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())
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())
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits