[all-commits] [llvm/llvm-project] b9e173: [clang-format] Add option to explicitly specify a ...

Zhao Wei Liew via All-commits all-commits at lists.llvm.org
Mon Jan 3 02:43:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9e173fcd46b336b5589f577a74de9472d4deae3
      https://github.com/llvm/llvm-project/commit/b9e173fcd46b336b5589f577a74de9472d4deae3
  Author: Zhao Wei Liew <zhaoweiliew at gmail.com>
  Date:   2022-01-03 (Mon, 03 Jan 2022)

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

  Log Message:
  -----------
  [clang-format] Add option to explicitly specify a config file

This diff extends the -style=file option to allow a config file to be specified explicitly. This is useful (for instance) when adding IDE commands to reformat code to a personal style.

Usage: `clang-format -style=file:<path/to/config/file> ...`

Reviewed By: HazardyKnusperkeks, curdeius, MyDeveloperDay, zwliew

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




More information about the All-commits mailing list