diff options
-rw-r--r-- | include/clang/Basic/DiagnosticKinds.def | 2 | ||||
-rw-r--r-- | test/Sema/declspec.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def index 494eb59ddd..e8e6fa097e 100644 --- a/include/clang/Basic/DiagnosticKinds.def +++ b/include/clang/Basic/DiagnosticKinds.def @@ -667,7 +667,7 @@ DIAG(warn_typecheck_function_qualifiers, WARNING, DIAG(err_typecheck_invalid_restrict_not_pointer, ERROR, "restrict requires a pointer or reference ('%0' is invalid)") DIAG(err_typecheck_invalid_restrict_invalid_pointee, ERROR, - "restrict pointee must be an object or incomplete type ('%0' is invalid)") + "pointer to function type ('%0') may not be 'restrict' qualified") DIAG(ext_typecheck_zero_array_size, EXTENSION, "zero size arrays are an extension") DIAG(err_at_least_one_initializer_needed_to_size_array, ERROR, diff --git a/test/Sema/declspec.c b/test/Sema/declspec.c index 36e54b25a7..1e84d6523e 100644 --- a/test/Sema/declspec.c +++ b/test/Sema/declspec.c @@ -18,6 +18,6 @@ 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)}} +__restrict__ fptr v3; // expected-error {{pointer to function type ('f') may not be 'restrict' qualified}} +f *__restrict__ v4; // expected-error {{pointer to function type ('f') may not be 'restrict' qualified}} |