r321626 - [Sema] Fix build with GCC
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 1 09:07:24 PST 2018
Author: d0k
Date: Mon Jan 1 09:07:23 2018
New Revision: 321626
URL: http://llvm.org/viewvc/llvm-project?rev=321626&view=rev
Log:
[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'
Modified:
cfe/trunk/lib/Sema/DeclSpec.cpp
Modified: cfe/trunk/lib/Sema/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=321626&r1=321625&r2=321626&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/DeclSpec.cpp (original)
+++ cfe/trunk/lib/Sema/DeclSpec.cpp Mon Jan 1 09:07:23 2018
@@ -1112,7 +1112,7 @@ void DeclSpec::Finish(Sema &S, const Pri
}
// 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
More information about the cfe-commits
mailing list