We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05fd2bf commit c17d0ecCopy full SHA for c17d0ec
clang/lib/Sema/SemaCast.cpp
@@ -917,12 +917,13 @@ void CastOperation::CheckDynamicCast() {
917
// dynamic_cast is not available with -fno-rtti.
918
// As an exception, dynamic_cast to void* is available because it doesn't
919
// use RTTI.
920
+#ifndef _WIN32
921
if (!Self.getLangOpts().RTTI && !DestPointee->isVoidType()) {
922
Self.Diag(OpRange.getBegin(), diag::err_no_dynamic_cast_with_fno_rtti);
923
SrcExpr = ExprError();
924
return;
925
}
-
926
+#endif
927
// Warns when dynamic_cast is used with RTTI data disabled.
928
if (!Self.getLangOpts().RTTIData) {
929
bool MicrosoftABI =
0 commit comments