================
@@ -1048,15 +1048,14 @@ class Analyzer {
     }
 
     void checkIndirectCall(CallExpr *Call, QualType CalleeType) {
-      auto *FPT =
-          CalleeType->getAs<FunctionProtoType>(); // Null if FunctionType.
       FunctionEffectKindSet CalleeEffects;
-      if (FPT)
-        CalleeEffects.insert(FPT->getFunctionEffects());
+      if (FunctionEffectsRef Effects = FunctionEffectsRef::get(CalleeType);
----------------
dougsonos wrote:

`FunctionEffectsRef::get()` knows how to pick through indirections 
(references/pointers) to get to a `FunctionProtoType` so just reuse that.

https://github.com/llvm/llvm-project/pull/111224
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to