diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp --- a/clang/lib/Sema/SemaCast.cpp +++ b/clang/lib/Sema/SemaCast.cpp @@ -2209,10 +2209,8 @@ bool MicrosoftException = Self.getLangOpts().MicrosoftExt && !DestType->isBooleanType(); if (MicrosoftException) { - unsigned Diag = SrcType->isVoidPointerType() - ? diag::warn_void_pointer_to_int_cast - : diag::warn_pointer_to_int_cast; - Self.Diag(OpRange.getBegin(), Diag) << SrcType << DestType << OpRange; + Self.Diag(OpRange.getBegin(), diag::ext_ms_pointer_to_int_cast) + << SrcType << DestType << OpRange; } else { msg = diag::err_bad_reinterpret_cast_small_int; return TC_Failed;