[PATCH] D18313: clang-format: Make include sorting's main include detection configurable.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 06:25:31 PDT 2016


djasper created this revision.
djasper added a reviewer: klimek.
djasper added a subscriber: cfe-commits.
Herald added a subscriber: klimek.

This patch adds a regular expression to configure suffixes of an included file to check whether it is the "main" include of the current file. Previously, clang-format has allowed arbitrary suffixes on the formatted file, which is still the case when no IncludeMainRegex is specified.

http://reviews.llvm.org/D18313

Files:
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  unittests/Format/FormatTest.cpp
  unittests/Format/SortIncludesTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18313.51153.patch
Type: text/x-patch
Size: 5371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160321/30d85d8c/attachment-0001.bin>


More information about the cfe-commits mailing list