[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/125494 From d938ccc8bf6a0498ea2bf0fad89f4c207e8813f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 23 Dec 2024 12:20:35 +0100 Subject: [PATCH 1/3] [analyzer][NFC] Add option assume-one-itera

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Donát Nagy via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Reviewed the changes and it looks correct. Please change the flag name (along with the comments to `assume-at-least-one-iteration`. Please also review Edre's comments, those appear relevant. https://github.com/llvm/llvm-project/pull/12549

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Endre Fülöp via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 commented: IMO. This enables a heuristic that is closer to real-world code usage, and having this option is valuable. I left one comment inline. https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-04 Thread via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-04 Thread Balazs Benics via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-04 Thread Donát Nagy via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-03 Thread Balazs Benics via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-03 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > My preference would be to not have NFC tags for off by default features. OK, I removed the [NFC] tag from the PR title and adjusted the description accordingly. https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits maili

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits