================
@@ -14122,7 +14122,10 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
// C99 6.7.8p4: All the expressions in an initializer for an object that
has
// static storage duration shall be constant expressions or string
literals.
} else if (VDecl->getStorageClass() == SC_Static) {
- CheckForConstantInitializer(Init);
+ // Avoid evaluating the initializer twice for constexpr variables. It
will
+ // be evaluated later.
----------------
shafik wrote:
Does it make sense to point out where it will be done later?
https://github.com/llvm/llvm-project/pull/175927
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits