[clang] [clang-scan-deps] Don't inspect Args[0] as an option (PR #109050)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 04:20:41 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 cb98fd977a25d3d778244da4012fd34acf7fab45 73dbd692945899708e2c127ba9972c20e5fcd30f --extensions cpp -- clang/tools/clang-scan-deps/ClangScanDeps.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/tools/clang-scan-deps/ClangScanDeps.cpp b/clang/tools/clang-scan-deps/ClangScanDeps.cpp
index e9e0534e8d..b642a37c79 100644
--- a/clang/tools/clang-scan-deps/ClangScanDeps.cpp
+++ b/clang/tools/clang-scan-deps/ClangScanDeps.cpp
@@ -838,7 +838,8 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
// Reverse scan, starting at the end or at the element before "--".
auto R = std::make_reverse_iterator(FlagsEnd);
auto E = Args.rend();
- // Don't include Args[0] in the iteration; that's the executable, not an option.
+ // Don't include Args[0] in the iteration; that's the executable, not
+ // an option.
if (E != R)
E--;
for (auto I = R; I != E; ++I) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/109050
More information about the cfe-commits
mailing list