[clang] [Clang] Improve diagnostics to show the correct position for `[[maybe_unused]]` before a using-alias (PR #223910)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 19:16:11 PDT 2026


================
@@ -740,7 +749,7 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration(
       return nullptr;
     }
 
-    ProhibitAttributes(PrefixAttrs);
+    ProhibitAttributes(PrefixAttrs, Tok.getLocation());
----------------
shafik wrote:

It looks like we don't use this argument in most other places in `ParseDeclCXX.cpp`, should we or will this not work for the other cases?

https://github.com/llvm/llvm-project/pull/223910


More information about the cfe-commits mailing list