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) &&
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) &&
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits