aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kühnel <kuhnel@google.com>2021-11-15 15:25:12 +0000
committerChristian Kühnel <kuhnel@google.com>2021-11-18 09:16:54 +0000
commit7aa2ce0fab3c21cf87c5884f6bf8bdece1b6fe1c (patch)
treead7fc172ed4e2733bbf0e25cc6b7afae23adb97e
parent9bda9a39800f44e79f4379230bf0949739c86355 (diff)
downloadllvm-7aa2ce0fab3c21cf87c5884f6bf8bdece1b6fe1c.zip
llvm-7aa2ce0fab3c21cf87c5884f6bf8bdece1b6fe1c.tar.gz
llvm-7aa2ce0fab3c21cf87c5884f6bf8bdece1b6fe1c.tar.bz2
[NFC][clangd] fix clang-tidy finding on isa_and_nonnull
This is a cleanup of the only llvm-prefer-isa-or-dyn-cast-in-conditionals finding in the clangd code base. This patch was created by automatically applying the fixes from clang-tidy. Differential Revision: https://reviews.llvm.org/D113899
-rw-r--r--clang-tools-extra/clangd/Selection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/Selection.cpp b/clang-tools-extra/clangd/Selection.cpp
index e945f5d..0b10c7a 100644
--- a/clang-tools-extra/clangd/Selection.cpp
+++ b/clang-tools-extra/clangd/Selection.cpp
@@ -500,7 +500,7 @@ public:
// - those without source range information, we don't record those
// - those that can't be stored in DynTypedNode.
bool TraverseDecl(Decl *X) {
- if (X && isa<TranslationUnitDecl>(X))
+ if (llvm::isa_and_nonnull<TranslationUnitDecl>(X))
return Base::TraverseDecl(X); // Already pushed by constructor.
// Base::TraverseDecl will suppress children, but not this node itself.
if (X && X->isImplicit())