]> granicus.if.org Git - clang/commit
Allow getting all source locations of selector identifiers in a ObjCMethodDecl.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 3 Oct 2011 06:37:04 +0000 (06:37 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 3 Oct 2011 06:37:04 +0000 (06:37 +0000)
commit491306a83c4f0f49f95a3bcbca8580cb98a91c7a
tree2011c1e6e59dcea3f9eaad6f2160eb7e8295e3c2
parentb994e6c7d57b00e3e0f69d152065e2cf85d1de33
Allow getting all source locations of selector identifiers in a ObjCMethodDecl.

Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is

  -Immediately before the arguments: -(id)first:(int)x second:(int)y;
  -With a space between the arguments: -(id)first: (int)x second: (int)y;
  -For nullary selectors, immediately before ';': -(void)release;

In such cases we infer the locations instead of storing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140989 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/clang/AST/DeclObjC.h
include/clang/AST/ExprObjC.h
include/clang/AST/SelectorLocationsKind.h
lib/AST/ASTContext.cpp
lib/AST/ASTImporter.cpp
lib/AST/DeclObjC.cpp
lib/AST/SelectorLocationsKind.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaObjCProperty.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp