diff --git a/test/Index/usrs.m b/test/Index/usrs.m index 826abb53f3..a76394b746 100644 --- a/test/Index/usrs.m +++ b/test/Index/usrs.m @@ -118,9 +118,9 @@ int test_multi_declaration(void) { // CHECK: usrs.m c:usrs.m@551@F@local_func@x Extent=[49:23 - 49:28] // CHECK: usrs.m c:objc(cs)CWithExt Extent=[51:1 - 53:5] // CHECK: usrs.m c:objc(cs)CWithExt(im)meth1 Extent=[52:1 - 52:14] -// CHECK: usrs.m c:objc(ext)CWithExt@usrs.m@612 Extent=[54:1 - 56:5] +// CHECK: usrs.m c:objc(cs)CWithExt Extent=[54:1 - 56:5] // CHECK: usrs.m c:objc(cs)CWithExt(im)meth2 Extent=[55:1 - 55:14] -// CHECK: usrs.m c:objc(ext)CWithExt@usrs.m@654 Extent=[57:1 - 59:5] +// CHECK: usrs.m c:objc(cs)CWithExt Extent=[57:1 - 59:5] // CHECK: usrs.m c:objc(cs)CWithExt(im)meth3 Extent=[58:1 - 58:14] // CHECK: usrs.m c:objc(cy)CWithExt@Bar Extent=[60:1 - 62:5] // CHECK: usrs.m c:objc(cs)CWithExt(im)meth4 Extent=[61:1 - 61:14] diff --git a/tools/libclang/CIndexUSRs.cpp b/tools/libclang/CIndexUSRs.cpp index 195463cbe2..f6e9aa358e 100644 --- a/tools/libclang/CIndexUSRs.cpp +++ b/tools/libclang/CIndexUSRs.cpp @@ -336,11 +336,9 @@ void USRGenerator::VisitObjCContainerDecl(ObjCContainerDecl *D) { IgnoreResults = true; return; } - // Specially handle class extensions, which are anonymous categories. - // We want to mangle in the location to uniquely distinguish them. if (CD->IsClassExtension()) { - Out << "objc(ext)" << ID->getName() << '@'; - GenLoc(CD); + // An extension semantically continues the interface of the class. + GenObjCClass(ID->getName()); } else GenObjCCategory(ID->getName(), CD->getName());