summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-11 21:32:35 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-11 21:32:35 +0000
commit0547ad38e334146599521e455d0d6f83a117a60e (patch)
tree60bf881dbb022f4e021d7a3fea8c2ff27ea4fba8 /clang/lib/Sema/SemaExprCXX.cpp
parent12ebb47a07a82596841118af9d7ecb4b1b57b0b2 (diff)
downloadbcm5719-llvm-0547ad38e334146599521e455d0d6f83a117a60e.tar.gz
bcm5719-llvm-0547ad38e334146599521e455d0d6f83a117a60e.zip
Speculatively revert r103497, "Do not mark the virtual members of an
implicitly-instantiated class as ...", which seems to have broken bootstrap. llvm-svn: 103515
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index e3ca4355e65..67ad45d74b2 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -287,7 +287,7 @@ Sema::OwningExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
if (T->getAs<RecordType>() &&
RequireCompleteType(TypeidLoc, T, diag::err_incomplete_typeid))
return ExprError();
-
+
return Owned(new (Context) CXXTypeidExpr(TypeInfoType.withConst(),
Operand,
SourceRange(TypeidLoc, RParenLoc)));
@@ -314,10 +314,8 @@ Sema::OwningExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
// When typeid is applied to an expression other than an lvalue of a
// polymorphic class type [...] [the] expression is an unevaluated
// operand. [...]
- if (RecordD->isPolymorphic() && E->isLvalue(Context) == Expr::LV_Valid) {
+ if (RecordD->isPolymorphic() && E->isLvalue(Context) == Expr::LV_Valid)
isUnevaluatedOperand = false;
- MaybeMarkVirtualMembersReferenced(TypeidLoc, RecordD);
- }
}
// C++ [expr.typeid]p4:
@@ -447,14 +445,6 @@ bool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, Expr *&E) {
if (Res.isInvalid())
return true;
E = Res.takeAs<Expr>();
-
- if (const RecordType *RecordTy = Ty->getAs<RecordType>()) {
- // If we're throwing a polymorphic class, we need to make sure
- // there is a vtable.
- MaybeMarkVirtualMembersReferenced(ThrowLoc,
- cast<CXXRecordDecl>(RecordTy->getDecl()));
- }
-
return false;
}
OpenPOWER on IntegriCloud