aboutsummaryrefslogtreecommitdiff
path: root/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
commit83bc276de6cc2c0b8e2fa535048cd8edad1c94b1 (patch)
tree524add337aa07a4ad78fa19ae3876b70a9532943 /lib/Serialization/ASTReaderStmt.cpp
parent1367c9b0ff3f657d2f2d471365a69e8f6d2ccbd0 (diff)
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r--lib/Serialization/ASTReaderStmt.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp
index 8b85976bf4..77e4541669 100644
--- a/lib/Serialization/ASTReaderStmt.cpp
+++ b/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);