diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-03 06:36:17 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-03 06:36:17 +0000 |
commit | 951376242c076c3f62dd78bf672909fc011991db (patch) | |
tree | 6a21e6bb37bedc547fc336991a42aec28e4ef22e /lib/AST/Expr.cpp | |
parent | d2deee17ade564dc9ab672c4ae8d7d4c2002d507 (diff) |
Pass all the locations of the selector identifiers for a message expression from the parser.
They are not kept in the AST yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 6049f289f8..232709cb26 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -2811,7 +2811,7 @@ ObjCMessageExpr *ObjCMessageExpr::Create(ASTContext &Context, QualType T, bool IsInstanceSuper, QualType SuperType, Selector Sel, - SourceLocation SelLoc, + ArrayRef<SourceLocation> SelLocs, ObjCMethodDecl *Method, Expr **Args, unsigned NumArgs, SourceLocation RBracLoc) { @@ -2819,8 +2819,8 @@ ObjCMessageExpr *ObjCMessageExpr::Create(ASTContext &Context, QualType T, NumArgs * sizeof(Expr *); void *Mem = Context.Allocate(Size, llvm::AlignOf<ObjCMessageExpr>::Alignment); return new (Mem) ObjCMessageExpr(T, VK, LBracLoc, SuperLoc, IsInstanceSuper, - SuperType, Sel, SelLoc, Method, Args,NumArgs, - RBracLoc); + SuperType, Sel, SelLocs.front(), Method, + Args, NumArgs, RBracLoc); } ObjCMessageExpr *ObjCMessageExpr::Create(ASTContext &Context, QualType T, @@ -2828,14 +2828,15 @@ ObjCMessageExpr *ObjCMessageExpr::Create(ASTContext &Context, QualType T, SourceLocation LBracLoc, TypeSourceInfo *Receiver, Selector Sel, - SourceLocation SelLoc, + ArrayRef<SourceLocation> SelLocs, ObjCMethodDecl *Method, Expr **Args, unsigned NumArgs, SourceLocation RBracLoc) { unsigned Size = sizeof(ObjCMessageExpr) + sizeof(void *) + NumArgs * sizeof(Expr *); void *Mem = Context.Allocate(Size, llvm::AlignOf<ObjCMessageExpr>::Alignment); - return new (Mem) ObjCMessageExpr(T, VK, LBracLoc, Receiver, Sel, SelLoc, + return new (Mem) ObjCMessageExpr(T, VK, LBracLoc, Receiver, Sel, + SelLocs.front(), Method, Args, NumArgs, RBracLoc); } @@ -2844,14 +2845,15 @@ ObjCMessageExpr *ObjCMessageExpr::Create(ASTContext &Context, QualType T, SourceLocation LBracLoc, Expr *Receiver, Selector Sel, - SourceLocation SelLoc, + ArrayRef<SourceLocation> SelLocs, ObjCMethodDecl *Method, Expr **Args, unsigned NumArgs, SourceLocation RBracLoc) { unsigned Size = sizeof(ObjCMessageExpr) + sizeof(void *) + NumArgs * sizeof(Expr *); void *Mem = Context.Allocate(Size, llvm::AlignOf<ObjCMessageExpr>::Alignment); - return new (Mem) ObjCMessageExpr(T, VK, LBracLoc, Receiver, Sel, SelLoc, + return new (Mem) ObjCMessageExpr(T, VK, LBracLoc, Receiver, Sel, + SelLocs.front(), Method, Args, NumArgs, RBracLoc); } |