[Sema] Fix build with GCC

tools/clang/lib/Sema/DeclSpec.cpp: In member function 'void clang::DeclSpec::Finish(clang::Sema&, const clang::PrintingPolicy&)':
tools/clang/lib/Sema/DeclSpec.cpp:1116:8: error: could not convert 'clang::DeclSpec::TSW_unspecified' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
tools/clang/lib/Sema/DeclSpec.cpp:1117:8: error: could not convert 'clang::DeclSpec::TSW_short' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
tools/clang/lib/Sema/DeclSpec.cpp:1118:8: error: could not convert 'clang::DeclSpec::TSW_longlong' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
tools/clang/lib/Sema/DeclSpec.cpp:1128:8: error: could not convert 'clang::DeclSpec::TSW_long' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'

llvm-svn: 321626
This commit is contained in:
Benjamin Kramer 2018-01-01 17:07:23 +00:00
parent 5ffbeb4057
commit f13a514f08
1 changed files with 1 additions and 1 deletions

View File

@ -1112,7 +1112,7 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
}
// Validate the width of the type.
switch (TypeSpecWidth) {
switch (static_cast<TypeSpecifierWidth>(TypeSpecWidth)) {
case TSW_unspecified: break;
case TSW_short: // short int
case TSW_longlong: // long long int