aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/Sema.h')
-rw-r--r--lib/Sema/Sema.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 490ff65cd9..0540dd9e0c 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -606,6 +606,11 @@ public:
MethodPool InstanceMethodPool;
MethodPool FactoryMethodPool;
+ /// Method selectors used in a @selector expression. Used for implementation
+ /// of -Wselector.
+ llvm::DenseMap<Selector, SourceLocation> ReferencedSelectors;
+
+
MethodPool::iterator ReadMethodPool(Selector Sel, bool isInstance);
/// Private Helper predicate to check for 'self'.
@@ -798,6 +803,8 @@ public:
DeclGroupPtrTy ConvertDeclToDeclGroup(DeclPtrTy Ptr);
+ void DiagnoseUseOfUnimplementedSelectors();
+
virtual TypeTy *getTypeName(IdentifierInfo &II, SourceLocation NameLoc,
Scope *S, CXXScopeSpec *SS,
bool isClassName = false,
@@ -1656,7 +1663,7 @@ public:
/// unit are added to a global pool. This allows us to efficiently associate
/// a selector with a method declaraation for purposes of typechecking
/// messages sent to "id" (where the class of the object is unknown).
- void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method);
+ void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false);
/// LookupInstanceMethodInGlobalPool - Returns the method and warns if
/// there are multiple signatures.
@@ -1665,10 +1672,15 @@ public:
/// LookupFactoryMethodInGlobalPool - Returns the method and warns if
/// there are multiple signatures.
- ObjCMethodDecl *LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R);
+ ObjCMethodDecl *LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R,
+ bool warn=true);
+
+ /// LookupImplementedMethodInGlobalPool - Returns the method which has an
+ /// implementation.
+ ObjCMethodDecl *LookupImplementedMethodInGlobalPool(Selector Sel);
/// AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
- void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method);
+ void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false);
/// CollectIvarsToConstructOrDestruct - Collect those ivars which require
/// initialization.