[cfe-commits] r88668 - in /cfe/trunk/lib/Sema: SemaDeclCXX.cpp TreeTransform.h
Douglas Gregor
dgregor at apple.com
Fri Nov 13 10:34:26 PST 2009
Author: dgregor
Date: Fri Nov 13 12:34:26 2009
New Revision: 88668
URL: http://llvm.org/viewvc/llvm-project?rev=88668&view=rev
Log:
When transforming an expression statement (e.g., for template
instantiation), be sure to finish the expression statement by
providing a FullExprArg, making sure that temporaries get
destroyed. Fixes an obscure failure when parsing
llvm/LinkAllPasses.h.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/TreeTransform.h
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=88668&r1=88667&r2=88668&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri Nov 13 12:34:26 2009
@@ -1348,7 +1348,7 @@
if (const RecordType *FieldClassType =
Field->getType()->getAs<RecordType>()) {
CXXRecordDecl *FieldClassDecl
- = cast<CXXRecordDecl>(FieldClassType->getDecl());
+ = cast<CXXRecordDecl>(FieldClassType->getDecl());
for (RecordDecl::field_iterator FA = FieldClassDecl->field_begin(),
EA = FieldClassDecl->field_end(); FA != EA; FA++) {
if (CXXBaseOrMemberInitializer *Value = AllBaseFields.lookup(*FA)) {
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=88668&r1=88667&r2=88668&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Fri Nov 13 12:34:26 2009
@@ -1709,7 +1709,7 @@
if (E.isInvalid())
return getSema().StmtError();
- return getSema().Owned(E.takeAs<Stmt>());
+ return getSema().ActOnExprStmt(getSema().FullExpr(E));
}
}
More information about the cfe-commits
mailing list