Implement C++ [temp.local]p4, which specifies how we eliminate
name-lookup ambiguities when there are multiple base classes that are
all specializations of the same class template. This is part of a
general cleanup for ambiguities in template-name lookup. Fixes
PR6717.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101065 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Lookup.h b/lib/Sema/Lookup.h
index 73559a2..97bc4f2 100644
--- a/lib/Sema/Lookup.h
+++ b/lib/Sema/Lookup.h
@@ -343,6 +343,11 @@
} else {
ResultKind = Found;
resolveKind();
+
+ if (Paths && (ResultKind != Ambiguous)) {
+ deletePaths(Paths);
+ Paths = 0;
+ }
}
}