diff options
author | Daniel Jasper <djasper@google.com> | 2012-07-16 08:05:07 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2012-07-16 08:05:07 +0000 |
commit | a770a4daf77037b5526dba1c447d61acf0aba01a (patch) | |
tree | 1312d135f91d8d6b167a2cd171aa5b7bc4961ba4 /lib/Sema/SemaCast.cpp | |
parent | 32bb534cef14aaf54a760919dc1131b5f24427a6 (diff) |
Add correct parenthesis range to CXXConstructExprs inside
CXXFunctionalCastExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCast.cpp')
-rw-r--r-- | lib/Sema/SemaCast.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp index b4bbe32125..819975143d 100644 --- a/lib/Sema/SemaCast.cpp +++ b/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(), |