[clang] Raise an error on namespace aliases with qualified names. (PR #86122)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 21 07:32:19 PDT 2024
================
@@ -140,6 +140,11 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context,
SkipUntil(tok::semi);
return nullptr;
}
+ if (!ExtraNSs.empty()) {
+ Diag(IdentLoc, diag::err_unexpected_qualified_namespace_alias);
----------------
Sirraide wrote:
If you want to, you could also consider adding a fix-it hint to remove the extra `::`+*nested-name-specifier*, but I doubt that this would be a common error (seeing as this bug has been in Clang for a long time w/o anyone noticing), so I don’t think it’s really that necessary here. Just the error would also be enough imo.
https://github.com/llvm/llvm-project/pull/86122
More information about the cfe-commits
mailing list