Skip to content

Commit c17d0ec

Browse files
committed
Update SemaCast.cpp
1 parent 05fd2bf commit c17d0ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Sema/SemaCast.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,12 +917,13 @@ void CastOperation::CheckDynamicCast() {
917917
// dynamic_cast is not available with -fno-rtti.
918918
// As an exception, dynamic_cast to void* is available because it doesn't
919919
// use RTTI.
920+
#ifndef _WIN32
920921
if (!Self.getLangOpts().RTTI && !DestPointee->isVoidType()) {
921922
Self.Diag(OpRange.getBegin(), diag::err_no_dynamic_cast_with_fno_rtti);
922923
SrcExpr = ExprError();
923924
return;
924925
}
925-
926+
#endif
926927
// Warns when dynamic_cast is used with RTTI data disabled.
927928
if (!Self.getLangOpts().RTTIData) {
928929
bool MicrosoftABI =

0 commit comments

Comments
 (0)