[clang] [clang-format] Add AllowShortType option for AlwaysBreakAfterReturnType. (PR #78011)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 27 02:19:02 PST 2024
owenca wrote:
OTOH, if we change `LLVMStyle.AlwaysBreakAfterReturnType` to `RTBS_AllowShortType`, we get the following:
```
$ ninja polly-check-format
[24/105] Checking format of /Users/Owe...olly/include/polly/DependenceInfo.h...
FAILED: tools/polly/polly-check-format16 /Users/Owen/llvm-project/build/tools/polly/polly-check-format16
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/DependenceInfo.h | diff -u /Users/Owen/llvm-project/polly/include/polly/DependenceInfo.h -
--- /Users/Owen/llvm-project/polly/include/polly/DependenceInfo.h 2024-01-05 20:24:43
+++ - 2024-01-27 02:13:13
@@ -332,8 +332,8 @@
void initializeDependenceInfoPass(llvm::PassRegistry &);
void initializeDependenceInfoPrinterLegacyPassPass(llvm::PassRegistry &);
void initializeDependenceInfoWrapperPassPass(llvm::PassRegistry &);
-void initializeDependenceInfoPrinterLegacyFunctionPassPass(
- llvm::PassRegistry &);
+void
+initializeDependenceInfoPrinterLegacyFunctionPassPass(llvm::PassRegistry &);
} // namespace llvm
#endif
[26/105] Checking format of /Users/Owe...polly/include/polly/LinkAllPasses.h...
FAILED: tools/polly/polly-check-format21 /Users/Owen/llvm-project/build/tools/polly/polly-check-format21
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/LinkAllPasses.h | diff -u /Users/Owen/llvm-project/polly/include/polly/LinkAllPasses.h -
--- /Users/Owen/llvm-project/polly/include/polly/LinkAllPasses.h 2024-01-05 20:58:16
+++ - 2024-01-27 02:13:13
@@ -138,8 +138,8 @@
void initializeDependenceInfoPass(llvm::PassRegistry &);
void initializeDependenceInfoPrinterLegacyPassPass(llvm::PassRegistry &);
void initializeDependenceInfoWrapperPassPass(llvm::PassRegistry &);
-void initializeDependenceInfoPrinterLegacyFunctionPassPass(
- llvm::PassRegistry &);
+void
+initializeDependenceInfoPrinterLegacyFunctionPassPass(llvm::PassRegistry &);
void initializeIslAstInfoWrapperPassPass(llvm::PassRegistry &);
void initializeIslAstInfoPrinterLegacyPassPass(llvm::PassRegistry &);
void initializeCodeGenerationPass(llvm::PassRegistry &);
[33/105] Checking format of /Users/Owe...ect/polly/unittests/Isl/IslTest.cpp...
ninja: build stopped: subcommand failed.
```
which is an improvement IMO.
https://github.com/llvm/llvm-project/pull/78011
More information about the cfe-commits
mailing list