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

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Apr 29 00:58:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e5082bbc498ab7d68178ea883203b38f6cd47fb
      https://github.com/llvm/llvm-project/commit/6e5082bbc498ab7d68178ea883203b38f6cd47fb
  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 a bogus build error on gcc, e.g. https://lab.llvm.org/buildbot/#/builders/110/builds/2973.

/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/clang/lib/Format/TokenAnnotator.cpp:3097:53: error: binding ‘const clang::SourceRange’ to reference of type ‘clang::SourceRange&’ discards qualifiers
   auto HasExistingWhitespace = [&Whitespace = Right.WhitespaceRange]() {
                                                     ^




More information about the All-commits mailing list