This fixes another bogus build error on gcc, e.g. https://lab.llvm.org/buildbot/#/builders/118/builds/2504.
/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux-perf/llvm/clang/lib/Format/UnwrappedLineFormatter.cpp:424:42: error: binding ‘clang::format::FormatToken* const’ to reference of type ‘clang::format::FormatToken*&’ discards qualifiers
auto IsElseLine = [&First = TheLine->First]() -> bool {
^
}
return MergedLines;
}
- auto IsElseLine = [&First = TheLine->First]() -> bool {
+ auto IsElseLine = [&TheLine]() -> bool {
+ const FormatToken *First = TheLine->First;
if (First->is(tok::kw_else))
return true;