[all-commits] [llvm/llvm-project] 8c810a: [clang-format] Parse __ptr32/__ptr64 as a pointer ...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Fri Sep 4 08:58:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c810acc94ed462238242c04c75ab33fc96da6e8
      https://github.com/llvm/llvm-project/commit/8c810acc94ed462238242c04c75ab33fc96da6e8
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

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

  Log Message:
  -----------
  [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier

Before:
x = (foo *__ptr32) * v;
MACRO(A * __ptr32 a);
x = (foo *__ptr64) * v;
MACRO(A * __ptr64 a);

After:
x = (foo *__ptr32)*v;
MACRO(A *__ptr32 a);
x = (foo *__ptr64)*v;
MACRO(A *__ptr64 a);

Depends on D86721 (to apply cleanly)

Reviewed By: MyDeveloperDay

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


  Commit: e0ff5a8410ea58ba3d2e75791789a28ce976a7e7
      https://github.com/llvm/llvm-project/commit/e0ff5a8410ea58ba3d2e75791789a28ce976a7e7
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

  Changed paths:
    A clang/test/Format/dump-config-list-override.cpp

  Log Message:
  -----------
  [clang-format] Add a test showing the current config file list parsing

Currently clang-format starts overriding the default values at index 0
(keeping the existing values) instead of appending or replacing all values.
This patch simply checks the current (IMO surprising) behaviour and does
not attempt to change it.

Reviewed By: MyDeveloperDay

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


  Commit: 2108bceceb5e6eca361aaa6b10441d83bd9edc1b
      https://github.com/llvm/llvm-project/commit/2108bceceb5e6eca361aaa6b10441d83bd9edc1b
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

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

  Log Message:
  -----------
  FormatTest: Provide real line number in failure messages

Currently a test failure always reports a line number inside verifyFormat()
which is not very helpful to see which test failed. With this change we now
emit the line number where the verify function was called. When using an
IDE such as CLion, the output now includes a clickable link that points to
the call site.

Reviewed By: MyDeveloperDay

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


Compare: https://github.com/llvm/llvm-project/compare/1ffcbe35ae0e...2108bceceb5e


More information about the All-commits mailing list