[all-commits] [llvm/llvm-project] 2b04c4: [clang-format] Fix misannotation of colon in prese...

Björn Schäpers via All-commits all-commits at lists.llvm.org
Mon Jul 18 12:42:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b04c41b28320c1e399209fbe7a5a8d540578999
      https://github.com/llvm/llvm-project/commit/2b04c41b28320c1e399209fbe7a5a8d540578999
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

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

  Log Message:
  -----------
  [clang-format] Fix misannotation of colon in presence of requires clause

For clauses without parentheses it was annotated as TT_InheritanceColon.
Relates to https://github.com/llvm/llvm-project/issues/56215

Differential Revision: https://reviews.llvm.org/D129940


  Commit: 3c18a8b3a349781eac54144d0cf252bbbce0c4c1
      https://github.com/llvm/llvm-project/commit/3c18a8b3a349781eac54144d0cf252bbbce0c4c1
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Indent TT_CtorInitializerColon after requires clauses

Fixes https://github.com/llvm/llvm-project/issues/56215

Differential Revision: https://reviews.llvm.org/D129942


  Commit: d2eda49202386b222cec763aad9aaecd463ce044
      https://github.com/llvm/llvm-project/commit/d2eda49202386b222cec763aad9aaecd463ce044
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] Mark constexpr lambdas as lambda

Otherwise the brace was detected as a function brace, not wrong per se,
but when directly calling the lambda the calling parens were put on the
next line.

Differential Revision: https://reviews.llvm.org/D129946


Compare: https://github.com/llvm/llvm-project/compare/523a99c0eb03...d2eda4920238


More information about the All-commits mailing list