summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-05-09 21:46:33 +0000
committerDouglas Gregor <dgregor@apple.com>2011-05-09 21:46:33 +0000
commit5d1d9e381e6b1744dc55b047f7c83f078069d2dd (patch)
tree0a0c4b021f1b12c7e318d6b8bc4d153a777da345 /clang/lib/Sema/SemaDecl.cpp
parent88c75c311fc80fb12d7226e93da5db6db1e78b7a (diff)
downloadbcm5719-llvm-5d1d9e381e6b1744dc55b047f7c83f078069d2dd.tar.gz
bcm5719-llvm-5d1d9e381e6b1744dc55b047f7c83f078069d2dd.zip
Extend the tag-ambiguity hack I committed in r130810 for tag
definitions to also include tag declarations. Fixes PR8151. llvm-svn: 131102
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 71bea3c92d2..cd6dc9227ee 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud