[all-commits] [llvm/llvm-project] 40c2d6: [clang-format] Fix build on gcc < 7 introduced in ...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Apr 29 01:09:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 40c2d6188b08f7a1bdd23a8cfdfea8fa998bdff6
      https://github.com/llvm/llvm-project/commit/40c2d6188b08f7a1bdd23a8cfdfea8fa998bdff6
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2021-04-29 (Thu, 29 Apr 2021)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp

  Log Message:
  -----------
  [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,
                                  ^




More information about the All-commits mailing list