/// Declared in protocol, and those referenced by it.
void Sema::CheckProtocolMethodDefs(ObjcProtocolDecl *PDecl,
bool& IncompleteImpl,
- const llvm::DenseSet<void *>& InsMap,
+ const llvm::DenseSet<Selector> &InsMap,
const llvm::DenseSet<Selector> &ClsMap) {
// check unimplemented instance methods.
ObjcMethodDecl** methods = PDecl->getInstanceMethods();
for (int j = 0; j < PDecl->getNumInstanceMethods(); j++) {
- void * cpv = methods[j]->getSelector().getAsOpaquePtr();
- if (!InsMap.count(cpv)) {
+ if (!InsMap.count(methods[j]->getSelector())) {
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
methods[j]->getSelector().getName());
IncompleteImpl = true;
void Sema::ImplMethodsVsClassMethods(ObjcImplementationDecl* IMPDecl,
ObjcInterfaceDecl* IDecl) {
- llvm::DenseSet<void *> InsMap;
+ llvm::DenseSet<Selector> InsMap;
// Check and see if instance methods in class interface have been
// implemented in the implementation class.
ObjcMethodDecl **methods = IMPDecl->getInstanceMethods();
for (int i=0; i < IMPDecl->getNumInstanceMethods(); i++)
- InsMap.insert(methods[i]->getSelector().getAsOpaquePtr());
+ InsMap.insert(methods[i]->getSelector());
bool IncompleteImpl = false;
methods = IDecl->getInstanceMethods();
for (int j = 0; j < IDecl->getNumInstanceMethods(); j++)
- if (!InsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
+ if (!InsMap.count(methods[j]->getSelector())) {
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
methods[j]->getSelector().getName());
IncompleteImpl = true;
/// category interface is implemented in the category @implementation.
void Sema::ImplCategoryMethodsVsIntfMethods(ObjcCategoryImplDecl *CatImplDecl,
ObjcCategoryDecl *CatClassDecl) {
- llvm::DenseSet<void *> InsMap;
+ llvm::DenseSet<Selector> InsMap;
// Check and see if instance methods in category interface have been
// implemented in its implementation class.
ObjcMethodDecl **methods = CatImplDecl->getInstanceMethods();
for (int i=0; i < CatImplDecl->getNumInstanceMethods(); i++)
- InsMap.insert(methods[i]->getSelector().getAsOpaquePtr());
+ InsMap.insert(methods[i]->getSelector());
bool IncompleteImpl = false;
methods = CatClassDecl->getInstanceMethods();
for (int j = 0; j < CatClassDecl->getNumInstanceMethods(); j++)
- if (!InsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
+ if (!InsMap.count(methods[j]->getSelector())) {
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
methods[j]->getSelector().getName());
IncompleteImpl = true;
llvm::SmallVector<ObjcMethodDecl*, 32> insMethods;
llvm::SmallVector<ObjcMethodDecl*, 16> clsMethods;
- llvm::DenseMap<void *, const ObjcMethodDecl*> InsMap;
- llvm::DenseMap<void *, const ObjcMethodDecl*> ClsMap;
+ llvm::DenseMap<Selector, const ObjcMethodDecl*> InsMap;
+ llvm::DenseMap<Selector, const ObjcMethodDecl*> ClsMap;
bool isClassDeclaration =
(isa<ObjcInterfaceDecl>(ClassDecl) || isa<ObjcCategoryDecl>(ClassDecl));
if (Method->isInstance()) {
if (isClassDeclaration) {
/// Check for instance method of the same name with incompatible types
- const ObjcMethodDecl *&PrevMethod =
- InsMap[Method->getSelector().getAsOpaquePtr()];
+ const ObjcMethodDecl *&PrevMethod = InsMap[Method->getSelector()];
if (PrevMethod && !MatchTwoMethodDeclarations(Method, PrevMethod)) {
Diag(Method->getLocation(), diag::error_duplicate_method_decl,
Method->getSelector().getName());
}
else {
insMethods.push_back(Method);
- InsMap[Method->getSelector().getAsOpaquePtr()] = Method;
+ InsMap[Method->getSelector()] = Method;
}
}
else
else {
if (isClassDeclaration) {
/// Check for class method of the same name with incompatible types
- const ObjcMethodDecl *&PrevMethod =
- ClsMap[Method->getSelector().getAsOpaquePtr()];
+ const ObjcMethodDecl *&PrevMethod = ClsMap[Method->getSelector()];
if (PrevMethod && !MatchTwoMethodDeclarations(Method, PrevMethod)) {
Diag(Method->getLocation(), diag::error_duplicate_method_decl,
Method->getSelector().getName());
}
else {
clsMethods.push_back(Method);
- ClsMap[Method->getSelector().getAsOpaquePtr()] = Method;
+ ClsMap[Method->getSelector()] = Method;
}
}
else
84AF36A00CB17A3B00C820A5 /* DeclObjC.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DeclObjC.h; path = clang/AST/DeclObjC.h; sourceTree = "<group>"; };
84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = Parse/AttributeList.cpp; sourceTree = "<group>"; };
84D9A88B0C1A581300AC7ABC /* AttributeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AttributeList.h; path = clang/Parse/AttributeList.h; sourceTree = "<group>"; };
- 8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = "<group>"; };
DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = Parse/ParseExprCXX.cpp; sourceTree = "<group>"; };
DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = "<group>"; };
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
- compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";