Improve diagnostics for ambiguous name lookup results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62287 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInherit.h b/lib/Sema/SemaInherit.h
index db7bfb8..87a4a66 100644
--- a/lib/Sema/SemaInherit.h
+++ b/lib/Sema/SemaInherit.h
@@ -92,6 +92,9 @@
   /// refer to the same base class subobject of type A (the virtual
   /// one), there is no ambiguity.
   class BasePaths {
+    /// Origin - The type from which this search originated.
+    QualType Origin;
+
     /// Paths - The actual set of paths that can be taken from the
     /// derived class to the same base class.
     std::list<BasePath> Paths;
@@ -168,6 +171,11 @@
       return DetectedVirtual;
     }
 
+    /// @brief Retrieve the type from which this base-paths search
+    /// began
+    QualType getOrigin() const { return Origin; }
+    void setOrigin(QualType Type) { Origin = Type; }
+
     void clear();
 
     void swap(BasePaths &Other);