summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-12 22:41:29 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-12 22:41:29 +0000
commit4478f858b5fd086e6f1d4ab9f5990d99efdee94e (patch)
treed3462842d0b51f0470673a1e4fd6d4179b612078 /clang/lib/Serialization/ASTWriterStmt.cpp
parent1a3534afc4dcab48fe937a0c1aed63da6a492503 (diff)
downloadbcm5719-llvm-4478f858b5fd086e6f1d4ab9f5990d99efdee94e.tar.gz
bcm5719-llvm-4478f858b5fd086e6f1d4ab9f5990d99efdee94e.zip
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. llvm-svn: 123336
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index af066bb4257..c41cc1a7517 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud