I think this is a false positive in GCC's warning, but nonetheless, we
should try to be warning-free. Smaller reproducer (reproduces with GCC
6.3):
https://godbolt.org/g/cJuO2z
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302003
91177308-0d34-0410-b5e6-
96231b3b80d8
[](const DiagnosticsEngine::DiagState *DS) -> unsigned {
unsigned Result = (unsigned)DS->ExtBehavior;
for (unsigned Val :
- {DS->IgnoreAllWarnings, DS->EnableAllWarnings, DS->WarningsAsErrors,
- DS->ErrorsAsFatal, DS->SuppressSystemWarnings})
+ {(unsigned)DS->IgnoreAllWarnings, (unsigned)DS->EnableAllWarnings,
+ (unsigned)DS->WarningsAsErrors, (unsigned)DS->ErrorsAsFatal,
+ (unsigned)DS->SuppressSystemWarnings})
Result = (Result << 1) | Val;
return Result;
};