ObjC interfaces marked with an ExternalSourceSymbolAttr have the name of the external module they were defined in included in their USR. During USR generation we were looking for this attribute only on the canonical decl. In the case of ObjC interfaces and Tag decls however, the canonical declaration is simply the first one, which may be a forward declaration, rather than the definition that has the the attribute. This patch changes the logic to look for the attribute on the definitions for these cases.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I recommend to add a Decl::getExternalSourceSymbolAttr() to reuse this and avoid code duplication.
Comment Actions
Also used the new Decl:: function in a place in libclang/CIndex.cpp and committed in r303484