[clang] [NFC][analyzer] OOB test consolidation III: 'outofbound' tests (PR #128508)

2025-02-28 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. This is a nice cleanup change. I have checked the test cases and the reasoning behind the removals. It is also welcome that these reasons are documented, at least in the PR. @NagyDonat What do you think about making these reasoning snippe

[clang] [analyzer] Add hack in ArrayBound to cover up missing casts (PR #127117)

2025-02-17 Thread Endre Fülöp via cfe-commits
@@ -588,20 +603,48 @@ void ArrayBoundChecker::performCheck(const Expr *E, CheckerContext &C) const { State, ByteOffset, SVB.makeZeroArrayIndex(), SVB); if (PrecedesLowerBound) { - // The offset may be invalid (negative)... - if (!WithinLowerBound) { -

[clang] [analyzer] Add hack in ArrayBound to cover up missing casts (PR #127117)

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

[clang] [analyzer] Add hack in ArrayBound to cover up missing casts (PR #127117)

2025-02-17 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. LGTM. An interesting thing could be to track in the analyzer the number of suppressed underflows (i.e.: the number of times we resorted to hacking with this solution). That way, we could have more information about how far we deviate fro

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

2025-02-12 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. 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
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] [clang][analyzer][doc] Migrate ClangSA www FAQ section (PR #112831)

2024-10-25 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/112831 From 327a84633d6d2029e11642dac07d63c90f2577d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 17 Oct 2024 19:53:17 +0200 Subject: [PATCH 1/2] [clang][analyzer][doc] Migrate ClangS

[clang] [clang][analyzer][doc] Update Clang SA www docs index.html (PR #112833)

2024-10-25 Thread Endre Fülöp via cfe-commits
@@ -121,10 +80,25 @@ Mac OS X - Other Platforms - For other platforms, please follow the instructions for building the analyzer from - source code. +The static analyzer is part of Clang. Please refer to the +https://releases.llvm.org/download.html";>LLVM +

[clang] [clang][analyzer][doc] Migrate ClangSA www FAQ section (PR #112831)

2024-10-25 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/112831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][doc] Update Clang SA www docs index.html (PR #112833)

2024-10-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/112833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][doc] Update Clang SA www docs index.html (PR #112833)

2024-10-24 Thread Endre Fülöp via cfe-commits
@@ -69,48 +69,7 @@ Clang Static Analyzer -The Clang Static Analyzer is a source code analysis tool that finds bugs in -C, C++, and Objective-C programs. - -Currently it can be run either from the command - line or if you use macOS then within Xcode. When -invoked from the co

[clang] [clang][analyzer][doc] Update Clang SA www docs index.html (PR #112833)

2024-10-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/112833 From 0d9d024b234d72d3b8d1b631ad3994741c6801c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 17 Oct 2024 20:21:03 +0200 Subject: [PATCH 1/2] [clang][analyzer][doc] Update Clang S

[clang] [clang][analyzer][doc] Migrate ClangSA www FAQ section (PR #112831)

2024-10-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/112831 From ffd347bded0846d72dc487d3310e8b36caa6dd0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 17 Oct 2024 19:53:17 +0200 Subject: [PATCH 1/2] [clang][analyzer][doc] Migrate ClangS

[clang] [clang][analyzer][doc] Update Clang SA www docs index.html (PR #112833)

2024-10-17 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/112833 Downloads and releases sections are removed, users are advised to use the conventional ways of acquiring the analyzer. From 37703dc999b1e6a345bbae490316898080972082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?En

[clang] [clang][analyzer][doc] Migrate ClangSA www FAQ section (PR #112831)

2024-10-17 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/112831 The ClangSA documentation lives in RST format, and the FAQ section of the old webpage is also migrated from HTML with this change. From 327a84633d6d2029e11642dac07d63c90f2577d8 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][analyzer] Introduce MutexModeling checker (PR #111381)

2024-10-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/111381 From 4af2c63e4e65b1a8dd9947afdd09fe18362f5cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 3 Oct 2024 18:24:17 +0200 Subject: [PATCH 1/2] [clang][analyzer] Introduce MutexModel

[clang] [clang][analyzer] Introduce MutexModeling checker (PR #111381)

2024-10-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/111381 From 4af2c63e4e65b1a8dd9947afdd09fe18362f5cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 3 Oct 2024 18:24:17 +0200 Subject: [PATCH] [clang][analyzer] Introduce MutexModeling

[clang] [clang][analyzer] Introduce MutexModeling checker (PR #111381)

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

[clang] Introduce MutexModeling checker (PR #111381)

2024-10-07 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: This commit is NFC, and the intention is to allow the integration of this checker into BlockInCriticalSectionChecker and PthreadLockChecker to also be NFC (or very close to that). This patch introduces a new data model for the threading-related information in the static analy

[clang] Introduce MutexModeling checker (PR #111381)

2024-10-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/111381 From 1f0ec8231830bb15199300060b428aa97fb4a35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 3 Oct 2024 18:24:17 +0200 Subject: [PATCH] Introduce MutexModeling checker This patc

[clang] Introduce MutexModeling checker (PR #111381)

2024-10-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/111381 This patch introduces the basic structure for the MutexModeling checker. It adds the checker definition, creates the MutexModeling.cpp file, supporting header files, and updates the necessary build files. The

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-07 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > Usually its hard to see how the implementation changes if anyways all the > surrounding code moves. For such changes, if the change is large (like in > this case, its a 2k+ diff), it feels better to review the individual commits > instead of everything all at once. If we do

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 ready_for_review https://github.com/llvm/llvm-project/pull/109636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

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

[clang] [clang][analyzer][WIP] Introduce modeling for threading related checkers (PR #109636)

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

[clang] [clang][analyzer][WIP] Introduce modeling for threading related checkers (PR #109636)

2024-10-07 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: This patch's primary driving force is reducing code duplication in BlockInCriticalSectionChecker and PthreadLockChecker. This is mainly NFC. The user-facing API is the same, but at least one false positive has been fixed, and the internal state representation has changed. htt

[clang] [NFCI][clang][analyzer] Make ProgramStatePartialTrait a template definition (PR #98150)

2024-07-17 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: @steakhal Thanks for the feedback on the intention behind using this trait. From this perspective, I see merit in being as conservative as possible with the types we allow in the ProgramState. > If the issue was that the warning was cryptic, we can continue the discussion > i

[clang] [NFCI][clang][analyzer] Make ProgramStatePartialTrait a template definition (PR #98150)

2024-07-16 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: The warning just ''Type ProgramStatePartialTrait is incomplete", and to reproduce it here is minimal exmaple: `` https://github.com/llvm/llvm-project/pull/98150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [NFCI][clang][analyzer] Make ProgramStatePartialTrait a template definition (PR #98150)

2024-07-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/98150 N4860 13 [class.derived]/2 mandates that base classes must be complete types. Before this patch, ProgramStatePartialTrait is a forward declaration of a class template, thus an incomplete type. Explicit specializ

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-07-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/97034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-07-04 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: * Updated the HTML pages to use the redirect logic in available_checks.html (instead of deleting them). * Updated the usages of 'the static analyzer' in the files touched by this patch. @steakhal, @NagyDonat, @haoNoQ Thanks for the snappy review! https://github.com/llvm/llvm-p

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-07-04 Thread Endre Fülöp via cfe-commits
@@ -96,11 +96,11 @@ Download Mac OS X Latest build (10.8+): - + checker-279.tar.bz2 (built November 14, 2016) gamesh411 wrote: @haoNoQ Thanks for the insights! I'll also create another PR to clean up the index.html and finish the developer

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-07-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/97032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-07-04 Thread Endre Fülöp via cfe-commits
@@ -126,7 +126,7 @@ Cocoa & Core Foundation Memory Management Annotations gamesh411 wrote: I am unsure which one to link to, so I opted for less but not misleading information with this edit. https://github.com/llvm/llvm-project/pull/97032 ___

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-07-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/97032 From b11a113682a1b998395139e5e4736689c0f9be84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 26 Jun 2024 11:09:33 +0200 Subject: [PATCH 1/2] [clang][analyzer][doc] Migrate checker

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-07-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/97032 From b11a113682a1b998395139e5e4736689c0f9be84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 26 Jun 2024 11:09:33 +0200 Subject: [PATCH 1/2] [clang][analyzer][doc] Migrate checker

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-07-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/97032 From b11a113682a1b998395139e5e4736689c0f9be84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 26 Jun 2024 11:09:33 +0200 Subject: [PATCH 1/2] [clang][analyzer][doc] Migrate checker

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-07-02 Thread Endre Fülöp via cfe-commits
@@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build +=== + +This document provides guidelines for running Clang Static Analyzer from the command line on whole projects. +CodeChecker and scan-build are two CLI tools for usi

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-07-02 Thread Endre Fülöp via cfe-commits
@@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build +=== + +This document provides guidelines for running Clang Static Analyzer from the command line on whole projects. +CodeChecker and scan-build are two CLI tools for usi

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-07-02 Thread Endre Fülöp via cfe-commits
@@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build +=== + +This document provides guidelines for running Clang Static Analyzer from the command line on whole projects. +CodeChecker and scan-build are two CLI tools for usi

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-07-01 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: I have tried to ensure no information is lost with this change. I have cross-checked the history of the checker's HTML files with commits that introduce checkers and have found that we tend to add checkers only to the RST files and sometimes miss the fact that there is another

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

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

[clang] [clang][analyzer][doc] Migrate user-related docs from HTML to RST (PR #97034)

2024-06-28 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: Some parts, especially Apple-related sections, may no longer be relevant in the docs. Please share insights into which parts should be corrected or omitted from the migration process. The legacy Clang builds (the most recent one uses Clang version 4.0.0) are still on the clang

[clang] [clang][analyzer][doc] Migrate checkers-related docs from HTML to RST (PR #97032)

2024-06-28 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/97032 Documentation for the checkers is kept up to date in RST files. This patch removes duplication by replacing the HTML docs with links to docs generated from the RST. From b11a113682a1b998395139e5e4736689c0f9be84

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

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

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-06-03 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 1da3d4dc3c74f1240e7d921c97b0c7eea2a53e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 29 May 2024 00:38:07 +0200 Subject: [PATCH 1/2] [clang][analyzer] Move unix.BlockInCri

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: Rebased and squashed noisy small commits. https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 1da3d4dc3c74f1240e7d921c97b0c7eea2a53e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 29 May 2024 00:38:07 +0200 Subject: [PATCH] [clang][analyzer] Move unix.BlockInCritica

[clang] [llvm] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 429cbcfb14295aaf07997082fed0820b6f79f4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:28:12 +0200 Subject: [PATCH 1/2] [workflow] Add AI review for PRs ---

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

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

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 ready_for_review https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

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

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/93799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/93812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 895ff8779b11294f132604e40572ebec8b6bc4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 29 May 2024 00:38:07 +0200 Subject: [PATCH 1/2] [clang][analyzer] Move unix.BlockInCri

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

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

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93812 From 54f117258b936b9448e2fb93dc2307e23629b85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 28 May 2024 23:13:07 +0200 Subject: [PATCH] [clang][analyzer][NFC] Improve docs of al

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-31 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > It's good to document this, the commit LGTM. Are you planning to fix this > soon? I have been looking into the [alpha.unix.PthreadLock](https://clang.llvm.org/docs/analyzer/checkers.html#alpha-unix-pthreadlock-c) checker. By reusing the logic there https://github.com/llvm/

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > What's the relationship between this PR and #93799 ? > > Otherwise, the change LGTM, but you might want to either unify these two NFC > changes into a single commit or ensure that they're independent. Thanks for checking this! To be honest, I started working on this, and the

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

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

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH 1/3] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93815 After recent improvements, and testing on open source projects, the checker is ready to move out of the alpha package. I would like to land #93799 and #93799 first, then this modification. I have ran this chec

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93812 - Enhanced descriptions for blocking and critical section functions - Added an additional code sample highlighting interleaved C and C++ style mutexes - Introduced a new section on limitations From 8cb24070e2c

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH 1/2] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH] [clang][analyzer][NFC] Add test for a limi

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93799 …kInCriticalSection checker Updated the documentation in `checkers.rst` to include an example of how `trylock` function is handled. Added a new test for a scenario where `pthread_mutex_trylock` is used, demon

[clang] [clang][analyzer] Fix a crash in alpha.unix.BlockInCriticalSection (PR #90030)

2024-05-15 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From af05be993f4789705cde374dbf7efefd9a18f1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix alpha.unix.BlockI

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection (PR #90030)

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

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection (PR #90030)

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

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: After reducing a crashing TU, I have found, that the issue came up without CTU analysis as well. I have added a test case that demonstrates the crash without the fix. I also updated the commit message to reflect the real cause. https://github.com/llvm/llvm-project/pull/90030 __

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From af05be993f4789705cde374dbf7efefd9a18f1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH] [clang][analyzer] Fix alpha.unix.BlockInCri

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From ca7be03d939d3375e9075fc287393d3b5e5a2c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix alpha.unix.BlockI

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From de695f8e556e1efd6b2a4e69f916467af94e0c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix alpha.unix.BlockI

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. Emitting a note to the location where the first part of the detected pattern (the `setuid(getuid())` call) seems like useful information, but this patch is great as it is. You could also add it in another patch if it is not trivial. http

[clang] [analyzer] Use explicit call description mode in more checkers (PR #90974)

2024-05-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. LGTM, I especially like how InnerPointerChecker was simplified. https://github.com/llvm/llvm-project/pull/90974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-04-25 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/90030 In CTU there is not always an AnalysisDeclContext for a given call. This led to crashes. The AnalysisDeclContext access is now checked. From de695f8e556e1efd6b2a4e69f916467af94e0c0d Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/80029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/3] [clang][analyzer] Improve BlockInCriti

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -70,73 +202,121 @@ class BlockInCriticalSectionChecker : public Checker { } // end anonymous namespace -REGISTER_TRAIT_WITH_PROGRAMSTATE(MutexCounter, unsigned) +REGISTER_LIST_WITH_PROGRAMSTATE(ActiveCritSections, CritSectionMarker) -void BlockInCriticalSectionChecker::

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/2] [clang][analyzer] Improve BlockInCriti

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-10 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: As keeping the trivial change that this PR was before, and thanks to the fact that the checker needed a major overhaul, I have increased the scope of this change to support the use cases mentioned by @balazske. That is why I am re-requesting a review. https://github.com/llvm/l

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

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

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-03-10 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH] [clang][analyzer] Improve BlockInCriticalS

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

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

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
@@ -27,20 +27,48 @@ class IdentifierInfo; namespace clang { namespace ento { - -enum CallDescriptionFlags : unsigned { - CDF_None = 0, - - /// Describes a C standard function that is sometimes implemented as a macro - /// that expands to a compiler builtin with some __built

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

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

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/83432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > > The flag approach can probably make a sense for namespace handling (match > > the exact specified namespace, or allow a prefix before, or even something > > in between). > > Even in that case, I'd prefer a separate second parameter (that's either > boolean or a different

[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)

2024-02-21 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/81034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)

2024-02-21 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: I checked many false positives, even those that were not FP at first sight; I think we can live without them. I also agree that we should strive to handle comparison evaluation more uniformly and preferably behind the API barrier of the constraint manager. LGTM https://github.

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-02-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From f7875a7f1ff20f3cf850ce1c23bec6d6c3d88d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/2] [clang][analyzer] Add note tags to al

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-01-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From f7875a7f1ff20f3cf850ce1c23bec6d6c3d88d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH] [clang][analyzer] Add note tags to alpha.

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-01-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/80029 checker On entering a critical section, a note tag is now placed along the bugpath. From 54da4f5ff32a0e35777fd77f6a928c65789c22af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue,

  1   2   >