[clang] d9832ef - Concatenate uses of isa<> into one call; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 09:30:33 PDT 2023


Author: Aaron Ballman
Date: 2023-07-25T12:30:24-04:00
New Revision: d9832ef815f529a0b912baa14e1b3e23af99bc86

URL: https://github.com/llvm/llvm-project/commit/d9832ef815f529a0b912baa14e1b3e23af99bc86
DIFF: https://github.com/llvm/llvm-project/commit/d9832ef815f529a0b912baa14e1b3e23af99bc86.diff

LOG: Concatenate uses of isa<> into one call; NFC

Spotted during post-commit review of 4b15bb9a317edcf6a3ad95ddaa4a843afe700261

Added: 
    

Modified: 
    clang/include/clang/AST/ASTNodeTraverser.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/ASTNodeTraverser.h b/clang/include/clang/AST/ASTNodeTraverser.h
index d649ef6816ca42..5ffce930b440ff 100644
--- a/clang/include/clang/AST/ASTNodeTraverser.h
+++ b/clang/include/clang/AST/ASTNodeTraverser.h
@@ -104,8 +104,7 @@ class ASTNodeTraverser
         Visit(Comment, Comment);
 
       // Decls within functions are visited by the body.
-      if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D) &&
-          !isa<BlockDecl>(*D)) {
+      if (!isa<FunctionDecl, ObjCMethodDecl, BlockDecl>(*D)) {
         if (Traversal != TK_AsIs) {
           if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
             auto SK = CTSD->getSpecializationKind();


        


More information about the cfe-commits mailing list