diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-03 06:36:36 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-03 06:36:36 +0000 |
commit | 11d77169555480ee0a04c6e5bc390d8fde41175d (patch) | |
tree | f809e653dfa87d94c84ea3e4d767edc8265a3922 /lib/Sema/SemaDeclObjC.cpp | |
parent | da92a7f91cf88f49e02050919676f7fb8e3bdff8 (diff) |
Pass from the parser the locations of selector identifiers when creating
objc method decls.
They are not stored in the AST yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 23e44748c8..3a34ffb543 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -2489,7 +2489,7 @@ Decl *Sema::ActOnMethodDeclaration( SourceLocation MethodLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, - SourceLocation SelectorStartLoc, + ArrayRef<SourceLocation> SelectorLocs, Selector Sel, // optional arguments. The number of types/arguments is obtained // from the Sel.getNumArgs(). @@ -2523,11 +2523,12 @@ Decl *Sema::ActOnMethodDeclaration( } else { // get the type for "id". resultDeclType = Context.getObjCIdType(); Diag(MethodLoc, diag::warn_missing_method_return_type) - << FixItHint::CreateInsertion(SelectorStartLoc, "(id)"); + << FixItHint::CreateInsertion(SelectorLocs.front(), "(id)"); } ObjCMethodDecl* ObjCMethod = - ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, Sel, resultDeclType, + ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, SelectorLocs, Sel, + resultDeclType, ResultTInfo, CurContext, MethodType == tok::minus, isVariadic, |