diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-12 22:41:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-12 22:41:29 +0000 |
commit | 1d5d0b9df6d2a3df338bc3e63000536406e7666c (patch) | |
tree | 7986c81096111348632c4f5df0cecaae315322c8 /lib/Serialization/ASTWriterStmt.cpp | |
parent | 9370c8f4af43a98a6f16e65f5d88d58db846e374 (diff) |
Add the location of the right parenthesis of a C++ named cast
(static_cast, dynamic_cast, reinterpret_cast, or const_cast) to
improve source-location information. Fixes PR8960.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterStmt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index af066bb425..c41cc1a751 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -984,7 +984,8 @@ void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) { void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) { VisitExplicitCastExpr(E); - Writer.AddSourceLocation(E->getOperatorLoc(), Record); + Writer.AddSourceRange(SourceRange(E->getOperatorLoc(), E->getRParenLoc()), + Record); } void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) { |