aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-04-21 19:52:01 +0000
committerAnders Carlsson <andersca@mac.com>2010-04-21 19:52:01 +0000
commit711f34adb886cce8ba86c7b1b6513a1eaaf63bb5 (patch)
tree2924029db55c4ce8e5e78220e02c7aca80c3c434 /lib/Sema/SemaInit.cpp
parent46c54fb8ec45765a475b7b709b9aee7f94c490c2 (diff)
Keep tack of whether a base in an InitializedEntity is an inherited virtual base or not. Use this in CheckConstructorAccess.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index fe7f79f9c5..a015dd7104 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -1921,11 +1921,15 @@ InitializedEntity::InitializedEntity(ASTContext &Context, unsigned Index,
}
InitializedEntity InitializedEntity::InitializeBase(ASTContext &Context,
- CXXBaseSpecifier *Base)
+ CXXBaseSpecifier *Base,
+ bool IsInheritedVirtualBase)
{
InitializedEntity Result;
Result.Kind = EK_Base;
- Result.Base = Base;
+ Result.Base = reinterpret_cast<uintptr_t>(Base);
+ if (IsInheritedVirtualBase)
+ Result.Base |= 0x01;
+
Result.Type = Base->getType();
return Result;
}