[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 12:01:01 PDT 2024


================
@@ -2822,6 +2822,46 @@ struct FormatStyle {
   /// \version 11
   IndentExternBlockStyle IndentExternBlock;
 
+  /// IndentNamespaceAliases is the type of indenting of namespace aliases
+  /// irrespective of NamespaceIndentation.
+  bool IndentNamespaceAliases;
+
+  /// IndentUsingDeclarations is the type of indenting of using declarations
+  /// irrespective of NamespaceIndentation.
+  bool IndentUsingDeclarations;
+
+  enum DecorateReflowedCommentsStyle : int8_t {
+    /// Never:
+    /// don't use any decorator
+    /// \code
+    /// /* blah blah blah blah blah blah blah blah blah blah blah blah blah
+    ///    blah blah blah blah blah blah blah blah */
+    /// \endcode
+    DRC_Never,
+    /// Always:
+    /// Always decorate with the decorator
+    /// \code
+    /// /* blah blah blah blah blah blah blah blah blah blah blah blah blah
+    ///  * blah blah blah blah blah blah blah blah */
+    /// \endcode
+    DRC_Always,
+    /// FirstInLine:
+    /// Use decoration only for First in line block comments
+    /// \code
+    /// using namespace std; /* blah blah blah blah blah blah blah blah blah
+    ///                         blah blah blah */
+    ///
+    /// /* blah blah blah blah blah blah blah blah blah blah blah blah blah
+    ///  * blah blah blah blah blah blah blah blah */
+    /// using namespace std;
+    /// \endcode
+    DRC_FirstInLineOnly
+  };
+
+  /// reflowed block comments decoration style
+  /// \version 17
+  DecorateReflowedCommentsStyle DecorateReflowedComments;
----------------
HazardyKnusperkeks wrote:

Please sort Alphabetically.

https://github.com/llvm/llvm-project/pull/102894


More information about the cfe-commits mailing list