diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-07 21:49:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-07 21:49:58 +0000 |
commit | 1bb2a93ab7b1499dda6f6b58865bd0dce1864228 (patch) | |
tree | 839f3064983d5d820ecc01c0f0bfa5b4809522b6 /lib/Serialization/ASTWriterStmt.cpp | |
parent | 02b49bb23273f3488a47f8abadf0ec7a98429d1f (diff) |
Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index 7f2da6c225..b98b7e90a6 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -1091,6 +1091,7 @@ void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) { Writer.AddDeclRef(E->getOperatorNew(), Record); Writer.AddDeclRef(E->getOperatorDelete(), Record); Writer.AddDeclRef(E->getConstructor(), Record); + Writer.AddTypeSourceInfo(E->getAllocatedTypeSourceInfo(), Record); Writer.AddSourceRange(E->getTypeIdParens(), Record); Writer.AddSourceLocation(E->getStartLoc(), Record); Writer.AddSourceLocation(E->getEndLoc(), Record); |