summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-03 00:58:24 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-03 00:58:24 +0000
commit800538253d3fea8b7a102d6b5af86919c9b79c80 (patch)
treebc0ac4bd2d9b3c993f02fe87b9240ab04e159685 /clang/lib/Sema/SemaLookup.cpp
parent73570673de76e28a53813f21a1cd634aeb6deb5b (diff)
downloadbcm5719-llvm-800538253d3fea8b7a102d6b5af86919c9b79c80.tar.gz
bcm5719-llvm-800538253d3fea8b7a102d6b5af86919c9b79c80.zip
Stop stripping UnresolvedUsingDecls out of LookupResults that have other
results in them (which we were doing intentionally as a stopgap). Fix an DeclContext lookup-table ordering problem which was causing UsingDecls to show up incorrectly when looking for ordinary results. And oh hey Clang-Code-Syntax passes now. llvm-svn: 90367
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index f8cb5f037ec..1ddfef839fd 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -282,9 +282,6 @@ void LookupResult::resolveKind() {
// If it's not unique, pull something off the back (and
// continue at this index).
Decls[I] = Decls[--N];
- } else if (isa<UnresolvedUsingValueDecl>(D)) {
- // FIXME: support unresolved using value declarations
- Decls[I] = Decls[--N];
} else {
// Otherwise, do some decl type analysis and then continue.
@@ -318,13 +315,13 @@ void LookupResult::resolveKind() {
// wherever the object, function, or enumerator name is visible.
// But it's still an error if there are distinct tag types found,
// even if they're not visible. (ref?)
- if (HideTags && HasTag && !Ambiguous && !HasUnresolved &&
- (HasFunction || HasNonFunction))
+ if (HideTags && HasTag && !Ambiguous &&
+ (HasFunction || HasNonFunction || HasUnresolved))
Decls[UniqueTagIndex] = Decls[--N];
Decls.set_size(N);
- if (HasFunction && HasNonFunction)
+ if (HasNonFunction && (HasFunction || HasUnresolved))
Ambiguous = true;
if (Ambiguous)
OpenPOWER on IntegriCloud