Allow additional file suffixes/extensions considered as source in main include grouping
authormydeveloperday <mydeveloperday@gmail.com>
Tue, 12 Nov 2019 21:15:17 +0000 (21:15 +0000)
committerpaulhoad <mydeveloperday@gmail.com>
Tue, 12 Nov 2019 21:26:52 +0000 (21:26 +0000)
commit335ac2eb662ce5f1888e2a50310b01fba2d40d68
tree6572fea0e79874c06cd4bdc683b85ad7e9559478
parentfbb228c7d222b991bed20d674e3b43143848fb95
Allow additional file suffixes/extensions considered as source in main include grouping

Summary:
By additional regex match, grouping of main include can be enabled in files that are not normally considered as a C/C++ source code.
For example, this might be useful in templated code, where template implementations are being held in *Impl.hpp files.
On the occassion, 'assume-filename' option description was reworded as it was misleading. It has nothing to do with `style=file` option and it does not influence sourced style filename.

Reviewers: rsmith, ioeric, krasimir, sylvestre.ledru, MyDeveloperDay

Reviewed By: MyDeveloperDay

Subscribers: MyDeveloperDay, cfe-commits

Patch by:  furdyna

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67750
clang/docs/ClangFormat.rst
clang/docs/ClangFormatStyleOptions.rst
clang/docs/ReleaseNotes.rst
clang/include/clang/Format/Format.h
clang/include/clang/Tooling/Inclusions/IncludeStyle.h
clang/lib/Format/Format.cpp
clang/lib/Tooling/Inclusions/HeaderIncludes.cpp
clang/tools/clang-format/ClangFormat.cpp
clang/unittests/Format/FormatTest.cpp
clang/unittests/Format/SortIncludesTest.cpp