[libclang] Since an objc extension semantically continues the interface of the class
don't use unique USRs for them, otherwise we fail to associate @implementation methods
with the methods in extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndexUSRs.cpp b/tools/libclang/CIndexUSRs.cpp
index 195463c..f6e9aa3 100644
--- a/tools/libclang/CIndexUSRs.cpp
+++ b/tools/libclang/CIndexUSRs.cpp
@@ -336,11 +336,9 @@
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());