[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: @steakhal Thanks for the updates, I'm completely satisfied with them. I don't see any connection between this commit and the buildbot failures :thinking: ... they are probably unrelated. https://github.com/llvm/llvm-project/pull/140924 __

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,357 @@ +//===- unittests/StaticAnalyzer/BlockEntranceCallbackTest.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. I also read the tests and the change LGTM if you move the explanations from the very helpful review comments https://github.com/llvm/llvm-project/pull/140924/files#r2107471659 and https://github.com/llvm/llvm-project/pull/140924/files#r2

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Oops, forgot to update the title before merging, so it still refers to `getDebugName` :sweat: https://github.com/llvm/llvm-project/pull/141511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/141511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

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

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,357 @@ +//===- unittests/StaticAnalyzer/BlockEntranceCallbackTest.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
@@ -166,6 +179,23 @@ class CheckerDocumentation /// check::Bind void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &) const {} + /// Called after a CFG edge is taken within a function. + /// + /// This callback can be used to obtain information about poten

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

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

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/141511 From e19773f3a1c52213ec1afe5329c2715b6119ed33 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 15 May 2025 19:44:55 +0200 Subject: [PATCH 1/2] [NFC][analyzer] Rename getTagDescription to getDebugName -

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > In hind sight, maybe "debugTag" is the best of both worlds. WDYT? Why not :smile: ? https://github.com/llvm/llvm-project/pull/141511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

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

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
@@ -548,6 +564,8 @@ class CheckerProgramPointTag : public SimpleProgramPointTag { template class Checker : public CHECK1, public CHECKs..., public CheckerBase { public: + using BlockEntrance = clang::BlockEntrance; NagyDonat wrote: > As I was thinking about

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat ready_for_review https://github.com/llvm/llvm-project/pull/141511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Rename getTagDescription to getDebugName (PR #141511)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/141511 None From e19773f3a1c52213ec1afe5329c2715b6119ed33 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 15 May 2025 19:44:55 +0200 Subject: [PATCH] [NFC][analyzer] Rename getTagDescription to getDebugName

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/139256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
@@ -166,6 +179,23 @@ class CheckerDocumentation /// check::Bind void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &) const {} + /// Called after a CFG edge is taken within a function. + /// + /// This callback can be used to obtain information about poten

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-26 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I reverted this PR to an earlier stage and added a more verbose explanation for the (current) requirement that classes derived from `CheckerFamily` need to override `getTagDescription`. @steakhal In addition to the other changes, I also reverted commit https://github.com/llv

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
@@ -548,6 +564,8 @@ class CheckerProgramPointTag : public SimpleProgramPointTag { template class Checker : public CHECK1, public CHECKs..., public CheckerBase { public: + using BlockEntrance = clang::BlockEntrance; NagyDonat wrote: Why is this `using` requi

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

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

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I finished reviewing the non-test code and overall it LGTM, but I added two minor questions as inline comments. I'll review the tests tomorrow. https://github.com/llvm/llvm-project/pull/140924 ___ cfe-commits ma

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-23 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Thanks for your understanding – and sorry for stretching this review process for so long. I will push and merge the reduced commit on Monday (to be able to follow up its effect in the CI). I will probably also create a spinoff PR that contains some minor NFC code quality impr

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-23 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I don't think I have time for this. I'm really sorry. I read the first couple > paragraphs then gave up. I'm really short of time. The two commits made sense. And resolved most if not all of my major concerns. I see, and I understand that this review process became much longe

[clang] [analyzer] Add previous CFG block to BlockEntrance ProgramPoints (PR #140861)

2025-05-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: LGTM, straightforward simple extension. https://github.com/llvm/llvm-project/pull/140861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add previous CFG block to BlockEntrance ProgramPoints (PR #140861)

2025-05-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/140861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I have yet another implementation idea where: - boilerplate is either minimal or nonexistent; - there is no need to pass an additional string value (the debug name) through the checker registry code; - the debug name is guaranteed to be the same as the class name. The minimal-b

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

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

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Donát Nagy via cfe-commits
@@ -115,9 +115,22 @@ class CheckerRegistry { public: /// Adds a checker to the registry. Use this non-templated overload when your /// checker requires custom initialization. - void addChecker(RegisterCheckerFn Fn, ShouldRegisterFunction sfn, + void addChecker(RegisterChe

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I'm happy as this PR looks right now, except for having that backward > compatibility overload for plugins. > We can just move on with life and let them migrate once the next clang is > out. To me, the upgrade path looks straightforward and this isn't the only > API they wil

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Donát Nagy via cfe-commits
@@ -115,9 +115,22 @@ class CheckerRegistry { public: /// Adds a checker to the registry. Use this non-templated overload when your /// checker requires custom initialization. - void addChecker(RegisterCheckerFn Fn, ShouldRegisterFunction sfn, + void addChecker(RegisterChe

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139256 From 3bead14691a29482705c76951eaed176bfbfc996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 8 May 2025 18:46:41 +0200 Subject: [PATCH 01/12] [analyzer][NFC] Introduce framework for ch

[clang] [analyzer][NFC] Move PrettyStackTraceLocationContext into dispatchWorkItem (PR #140035)

2025-05-20 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. I'm happy to see that this change simplifies the logic and moves several scattered stacktrace helpers to a common location. https://github.com/llvm/llvm-project/pull/140035 ___ cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-20 Thread Donát Nagy via cfe-commits
@@ -115,9 +115,22 @@ class CheckerRegistry { public: /// Adds a checker to the registry. Use this non-templated overload when your /// checker requires custom initialization. - void addChecker(RegisterCheckerFn Fn, ShouldRegisterFunction sfn, + void addChecker(RegisterChe

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

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

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-19 Thread Donát Nagy via cfe-commits
NagyDonat wrote: In commit https://github.com/llvm/llvm-project/pull/139256/commits/13f4a3011e76c5665ca295ef597eb130f356df68 I implemented your suggestion that the debug name of the checker name should be derived from the name fragment of the registration functions (which is called `CLASS` bu

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-19 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139256 From 3bead14691a29482705c76951eaed176bfbfc996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 8 May 2025 18:46:41 +0200 Subject: [PATCH 01/11] [analyzer][NFC] Introduce framework for ch

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-19 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > First, let's align on why we currently have the concept of "modeling" and > "reporting" checkers. I think you are probably already aware of this, but > let's clarify this. > > It's a great property if the exploded graph remains sort of the same no > matter what checkers are

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-19 Thread Donát Nagy via cfe-commits
NagyDonat wrote: You're right, repeating the same measurement produced significantly different results: | Project | before this PR | this PR | Ratio | | --- | --- | --- | --- | | memcached | 25.70 | 28.12 | 109.4% | | tmux | 74.18 | 74.30 | 100.2% | | curl | 219.55 | 217.06 | 98.9% | | twin | 5

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-17 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > RT is not a concern to me in this case. The reason why I decided to check the runtime is because you said that "It not only simplifies it but also makes if faster. " in an earlier commit. My first runtime measurement finished and unfortunately it seems that this PR somehow

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-17 Thread Donát Nagy via cfe-commits
NagyDonat wrote: ## Accommodating the modeling checkers in the checker family framework _I thought a bit about the place of the modeling checkers in the checker family framework (which is introduced in this PR). This question is a bit architectural, so in theory this post would "belong to" dis

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-17 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM if you implement the changes suggested by EugeneZelenko. https://github.com/llvm/llvm-project/pull/140086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-17 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I'd recommend you to look at the `Checkers.inc` file in the build folder > somewhere - the file that gets generated from the `Checkers.td`. Notice that > every checker has a `registerXXX` and `shouldRegisterXXX` function where XXX > is the verbatim spelling of the checker cl

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I think the order is deterministic, and due to how checker dependencies are > resolved, the backend checker would be always the one that is registered > first. I have not checked this. You're correct wrt the current state of the code but I'm planning to get rid of many "bac

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I started a measurement on open source projects to see the effect of this change on the (total) analysis runtime. I don't expect much but if this turns out to be non-negligible, then I will prioritize this direction. https://github.com/llvm/llvm-project/pull/139939 ___

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-15 Thread Donát Nagy via cfe-commits
NagyDonat wrote: :thinking: These strings are only relevant for debugging, so this whole machinery could be limited to debug builds (or builds with an off-by-default flag). That way these debug names would be still available for the very specific situation when somebody is debugging the analyz

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-15 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I prototyped a "get the name of template argument as string" solution which is sufficient for our use cases (where the checker family is a non-templated class type) and works on all supported versions of all three compilers (GCC, clang, MSVC) that are supported for LLVM compil

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
@@ -4096,7 +4096,8 @@ std::string ExprEngine::DumpGraph(bool trim, StringRef Filename) { std::string ExprEngine::DumpGraph(ArrayRef Nodes, StringRef Filename) { - std::unique_ptr TrimmedG(G.trim(Nodes)); + TrimGraphWorklist Worklist{Nodes};

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

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

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I pushed a heap of small commits which do various simple cleanup in this neighborhood. > If we could harden the bug EQclass part for deterministically selecting the > sequence of the bug reports we would try, that would make the outcomes stable > no matt

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
@@ -2633,7 +2633,8 @@ BugPathGetter::BugPathGetter(const ExplodedGraph *OriginalGraph, assert(I->isValid() && "We only allow BugReporterVisitors and BugReporter itself to " "invalidate reports!"); -Nodes.emplace_back(I->getErrorNode()); +if (c

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 From 8a33087fcd94d326cac602a6be83a1b34b43e1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 14 May 2025 19:24:37 +0200 Subject: [PATCH 01/10] [WIP][analyzer] Refactor `ExplodedGraph::

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
@@ -479,25 +479,20 @@ ExplodedGraph::trim(ArrayRef Sinks, // in the trimmed graph, then add the corresponding edges with // `addPredecessor()`, otherwise add them to the worklist. for (const ExplodedNode *Pred : N->Preds) { - auto Iterator = ForwardMap->find(Pr

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
@@ -442,109 +442,65 @@ std::unique_ptr ExplodedGraph::trim(ArrayRef Sinks, InterExplodedGraphMap *ForwardMap, InterExplodedGraphMap *InverseMap) const { - // FIXME: The two-pass algorithm of this function (which was introduced in - // 2

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-14 Thread Donát Nagy via cfe-commits
NagyDonat wrote: This is the cleanup of `ExplodedGraph::trim()` that I promised at https://github.com/llvm/llvm-project/commit/31e981ca1dc323c8a32012cb60a0a8fe3985db1a. This significantly simplifies the algorithm and should be equivalent in a theoretical sense, but unfortunately it changes the

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/139939 ...because its implementation was using a complicated two-pass graph traversal while in fact one pass is sufficient for performing that trimming operation. Note that this commit changes the interface of `trim

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
NagyDonat wrote: This change only affects the documentation, the C++ assertion failure detected by the buildbot is completely unrelated. https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one root (PR #139903)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139903 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one root (PR #139903)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/139903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one root (PR #139903)

2025-05-14 Thread Donát Nagy via cfe-commits
NagyDonat wrote: (By the way, the commit message `Use` intended to be ```Use `getRootLocationContext()` ``` but the shell evaluated the backticks.) https://github.com/llvm/llvm-project/pull/139903 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one root (PR #139903)

2025-05-14 Thread Donát Nagy via cfe-commits
@@ -46,8 +46,9 @@ void AnalyzerStatsChecker::checkEndAnalysis(ExplodedGraph &G, llvm::SmallPtrSet reachable; // Root node should have the location context of the top most function. - const ExplodedNode *GraphRoot = *G.roots_begin(); - const LocationContext *LC = GraphRoo

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one root (PR #139903)

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

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one roots (PR #139903)

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

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one roots (PR #139903)

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

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one roots (PR #139903)

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

[clang] [NFC][analyzer] Clarify that ExplodedGraph has only one roots (PR #139903)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/139903 Previously the class `ExplodedGraph` had a data member called `Roots` which could (in theory) store multiple root nodes -- but in practice exploded graphs always had at most one root node (zero was possible f

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/135169 From 705372a8a2f6e87f5fdf6b0e99bfa6a13408c5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 3 Apr 2025 20:13:04 +0200 Subject: [PATCH 01/11] [NFC][analyzer] Document configuration opt

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
NagyDonat wrote: If I'm not mistaken I handled every review comment. Thanks for all the useful suggestions! https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/135169 From 705372a8a2f6e87f5fdf6b0e99bfa6a13408c5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 3 Apr 2025 20:13:04 +0200 Subject: [PATCH 01/10] [NFC][analyzer] Document configuration opt

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/135169 From 705372a8a2f6e87f5fdf6b0e99bfa6a13408c5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 3 Apr 2025 20:13:04 +0200 Subject: [PATCH 1/9] [NFC][analyzer] Document configuration optio

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-14 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -25,25 +25,23 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker> { +class DivZeroChecker : public CheckerFamily> { void reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const; voi

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -227,8 +263,11 @@ def get_option_list(input_file): p = argparse.ArgumentParser() p.add_argument("--options-def", help="path to AnalyzerOptions.def") -p.add_argument("--template", help="path of template file") -p.add_argument("--out", help="path of output file") +p.add_argum

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,115 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Sorry for my delay. I missed the review request. No problem, happens with anyone :smile: https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [NFC][analyzer] Document configuration options (PR #135169)

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

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/135169 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I handled all the inline comments. I have one minor architectural question: we should standardize a way to assign a single tag description (that is, identifiers that can be used in debug dumps) to each checker family. The old code automatically used the name of the first chec

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

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

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -56,11 +54,11 @@ static const Expr *getDenomExpr(const ExplodedNode *N) { void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const { - if (!isPartEnabled(DivideZeroChecker)) + if (!DivideZeroChecker.i

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -25,25 +25,23 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker> { +class DivZeroChecker : public CheckerFamily> { void reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const; voi

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139256 From 3bead14691a29482705c76951eaed176bfbfc996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 8 May 2025 18:46:41 +0200 Subject: [PATCH 1/3] [analyzer][NFC] Introduce framework for chec

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -64,9 +65,9 @@ class CheckerFn { Func Fn; public: - CheckerBase *Checker; + CheckerBackend *Checker; - CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) {} + CheckerFn(CheckerBackend *checker, Func fn) : Fn(fn), Checker(checker) {}

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -56,11 +54,11 @@ static const Expr *getDenomExpr(const ExplodedNode *N) { void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const { - if (!isPartEnabled(DivideZeroChecker)) + if (!DivideZeroChecker.i

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -50,11 +50,11 @@ bool CheckerManager::hasPathSensitiveCheckers() const { } void CheckerManager::reportInvalidCheckerOptionValue( -const CheckerBase *C, CheckerPartIdx Idx, StringRef OptionName, +const CheckerFrontend *CP, StringRef OptionName, NagyD

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -3411,12 +3411,12 @@ PathSensitiveBugReporter::generateDiagnosticForConsumerMap( } void BugReporter::EmitBasicReport(const Decl *DeclWithIssue, - const CheckerBase *Checker, StringRef Name, + const CheckerFr

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139256 From 3bead14691a29482705c76951eaed176bfbfc996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 8 May 2025 18:46:41 +0200 Subject: [PATCH 1/2] [analyzer][NFC] Introduce framework for chec

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -3411,12 +3411,12 @@ PathSensitiveBugReporter::generateDiagnosticForConsumerMap( } void BugReporter::EmitBasicReport(const Decl *DeclWithIssue, - const CheckerBase *Checker, StringRef Name, + const CheckerFr

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

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

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @steakhal Gentle ping. https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

  1   2   3   4   5   6   7   8   9   10   >