diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 21f7219639910a..23b0df26ba2aa5 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(IFunc)) { + if (!isa(IFunc)) { assert(cast(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 803e0139d40ec0..0615c81bff4ae9 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(BO->getRHS()->IgnoreImpCasts()) && - dyn_cast(S2)) + if (isa(BO->getRHS()->IgnoreImpCasts()) && + isa(S2)) return checkForm45(CS, ErrorInfo); // It cannot be set before we the check for form45. IsPostfixUpdate = true;