diff options
| author | John McCall <rjmccall@apple.com> | 2010-08-28 20:17:00 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-08-28 20:17:00 +0000 |
| commit | 67d22fb57ecccd29ea9c8ec004f63dc356cd477d (patch) | |
| tree | 1da82a9d5b3e5aa29ec214d08608f708a8e2c0a8 /include | |
| parent | 91c83e76d8ad42d1fd8e249b72a36d552997f77c (diff) | |
| download | clang-67d22fb57ecccd29ea9c8ec004f63dc356cd477d.tar.gz clang-67d22fb57ecccd29ea9c8ec004f63dc356cd477d.tar.bz2 clang-67d22fb57ecccd29ea9c8ec004f63dc356cd477d.tar.xz | |
If filtering a lookup result leaves it ambiguous, keep the ambiguity
kind. Fixes PR7252.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/clang/Sema/Lookup.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h index c9b090ae22..1c7720abb1 100644 --- a/include/clang/Sema/Lookup.h +++ b/include/clang/Sema/Lookup.h @@ -366,10 +366,15 @@ public: if (ResultKind != NotFoundInCurrentInstantiation) ResultKind = NotFound; } else { + AmbiguityKind SavedAK = Ambiguity; ResultKind = Found; resolveKind(); - - if (Paths && (ResultKind != Ambiguous)) { + + // If we didn't make the lookup unambiguous, restore the old + // ambiguity kind. + if (ResultKind == Ambiguous) { + Ambiguity = SavedAK; + } else if (Paths) { deletePaths(Paths); Paths = 0; } |
