[all-commits] [llvm/llvm-project] 860ee4: [clang-format] NFC allow Format.h to be clang-form...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Fri Nov 8 13:14:47 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 860ee4f3ebf56f4d2e387ceec9b8028636e72d2c
      https://github.com/llvm/llvm-project/commit/860ee4f3ebf56f4d2e387ceec9b8028636e72d2c
  Author: paul_hoad <paul_hoad at amat.com>
  Date:   2019-11-08 (Fri, 08 Nov 2019)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.rst
    M clang/include/clang/Format/Format.h

  Log Message:
  -----------
  [clang-format] NFC allow Format.h to be clang-formatted but still maintain the same doc layout in ClangFormatStyleOptions.rst

Summary:
Format.h is used to generate ClangFormatStyleOptions.rst, the layout of the comments is critical to the rst file. Accidentally clang-formatting Format.h can lead to the .rst changing.

This revision simply add // clang-format off/on statement around the areas who formatting needs to be maintained, mainly around the options that are related to what happens when the line breaks due to `ColumnLimit` (which is what is happening to the comment)

This allows Format.h to be clang-formatted without causing a change in the documentation when dump_format_style.py is rerun, which is also part of the revision.

Reviewers: mitchell-stellar, klimek, sammccall, owenpan

Reviewed By: mitchell-stellar

Subscribers: cfe-commits

Tags: #clang, #clang-format

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




More information about the All-commits mailing list