summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCast.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-07-16 08:05:07 +0000
committerDaniel Jasper <djasper@google.com>2012-07-16 08:05:07 +0000
commit3e1a9cf3b8bcde98c8f12b279251c4efaa885fa2 (patch)
tree83a21fd2c28cf18c881004b8a6513c7f6b1ab508 /clang/lib/Sema/SemaCast.cpp
parentf5fe556c708de48f833ac24048b15981f47811ca (diff)
downloadbcm5719-llvm-3e1a9cf3b8bcde98c8f12b279251c4efaa885fa2.tar.gz
bcm5719-llvm-3e1a9cf3b8bcde98c8f12b279251c4efaa885fa2.zip
Add correct parenthesis range to CXXConstructExprs inside
CXXFunctionalCastExprs. llvm-svn: 160252
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCast.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index b4bbe321253..819975143dc 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/lib/Sema/SemaCast.cpp
@@ -2102,6 +2102,9 @@ ExprResult Sema::BuildCXXFunctionalCastExpr(TypeSourceInfo *CastTypeInfo,
Op.CheckCXXCStyleCast(/*FunctionalStyle=*/true, /*ListInit=*/false);
if (Op.SrcExpr.isInvalid())
return ExprError();
+
+ if (CXXConstructExpr *ConstructExpr = dyn_cast<CXXConstructExpr>(Op.SrcExpr.get()))
+ ConstructExpr->setParenRange(SourceRange(LPLoc, RPLoc));
return Op.complete(CXXFunctionalCastExpr::Create(Context, Op.ResultType,
Op.ValueKind, CastTypeInfo, Op.DestRange.getBegin(),
OpenPOWER on IntegriCloud