summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-deprecated.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/attr-deprecated.c')
-rw-r--r--clang/test/Sema/attr-deprecated.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-deprecated.c b/clang/test/Sema/attr-deprecated.c
index 2e3e722942a..8566a0e9436 100644
--- a/clang/test/Sema/attr-deprecated.c
+++ b/clang/test/Sema/attr-deprecated.c
@@ -122,5 +122,10 @@ struct test22 {
};
typedef int test23_ty __attribute((deprecated));
+// Redefining a typedef is a C11 feature.
+#if __STDC_VERSION__ <= 199901L
+// expected-note@-3 {{'test23_ty' has been explicitly marked deprecated here}}
+#else
typedef int test23_ty; // expected-note {{'test23_ty' has been explicitly marked deprecated here}}
+#endif
test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}}
OpenPOWER on IntegriCloud