diff options
author | John McCall <rjmccall@apple.com> | 2011-01-27 09:37:56 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-01-27 09:37:56 +0000 |
commit | 6ec278d1a354517e20f13a877481453ee7940c78 (patch) | |
tree | fad4d032592f9dbebc24c2fb8de1aed6149b950e /lib/Serialization/ASTReaderStmt.cpp | |
parent | d0370f59e79702ac908c81bf556519f91e9ca297 (diff) |
Do a proper recursive lookup when deciding whether a class's usual
deallocation function has a two-argument form. Store the result of this
check in new[] and delete[] nodes.
Fixes rdar://problem/8913519
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderStmt.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp index 5fec238ab8..79b68e63a8 100644 --- a/lib/Serialization/ASTReaderStmt.cpp +++ b/lib/Serialization/ASTReaderStmt.cpp @@ -1106,8 +1106,9 @@ void ASTStmtReader::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { void ASTStmtReader::VisitCXXNewExpr(CXXNewExpr *E) { VisitExpr(E); - E->setGlobalNew(Record[Idx++]); - E->setHasInitializer(Record[Idx++]); + E->GlobalNew = Record[Idx++]; + E->Initializer = Record[Idx++]; + E->UsualArrayDeleteWantsSize = Record[Idx++]; bool isArray = Record[Idx++]; unsigned NumPlacementArgs = Record[Idx++]; unsigned NumCtorArgs = Record[Idx++]; @@ -1140,6 +1141,7 @@ void ASTStmtReader::VisitCXXDeleteExpr(CXXDeleteExpr *E) { E->GlobalDelete = Record[Idx++]; E->ArrayForm = Record[Idx++]; E->ArrayFormAsWritten = Record[Idx++]; + E->UsualArrayDeleteWantsSize = Record[Idx++]; E->OperatorDelete = cast_or_null<FunctionDecl>(Reader.GetDecl(Record[Idx++])); E->Argument = Reader.ReadSubExpr(); E->Loc = ReadSourceLocation(Record, Idx); |