[clang] [Sema] Don't call isNonConstantStorage on incomplete variable types (PR #161590)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 3 10:05:27 PDT 2025
================
@@ -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()) {
----------------
cor3ntin wrote:
Did you try `!type->isDependentType()` - we do that elsewhere
https://github.com/llvm/llvm-project/pull/161590
More information about the cfe-commits
mailing list