summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-04-12 00:51:03 +0000
committerAnders Carlsson <andersca@mac.com>2010-04-12 00:51:03 +0000
commit1c0f8bb4ce83d225ec40666ce6bfcb844f8a2c12 (patch)
treeeb526c63366651862dde5552d25aa8faacee1d85 /clang/lib/Sema
parentc0f1efaf8d50d235545ab2ce1a525cc3902212af (diff)
downloadbcm5719-llvm-1c0f8bb4ce83d225ec40666ce6bfcb844f8a2c12.tar.gz
bcm5719-llvm-1c0f8bb4ce83d225ec40666ce6bfcb844f8a2c12.zip
Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.
llvm-svn: 101004
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index d68351cc387..0b26e9be3aa 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -1337,6 +1337,7 @@ Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo,
ExprTemporaries.end());
return new (Context) CXXBaseOrMemberInitializer(Context, BaseTInfo,
+ /*IsVirtual=*/false,
LParenLoc,
BaseInit.takeAs<Expr>(),
RParenLoc);
@@ -1417,12 +1418,14 @@ Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo,
= Owned(new (Context) ParenListExpr(Context, LParenLoc, Args, NumArgs,
RParenLoc));
return new (Context) CXXBaseOrMemberInitializer(Context, BaseTInfo,
+ BaseSpec->isVirtual(),
LParenLoc,
Init.takeAs<Expr>(),
RParenLoc);
}
return new (Context) CXXBaseOrMemberInitializer(Context, BaseTInfo,
+ BaseSpec->isVirtual(),
LParenLoc,
BaseInit.takeAs<Expr>(),
RParenLoc);
@@ -1494,6 +1497,7 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor,
new (Context) CXXBaseOrMemberInitializer(Context,
Context.getTrivialTypeSourceInfo(VBase->getType(),
SourceLocation()),
+ /*IsVirtual=*/true,
SourceLocation(),
BaseInit.takeAs<Expr>(),
SourceLocation());
@@ -1528,6 +1532,7 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor,
new (Context) CXXBaseOrMemberInitializer(Context,
Context.getTrivialTypeSourceInfo(Base->getType(),
SourceLocation()),
+ /*IsVirtual=*/false,
SourceLocation(),
BaseInit.takeAs<Expr>(),
SourceLocation());
OpenPOWER on IntegriCloud