summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/warn-type-safety.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Sema/warn-type-safety.c b/clang/test/Sema/warn-type-safety.c
index dfab8f8c818..04313865a8b 100644
--- a/clang/test/Sema/warn-type-safety.c
+++ b/clang/test/Sema/warn-type-safety.c
@@ -57,6 +57,8 @@ extern struct A datatype_wrong6
__attribute__(( type_tag_for_datatype(mpi,int,layout_compatible,not_a_flag) )); // expected-error {{invalid comparison flag 'not_a_flag'}}
+void datatype_wrong7(void) __attribute__((type_tag_for_datatype(datatype_wrong7, int))); // expected-error {{'type_tag_for_datatype' attribute only applies to variables}}
+
// Using a tag with kind A in a place where the function requires kind B should
// warn.
@@ -156,5 +158,3 @@ void test_64bit_magic(int *int_ptr, float *float_ptr)
F_func(float_ptr, 0xFFFFFFFFFFFFFFFFULL); // expected-warning {{argument type 'float *' doesn't match specified 'f' type tag that requires 'int *'}}
F_func(float_ptr, 0xFFFFFFFFULL);
}
-
-
OpenPOWER on IntegriCloud