diff options
author | mydeveloperday <mydeveloperday@gmail.com> | 2019-11-12 21:15:17 +0000 |
---|---|---|
committer | paulhoad <mydeveloperday@gmail.com> | 2019-11-12 21:26:52 +0000 |
commit | 335ac2eb662ce5f1888e2a50310b01fba2d40d68 (patch) | |
tree | 6572fea0e79874c06cd4bdc683b85ad7e9559478 /clang/lib/Format/Format.cpp | |
parent | fbb228c7d222b991bed20d674e3b43143848fb95 (diff) | |
download | bcm5719-llvm-335ac2eb662ce5f1888e2a50310b01fba2d40d68.tar.gz bcm5719-llvm-335ac2eb662ce5f1888e2a50310b01fba2d40d68.zip |
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
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 50a68773093..60958597ad2 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -476,6 +476,8 @@ template <> struct MappingTraits<FormatStyle> { IO.mapOptional("IncludeBlocks", Style.IncludeStyle.IncludeBlocks); IO.mapOptional("IncludeCategories", Style.IncludeStyle.IncludeCategories); IO.mapOptional("IncludeIsMainRegex", Style.IncludeStyle.IncludeIsMainRegex); + IO.mapOptional("IncludeIsMainSourceRegex", + Style.IncludeStyle.IncludeIsMainSourceRegex); IO.mapOptional("IndentCaseLabels", Style.IndentCaseLabels); IO.mapOptional("IndentGotoLabels", Style.IndentGotoLabels); IO.mapOptional("IndentPPDirectives", Style.IndentPPDirectives); |