[clang-format] Fix build on gcc < 7 introduced in rG9363aa9.
authorMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Thu, 29 Apr 2021 08:06:46 +0000 (10:06 +0200)
committerMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Thu, 29 Apr 2021 08:07:04 +0000 (10:07 +0200)
commit40c2d6188b08f7a1bdd23a8cfdfea8fa998bdff6
tree0747d3ca5e6a30cacbc37e5c20f5ad8637bd8af8
parentd138e97c2a741fe7c9d4fa278e262ef95b63a358
[clang-format] Fix build on gcc < 7 introduced in rG9363aa9.

This fixes another bogus build error on gcc, e.g. https://lab.llvm.org/buildbot/#/builders/110/builds/2974.

/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/clang/lib/Format/TokenAnnotator.cpp:3412:34: error: binding ‘const clang::format::FormatStyle’ to reference of type ‘clang::format::FormatStyle&’ discards qualifiers
   auto ShouldAddSpacesInAngles = [&Style = this->Style,
                                  ^
clang/lib/Format/TokenAnnotator.cpp