[all-commits] [llvm/llvm-project] 9363aa: [clang-format] Add `SpacesInAngles: Leave` option ...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Wed Apr 28 23:59:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9363aa90bfe6f73df105799abc55bb74d4f186bf
      https://github.com/llvm/llvm-project/commit/9363aa90bfe6f73df105799abc55bb74d4f186bf
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2021-04-29 (Thu, 29 Apr 2021)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/Format.cpp
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Add `SpacesInAngles: Leave` option to keep spacing inside angle brackets as is.

A need for such an option came up in a few libc++ reviews. That's because libc++ has both code in C++03 and newer standards.
Currently, it uses `Standard: C++03` setting for clang-format, but this breaks e.g. u8"string" literals.
Also, angle brackets are the only place where C++03-specific formatting needs to be applied.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks

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




More information about the All-commits mailing list