mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-10 12:55:00 +00:00
C++0x [dcl.typedef]p4, take 3, where we actually figure out what "that
is not also a typedef-name" actually means. For anyone keeping score, that's John: 2, Doug: 0. llvm-svn: 93196
This commit is contained in:
parent
b53e826103
commit
d615026e8d
@ -832,7 +832,7 @@ void Sema::MergeTypeDefDecl(TypedefDecl *New, LookupResult &OldDecls) {
|
||||
// };
|
||||
//
|
||||
// since that was the intent of DR56.
|
||||
if (isa<ElaboratedType>(New->getUnderlyingType()))
|
||||
if (!isa<TypedefDecl >(Old))
|
||||
return;
|
||||
|
||||
Diag(New->getLocation(), diag::err_redefinition)
|
||||
|
@ -2,11 +2,14 @@
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user