summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Sema/SemaInherit.cpp1
-rw-r--r--clang/lib/Sema/SemaInherit.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaInherit.cpp b/clang/lib/Sema/SemaInherit.cpp
index c572f62d611..cc495c5ea49 100644
--- a/clang/lib/Sema/SemaInherit.cpp
+++ b/clang/lib/Sema/SemaInherit.cpp
@@ -132,6 +132,7 @@ bool Sema::LookupInBases(CXXRecordDecl *Class,
// Add this base specifier to the current path.
BasePathElement Element;
Element.Base = &*BaseSpec;
+ Element.Class = Class;
if (BaseSpec->isVirtual())
Element.SubobjectNumber = 0;
else
diff --git a/clang/lib/Sema/SemaInherit.h b/clang/lib/Sema/SemaInherit.h
index 8d008a2ce61..6138685b264 100644
--- a/clang/lib/Sema/SemaInherit.h
+++ b/clang/lib/Sema/SemaInherit.h
@@ -39,6 +39,9 @@ namespace clang {
/// path element.
const CXXBaseSpecifier *Base;
+ /// Class - The record decl of the class that the base is a base of.
+ const CXXRecordDecl *Class;
+
/// SubobjectNumber - Identifies which base class subobject (of type
/// @c Base->getType()) this base path element refers to. This
/// value is only valid if @c !Base->isVirtual(), because there
OpenPOWER on IntegriCloud