forked from OSchip/llvm-project
[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:
parent
5ffbeb4057
commit
f13a514f08
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue