summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-20 16:12:14 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-20 16:12:14 +0000
commitcaf4826e2edd31da89e7c0f1bd1b5f557918d850 (patch)
tree0c6b327588acf4775fdc76ae4b9096216f33efbc /clang/lib/Serialization/ASTReaderStmt.cpp
parent7adb1895384553144aa54d37ad1ed9166ece7644 (diff)
downloadbcm5719-llvm-caf4826e2edd31da89e7c0f1bd1b5f557918d850.tar.gz
bcm5719-llvm-caf4826e2edd31da89e7c0f1bd1b5f557918d850.zip
Deserialize the direct-initialization range of a "new" expression
properly. Previously, we deserialized it but failed to set the corresponding member in CXXNewExpr. Fixes <rdar://problem/10893600>. llvm-svn: 150963
Diffstat (limited to 'clang/lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderStmt.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 8b85976bf42..77e45416694 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -1174,14 +1174,9 @@ void ASTStmtReader::VisitCXXNewExpr(CXXNewExpr *E) {
E->setOperatorNew(ReadDeclAs<FunctionDecl>(Record, Idx));
E->setOperatorDelete(ReadDeclAs<FunctionDecl>(Record, Idx));
E->AllocatedTypeInfo = GetTypeSourceInfo(Record, Idx);
- SourceRange TypeIdParens;
- TypeIdParens.setBegin(ReadSourceLocation(Record, Idx));
- TypeIdParens.setEnd(ReadSourceLocation(Record, Idx));
- E->TypeIdParens = TypeIdParens;
+ E->TypeIdParens = ReadSourceRange(Record, Idx);
E->StartLoc = ReadSourceLocation(Record, Idx);
- SourceRange DirectInitRange;
- DirectInitRange.setBegin(ReadSourceLocation(Record, Idx));
- DirectInitRange.setEnd(ReadSourceLocation(Record, Idx));
+ E->DirectInitRange = ReadSourceRange(Record, Idx);
E->AllocateArgsArray(Reader.getContext(), isArray, NumPlacementArgs,
E->StoredInitializationStyle != 0);
OpenPOWER on IntegriCloud