is not also a typedef-name" actually means. For anyone keeping score,
that's John: 2, Doug: 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93196
91177308-0d34-0410-b5e6-
96231b3b80d8
// };
//
// since that was the intent of DR56.
- if (isa<ElaboratedType>(New->getUnderlyingType()))
+ if (!isa<TypedefDecl >(Old))
return;
Diag(New->getLocation(), diag::err_redefinition)
struct S {
typedef struct A {} A; // expected-note {{previous definition is here}}
- typedef struct B {} B;
+ typedef struct B B;
typedef A A; // expected-error {{redefinition of 'A'}}
- struct C { }; // expected-note{{previous definition is here}}
+ struct C { };
typedef struct C OtherC;
- typedef OtherC C; // expected-error{{redefinition of 'C'}}
+ typedef OtherC C;
+
+ typedef struct D { } D2;
+ typedef D2 D;
};