[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/97418 >From 69f2b22cf5dc7a3a5b45c00cc867685dc66b397f Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 2 Jul 2024 15:01:22 +0200 Subject: [PATCH] [analyzer][docs] Add clang-19 release notes for CSA ---

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
steakhal wrote: > > Thanks for the ping. Looks really nice! FYI I just came across a case last > > week w.r.t asm gotos. You can have a read > > [here](https://sonarsource.atlassian.net/browse/CPP-5459) if you are > > interested in the subject. > > Thank you! Looks interesting. Does this

[clang] [analyzer] Splitting TaintPropagation checker into reporting and mode… (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -1122,10 +1131,20 @@ void GenericTaintChecker::taintUnsafeSocketProtocol(const CallEvent , } /// Checker registration -void ento::registerGenericTaintChecker(CheckerManager ) { +void ento::registerTaintPropagationChecker(CheckerManager ) { Mgr.registerChecker(); }

[clang] [analyzer] Splitting TaintPropagation checker into reporting and mode… (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I like the separation. Thanks. https://github.com/llvm/llvm-project/pull/98157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Splitting TaintPropagation checker into reporting and mode… (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -1122,10 +1131,20 @@ void GenericTaintChecker::taintUnsafeSocketProtocol(const CallEvent , } /// Checker registration -void ento::registerGenericTaintChecker(CheckerManager ) { +void ento::registerTaintPropagationChecker(CheckerManager ) { Mgr.registerChecker(); }

[clang] [analyzer] Splitting TaintPropagation checker into reporting and mode… (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -2,10 +2,13 @@ Taint Analysis Configuration -The Clang Static Analyzer uses taint analysis to detect security-related issues in code. -The backbone of taint analysis in the Clang SA is the `GenericTaintChecker`, which the user can access via

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

2024-07-10 Thread Balazs Benics via cfe-commits
steakhal wrote: > 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 specializations of forward > declared templates are also incomplete

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,90 @@ +//===- ExprEngineVisitTest.cpp ---===// steakhal wrote: I think this should have the same length as the closing one. https://github.com/llvm/llvm-project/pull/95409

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,90 @@ +//===- ExprEngineVisitTest.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: Apache-2.0

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -2057,11 +2057,16 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, llvm_unreachable("Support for MatrixSubscriptExpr is not implemented."); break; -case Stmt::GCCAsmStmtClass: +case Stmt::GCCAsmStmtClass: { Bldr.takeNodes(Pred); -

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Thanks for the ping. Looks really nice! FYI I just came across a case last week w.r.t asm gotos. You can have a read [here](https://sonarsource.atlassian.net/browse/CPP-5459) if you are interested in the subject.

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-08 Thread Balazs Benics via cfe-commits
steakhal wrote: Ping. https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Balazs Benics via cfe-commits
@@ -346,6 +352,39 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// The simplest example of a concrete compound value is nonloc::CompoundVal, +/// which represents a concrete r-value of an initializer-list

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Balazs Benics via cfe-commits
@@ -326,6 +326,12 @@ class LocAsInteger : public NonLoc { static bool classof(SVal V) { return V.getKind() == LocAsIntegerKind; } }; +/// The simplest example of a concrete compound value is nonloc::CompoundVal, +/// which represents a concrete r-value of an

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Makes sense. It's good to see some love for the docs. https://github.com/llvm/llvm-project/pull/97407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/97407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/97418 >From 69f2b22cf5dc7a3a5b45c00cc867685dc66b397f Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 2 Jul 2024 15:01:22 +0200 Subject: [PATCH] [analyzer][docs] Add clang-19 release notes for CSA ---

[clang] [clang][docs] Move entries around (PR #97416)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/97416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/97418 The day is coming for creating the release branch for clang-19, [scheduled](https://discourse.llvm.org/t/llvm-19-release-schedule-and-planning/79828) for the 23rd of July. Let's start syncing the ReleaseNotes,

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal milestoned https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Move entries around (PR #97416)

2024-07-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/97416 Let's just move these under the `Non-comprehensive list of changes in this release` section. Resolves: - https://github.com/llvm/llvm-project/pull/79261#issuecomment-2202950396 -

[clang] Support C++20 Modules in clang-repl (PR #79261)

2024-07-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > Do you mean the documentation? If so, yes, that’s probably not the right > place. I am on my phone but can you suggest a place where we should move this > or just move it? I think that was an oversight. Thanks. There is nothing urgent. I was just preparing a PR for syncing

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2024-07-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > Release note added in > [e33dc6b](https://github.com/llvm/llvm-project/commit/e33dc6b0282fb28d5289490981ad57d97d83db42), > thank you for the improvements! @AaronBallman It appears that that commit added an entry to the Static Analyzer section, and I'm not sure if that's the

[clang] Support C++20 Modules in clang-repl (PR #79261)

2024-07-02 Thread Balazs Benics via cfe-commits
steakhal wrote: @vgvassilev It appears that this PR added an entry to the Static Analyzer section, and I'm not sure if that's the right one. Could you please suggest an alternative section where I should move it? https://github.com/llvm/llvm-project/pull/79261

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

2024-07-02 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre

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

2024-07-02 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre

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

2024-07-02 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To:

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

2024-07-02 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To:

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

2024-07-02 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: steakhal wrote: > 樂 Deleting the html files could break some links on external sites, so I > think it would be better to replace them with a very simple "This content was > moved to ``" placeholder. Maybe something

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/97199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/97199 >From 6eeab014b09cfa0909c3ccb1b2d3e6fadadb983f Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 1 Jul 2024 17:29:25 +0200 Subject: [PATCH 1/5] [analyzer] Fix crash in Stream checker when using void

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/97032 ___ cfe-commits mailing list

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,37 @@ +Obtaining the Static Analyzer

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,238 @@ +Command-Line Usage: CodeChecker and scan-build

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= Message-ID: In-Reply-To:

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

2024-07-01 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/97034

[clang] Reland "[analyzer] Harden safeguards for Z3 query times" (PR #97298)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/97298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-07-01 Thread Balazs Benics via cfe-commits
@@ -1034,16 +1034,16 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent , C.addTransition(State); } -static std::optional getPointeeType(const MemRegion *R) { +static QualType getPointeeType(const MemRegion *R) { if (!R) -return std::nullopt;

[clang] Reland "[analyzer] Harden safeguards for Z3 query times" (PR #97298)

2024-07-01 Thread Balazs Benics via cfe-commits
steakhal wrote: This is the continuation patch of #97265. https://github.com/llvm/llvm-project/pull/97298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[analyzer] Harden safeguards for Z3 query times" (PR #97298)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/97298 This is exactly as originally landed in #95129, but now the minimal Z3 version was increased to meet this change in #96682. https://discourse.llvm.org/t/bump-minimal-z3-requirements-from-4-7-1-to-4-8-9/79664/4

[clang] [llvm] Reland "[analyzer][NFC] Reorganize Z3 report refutation" (PR #97265)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/97265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Refine unused-member-function diagnostic message for constructors (PR #84515)

2024-07-01 Thread Balazs Benics via cfe-commits
steakhal wrote: Ping. https://github.com/llvm/llvm-project/pull/84515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-07-01 Thread Balazs Benics via cfe-commits
@@ -21,30 +21,55 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-07-01 Thread Balazs Benics via cfe-commits
@@ -21,30 +21,55 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-07-01 Thread Balazs Benics via cfe-commits
@@ -21,30 +21,55 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-07-01 Thread Balazs Benics via cfe-commits
@@ -21,30 +21,55 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Looks good. I only had some minor remarks. https://github.com/llvm/llvm-project/pull/97078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/97078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-07-01 Thread Balazs Benics via cfe-commits
steakhal wrote: > Overall, I'd say that it's futile to try to recognize zero-sized types with a > "canonical type equal to" check, so you should just check whether > `ElemSizeInChars` is zero and do something based on that. (Either an early > return, or you can say `ElemSizeInChars = 1` at

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/97199 >From 81910b6d8139868304c87784416e087e2aea9f7a Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 30 Jun 2024 11:32:14 +0200 Subject: [PATCH 1/3] [analyzer] Fix crash in Stream checker when using void

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/97199 >From 81910b6d8139868304c87784416e087e2aea9f7a Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 30 Jun 2024 11:32:14 +0200 Subject: [PATCH 1/2] [analyzer] Fix crash in Stream checker when using void

[clang] [llvm] Reland "[analyzer][NFC] Reorganize Z3 report refutation" (PR #97265)

2024-07-01 Thread Balazs Benics via cfe-commits
steakhal wrote: This was already reviewed and approved in the past. The content is identical to that one. https://github.com/llvm/llvm-project/pull/97265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Reland "[analyzer][NFC] Reorganize Z3 report refutation" (PR #97265)

2024-07-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/97265 This is exactly as originally landed in #95128, but now the minimal Z3 version was increased to meet this change in #96682. https://discourse.llvm.org/t/bump-minimal-z3-requirements-from-4-7-1-to-4-8-9/79664/4

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" again (PR #85791)

2024-07-01 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy ,NagyDonat ,NagyDonat Message-ID: In-Reply-To: steakhal wrote: This fixed tickets in our backlog. Thanks for pushing for this. https://github.com/llvm/llvm-project/pull/85791 ___

[clang] [analyzer] Fix crash in Stream checker when using void pointers (PR #97199)

2024-06-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/97199 We can get zero type size (thus div by zero crash) if the region is for a 'void*' pointer. In this patch, let's just override the void type with a char type to avoid the crash. Fixes

[clang] [analyzer][NFC] Use ArrayRef for input parameters (PR #93203)

2024-06-28 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/93203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Use ArrayRef for input parameters (PR #93203)

2024-06-27 Thread Balazs Benics via cfe-commits
@@ -672,7 +672,7 @@ class StdLibraryFunctionsChecker StringRef getNote() const { return Note; } }; - using ArgTypes = std::vector>; + using ArgTypes = ArrayRef>; steakhal wrote: One can argue the same the other way around, just like for pointers.

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-25 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hi @steakhal , this change seems to have exposed by div/0 error in a very > particular corner we came across after integrating this change. Could you try > this case to see if can repro? Yea, it seems to crash. I'll fix it once I have some time. Probably early next week if

[clang] [llvm] [analyzer] Revert Z3 changes (PR #95916)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[analyzer] Harden safeguards for Z3 query times" (PR #95914)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: Superseded by a combined revert: #95916 https://github.com/llvm/llvm-project/pull/95914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[analyzer] Harden safeguards for Z3 query times" (PR #95914)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer] Revert Z3 changes (PR #95916)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/95916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer] Revert Z3 changes (PR #95916)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/95916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: @mikaelholmen Please approve the revert PR then. https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer] Revert Z3 changes (PR #95916)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/95916 Requested in: https://github.com/llvm/llvm-project/pull/95128#issuecomment-2176008007 Revert "[analyzer] Harden safeguards for Z3 query times" Revert "[analyzer][NFC] Reorganize Z3 report refutation" This

[clang] Revert "[analyzer] Harden safeguards for Z3 query times" (PR #95914)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/95914 Reverts llvm/llvm-project#95129 Reverting this patch as requested in this [comment](https://github.com/llvm/llvm-project/pull/95128#issuecomment-2176008007). >From bbcee744465c72b8000321defd85ed3daa290502 Mon

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: Reverting this patch as requested in this [comment](https://github.com/llvm/llvm-project/pull/95128#issuecomment-2176008007). https://github.com/llvm/llvm-project/pull/95129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > I don't know really, I just noticed that main suddenly broke for us and > bisected to this patch. If after the second patch the tests pass then I'm contemplated to say I'd go for upgrading Z3 requirements to 4.8.9, and accept that with my first commit would have failed the

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > With the next patch > [eacc3b3](https://github.com/llvm/llvm-project/commit/eacc3b3504be061f7334410dd0eb599688ba103a) > it fails on rlimit for me, but on this patch it's on timeout. What do you suggest? Do you know a reliable minimal Z3 version which we should require? FYI

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: Alright. I had a look and it's interesting. For me, it crashes with `LLVM ERROR: Z3 error: unknown parameter 'rlimit'`, but that shouldn't matter. Actually `rlimit` should be available from 4.5.0, according to the [release

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: >From the logs you sent, its not clear to me which statianalyzer test fails. >Could you point me to an exact gtest or file linenumber pair? https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hi @steakhal and @NagyDonat , > > Does this patch have requirements on the Z3 version? > > I get > ```LLVM ERROR: Z3 error: unknown parameter 'timeout'``` > for the following testcases > ``` > Failed Tests (3): > Clang-Unit :: StaticAnalyzer/./StaticAnalysisTests/24/188 >

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/95129 >From 1b61e227a5ee3bf9646cbb7f1c1fca7490868dbf Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 11 Jun 2024 16:54:26 +0200 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?=

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/95129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: Implement move-only rule-of-5 for: - `Z3Config` - `Z3Context` https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/95128 >From 6b9a5a6902c3efca6ac7d6a5dabc8950767560cc Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 11 Jun 2024 16:53:46 +0200 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-17 Thread Balazs Benics via cfe-commits
steakhal wrote: > > Excellent quality. Thank for fixing this. > > Should I fix the other type comparison in static analysis? It looks like not > consider this case at lots of position. > > I think you are right. And in most cases within CSA, we should usually compare canonical types. If

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Excellent quality. Thank for fixing this. Do you need us to merge this, or you have merge rights? https://github.com/llvm/llvm-project/pull/95729 ___ cfe-commits mailing list

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Awesome. I have one remark though. It would be nice to see tests that does not depend on the errno, as this eqclass merging is a major vore feature, unlike the errno modeling which is an optional feature. If have something in mind, you could add that test

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-14 Thread Balazs Benics via cfe-commits
steakhal wrote: I checked out the code and gave it a test run. Across 200+ projects, it suppresses around 650 reports. I've sampled them and they appear like the FP this patch was motivated by. I don't really have the time to do the review, as I'll leave for vacation, but the intent of the

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM. Please make clang format happy before merging. https://github.com/llvm/llvm-project/pull/95470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-06-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Could you please drop the format only changes so that I could focus on the actual change set? https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/95408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext , return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder =

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: The intention of the patch makes sense to me. However, I believe that the bug is inside the Store. It should not say it's `Undefined` if actually an existing binding overlaps (actually completely covers) the requested region. So, that said, the checker

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext , return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder =

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext , return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder =

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext , return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder =

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -171,6 +174,17 @@ class MemRegion : public llvm::FoldingSetNode { Kind getKind() const { return kind; } + StringRef getKindStr() const { +switch (getKind()) { +#define REGION(Id, Parent) \ + case Id##Kind:

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -171,6 +174,17 @@ class MemRegion : public llvm::FoldingSetNode { Kind getKind() const { return kind; } + StringRef getKindStr() const { +switch (getKind()) { +#define REGION(Id, Parent) \ + case Id##Kind:

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks for the green light! > Another possible solution is that a generic invalidation support is added to > `StdLibraryFunctionsChecker` that can be used for stream related and other > functions. Yes, that would be so nice. However, it's out of scope for me this time.

  1   2   3   4   5   6   7   8   9   10   >