================
@@ -14919,7 +14919,7 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl 
*var) {
 
   // Apply section attributes and pragmas to global variables.
   if (GlobalStorage && var->isThisDeclarationADefinition() &&
-      !inTemplateInstantiation()) {
+      !var->getDeclContext()->isDependentContext()) {
----------------
shafik wrote:

To fill in some details, it is more consistent and it is cheaper since 
`isDependentContext()` looks at all the parent contexts recursively. 

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

Reply via email to