From 105ac0a067881495b1756f0e2557e71a61f1c122 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Tue, 21 Mar 2017 20:14:46 +0000 Subject: [PATCH] iFix Test deprecation behavior in C89 mode as a result of r298410 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298433 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/attr-deprecated.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/Sema/attr-deprecated.c b/test/Sema/attr-deprecated.c index d6f560f175..462f306db7 100644 --- a/test/Sema/attr-deprecated.c +++ b/test/Sema/attr-deprecated.c @@ -1,4 +1,6 @@ // RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -std=c99 -verify -fsyntax-only +// RUN: %clang_cc1 %s -std=c89 -verify -fsyntax-only int f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}} void g() __attribute__((deprecated));// expected-note {{'g' has been explicitly marked deprecated here}} @@ -121,11 +123,12 @@ struct test22 { __attribute((deprecated)) foo_dep e, f; }; -typedef int test23_ty __attribute((deprecated)); // expected-note {{'test23_ty' has been explicitly marked deprecated here}} +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 +// expected-note@-5 {{'test23_ty' has been explicitly marked deprecated here}} typedef int test23_ty; #endif test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}} -- 2.40.0