aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2010-11-22 10:30:56 +0000
committerNico Weber <nicolasweber@gmx.de>2010-11-22 10:30:56 +0000
commit253e80b019727451edb4cbcad71277fcbe05ff0e (patch)
treec950b375874ffce6589138db0d15f6ac024ca8e3 /lib/Parse/ParseExpr.cpp
parent59b173d81b05b7d10cec8b06b3fd843230ef628c (diff)
Fix the source range of CXXNewExprs. Fixes http://llvm.org/pr8661.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index c4d09f2816..0accc4bcd8 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -822,8 +822,8 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
const char *PrevSpec = 0;
unsigned DiagID;
- DS.SetTypeSpecType(TST_typename, Tok.getLocation(), PrevSpec, DiagID,
- Type);
+ DS.SetTypeSpecType(TST_typename, Tok.getAnnotationEndLoc(),
+ PrevSpec, DiagID, Type);
Declarator DeclaratorInfo(DS, Declarator::TypeNameContext);
TypeResult Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);