summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/aarch64-tme-errors.c8
-rw-r--r--clang/test/Sema/aarch64-tme-tcancel-errors.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Sema/aarch64-tme-errors.c b/clang/test/Sema/aarch64-tme-errors.c
new file mode 100644
index 00000000000..0e9c2a6beec
--- /dev/null
+++ b/clang/test/Sema/aarch64-tme-errors.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple aarch64-eabi -verify %s
+
+#include "arm_acle.h"
+
+void test_no_tme_funcs() {
+ __tstart(); // expected-warning{{implicit declaration of function '__tstart'}}
+ __builtin_tstart(); // expected-error{{use of unknown builtin '__builtin_tstart'}}
+}
diff --git a/clang/test/Sema/aarch64-tme-tcancel-errors.c b/clang/test/Sema/aarch64-tme-tcancel-errors.c
new file mode 100644
index 00000000000..bd5b7170a99
--- /dev/null
+++ b/clang/test/Sema/aarch64-tme-tcancel-errors.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple aarch64-eabi -target-feature +tme -verify %s
+void t_cancel_const(unsigned short u) {
+ __builtin_arm_tcancel(u); // expected-error{{argument to '__builtin_arm_tcancel' must be a constant integer}}
+}
+
+// RUN: %clang_cc1 -triple aarch64-eabi -target-feature +tme -verify %s
+void t_cancel_range() {
+ __builtin_arm_tcancel(0x12345u); // expected-error{{argument value 74565 is outside the valid range [0, 65535]}}
+}
OpenPOWER on IntegriCloud