[PATCH] D122417: [Clang][NFC] Prefer using variadic isa<> over non-variadic isa<>s
Hirochika Matsumoto via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 24 10:25:59 PDT 2022
hkmatsumoto created this revision.
Herald added subscribers: usaxena95, kadircet, arphaman.
Herald added a project: All.
hkmatsumoto requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.
Given that isa<Foo, Bar>(A) is equivalent to isa<Foo>(A) || isa<Bar>(A),
we can refactor the codebase as follows:
- Change isa<Foo>(A) || isa<Bar>(A) to isa<Foo, Bar>(A)
- Change !isa<Foo>(A) && !isa<Bar>(A) to !isa<Foo, Bar>(A)
Fixes https://github.com/llvm/llvm-project/issues/45827
Related to https://reviews.llvm.org/D122416
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122417
Files:
clang-tools-extra/clangd/InlayHints.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/StmtOpenMP.cpp
clang/lib/AST/TypeLoc.cpp
clang/lib/CodeGen/CGDecl.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/Sema/SemaLookup.cpp
clang/tools/libclang/CXCursor.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122417.417977.patch
Type: text/x-patch
Size: 5122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220324/2f42c5f6/attachment-0001.bin>
More information about the cfe-commits
mailing list