[PATCH] D113899: [NFC][clangd] fix clang-tidy finding on isa_and_nonnull

Christian Kühnel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 18 01:26:00 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7aa2ce0fab3c: [NFC][clangd] fix clang-tidy finding on isa_and_nonnull (authored by kuhnel).

Changed prior to commit:
  https://reviews.llvm.org/D113899?vs=387254&id=388127#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113899

Files:
  clang-tools-extra/clangd/Selection.cpp


Index: clang-tools-extra/clangd/Selection.cpp
===================================================================
--- clang-tools-extra/clangd/Selection.cpp
+++ clang-tools-extra/clangd/Selection.cpp
@@ -500,7 +500,7 @@
   //  - 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())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113899.388127.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211118/bbb45ac4/attachment.bin>


More information about the cfe-commits mailing list