[clang] 4e8cae4 - Fix build break on pickier MSVC configurations [NFC]
Paul Robinson via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 8 09:46:12 PDT 2023
Author: Paul Robinson
Date: 2023-08-08T12:44:47-04:00
New Revision: 4e8cae4aec6590ca13ec65ed38d6da55c6031755
URL: https://github.com/llvm/llvm-project/commit/4e8cae4aec6590ca13ec65ed38d6da55c6031755
DIFF: https://github.com/llvm/llvm-project/commit/4e8cae4aec6590ca13ec65ed38d6da55c6031755.diff
LOG: Fix build break on pickier MSVC configurations [NFC]
clang::StreamingDiagnostic doesn't have a uint8_t overload,
which makes MSVC without /permissive- decide it's ambiguous.
Pre-approved in replies to D153276.
Added:
Modified:
clang/lib/AST/Interp/Interp.h
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/Interp.h b/clang/lib/AST/Interp/Interp.h
index 4da5985e3b3d6f..22706fc0f64688 100644
--- a/clang/lib/AST/Interp/Interp.h
+++ b/clang/lib/AST/Interp/Interp.h
@@ -1786,7 +1786,7 @@ inline bool Invalid(InterpState &S, CodePtr OpPC) {
inline bool InvalidCast(InterpState &S, CodePtr OpPC, CastKind Kind) {
const SourceLocation &Loc = S.Current->getLocation(OpPC);
S.FFDiag(Loc, diag::note_constexpr_invalid_cast)
- << static_cast<uint8_t>(Kind) << S.Current->getRange(OpPC);
+ << static_cast<unsigned>(Kind) << S.Current->getRange(OpPC);
return false;
}
More information about the cfe-commits
mailing list