[clang] [Clang] Instantiate constexpr function when they are needed. (PR #173537)

via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 25 11:49:24 PST 2025


================
@@ -168,6 +168,8 @@ class State {
   /// is set; this is used when evaluating ICEs in C.
   bool CheckingForUndefinedBehavior = false;
 
+  bool TryConstantInitialization = false;
----------------
Sirraide wrote:

A comment explaining what this is for would be nice. Also, if this keeps track of whether we’re performing trial evaluation, then I’d prefer a name along the lines of `PerformingTrialEvaluation`, because as-is that’s not clear to me (or rather, it only is because you mentioned that we needed to keep track of this the other day)

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


More information about the cfe-commits mailing list