diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-05-09 21:46:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-05-09 21:46:33 +0000 |
commit | 93b6bceb0f009942e8a9e97d8c5c316ad10338f2 (patch) | |
tree | b28d6bc1efdf069994bc4d452afc9cad8eba18eb /lib/Sema/SemaDecl.cpp | |
parent | 37b8c9ee7cf2b4d5ce3ccd3be1fcadd18a783a57 (diff) |
Extend the tag-ambiguity hack I committed in r130810 for tag
definitions to also include tag declarations. Fixes PR8151.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 71bea3c92d..cd6dc9227e 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6763,7 +6763,8 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, // shouldn't be diagnosing. LookupName(Previous, S); - if (Previous.isAmbiguous() && TUK == TUK_Definition) { + if (Previous.isAmbiguous() && + (TUK == TUK_Definition || TUK == TUK_Declaration)) { LookupResult::Filter F = Previous.makeFilter(); while (F.hasNext()) { NamedDecl *ND = F.next(); @@ -6771,9 +6772,6 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, F.erase(); } F.done(); - - if (Previous.isAmbiguous()) - return 0; } // Note: there used to be some attempt at recovery here. |