[PATCH] D69951: [clang-format] NFC allow Format.h to be clang-formatted but still maintain the same doc layout in ClangFormatStyleOptions.rst
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 10:26:41 PST 2019
MyDeveloperDay updated this revision to Diff 228491.
MyDeveloperDay marked 4 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69951/new/
https://reviews.llvm.org/D69951
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
Index: clang/include/clang/Format/Format.h
===================================================================
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -1161,6 +1161,7 @@
/// \endcode
bool CompactNamespaces;
+ // clang-format off
/// If the constructor initializers don't fit on a line, put each
/// initializer on its own line.
/// \code
@@ -1178,6 +1179,7 @@
/// }
/// \endcode
bool ConstructorInitializerAllOnOneLineOrOnePerLine;
+ // clang-format on
/// The number of characters to use for indentation of constructor
/// initializer lists as well as inheritance lists.
@@ -1306,8 +1308,9 @@
/// Indent case labels one level from the switch statement.
///
- /// When ``false``, use the same indentation level as for the switch statement.
- /// Switch statement body is always indented one level more than case labels.
+ /// When ``false``, use the same indentation level as for the switch
+ /// statement. Switch statement body is always indented one level more than
+ /// case labels.
/// \code
/// false: true:
/// switch (fool) { vs. switch (fool) {
@@ -1453,6 +1456,7 @@
/// The JavaScriptQuoteStyle to use for JavaScript strings.
JavaScriptQuoteStyle JavaScriptQuotes;
+ // clang-format off
/// Whether to wrap JavaScript import/export statements.
/// \code{.js}
/// true:
@@ -1466,6 +1470,7 @@
/// import {VeryLongImportsAreAnnoying, VeryLongImportsAreAnnoying, VeryLongImportsAreAnnoying,} from "some/module.js"
/// \endcode
bool JavaScriptWrapImports;
+ // clang-format on
/// If true, the empty line at the start of blocks is kept.
/// \code
@@ -1747,6 +1752,7 @@
/// \endcode
std::vector<RawStringFormat> RawStringFormats;
+ // clang-format off
/// If ``true``, clang-format will attempt to re-flow comments.
/// \code
/// false:
@@ -1760,6 +1766,7 @@
/// * information */
/// \endcode
bool ReflowComments;
+ // clang-format on
/// If ``true``, clang-format will sort ``#includes``.
/// \code
@@ -2294,8 +2301,7 @@
/// a non-recoverable syntax error.
tooling::Replacements reformat(const FormatStyle &Style, StringRef Code,
ArrayRef<tooling::Range> Ranges,
- StringRef FileName,
- bool *IncompleteFormat);
+ StringRef FileName, bool *IncompleteFormat);
/// Clean up any erroneous/redundant code in the given \p Ranges in \p
/// Code.
@@ -2406,6 +2412,6 @@
namespace std {
template <>
struct is_error_code_enum<clang::format::ParseError> : std::true_type {};
-}
+} // namespace std
#endif // LLVM_CLANG_FORMAT_FORMAT_H
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1584,8 +1584,9 @@
**IndentCaseLabels** (``bool``)
Indent case labels one level from the switch statement.
- When ``false``, use the same indentation level as for the switch statement.
- Switch statement body is always indented one level more than case labels.
+ When ``false``, use the same indentation level as for the switch
+ statement. Switch statement body is always indented one level more than
+ case labels.
.. code-block:: c++
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69951.228491.patch
Type: text/x-patch
Size: 3467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191108/3b4ef421/attachment-0001.bin>
More information about the cfe-commits
mailing list