[all-commits] [llvm/llvm-project] e0b1df: [clang-format] Fix AlignConsecutiveDeclarations ha...

darwin-x via All-commits all-commits at lists.llvm.org
Sat Feb 27 13:57:37 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e0b1df924ae06d6d88582334087d2eacc6702e8f
      https://github.com/llvm/llvm-project/commit/e0b1df924ae06d6d88582334087d2eacc6702e8f
  Author: Darwin Xu <darwin.xu at icloud.com>
  Date:   2021-02-27 (Sat, 27 Feb 2021)

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

  Log Message:
  -----------
  [clang-format] Fix AlignConsecutiveDeclarations handling of pointers

This is a bug fix of https://bugs.llvm.org/show_bug.cgi?id=49175

The expected code format:

unsigned int*       a;
int*                b;
unsigned int Const* c;

The actual code after formatting (without this patch):

unsigned int* a;
int*          b;
unsigned int Const* c;

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




More information about the All-commits mailing list