aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/target-features-no-error.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/target-features-no-error.c')
-rw-r--r--test/CodeGen/target-features-no-error.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/target-features-no-error.c b/test/CodeGen/target-features-no-error.c
new file mode 100644
index 000000000000..b6283b65ec5a
--- /dev/null
+++ b/test/CodeGen/target-features-no-error.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -emit-llvm -o - -target-feature -sse2
+
+// Verify that negative features don't cause additional requirements on the inline function.
+int __attribute__((target("sse"), always_inline)) foo(int a) {
+ return a + 4;
+}
+int bar() {
+ return foo(4); // expected-no-diagnostics
+}