summaryrefslogtreecommitdiffstats
path: root/clang/docs/ReleaseNotes.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang/docs/ReleaseNotes.rst')
-rw-r--r--clang/docs/ReleaseNotes.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 3db1603e063..1139116ed10 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -292,6 +292,24 @@ clang-format
- clang-format gets a new option called ``--dry-run`` or ``-n`` to emit a
warning.
+- Option *IncludeIsMainSourceRegex* added to allow for additional
+ suffixes and file extensions to be considered as a source file
+ for execution of logic that looks for "main *include* file" to put
+ it on top.
+
+ By default, clang-format considers *source* files as "main" only when
+ they end with: ``.c``, ``.cc``, ``.cpp``, ``.c++``, ``.cxx``,
+ ``.m`` or ``.mm`` extensions. This config option allows to
+ extend this set of source files considered as "main".
+
+ For example, if this option is configured to ``(Impl\.hpp)$``,
+ then a file ``ClassImpl.hpp`` is considered "main" (in addition to
+ ``Class.c``, ``Class.cc``, ``Class.cpp`` and so on) and "main
+ include file" logic will be executed (with *IncludeIsMainRegex* setting
+ also being respected in later phase). Without this option set,
+ ``ClassImpl.hpp`` would not have the main include file put on top
+ before any other include.
+
libclang
--------
OpenPOWER on IntegriCloud