[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/98621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -2213,7 +2213,7 @@ void BasicBugReport::Profile(llvm::FoldingSetNodeID& hash) const { void PathSensitiveBugReport::Profile(llvm::FoldingSetNodeID &hash) const { hash.AddInteger(static_cast(getKind())); hash.AddPointer(&

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM. I only had one minor question inline. https://github.com/llvm/llvm-project/pull/98621 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][analyzer] Support `ownership_{returns,takes}` attributes (PR #98941)

2024-07-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > > and you can read the docs for the checker, and the attribute at the links. > > I can't find any docs for this attribute. As I mentioned, I will fill new > issues to fix couple of frontend issues and after that we can write down > correct semantics of these attrs. Thats fin

[clang] [clang][analyzer] Support `ownership_{returns,takes}` attributes (PR #98941)

2024-07-18 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI This PR is still not mentioned in the `clang/docs/ReleaseNotes.rst`. We should have two entries there: 1) In [Attribute Changes in Clang](https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.rst#id34), mentioning that calls can have at most one `ownership_

[clang] [clang][analyzer] Support `ownership_{returns,takes}` attributes (PR #98941)

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

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -1877,16 +1923,43 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -1877,16 +1923,43 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { --

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -1877,16 +1923,43 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -1877,16 +1923,43 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. I think it looks great. Only a few more stylistic remarks are left, but it should be already in a good shape functional-wise. I'll let you decide if you wanna apply my suggestions or not. One more remark - this time w.r.t. the workflow. U

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

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

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,49 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

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

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -1122,7 +1157,7 @@ MallocChecker::performKernelMalloc(const CallEvent &Call, CheckerContext &C, if (TrueState && !FalseState) { SVal ZeroVal = C.getSValBuilder().makeZeroVal(Ctx.CharTy); return MallocMemAux(C, Call, Call.getArgExpr(0), ZeroVal, TrueState, -

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,49 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,49 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -1490,7 +1532,7 @@ ProgramStateRef MallocChecker::ProcessZeroAllocCheck( return State; } } else -llvm_unreachable("not a CallExpr or CXXNewExpr"); +assert(false && "not a CallExpr or CXXNewExpr"); steakhal wrote: ```suggestion } else {

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,49 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); steakhal wrote: Interesting. https://github.com/llvm/llvm-project/pull/98941 __

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,49 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -24,3 +24,7 @@ void f15(int, int) void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index void f17(void*) __attribute__((ownership_takes(__, 1))); void f18() __attribute__((ownership_takes(foo, 1))); //

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: It looks great! I only had one more thing to test. Besides that it would be nice to advertise this in the `clang/docs/ReleaseNotes.rst`. Usually, from that release notes we also link to the checker or the relevant doc pages - in this case it would be nice

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

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

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -60,6 +67,41 @@ void testMalloc8() { operator delete[](p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete[]}} } +void testMalloc9() { + int *p = (int *)my_malloc(sizeof(int)); + my_free(p); // no warning +} + +voi

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

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

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -346,6 +350,36 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// W

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

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -346,6 +350,36 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// W

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

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/97407 ___ cfe-commits mailing list cfe

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

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -363,6 +397,18 @@ class LazyCompoundVal : public NonLoc { /// It might return null. const void *getStore() const; + /// This functi

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

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. I think it's already in a good shape. I found barely any problems with the wording. https://github.co

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -3483,53 +3578,54 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, Sym, "Returned allocated memory"); } else if (isReleased(RSCurr, RSPrev, S)) { const auto Family = RSCurr->getAllocationFamily(); - switch (Family) { -

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); steakhal wrote: What happens if you have a forward declaration to a malloc function with

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1877,6 +1914,33 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1918,26 +1982,54 @@ static bool printMemFnName(raw_ostream &os, CheckerContext &C, const Expr *E) { static void printExpectedAllocName(raw_ostream &os, AllocationFamily Family) { - switch(Family) { -case AF_Malloc: os << "malloc()"; return; -case AF_CXXNew: os <

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1877,6 +1914,33 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -194,7 +226,7 @@ class RefState { void Profile(llvm::FoldingSetNodeID &ID) const { ID.AddInteger(K); ID.AddPointer(S); -ID.AddInteger(Family); +ID.AddInteger(Family.kind()); steakhal wrote: This Profile wouldn't take the custom allocation

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Looks pretty good. Thanks for working on the issue. I didn't see any major blocking issue with the PR, so good job on that! Overall, be sure to follow the llvm [coding style](https://llvm.org/docs/CodingStandards.html#name-type

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1918,26 +1982,54 @@ static bool printMemFnName(raw_ostream &os, CheckerContext &C, const Expr *E) { static void printExpectedAllocName(raw_ostream &os, AllocationFamily Family) { - switch(Family) { -case AF_Malloc: os << "malloc()"; return; -case AF_CXXNew: os <

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

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

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > _(Technical detail: I'll be on vacation during the next week, so I won't see > updates on this PR until the 22nd of July. If you want to merge this PR, feel > free to do so.)_ No need to rush. Have a nice one! https://githu

[clang] [analyzer] Don't display the offset value in underflows (PR #98621)

2024-07-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: This makes sense. I wonder if we could have something in between. I'm thinking of having the concrete offset as a separate note, instead of having it part of the primary message. That way after BR selection, we would still deterministically pick the shorte

[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 closed 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] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
@@ -1046,10 +1044,7 @@ bool GenericTaintChecker::generateReportIfTainted(const Expr *E, StringRef Msg, return false; // Generate diagnostic. steakhal wrote: If we are there, maybe we should also assert that inside the register call, before emplacing i

[clang] [analyzer] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM 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] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited 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] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited 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 &Call, } /// Checker registration -void ento::registerGenericTaintChecker(CheckerManager &Mgr) { +void ento::registerTaintPropagationChecker(CheckerManager &Mgr) { Mgr.registerCheck

[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/d

[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 mean

[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 &Call, } /// Checker registration -void ento::registerGenericTaintChecker(CheckerManager &Mgr) { +void ento::registerTaintPropagationChecker(CheckerManager &Mgr) { Mgr.registerCheck

[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 &Call, } /// Checker registration -void ento::registerGenericTaintChecker(CheckerManager &Mgr) { +void ento::registerTaintPropagationChecker(CheckerManager &Mgr) { Mgr.registerCheck

[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 t

[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 ty

[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 WI

[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. https://githu

[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 o

[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 initializer-list

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[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/d

[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 - https://github.com/llvm/llvm-p

[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 th

[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 =?utf

[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 =?utf

[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 l

[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 point

[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 cfe-com

[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: https://github.com/s

[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 &Call, C.addTransition(State); } -static std::optional getPointeeType(const MemRegion *R) { +static QualType getPointeeType(const MemRegion *R) { if (!R) -return std::null

[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

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