================
@@ -14127,6 +14093,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
return;
}
+ // handleAliasAttr() runs before the initializer is attached to the VarDecl,
+ // so it cannot determine that an extern declaration with an initializer is a
+ // definition. Diagnose the conflict now that an initializer is present and
----------------
AaronBallman wrote:
I think for this case it would make sense on redeclaration merging. CC
@erichkeane in case he has better ideas because this is starting to spread the
checking out an awful lot.
`Sema::FinalizeDeclaration()` is another place to consider, but I suspect it
may be similar to adding the logic to `AddInitializerToDecl()`...
https://github.com/llvm/llvm-project/pull/223124
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits