[clang] [llvm] [NFC] Fix misspellings of effects (PR #87795)

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

[clang] [clang][analyzer] Support `PointerType` in `getCXXRecordDecl` for `ContainerModeling` (PR #87787)

2024-04-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Looks clean to me, even though I haven't checked how the ContainerModeling checker works. https://github.com/llvm/llvm-project/pull/87787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [analyzer] Set and display CSA analysis entry points as notes on debugging (PR #84823)

2024-04-05 Thread Balazs Benics via cfe-commits
@@ -788,7 +791,7 @@ class PathDiagnostic : public llvm::FoldingSetNode { PathDiagnostic(StringRef CheckerName, const Decl *DeclWithIssue, StringRef bugtype, StringRef verboseDesc, StringRef shortDesc, StringRef category, PathDiagnosticLocatio

[clang] [clang][analyzer] Add "pedantic" mode to StreamChecker. (PR #87322)

2024-04-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > > Unless you plan to add more heuristics, I'd prefer a more concrete option > > name, like AssumeSuccessfulWrites=true. This would better describe it imo. > > I do not like totally the name "Pedantic", it could be > "AssumeOftenUncheckedOperationsMayFail". I am not sure if th

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

2024-04-02 Thread Balazs Benics via cfe-commits
@@ -5317,6 +5317,34 @@ TEST_P(ASTImporterOptionSpecificTestBase, EXPECT_FALSE(ToX); } +TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclInlineWithCXX17) { + Decl *FromTU = getTuDecl( + R"( + struct S { +template static constexpr bool X = true; +

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

2024-04-02 Thread Balazs Benics via cfe-commits
@@ -5317,6 +5317,34 @@ TEST_P(ASTImporterOptionSpecificTestBase, EXPECT_FALSE(ToX); } +TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclInlineWithCXX17) { + Decl *FromTU = getTuDecl( + R"( + struct S { +template static constexpr bool X = true; +

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

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

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

2024-04-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. I only had generic nits, as I'm not really in the domain. Consider my review as such. https://github.com/llvm/llvm-project/pull/87314 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang][analyzer] Add "pedantic" mode to StreamChecker. (PR #87322)

2024-04-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Unless you plan to add more heuristics, I'd prefer a more concrete option name, like AssumeSuccessfulWrites=true. This would better describe it imo. https://github.com/llvm/llvm-project/pull/87322 ___ cfe-commits

[clang] [clang][analyzer] Change modeling of `fseek` in StreamChecker. (PR #86919)

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

[clang] [analyzer] Remove barely used class 'KnownSVal' (NFC) (PR #86953)

2024-03-28 Thread Balazs Benics via cfe-commits
@@ -1238,12 +1238,12 @@ class StoreSiteFinder final : public TrackingBugReporterVisitor { ///changes to its value in a nested stackframe could be pruned, and ///this visitor can prevent that without polluting the bugpath too ///much. - StoreSiteF

[clang] [analyzer] Remove barely used class 'KnownSVal' (NFC) (PR #86953)

2024-03-28 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. The simpler the better. Thanks. https://github.com/llvm/llvm-project/pull/86953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Remove barely used class 'KnownSVal' (NFC) (PR #86953)

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

[clang] [analyzer][docs] Document the `optin.performance.Padding` checker (PR #86411)

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

[clang] [analyzer] Document the `optin.performance.Padding` checker (PR #86411)

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

[clang] [analyzer] Document the `optin.performance.Padding` checker (PR #86411)

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

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

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

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/86411 >From b6ca6f0ef83d03e299d6ee9a8ed9b8044477914e Mon Sep 17 00:00:00 2001 From: komalverma04 <114138604+komalverm...@users.noreply.github.com> Date: Sat, 23 Mar 2024 11:14:44 -0700 Subject: [PATCH 1/9] Update check

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/86411 >From b6ca6f0ef83d03e299d6ee9a8ed9b8044477914e Mon Sep 17 00:00:00 2001 From: komalverma04 <114138604+komalverm...@users.noreply.github.com> Date: Sat, 23 Mar 2024 11:14:44 -0700 Subject: [PATCH 1/8] Update check

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, but I'd recommed @Xazax-hun to also have a look. If nothing happens, merge this after one week. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
@@ -124,34 +124,45 @@ class CStringChecker : public Checker< eval::Call, const CallEvent &)>; CallDescriptionMap Callbacks = { - {{CDM::CLibrary, {"memcpy"}, 3}, + {{CDM::CLibraryMaybeHardened, {"memcpy"}, 3}, std::bind(

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I like your patch. This is an important fix. I only had a couple nits, but overall looks good. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
@@ -110,13 +110,24 @@ bool CheckerContext::isCLibraryFunction(const FunctionDecl *FD, if (FName.starts_with("__inline") && FName.contains(Name)) return true; - if (FName.starts_with("__") && FName.ends_with("_chk") && - FName.contains(Name)) -return true; -

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

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

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
@@ -124,34 +124,45 @@ class CStringChecker : public Checker< eval::Call, const CallEvent &)>; CallDescriptionMap Callbacks = { - {{CDM::CLibrary, {"memcpy"}, 3}, + {{CDM::CLibraryMaybeHardened, {"memcpy"}, 3}, std::bind(

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-27 Thread Balazs Benics via cfe-commits
steakhal wrote: I figured, it might be easier to directly propose and apply some of my thoughts. Let me know if you like it. My goal was: - be specific what is the impact of not having the optimal layout: memory, cachemisses - have a single block of examples, demonstrating the bad, the good a

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/86411 >From b6ca6f0ef83d03e299d6ee9a8ed9b8044477914e Mon Sep 17 00:00:00 2001 From: komalverma04 <114138604+komalverm...@users.noreply.github.com> Date: Sat, 23 Mar 2024 11:14:44 -0700 Subject: [PATCH 1/7] Update check

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-25 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,38 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (C, C++, ObjC) + Check for ex

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. The grammar seems good. I have further concerns inline. https://github.com/llvm/llvm-project/pull/86411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-25 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,38 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (C, C++, ObjC) + Check for ex

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-25 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,38 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (C, C++, ObjC) + Check for ex

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-25 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,38 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (C, C++, ObjC) + Check for ex

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

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

[clang] [analyzer] Set and display CSA analysis entry points as notes on debugging (PR #84823)

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

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

2024-03-25 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: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/85791 ___ cfe-commits mailing list cfe-commit

[clang] [analyzer] Set and display CSA analysis entry points as notes on debugging (PR #84823)

2024-03-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84823 >From 94c6be96d92d8a25693ccbbffedf9edabfe79cc5 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 11 Mar 2024 21:18:30 +0100 Subject: [PATCH 1/2] [analyzer] Set and display CSA analysis entry points as not

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

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

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

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

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

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

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (PaddingChecker) +

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (PaddingChecker) +

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (PaddingChecker) steakhal wrote: It should be the la

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (PaddingChecker) +

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (PaddingChecker) +

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. The docs should also explain why is a problem to have padding bytes, and how to fix it. How does the generated html look like after your change for this file? (Have a look at my commits to this or to the releasenotes file for c

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-24 Thread Balazs Benics via cfe-commits
@@ -804,10 +804,28 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (PaddingChecker) +

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

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

[clang] 730ca47 - [clang][analyzer] Model getline/getdelim preconditions and evaluation (#83027)

2024-03-22 Thread Balazs Benics via cfe-commits
Author: Alejandro Álvarez Ayllón Date: 2024-03-22T11:50:34+01:00 New Revision: 730ca47a0cc7380def6df1d25b30c1378fd8bf14 URL: https://github.com/llvm/llvm-project/commit/730ca47a0cc7380def6df1d25b30c1378fd8bf14 DIFF: https://github.com/llvm/llvm-project/commit/730ca47a0cc7380def6df1d25b30c1378fd

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84972 >From f66c62bcf3fd1427ad3f5061ec23110c1c3a5b6e Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 19:55:29 +0100 Subject: [PATCH] [analyzer] Support C++23 static operator calls Made by followin

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-22 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/83027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [analyzer] Set and display CSA analysis entry points as notes on debugging (PR #84823)

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

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-22 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: steakhal wrote: Rebase merged. https://github.com/llvm/llvm-project/pull/83027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] a62441d - [clang][analyzer][NFC] UnixAPIMisuseChecker inherits from Checker (#83027)

2024-03-22 Thread Balazs Benics via cfe-commits
Author: Alejandro Álvarez Ayllón Date: 2024-03-22T11:50:34+01:00 New Revision: a62441d4bb6bd0cd8eccab8c5692340c5a2c60bb URL: https://github.com/llvm/llvm-project/commit/a62441d4bb6bd0cd8eccab8c5692340c5a2c60bb DIFF: https://github.com/llvm/llvm-project/commit/a62441d4bb6bd0cd8eccab8c5692340c5a2

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

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

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: I'm sorry, but I'm out of bandwidth. Maybe someone else can step up for the review. https://github.com/llvm/llvm-project/pull/83675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: @NagyDonat Thank you for the excellent feedback. Great recommendations, with fixes. Thanks! All applied. https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-03-21 Thread Balazs Benics via cfe-commits
@@ -1090,7 +1090,8 @@ static bool isStandardNewDelete(const FunctionDecl *FD) { // If the header for operator delete is not included, it's still defined // in an invalid source location. Check to make sure we don't crash. return !L.isValid() || - FD->getASTContext

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: Retriggered the premerge checks. https://github.com/llvm/llvm-project/pull/83985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/83985 >From 881701d528255e2c49ed64f5f1df98f0f44c1d7b Mon Sep 17 00:00:00 2001 From: Viktor Date: Tue, 5 Mar 2024 09:46:26 + Subject: [PATCH] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha --- clang/d

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

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

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

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

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/4] [analyzer] Wrap SymbolicRegions by ElementRegions before ge

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 01/12] Adapted MemRegion::getDescriptiveName to handle Ele

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/3] [analyzer] Wrap SymbolicRegions by ElementRegions before ge

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hi @steakhal, just to be sure. We are talking about a test case that covers > that the index is "recognised" as a wrong variable (the matrix example above)? Exactly! https://github.com/llvm/llvm-project/pull/85104 ___ cfe-commits ma

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -1186,6 +1192,14 @@ def main(): "displaying it, dump the rewritten dot file " "to stdout", ) +dump_conflict.add_argument( +"--dump-html-only", +action="store_const", +dest="dump_html_only", +const=True, +default

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -479,12 +479,15 @@ def add_raw_line(self, raw_line): # A visitor that dumps the ExplodedGraph into a DOT file with fancy HTML-based # syntax highlighing. class DotDumpVisitor: -def __init__(self, do_diffs, dark_mode, gray_mode, topo_mode, dump_dot_only): +def __init

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: @T-Gruber Could you please add that test case with a FIXME? https://github.com/llvm/llvm-project/pull/85104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > I think it's good that we're moving towards establishing the invariant that > the parent of a FieldRegion should always be a typed value region (of a > suitable type) for the sake of consistency. Do I understand it correctly that > this is not too far away? Would it be possib

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -451,6 +451,38 @@ void ProgramState::setStore(const StoreRef &newStore) { store = newStoreStore; } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +static SVal wrapSymbo

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/2] [analyzer] Wrap SymbolicRegions by ElementRegions before ge

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-03-14 Thread Balazs Benics via cfe-commits
@@ -1090,7 +1090,8 @@ static bool isStandardNewDelete(const FunctionDecl *FD) { // If the header for operator delete is not included, it's still defined // in an invalid source location. Check to make sure we don't crash. return !L.isValid() || - FD->getASTContext

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-03-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/85224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

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

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-14 Thread Balazs Benics via cfe-commits
steakhal wrote: > In addition to the above-mentioned issues there is also a conceptual problem > with using `getOriginRegion()` to describe a symbol: it names the region > where the symbol _originated_ (if it originated as the unknown initial value > of a symbol), which is not necessarily the

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-14 Thread Balazs Benics via cfe-commits
@@ -720,14 +720,20 @@ std::string MemRegion::getDescriptiveName(bool UseQuotes) const { CI->getValue().toString(Idx); ArrayIndices = (llvm::Twine("[") + Idx.str() + "]" + ArrayIndices).str(); } -// If not a ConcreteInt, try to obtain the variable -// na

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/85211 Inside the ExprEngine when we process the initializers, we create a PostInitializer program-point, which will refer to the field being initialized, see `FieldLoc` inside `ExprEngine::ProcessInitializer`. When

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

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

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 01/10] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Stat

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/9] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hello @steakhal, I have just looked through the changes again. What is the > advantage of using checkPreCall instead of checkLocation? I would very much > appreciate some background information. Thanks for your help! Oh yes, I should have explained. So, `checkLocation` can be

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/8] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
@@ -1,5 +1,7 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config unroll-loops=true,cfg-loopexit=true -verify -std=c++14 -analyzer-config exploration_strategy=unexplored_first_queue %s // RUN: %clang_analyze_cc1 -analyzer-checker=core,debu

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/7] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/6] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 1/9] Adapted MemRegion::getDescriptiveName to handle Eleme

[clang] [analyzer] Set and display CSA analysis entry points as notes on debugging (PR #84823)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: > However, I feel an urge to bikeshed that the "[invisible]" prefix is a bit > puzzling for the developer who encounters it. Consider replacing it with the > prefix "[debug]" which is a more conventional signal for "this is a debug > printout" (i.e. normal users won't see it).

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: I hope you don't mind that I reworked the testing a bit, to be similar to the rest of the tests. I also reverted unnecessary clang-formatting where it was not relevant. I refined the `auto` usage, but other than that I left your code untouched. As I did everything I thought, I'l

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85104 >From 0f964127ed91e23f8e969e08ce680535cfeb8906 Mon Sep 17 00:00:00 2001 From: Andreas Steinhausen Date: Wed, 13 Mar 2024 17:07:53 +0100 Subject: [PATCH 1/8] Adapted MemRegion::getDescriptiveName to handle Eleme

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

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Merged to main as e48d5a838f69e0a8e0ae95a8aed1a8809f45465a https://github.com/llvm/llvm-project/pull/84963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] e48d5a8 - Reapply "[analyzer] Accept C library functions from the `std` namespace"

2024-03-13 Thread Balazs Benics via cfe-commits
Author: NagyDonat Date: 2024-03-13T14:48:42+01:00 New Revision: e48d5a838f69e0a8e0ae95a8aed1a8809f45465a URL: https://github.com/llvm/llvm-project/commit/e48d5a838f69e0a8e0ae95a8aed1a8809f45465a DIFF: https://github.com/llvm/llvm-project/commit/e48d5a838f69e0a8e0ae95a8aed1a8809f45465a.diff LOG

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

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84963 >From e48d5a838f69e0a8e0ae95a8aed1a8809f45465a Mon Sep 17 00:00:00 2001 From: NagyDonat Date: Tue, 12 Mar 2024 18:24:26 +0100 Subject: [PATCH] Reapply "[analyzer] Accept C library functions from the `std` names

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

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84963 >From bca501228e3a146d3ca6c05b7de15fd914fb16b9 Mon Sep 17 00:00:00 2001 From: NagyDonat Date: Tue, 12 Mar 2024 18:24:26 +0100 Subject: [PATCH] Reapply "[analyzer] Accept C library functions from the `std` names

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

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: You gave approval for the fix for the buggy tests I suggested. I think there is nothing wrong with this. Thanks for having a look at my fix. Ill recommit this as you authored, and I coauthored. https://github.com/llvm/llvm-project/pull/84963 _

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

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

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84972 >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 19:55:29 +0100 Subject: [PATCH 1/3] [analyzer] Support C++23 static operator calls Made by foll

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84972 >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 19:55:29 +0100 Subject: [PATCH 1/2] [analyzer] Support C++23 static operator calls Made by foll

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/84972 Made by following: https://github.com/llvm/llvm-project/pull/83585#issuecomment-1980340866 Thanks for the details Tomek! >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs Beni

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

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84963 >From a88c479c8c1141af65887829e27194b2715ebfb2 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 18:24:26 +0100 Subject: [PATCH 1/3] Reapply "[analyzer] Accept C library functions from the `st

<    2   3   4   5   6   7   8   9   10   11   >