[PATCH] D83501: [clangd][ObjC] Improve xrefs for protocols and classes
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 10 10:58:17 PDT 2020
dgoldman updated this revision to Diff 277103.
dgoldman added a comment.
Move up null check
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83501/new/
https://reviews.llvm.org/D83501
Files:
clang-tools-extra/clangd/FindTarget.cpp
Index: clang-tools-extra/clangd/FindTarget.cpp
===================================================================
--- clang-tools-extra/clangd/FindTarget.cpp
+++ clang-tools-extra/clangd/FindTarget.cpp
@@ -282,6 +282,8 @@
D = CID->getCategoryDecl();
Flags |= Rel::Underlying;
}
+ if (!D)
+ return;
if (const Decl *Pat = getTemplatePattern(D)) {
assert(Pat != D);
@@ -290,8 +292,6 @@
Flags |= Rel::TemplateInstantiation;
}
- if (!D)
- return;
report(D, Flags);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83501.277103.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200710/e9f6ae04/attachment.bin>
More information about the cfe-commits
mailing list