================
@@ -6846,6 +6846,10 @@ void Sema::InstantiateVariableDefinition(SourceLocation 
PointOfInstantiation,
                                        OldVar->getPointOfInstantiation());
     // Emit any deferred warnings for the variable's initializer
     AnalysisWarnings.issueWarningsForRegisteredVarDecl(Var);
+    // Variables named in '-mloadtime-comment-vars=' are normally processed in
+    // FinalizeDeclaration, which instantiated definitions do not reach.
+    if (!getLangOpts().LoadTimeCommentVars.empty() && !Var->isInvalidDecl())
----------------
AaronBallman wrote:

When the predicate is moved into the helper function in SemaDecl.cpp, it can be 
removed from here too.

https://github.com/llvm/llvm-project/pull/187986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to