[PATCH] D64307: [clangd] Add a missing early return in getTypeHierarchy()

Nathan Ridge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 17:25:29 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL365849: [clangd] Add a missing early return in getTypeHierarchy() (authored by nridge, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D64307?vs=208317&id=209378#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64307/new/

https://reviews.llvm.org/D64307

Files:
  clang-tools-extra/trunk/clangd/XRefs.cpp


Index: clang-tools-extra/trunk/clangd/XRefs.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/XRefs.cpp
+++ clang-tools-extra/trunk/clangd/XRefs.cpp
@@ -1230,6 +1230,8 @@
   RecursionProtectionSet RPSet;
   Optional<TypeHierarchyItem> Result =
       getTypeAncestors(*CXXRD, AST.getASTContext(), RPSet);
+  if (!Result)
+    return Result;
 
   if ((Direction == TypeHierarchyDirection::Children ||
        Direction == TypeHierarchyDirection::Both) &&


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64307.209378.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190712/43a97dac/attachment.bin>


More information about the llvm-commits mailing list