[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)
Sam Tebbs via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 15 06:44:33 PST 2024
================
@@ -0,0 +1,12 @@
+// RUN: %clang --target=aarch64-none-linux-gnu -march=armv9-a+sme -O3 -S -Xclang -verify %s
+
+// Conflicting attributes when using always_inline
+__attribute__((always_inline)) __arm_locally_streaming
+int inlined_fn_local(void) {
+ return 42;
+}
----------------
SamTebbs33 wrote:
They actually don't have to return an int. I'll change them to be void.
The tests do unfortunately have to be in their own files as each error will stop the compiler from proceeding so we won't see the other errors being tested.
The other tests can be combined since those errors are emitted earlier in the pipeline but I don't think that's possible here. Much like how only one error is emitted for this example:
````
__attribute__ ((always_inline, target("+sme2")))
int bar(void) { return 42; }
int foo(void) { return bar(); }
int foo2(void) { return bar(); }
https://github.com/llvm/llvm-project/pull/77936
More information about the cfe-commits
mailing list