Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/72...@github.com>


================
@@ -332,6 +332,22 @@ bool CheckInitialized(InterpState &S, CodePtr OpPC, const 
Pointer &Ptr,
   return false;
 }
 
+bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
+  if (Ptr.isInitialized())
+    return true;
+
+  const VarDecl *VD = cast<VarDecl>(Ptr.getDeclDesc()->asValueDecl());
+  if ((S.getLangOpts().CPlusPlus && !VD->hasConstantInitialization() &&
----------------
AaronBallman wrote:

Shouldn't this also be used in C? https://godbolt.org/z/G6Yv1T9Wd

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

Reply via email to