[all-commits] [llvm/llvm-project] 5987d7: [clang-format] fix indent in alignChainedConditionals

Krasimir Georgiev via All-commits all-commits at lists.llvm.org
Mon Apr 26 02:07:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5987d7c59da5a7611036c2952f5a1f501d17ad48
      https://github.com/llvm/llvm-project/commit/5987d7c59da5a7611036c2952f5a1f501d17ad48
  Author: Krasimir Georgiev <krasimir at google.com>
  Date:   2021-04-26 (Mon, 26 Apr 2021)

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

  Log Message:
  -----------
  [clang-format] fix indent in alignChainedConditionals

Clang-format was indenting the lines following the `?` in the added test
case by +5 instead of +4. This only happens in a very specific
situation, where the `?` is followed by a multiline block comment, as in
the example. This fix addresses this without regressing any of the
existing tests.

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




More information about the All-commits mailing list