[clang] [clang-format] Add AllowShortType option for AlwaysBreakAfterReturnType. (PR #78011)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 26 23:29:01 PST 2024


owenca wrote:

This would break polly:
```
$ ninja polly-check-format
[27/105] Checking format of /Users/Owe...ude/polly/CodeGen/BlockGenerators.h...
FAILED: tools/polly/polly-check-format1 /Users/Owen/llvm-project/build/tools/polly/polly-check-format1 
cd /Users/Owen/llvm-project/build/tools/polly && /Users/Owen/llvm-project/build/bin/clang-format -sort-includes -style=llvm /Users/Owen/llvm-project/polly/include/polly/CodeGen/BlockGenerators.h | diff -u /Users/Owen/llvm-project/polly/include/polly/CodeGen/BlockGenerators.h -
--- /Users/Owen/llvm-project/polly/include/polly/CodeGen/BlockGenerators.h	2024-01-05 20:58:16
+++ -	2024-01-26 23:25:21
@@ -794,9 +794,9 @@
   /// @param BBMap A mapping from old values to their new values in this block.
   /// @param LTS   A mapping from loops virtual canonical induction variable to
   /// their new values.
-  void
-  generateScalarStores(ScopStmt &Stmt, LoopToScevMapT &LTS, ValueMapT &BBMAp,
-                       __isl_keep isl_id_to_ast_expr *NewAccesses) override;
+  void generateScalarStores(
+      ScopStmt &Stmt, LoopToScevMapT &LTS, ValueMapT &BBMAp,
+      __isl_keep isl_id_to_ast_expr *NewAccesses) override;
 
   /// Copy a single PHI instruction.
   ///
[36/105] Checking format of /Users/Owe...ject/polly/include/polly/ScopInfo.h...
FAILED: tools/polly/polly-check-format35 /Users/Owen/llvm-project/build/tools/polly/polly-check-format35 
cd /Users/Owen/llvm-project/build/tools/polly && /Users/Owen/llvm-project/build/bin/clang-format -sort-includes -style=llvm /Users/Owen/llvm-project/polly/include/polly/ScopInfo.h | diff -u /Users/Owen/llvm-project/polly/include/polly/ScopInfo.h -
--- /Users/Owen/llvm-project/polly/include/polly/ScopInfo.h	2024-01-22 03:28:44
+++ -	2024-01-26 23:25:21
@@ -1987,8 +1987,8 @@
   void addAccessData(MemoryAccess *Access);
 
   /// Add new invariant access equivalence class
-  void
-  addInvariantEquivClass(const InvariantEquivClassTy &InvariantEquivClass) {
+  void addInvariantEquivClass(
+      const InvariantEquivClassTy &InvariantEquivClass) {
     InvariantEquivClasses.emplace_back(InvariantEquivClass);
   }
 
ninja: build stopped: subcommand failed.
```

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


More information about the cfe-commits mailing list