[clang] [clang]: support std::meta::info for primitive types (PR #190356)

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 4 08:07:00 PDT 2026


================
@@ -6158,6 +6085,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D,
   if (getLangOpts().OpenCL && ASTTy->isSamplerT())
     return;
 
+  if (getLangOpts().Reflection && ASTTy->isMetaInfoType())
----------------
Sirraide wrote:

I also feel like it should be an assert.

Emitting a diagnostic here would also be an option, but that doesn’t help if the variable is referenced somewhere, because we’ll probably then just crash because we attempt to reference a variable that we didn’t actually emit...

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


More information about the cfe-commits mailing list