summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/declspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/declspec.c')
-rw-r--r--clang/test/Sema/declspec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Sema/declspec.c b/clang/test/Sema/declspec.c
index e262b343cbb..36e54b25a71 100644
--- a/clang/test/Sema/declspec.c
+++ b/clang/test/Sema/declspec.c
@@ -13,4 +13,11 @@ static void buggy(int *x) { } // expected-error {{function definition declared '
// expected-error {{cannot combine with previous 'typedef' declaration specifier}} \
// expected-error {{cannot combine with previous 'struct' declaration specifier}}
+// Type qualifiers.
+typedef int f(void);
+typedef f* fptr;
+const f* v1; // expected-warning {{qualifier on function type 'f' has unspecified behavior}}
+__restrict__ f* v2; // expected-error {{restrict requires a pointer or reference ('f' is invalid)}}
+__restrict__ fptr v3; // expected-error {{estrict pointee must be an object or incomplete type ('f' is invalid)}}
+f *__restrict__ v4; // expected-error {{restrict pointee must be an object or incomplete type ('f' is invalid)}}
OpenPOWER on IntegriCloud