diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-22 22:02:53 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-22 22:02:53 +0000 |
commit | f799ae1afb897151a84a7170951e367d8307ae04 (patch) | |
tree | 187fe0c1e758ebcd925bf31ea58a73ff3e8e1d18 /lib/Sema/SemaCast.cpp | |
parent | 5bb033ba5de8f00cea93b061427de92569b45d2d (diff) |
objective-C arg: provide fixit support when
c++'s named cast need be replaced for bridge casting.
// rdar://12788838
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCast.cpp')
-rw-r--r-- | lib/Sema/SemaCast.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp index e6dc0bd8bc..3f46cd457a 100644 --- a/lib/Sema/SemaCast.cpp +++ b/lib/Sema/SemaCast.cpp @@ -258,7 +258,8 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, } return Op.complete(CXXConstCastExpr::Create(Context, Op.ResultType, Op.ValueKind, Op.SrcExpr.take(), DestTInfo, - OpLoc, Parens.getEnd())); + OpLoc, Parens.getEnd(), + AngleBrackets)); case tok::kw_dynamic_cast: { if (!TypeDependent) { @@ -269,7 +270,8 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, return Op.complete(CXXDynamicCastExpr::Create(Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.take(), &Op.BasePath, DestTInfo, - OpLoc, Parens.getEnd())); + OpLoc, Parens.getEnd(), + AngleBrackets)); } case tok::kw_reinterpret_cast: { if (!TypeDependent) { @@ -280,7 +282,8 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, return Op.complete(CXXReinterpretCastExpr::Create(Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.take(), 0, DestTInfo, OpLoc, - Parens.getEnd())); + Parens.getEnd(), + AngleBrackets)); } case tok::kw_static_cast: { if (!TypeDependent) { @@ -292,7 +295,8 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, return Op.complete(CXXStaticCastExpr::Create(Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.take(), &Op.BasePath, DestTInfo, - OpLoc, Parens.getEnd())); + OpLoc, Parens.getEnd(), + AngleBrackets)); } } } |