[clang] [Clang] Avoid assertion failure for initialized extern aliases (PR #223124)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 20 09:21:30 PDT 2026
================
@@ -7191,7 +7180,7 @@ static void checkAliasAttr(Sema &S, NamedDecl &ND) {
if (VD->hasInit()) {
if (const auto *Attr = VD->getAttr<AliasAttr>()) {
assert(VD->isThisDeclarationADefinition() &&
- !VD->isExternallyVisible() && "Broken AliasAttr handled late!");
+ "Broken AliasAttr handled late!");
----------------
keepyixiao wrote:
Thanks for the suggestion. I agree that the assertion should remain as an invariant. I've updated the patch to diagnose this case earlier.
https://github.com/llvm/llvm-project/pull/223124
More information about the cfe-commits
mailing list