[all-commits] [llvm/llvm-project] 441108: Reland [clang-format] Fix overlapping whitespace r...

Owen via All-commits all-commits at lists.llvm.org
Fri Jun 16 17:00:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 441108ccba948d76e7002c61236e3bcbca0203ce
      https://github.com/llvm/llvm-project/commit/441108ccba948d76e7002c61236e3bcbca0203ce
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2023-06-16 (Fri, 16 Jun 2023)

  Changed paths:
    M clang/lib/Format/FormatToken.h
    M clang/lib/Format/UnwrappedLineFormatter.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  Reland [clang-format] Fix overlapping whitespace replacements before PPDirective

If the first token of an annotated line already has a computed Newlines,
reuse it to avoid potential overlapping whitespace replacements before
preprocessor branching directives.

Fixes #62892.

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




More information about the All-commits mailing list