[PATCH] D83501: [clangd][ObjC] Improve xrefs for protocols and classes
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 9 12:04:06 PDT 2020
dgoldman added inline comments.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:88-92
+ if (const auto *ID = dyn_cast<ObjCInterfaceDecl>(D)) {
+ if (const auto *IMD = ID->getImplementation())
+ return IMD;
+ return ID->getDefinition();
+ }
----------------
Let me know if there's a better way to handle this multi-"definition" support
================
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:722
+ std::string ObjcPrefix = "//objc";
+ if (strncmp(Test, ObjcPrefix.c_str(), ObjcPrefix.size()) == 0) {
----------------
Figured this would be easier than copy + paste, LMK
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83501/new/
https://reviews.llvm.org/D83501
More information about the cfe-commits
mailing list