forked from OSchip/llvm-project
clang_getDeclSpelling(): For category implementations, make sure we hand back the category name (not the class name). This fixes <rdar://problem/7297518>.
llvm-svn: 85521
This commit is contained in:
parent
0d07eb32de
commit
a4aeed6958
|
@ -549,7 +549,10 @@ const char *clang_getDeclSpelling(CXDecl AnonDecl)
|
|||
|
||||
if (ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(ND)) {
|
||||
return OMD->getSelector().getAsString().c_str();
|
||||
}
|
||||
}
|
||||
if (ObjCCategoryImplDecl *CIMP = dyn_cast<ObjCCategoryImplDecl>(ND))
|
||||
return CIMP->getCategoryClass()->getName().data();
|
||||
|
||||
if (ND->getIdentifier())
|
||||
return ND->getIdentifier()->getNameStart();
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue