================
@@ -873,30 +873,17 @@ class Sema final : public SemaBase {
   /// Warn when implicitly casting 0 to nullptr.
   void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E);
 
-  // ----- function effects ---
+  /// All functions/lambdas/blocks which have bodies and which have a non-empty
+  /// FunctionEffectsRef to be verified.
+  SmallVector<const Decl *> DeclsWithEffectsToVerify;
+  /// The union of all effects present on DeclsWithEffectsToVerify. Conditions
+  /// are all null.
+  FunctionEffectSet AllEffectsToVerify;
----------------
Sirraide wrote:

This is used to make sure we don’t try to infer effects that aren’t used 
anywhere, right? I’m not sure we need this. I’d imagine that most programs will 
either have no effects at all or none of them, so checking whether we’ve ever 
seen any effect at all and skipping effect analysis entirely if we have should 
be enough. 

This is especially the case so long as we don’t have a lot of effects. It might 
make sense to introduce something like this later, but it feels a bit like 
premature optimisation to me to do this now.

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

Reply via email to