aboutsummaryrefslogtreecommitdiff
path: root/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
commitfda8e12774921e3cac3ebcba1148bcf4479ddd7a (patch)
treeb2c929ce754e8ba92320062f034d9a3fefebef29 /lib/Sema/SemaLookup.cpp
parent74635d8cd3c367890735dc4af2c2825a7e4b434c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index f8cb5f037e..1ddfef839f 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/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)