[clang] [Sema] Keep attribute lists in the order the attributes were parsed (PR #162714)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 14:02:41 PDT 2025
================
@@ -20,7 +20,7 @@ struct __attribute__((internal_linkage)) S { // expected-warning{{'internal_link
__attribute__((internal_linkage("foo"))) int g(void) {} // expected-error{{'internal_linkage' attribute takes no arguments}}
int var6 [[clang::internal_linkage]];
-int var7 [[clang::internal_linkage]] __attribute__((common)); // expected-error{{'clang::internal_linkage' and 'common' attributes are not compatible}} \
+int var7 [[clang::internal_linkage]] __attribute__((common)); // expected-error{{'common' and 'clang::internal_linkage' attributes are not compatible}} \
----------------
compnerd wrote:
Yeah, I think that the rephrasing of the warning would absolutely help!
https://github.com/llvm/llvm-project/pull/162714
More information about the cfe-commits
mailing list