[Openmp-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Mar 22 11:06:46 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff cd8286a667d568c4319b09baa63ba899e3101a19 2dfda2e4b11c7ea0a81dd4dcd43aa426039d1e0a -- clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp clang/test/CXX/lex/lex.literal/lex.string/p4.cpp clang/test/CodeGen/fpconstrained.c clang/test/CodeGen/fpconstrained.cpp clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp clang/test/CodeGenCXX/debug-info-atexit-stub.cpp clang/test/Driver/ps4-ps5-relax-relocations.c clang/test/FixIt/fixit-newline-style.c clang/test/Frontend/rewrite-includes-macros.cpp clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h clang/test/Frontend/system-header-line-directive-ms-lineendings.c clang/test/Lexer/minimize_source_to_dependency_directives_include.c clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c clang/test/Preprocessor/macro_vaopt_check.cpp clang/test/Preprocessor/macro_vaopt_expand.cpp clang/test/Sema/aarch64-sve-vector-log-ops.c clang/test/Sema/aarch64-sve-vector-trig-ops.c clang/test/Sema/incorrect_pure.cpp clang/test/Sema/riscv-rvv-vector-log-ops.c clang/test/Sema/riscv-rvv-vector-trig-ops.c clang/test/SemaCXX/attr-non-x86-no_caller_saved_registers.cpp clang/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp clang/test/SemaCXX/compound-literal.cpp clang/test/SemaCXX/cxx23-static-callop-lambda-expression.cpp clang/test/SemaCXX/vla-ext-diag.cpp clang/test/SemaCXX/warn-redundant-move.cpp clang/test/SemaCXX/warn-shadow.cpp clang/test/SemaTemplate/default-expr-arguments-3.cpp compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp llvm/test/tools/llvm-pdbutil/Inputs/TypeServerTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
index 5b54c68161..63b4da3502 100644
--- a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
@@ -11,7 +11,7 @@
#include <string.h>
-char kChars[] = { 'f', 'o', 'o' };
+char kChars[] = {'f', 'o', 'o'};
int main(int argc, char **argv) {
char *copy = strndup(kChars, 3);
diff --git a/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp b/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
index d5b96472eb..1519b625fa 100644
--- a/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
+++ b/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
@@ -5,36 +5,28 @@
#include <stdio.h>
#else
int main();
-extern "C"
-{
- int _fltused;
- void mainCRTStartup() { main(); }
- void printf(const char*, ...) {}
+extern "C" {
+int _fltused;
+void mainCRTStartup() { main(); }
+void printf(const char *, ...) {}
}
#endif
-void crash(bool crash_self)
-{
- printf("Before...\n");
- if(crash_self)
- {
- printf("Crashing in 3, 2, 1 ...\n");
- *(volatile int*)nullptr = 0;
- }
- printf("After...\n");
+void crash(bool crash_self) {
+ printf("Before...\n");
+ if (crash_self) {
+ printf("Crashing in 3, 2, 1 ...\n");
+ *(volatile int *)nullptr = 0;
+ }
+ printf("After...\n");
}
-int foo(int x, float y, const char* msg)
-{
- bool flag = x > y;
- if(flag)
- printf("x = %d, y = %f, msg = %s\n", x, y, msg);
- crash(flag);
- return x << 1;
-}
-
-int main()
-{
- foo(10, 3.14, "testing");
+int foo(int x, float y, const char *msg) {
+ bool flag = x > y;
+ if (flag)
+ printf("x = %d, y = %f, msg = %s\n", x, y, msg);
+ crash(flag);
+ return x << 1;
}
+int main() { foo(10, 3.14, "testing"); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/86318
More information about the Openmp-commits
mailing list