[clang] [Clang] Handle consteval expression in array bounds expressions (PR #66222)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 20:00:33 PDT 2023


================
@@ -9843,30 +9833,44 @@ class Sema final {
   /// diagnostics that will be suppressed.
   std::optional<sema::TemplateDeductionInfo *> isSFINAEContext() const;
 
-  /// Determines whether we are currently in a context that
-  /// is not evaluated as per C++ [expr] p5.
-  bool isUnevaluatedContext() const {
+  /// Whether the AST is currently being rebuilt to correct immediate
+  /// invocations. Immediate invocation candidates and references to consteval
+  /// functions aren't tracked when this is set.
+  bool RebuildingImmediateInvocation = false;
+
+  /// Used to change context to isConstantEvaluated without pushing a heavy
+  /// ExpressionEvaluationContextRecord object.
+  bool isConstantEvaluatedOverride;
----------------
shafik wrote:

Is there no good default value?

https://github.com/llvm/llvm-project/pull/66222


More information about the cfe-commits mailing list