[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-02 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Owen Pan via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control.

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Owen Pan via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control.

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70768 >From 7e6030532f99b4128807631e993609ce40171043 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 30 Oct 2023 22:50:27 -0700 Subject: [PATCH 1/2] [clang-format] Treat empty for/while loops as short loops A

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Owen Pan via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control.

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Björn Schäpers via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control.

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Owen Pan via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control.

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Björn Schäpers via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control.

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: The code is okay, but I do not share the intention. https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes A for/while loop with only a semicolon as its body should be treated as an empty loop. Fixes #61708. --- Full diff: https://github.com/llvm/llvm-project/pull/70768.diff 2 Files Affected: - (modified)

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/70768 A for/while loop with only a semicolon as its body should be treated as an empty loop. Fixes #61708. >From 7e6030532f99b4128807631e993609ce40171043 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 30 Oct