diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp index c76d94e7d800..460e7722c102 100644 --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -1112,7 +1112,7 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) { } // Validate the width of the type. - switch (TypeSpecWidth) { + switch (static_cast(TypeSpecWidth)) { case TSW_unspecified: break; case TSW_short: // short int case TSW_longlong: // long long int