projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02fdc51
)
[clangd] Add a missing early return in getTypeHierarchy()
author
Nathan Ridge
<zeratul976@hotmail.com>
Fri, 12 Jul 2019 00:24:45 +0000
(
00:24
+0000)
committer
Nathan Ridge
<zeratul976@hotmail.com>
Fri, 12 Jul 2019 00:24:45 +0000
(
00:24
+0000)
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64307
llvm-svn: 365849
clang-tools-extra/clangd/XRefs.cpp
patch
|
blob
|
history
diff --git
a/clang-tools-extra/clangd/XRefs.cpp
b/clang-tools-extra/clangd/XRefs.cpp
index
a596189
..
1d34499
100644
(file)
--- a/
clang-tools-extra/clangd/XRefs.cpp
+++ b/
clang-tools-extra/clangd/XRefs.cpp
@@
-1230,6
+1230,8
@@
getTypeHierarchy(ParsedAST &AST, Position Pos, int ResolveLevels,
RecursionProtectionSet RPSet;
Optional<TypeHierarchyItem> Result =
getTypeAncestors(*CXXRD, AST.getASTContext(), RPSet);
+ if (!Result)
+ return Result;
if ((Direction == TypeHierarchyDirection::Children ||
Direction == TypeHierarchyDirection::Both) &&