Not completely sure this is right, but it's clearly better than what
we did before this commit (effectively dropping the attribute).
<rdar://problem/
14413117>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186373
91177308-0d34-0410-b5e6-
96231b3b80d8
if (TypedefNameDecl *Typedef = dyn_cast<TypedefNameDecl>(Old))
New->setPreviousDeclaration(Typedef);
+ mergeDeclAttributes(New, Old);
+
if (getLangOpts().MicrosoftExt)
return;
foo_dep c, d __attribute((deprecated)); // expected-warning {{'foo_dep' is deprecated}}
__attribute((deprecated)) foo_dep e, f;
};
+
+typedef int test23_ty __attribute((deprecated)); // expected-note {{previous definition is here}}
+typedef int test23_ty; // expected-note {{'test23_ty' declared here}} expected-warning {{redefinition of typedef 'test23_ty' is a C11 feature}}
+test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}}