summaryrefslogtreecommitdiff
path: root/test/CodeGen/safestack-attr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-21 14:00:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-21 14:00:56 +0000
commit2e645aa5697838f16ec570eb07c2bee7e13d0e0b (patch)
treea764184c2fc9486979b074250b013a0937ee64e5 /test/CodeGen/safestack-attr.cpp
parent798321d8eb5630cd4a8f490a4f25e32ef195fb07 (diff)
Notes
Diffstat (limited to 'test/CodeGen/safestack-attr.cpp')
-rw-r--r--test/CodeGen/safestack-attr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/safestack-attr.cpp b/test/CodeGen/safestack-attr.cpp
new file mode 100644
index 000000000000..9d1ed0d2e493
--- /dev/null
+++ b/test/CodeGen/safestack-attr.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple x86_64-linux-unknown -emit-llvm -o - %s -fsanitize=safe-stack | FileCheck -check-prefix=SP %s
+
+__attribute__((no_sanitize("safe-stack")))
+int foo(int *a) { return *a; }
+
+// SP-NOT: attributes #{{.*}} = { {{.*}}safestack{{.*}} }