diff --git a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp index aae90c403f0f2a..71fcf4aebda84d 100644 --- a/clang/lib/Sema/SemaCoroutine.cpp +++ b/clang/lib/Sema/SemaCoroutine.cpp @@ -680,7 +680,7 @@ static void checkNoThrow(Sema &S, const Stmt *E, QualType::DestructionKind::DK_cxx_destructor) { const auto *T = cast(ReturnType.getCanonicalType().getTypePtr()); - checkDeclNoexcept(dyn_cast(T->getDecl())->getDestructor(), + checkDeclNoexcept(cast(T->getDecl())->getDestructor(), /*IsDtor=*/true); } } else