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 | dfd657064376ff288fe23318ccc51164b61677ef (patch) | |
tree | 7e2e177cf72cfcd921e3073c636c8c521dc4ce1b /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 3849394b819c05fdbd1c3437c263b75482ebdb34 (diff) | |
download | bcm5719-llvm-dfd657064376ff288fe23318ccc51164b61677ef.tar.gz bcm5719-llvm-dfd657064376ff288fe23318ccc51164b61677ef.zip |
Pass from the parser the locations of selector identifiers when creating
objc method decls.
They are not stored in the AST yet.
llvm-svn: 140984
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 23e44748c8a..3a34ffb5433 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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, |