The following exemplifies the problem:
__attribute__((__visibility__("default"))) [[nodiscard]] int f();
[[nodiscard]] __attribute__((__visibility__("default"))) int f();
While GCC accepts both, clang will refuse the first one.
This is currently "expected" behaviour: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Parse/Parser.h#L2774-L2778