aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/builtins-aarch64.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/builtins-aarch64.c')
-rw-r--r--test/Sema/builtins-aarch64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/builtins-aarch64.c b/test/Sema/builtins-aarch64.c
new file mode 100644
index 0000000000..03e03343eb
--- /dev/null
+++ b/test/Sema/builtins-aarch64.c
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s
+
+void test_clear_cache_chars(char *start, char *end) {
+ __clear_cache(start, end);
+}
+
+void test_clear_cache_voids(void *start, void *end) {
+ __clear_cache(start, end);
+}
+
+void test_clear_cache_no_args() {
+ // AArch32 version of this is variadic (at least syntactically).
+ // However, on AArch64 GCC does not permit this call and the
+ // implementation I've seen would go disastrously wrong.
+ __clear_cache(); // expected-error {{too few arguments to function call}}
+}