[PATCH] D136554: Implement CWG2631

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 08:26:30 PST 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM!



================
Comment at: clang/include/clang/Sema/Sema.h:9654-9655
+        return true;
+      if (Ctx.isConstantEvaluated() || Ctx.isImmediateFunctionContext() ||
+          Ctx.isUnevaluated())
+        return false;
----------------
cor3ntin wrote:
> cor3ntin wrote:
> > aaron.ballman wrote:
> > > We repeat this pattern four times in this patch; perhaps we should make a helper function for this predicate? Not certain of the best name for it, but removing the duplication might not be a bad idea.
> > `isNotPotentiallyEvaluatedContext`? Something like that
> Actually, Maybe we should leave it as is in this patch, 
> and clean it up as part of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2564r0.html
> IE, I'm not sure i can come up with a completely correct name now.
That's fine by me; naming is hard.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136554/new/

https://reviews.llvm.org/D136554



More information about the cfe-commits mailing list