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 | f073871f7fb53f206a38b815d4e80a4e41606e21 (patch) | |
tree | 63619b1a5a74a865e7e46ee41701899a7db9c140 /clang/lib/AST/ExprCXX.cpp | |
parent | 9b620f341a4810a1538706c73887f3cd913022ea (diff) | |
download | bcm5719-llvm-f073871f7fb53f206a38b815d4e80a4e41606e21.tar.gz bcm5719-llvm-f073871f7fb53f206a38b815d4e80a4e41606e21.zip |
objective-C arg: provide fixit support when
c++'s named cast need be replaced for bridge casting.
// rdar://12788838
llvm-svn: 175923
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
-rw-r--r-- | clang/lib/AST/ExprCXX.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp index 4b520e4fdf9..e1e96e4c5ce 100644 --- a/clang/lib/AST/ExprCXX.cpp +++ b/clang/lib/AST/ExprCXX.cpp @@ -526,13 +526,14 @@ CXXStaticCastExpr *CXXStaticCastExpr::Create(ASTContext &C, QualType T, const CXXCastPath *BasePath, TypeSourceInfo *WrittenTy, SourceLocation L, - SourceLocation RParenLoc) { + SourceLocation RParenLoc, + SourceRange AngleBrackets) { unsigned PathSize = (BasePath ? BasePath->size() : 0); void *Buffer = C.Allocate(sizeof(CXXStaticCastExpr) + PathSize * sizeof(CXXBaseSpecifier*)); CXXStaticCastExpr *E = new (Buffer) CXXStaticCastExpr(T, VK, K, Op, PathSize, WrittenTy, L, - RParenLoc); + RParenLoc, AngleBrackets); if (PathSize) E->setCastPath(*BasePath); return E; } @@ -550,13 +551,14 @@ CXXDynamicCastExpr *CXXDynamicCastExpr::Create(ASTContext &C, QualType T, const CXXCastPath *BasePath, TypeSourceInfo *WrittenTy, SourceLocation L, - SourceLocation RParenLoc) { + SourceLocation RParenLoc, + SourceRange AngleBrackets) { unsigned PathSize = (BasePath ? BasePath->size() : 0); void *Buffer = C.Allocate(sizeof(CXXDynamicCastExpr) + PathSize * sizeof(CXXBaseSpecifier*)); CXXDynamicCastExpr *E = new (Buffer) CXXDynamicCastExpr(T, VK, K, Op, PathSize, WrittenTy, L, - RParenLoc); + RParenLoc, AngleBrackets); if (PathSize) E->setCastPath(*BasePath); return E; } @@ -606,13 +608,14 @@ CXXReinterpretCastExpr::Create(ASTContext &C, QualType T, ExprValueKind VK, CastKind K, Expr *Op, const CXXCastPath *BasePath, TypeSourceInfo *WrittenTy, SourceLocation L, - SourceLocation RParenLoc) { + SourceLocation RParenLoc, + SourceRange AngleBrackets) { unsigned PathSize = (BasePath ? BasePath->size() : 0); void *Buffer = C.Allocate(sizeof(CXXReinterpretCastExpr) + PathSize * sizeof(CXXBaseSpecifier*)); CXXReinterpretCastExpr *E = new (Buffer) CXXReinterpretCastExpr(T, VK, K, Op, PathSize, WrittenTy, L, - RParenLoc); + RParenLoc, AngleBrackets); if (PathSize) E->setCastPath(*BasePath); return E; } @@ -628,8 +631,9 @@ CXXConstCastExpr *CXXConstCastExpr::Create(ASTContext &C, QualType T, ExprValueKind VK, Expr *Op, TypeSourceInfo *WrittenTy, SourceLocation L, - SourceLocation RParenLoc) { - return new (C) CXXConstCastExpr(T, VK, Op, WrittenTy, L, RParenLoc); + SourceLocation RParenLoc, + SourceRange AngleBrackets) { + return new (C) CXXConstCastExpr(T, VK, Op, WrittenTy, L, RParenLoc, AngleBrackets); } CXXConstCastExpr *CXXConstCastExpr::CreateEmpty(ASTContext &C) { |