[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 01:21:59 PST 2024


================
@@ -914,16 +914,31 @@ struct FormatStyle {
   /// Different ways to break after the function definition or
   /// declaration return type.
   enum ReturnTypeBreakingStyle : int8_t {
-    /// Break after return type automatically.
-    /// ``PenaltyReturnTypeOnItsOwnLine`` is taken into account.
+    /// This is **deprecated**. See ``Automatic`` below.
+    RTBS_None,
+    /// Break after return type based on ``PenaltyReturnTypeOnItsOwnLine``.
     /// \code
     ///   class A {
     ///     int f() { return 0; };
     ///   };
     ///   int f();
     ///   int f() { return 1; }
+    ///   int
+    ///   LongName::AnotherLongName();
     /// \endcode
-    RTBS_None,
+    RTBS_Automatic,
+    /// Same as ``Automatic`` above, expect that there is no break after short
----------------
owenca wrote:

```suggestion
    /// Same as ``Automatic`` above, except that there is no break after short
```

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


More information about the cfe-commits mailing list