[clang] 5ee3876 - Use isa instead of dyn_cast (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 11 11:15:59 PDT 2022
Author: Kazu Hirata
Date: 2022-06-11T11:15:52-07:00
New Revision: 5ee387690568979fbb8c973eeb61e1a66ee6cc61
URL: https://github.com/llvm/llvm-project/commit/5ee387690568979fbb8c973eeb61e1a66ee6cc61
DIFF: https://github.com/llvm/llvm-project/commit/5ee387690568979fbb8c973eeb61e1a66ee6cc61.diff
LOG: Use isa instead of dyn_cast (NFC)
Added:
Modified:
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/Sema/SemaOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 21f7219639910..23b0df26ba2aa 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3664,7 +3664,7 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) {
// Fix up function declarations that were created for cpu_specific before
// cpu_dispatch was known
- if (!dyn_cast<llvm::GlobalIFunc>(IFunc)) {
+ if (!isa<llvm::GlobalIFunc>(IFunc)) {
assert(cast<llvm::Function>(IFunc)->isDeclaration());
auto *GI = llvm::GlobalIFunc::create(DeclTy, 0, Linkage, "", ResolverFunc,
&getModule());
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 803e0139d40ec..0615c81bff4ae 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -11966,8 +11966,8 @@ bool OpenMPAtomicCompareCaptureChecker::checkStmt(Stmt *S,
UpdateStmt = S1;
CondUpdateStmt = S2;
// Check if form 45.
- if (dyn_cast<BinaryOperator>(BO->getRHS()->IgnoreImpCasts()) &&
- dyn_cast<IfStmt>(S2))
+ if (isa<BinaryOperator>(BO->getRHS()->IgnoreImpCasts()) &&
+ isa<IfStmt>(S2))
return checkForm45(CS, ErrorInfo);
// It cannot be set before we the check for form45.
IsPostfixUpdate = true;
More information about the cfe-commits
mailing list