Fixed a bug which exposed the internally built type to user code.

llvm-svn: 43987
This commit is contained in:
Fariborz Jahanian 2007-11-10 22:00:55 +00:00
parent 16e3123071
commit 0bd56b7727
1 changed files with 7 additions and 2 deletions

View File

@ -551,8 +551,13 @@ Sema::ObjcActOnMethodDefinition(Scope *S, DeclTy *D, DeclTy *lastDecl) {
ObjcMethodDecl *MDecl = dyn_cast<ObjcMethodDecl>(static_cast<Decl *>(D));
ScopedDecl *LastDeclarator = dyn_cast_or_null<ScopedDecl>((Decl *)lastDecl);
const char *name = MDecl->getSelector().getName().c_str();
IdentifierInfo *II = &Context.Idents.get(name);
// build [classname selector-name] for the name of method.
std::string Name = "[";
Name += MDecl->getClassInterface()->getName();
Name += " ";
Name += MDecl->getSelector().getName();
Name += "]";
IdentifierInfo *II = &Context.Idents.get(Name);
assert (II && "ObjcActOnMethodDefinition - selector name is missing");
// The scope passed in may not be a decl scope. Zip up the scope tree until