[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-07-26 Thread Kristóf Umann via cfe-commits
@@ -804,23 +751,21 @@ class NoOwnershipChangeVisitor final : public NoStateChangeFuncVisitor { return false; } + bool hasResourceStateChanged(ProgramStateRef CallEnterState, + ProgramStateRef CallExitEndState) final { +return

[clang] [analyzer][NFC] Eliminate a dyn_cast (PR #100719)

2024-07-26 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/100719 Response to the catch in this comment: https://github.com/llvm/llvm-project/pull/94357/files/07f6daf2cf0f5d5bd4fc9950f2585a3f52b4ad2f#r1692084074 From d176b03b211144dadaa1efb4b7da959110d7725c Mon Sep 17

[clang] [analyzer][NFC] Minor cleanup in two test files. (PR #100570)

2024-07-25 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > If these changes are unrelated to each other, wouldn't it be better to > separate them into 2 commits? I see the principle, but I think its reasonable to push this one go, considering that these changes are really minor and inconsquential, especially since they affect the

[clang] [analyzer][NFC] Minor cleanup in two test files. (PR #100570)

2024-07-25 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus approved this pull request. https://github.com/llvm/llvm-project/pull/100570 ___ 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-25 Thread Kristóf Umann via cfe-commits
Szelethus wrote: I decided to merge this. We are still miles ahead with these docs, and I don't wanna accidentally forget the PR. 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-25 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus closed 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-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-07-23 Thread Kristóf Umann via cfe-commits
@@ -0,0 +1,182 @@ +//===--- TaggedUnionMemberCountCheck.cpp - clang-tidy -===// +// +// 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:

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-07-23 Thread Kristóf Umann via cfe-commits
@@ -0,0 +1,125 @@ +//===--- TaggedUnionMemberCountCheck.cpp - clang-tidy -===// +// +// 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:

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

2024-07-22 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/97407 From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 2 Jul 2024 12:58:19 +0200 Subject: [PATCH 1/6] [analyzer][NFC] Add some docs for

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

2024-07-22 Thread Kristóf Umann via cfe-commits
@@ -363,6 +397,18 @@ class LazyCompoundVal : public NonLoc { /// It might return null. const void *getStore() const; + /// This function itself is immaterial. It is only an implementation detail. + /// LazyCompoundVal represents only the rvalue, the data (known or

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

2024-07-16 Thread Kristóf Umann via cfe-commits
Szelethus wrote: I'd also love to see some docs for `Loc` and `NonLoc`, because I recall some angry looks from years ago when I touched those on their own, but I can barely recall them :( As well as some docs for the various `ProgramState::getSVal` methods...

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

2024-07-16 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/97407 From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 2 Jul 2024 12:58:19 +0200 Subject: [PATCH 1/5] [analyzer][NFC] Add some docs for

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

2024-07-16 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/97407 From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 2 Jul 2024 12:58:19 +0200 Subject: [PATCH 1/4] [analyzer][NFC] Add some docs for

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

2024-07-16 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/97407 From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 2 Jul 2024 12:58:19 +0200 Subject: [PATCH 1/3] [analyzer][NFC] Add some docs for

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

2024-07-16 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/97407 From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 2 Jul 2024 12:58:19 +0200 Subject: [PATCH 1/2] [analyzer][NFC] Add some docs for

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

2024-07-04 Thread Kristóf Umann via cfe-commits
Szelethus wrote: I merget the PR as is, but I'll keep the warning message in mind, I'm open to changing it as we are getting closer to moving out-of-alpha. https://github.com/llvm/llvm-project/pull/95408 ___ cfe-commits mailing list

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

2024-07-04 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus closed 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][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/97407 Yes, I basically copy-pasted some posts from discord and Artem's book, but these make for a rather decent docs. From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From:

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

2024-07-01 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From 90cedd519da8b76c686db9c3f824b6d044e16eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/7] [analyzer] Check the correct first and

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

2024-07-01 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From 90cedd519da8b76c686db9c3f824b6d044e16eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/6] [analyzer] Check the correct first and

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-24 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus closed https://github.com/llvm/llvm-project/pull/94957 ___ 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-24 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From d717b412749f10b45a9387044e97da6981f3cad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/5] [analyzer] Check the correct first and

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

2024-06-24 Thread Kristóf Umann via cfe-commits
@@ -393,6 +401,162 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext , return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder =

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-24 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > > > I did not find a similar test for `MallocChecker` but there could be one > > > with similar test functions. > > > > > > I'm not sure what tests you are referring to. I did fix your other > > observations. > > I meant another test file where the

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

2024-06-20 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From d717b412749f10b45a9387044e97da6981f3cad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/4] [analyzer] Check the correct first and

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

2024-06-20 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > 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 does the right

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

2024-06-18 Thread Kristóf Umann 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-18 Thread Kristóf Umann 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-18 Thread Kristóf Umann 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-18 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From d717b412749f10b45a9387044e97da6981f3cad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/3] [analyzer] Check the correct first and

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

2024-06-18 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/95408 From d717b412749f10b45a9387044e97da6981f3cad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Thu, 25 Apr 2024 17:31:24 +0200 Subject: [PATCH 1/2] [analyzer] Check the correct first and

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

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -26,16 +50,12 @@ void top(char *dst) { void *mempcpy(void *restrict s1, const void *restrict s2, size_t n); -void mempcpy14() { +void mempcpy13() { Szelethus wrote: I gave sensible names to all of these test functions.

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

2024-06-18 Thread Kristóf Umann 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] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor.

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > I did not find a similar test for `MallocChecker` but there could be one with > similar test functions. I'm not sure what tests you are referring to. I did fix your other observations. https://github.com/llvm/llvm-project/pull/94957

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/94957 From faf00d0e1286e053ba9fb457513bd8309eb541ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Fri, 7 Jun 2024 12:07:35 +0200 Subject: [PATCH 1/5] [analyzer] Add an ownership change

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor.

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor.

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/94957 ___ 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 Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/95408 I intend to fix this checker up so that we can move it out of alpha. I made a bunch of analyses, and found many similar false positives: ```c++ int t[] = {1,2,3}; memcpy(dst, t, sizeof(t) / sizeof(t[0])); //

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/94957 From faf00d0e1286e053ba9fb457513bd8309eb541ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Fri, 7 Jun 2024 12:07:35 +0200 Subject: [PATCH 1/4] [analyzer] Add an ownership change

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-10 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/94957 From faf00d0e1286e053ba9fb457513bd8309eb541ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Fri, 7 Jun 2024 12:07:35 +0200 Subject: [PATCH 1/3] [analyzer] Add an ownership change

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-10 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/94957 From faf00d0e1286e053ba9fb457513bd8309eb541ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Fri, 7 Jun 2024 12:07:35 +0200 Subject: [PATCH 1/2] [analyzer] Add an ownership change

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-10 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/94957 This is very similar to https://reviews.llvm.org/D105553, in fact, I barely made any changes from MallocChecker's ownership visitor to this one. The new visitor emits a diagnostic note for function where a

[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-07 Thread Kristóf Umann via cfe-commits
@@ -0,0 +1,116 @@ +//===--*- C++ -*--// +// +// 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:

[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-07 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus closed https://github.com/llvm/llvm-project/pull/94357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/94357 From b6beb7098bb8e5148fe0467dc976506ff6691f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 4 Jun 2024 16:15:42 +0200 Subject: [PATCH 1/2] [analyzer] Factor out

[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/94357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-06 Thread Kristóf Umann via cfe-commits
Szelethus wrote: Yes, it is, sorry about that :) https://github.com/llvm/llvm-project/pull/94357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-04 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/94357 In preparation for adding essentially the same visitor to StreamChecker, this patch factors this visitor out to a common header. I'll be the first to admit that the interface of these classes are not

[clang] [analyzer] Use CDM::CLibrary instead of isGlobalCFunction() (PR #88267)

2024-04-10 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus approved this pull request. Seems like a very straightforward followup to the existing patches. https://github.com/llvm/llvm-project/pull/88267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-21 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus approved this pull request. Lets hope it works fine this time around :) https://github.com/llvm/llvm-project/pull/85791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-13 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus approved this pull request. LGTM 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] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
@@ -41,12 +41,8 @@ class CallDescription { /// - We also accept calls where the number of arguments or parameters is ///greater than the specified value. /// For the exact heuristics, see CheckerContext::isCLibraryFunction(). -/// Note that functions whose

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
@@ -87,9 +87,11 @@ bool CheckerContext::isCLibraryFunction(const FunctionDecl *FD, if (!II) return false; - // Look through 'extern "C"' and anything similar invented in the future. - // If this function is not in TU directly, it is not a C library function. - if

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus commented: Makes perfect sense to me. Can you add a testcase for `std::malloc` or something similar? https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-15 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a504ddc - [analyzer] Initialize regions returned by CXXNew to undefined

2022-10-26 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2022-10-26T17:22:12+02:00 New Revision: a504ddc8bf9d5c406ea88b84b8495d7aae200d4c URL: https://github.com/llvm/llvm-project/commit/a504ddc8bf9d5c406ea88b84b8495d7aae200d4c DIFF: https://github.com/llvm/llvm-project/commit/a504ddc8bf9d5c406ea88b84b8495d7aae200d4c.diff

[clang] fd8e576 - [analyzer] Don't track function calls as control dependencies

2022-04-08 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2022-04-08T10:16:58+02:00 New Revision: fd8e5762f86f0a602ec08eea5c4c86927faba6dc URL: https://github.com/llvm/llvm-project/commit/fd8e5762f86f0a602ec08eea5c4c86927faba6dc DIFF: https://github.com/llvm/llvm-project/commit/fd8e5762f86f0a602ec08eea5c4c86927faba6dc.diff

[clang] d832078 - [analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators

2022-03-03 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2022-03-03T11:27:56+01:00 New Revision: d832078904c6e1d26648236b9f724f699dafb201 URL: https://github.com/llvm/llvm-project/commit/d832078904c6e1d26648236b9f724f699dafb201 DIFF: https://github.com/llvm/llvm-project/commit/d832078904c6e1d26648236b9f724f699dafb201.diff

[clang] 32ac21d - [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs

2022-03-01 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2022-03-01T17:13:04+01:00 New Revision: 32ac21d04909da0d50d3b24100d5d9ab30b29a95 URL: https://github.com/llvm/llvm-project/commit/32ac21d04909da0d50d3b24100d5d9ab30b29a95 DIFF: https://github.com/llvm/llvm-project/commit/32ac21d04909da0d50d3b24100d5d9ab30b29a95.diff

[clang] 5048a58 - [analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it

2022-02-25 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2022-02-25T17:51:37+01:00 New Revision: 5048a58a6792ee7432b749a48c937cc9b6a9dc93 URL: https://github.com/llvm/llvm-project/commit/5048a58a6792ee7432b749a48c937cc9b6a9dc93 DIFF: https://github.com/llvm/llvm-project/commit/5048a58a6792ee7432b749a48c937cc9b6a9dc93.diff

[clang] 3ad35ba - [Templight] Don't display empty strings for names of unnamed template parameters

2022-01-24 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2022-01-24T16:37:11+01:00 New Revision: 3ad35ba4dea5240dd58476f0c85f0fe096d6c7ce URL: https://github.com/llvm/llvm-project/commit/3ad35ba4dea5240dd58476f0c85f0fe096d6c7ce DIFF: https://github.com/llvm/llvm-project/commit/3ad35ba4dea5240dd58476f0c85f0fe096d6c7ce.diff

[clang] 8cc2de6 - [analyzer][docs] Fix the incorrect structure of the checker docs

2021-11-09 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-11-09T15:26:00+01:00 New Revision: 8cc2de667ec2526b055e971f46f4b3731107546c URL: https://github.com/llvm/llvm-project/commit/8cc2de667ec2526b055e971f46f4b3731107546c DIFF: https://github.com/llvm/llvm-project/commit/8cc2de667ec2526b055e971f46f4b3731107546c.diff

[clang] fb4d590 - Fix a unittest file after D108695 when Z3 is enabled

2021-09-14 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-09-14T16:11:11+02:00 New Revision: fb4d590a622f4031900516360c07ee6ace01c5e6 URL: https://github.com/llvm/llvm-project/commit/fb4d590a622f4031900516360c07ee6ace01c5e6 DIFF: https://github.com/llvm/llvm-project/commit/fb4d590a622f4031900516360c07ee6ace01c5e6.diff

[clang] 9d359f6 - [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default

2021-09-13 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-09-13T15:01:20+02:00 New Revision: 9d359f6c738632c6973e9f5328b10bf39b3df55a URL: https://github.com/llvm/llvm-project/commit/9d359f6c738632c6973e9f5328b10bf39b3df55a DIFF: https://github.com/llvm/llvm-project/commit/9d359f6c738632c6973e9f5328b10bf39b3df55a.diff

[clang] 0213d7e - [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-13 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-09-13T13:50:01+02:00 New Revision: 0213d7ec0c501414d12020737fdc47e47e4392d9 URL: https://github.com/llvm/llvm-project/commit/0213d7ec0c501414d12020737fdc47e47e4392d9 DIFF: https://github.com/llvm/llvm-project/commit/0213d7ec0c501414d12020737fdc47e47e4392d9.diff

[clang] a375bfb - [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-03 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-09-03T13:50:18+02:00 New Revision: a375bfb5b729e0f3ca8d5e001f423fa89e74de87 URL: https://github.com/llvm/llvm-project/commit/a375bfb5b729e0f3ca8d5e001f423fa89e74de87 DIFF: https://github.com/llvm/llvm-project/commit/a375bfb5b729e0f3ca8d5e001f423fa89e74de87.diff

[clang] 3891b45 - Revert "[analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it"

2021-09-02 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-09-02T17:19:49+02:00 New Revision: 3891b45a06f9192b7185d03269717cd60dfdea13 URL: https://github.com/llvm/llvm-project/commit/3891b45a06f9192b7185d03269717cd60dfdea13 DIFF: https://github.com/llvm/llvm-project/commit/3891b45a06f9192b7185d03269717cd60dfdea13.diff

[clang] 7d0e62b - [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-02 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-09-02T16:56:32+02:00 New Revision: 7d0e62bfb773c68d2bc8831fddcc8536f4613190 URL: https://github.com/llvm/llvm-project/commit/7d0e62bfb773c68d2bc8831fddcc8536f4613190 DIFF: https://github.com/llvm/llvm-project/commit/7d0e62bfb773c68d2bc8831fddcc8536f4613190.diff

[clang] 2d3668c - [analyzer] MallocChecker: Add a visitor to leave a note on functions that could have, but did not change ownership on leaked memory

2021-08-16 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-08-16T16:19:00+02:00 New Revision: 2d3668c997faac1f64cd3b8eb336af989069d135 URL: https://github.com/llvm/llvm-project/commit/2d3668c997faac1f64cd3b8eb336af989069d135 DIFF: https://github.com/llvm/llvm-project/commit/2d3668c997faac1f64cd3b8eb336af989069d135.diff

[clang] c019142 - [analyzer][NFC] Split the main logic of NoStoreFuncVisitor to an abstract NoStateChangeVisitor class

2021-08-16 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-08-16T15:03:22+02:00 New Revision: c019142a89b477cd247434c1d8f571662d26e19d URL: https://github.com/llvm/llvm-project/commit/c019142a89b477cd247434c1d8f571662d26e19d DIFF: https://github.com/llvm/llvm-project/commit/c019142a89b477cd247434c1d8f571662d26e19d.diff

[clang] 027c5a6 - [analyzer][NFC] Make test/Analysis/self-assign.cpp readable

2021-08-13 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-08-13T16:14:54+02:00 New Revision: 027c5a6adcb3a41c29533680a650fae7262f2b31 URL: https://github.com/llvm/llvm-project/commit/027c5a6adcb3a41c29533680a650fae7262f2b31 DIFF: https://github.com/llvm/llvm-project/commit/027c5a6adcb3a41c29533680a650fae7262f2b31.diff

[clang] 9cca5c1 - [analyzer] Make checker silencing work for non-pathsensitive bug reports

2021-06-17 Thread Kristóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2021-06-17T10:27:34+02:00 New Revision: 9cca5c1391d637b5500ada646cf136ddb38254a3 URL: https://github.com/llvm/llvm-project/commit/9cca5c1391d637b5500ada646cf136ddb38254a3 DIFF: https://github.com/llvm/llvm-project/commit/9cca5c1391d637b5500ada646cf136ddb38254a3.diff

[clang] dd1d548 - [analyzer][Liveness][NFC] Get rid of statement liveness, because such a thing doesn't exist

2020-09-15 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2020-09-15T17:43:02+02:00 New Revision: dd1d5488e47d0a89217dfd22a726c3d3ad2b4984 URL: https://github.com/llvm/llvm-project/commit/dd1d5488e47d0a89217dfd22a726c3d3ad2b4984 DIFF: https://github.com/llvm/llvm-project/commit/dd1d5488e47d0a89217dfd22a726c3d3ad2b4984.diff

[clang] 7c6f5b7 - [analyzer] Add documentation for alpha.fuchsia.Lock and alpha.core.C11Lock

2020-09-15 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2020-09-15T16:55:44+02:00 New Revision: 7c6f5b7fbf5a9eee7f3ef9192c354d1536a8f1c6 URL: https://github.com/llvm/llvm-project/commit/7c6f5b7fbf5a9eee7f3ef9192c354d1536a8f1c6 DIFF: https://github.com/llvm/llvm-project/commit/7c6f5b7fbf5a9eee7f3ef9192c354d1536a8f1c6.diff

Re: [clang] a8503b8 - [NFC] Remove unused static function

2020-09-12 Thread Kristóf Umann via cfe-commits
Yup, unless you this breaks something, I'd really prefer to keep it. On Sat, 12 Sep 2020, 03:24 David Blaikie, wrote: > LLVM_DUMP_METHOD is meant to be used for annotating functions that might > be useful to execute from a debugger to dump data structures, etc - so it's > expected that they'd

[clang] b9bca88 - [analyzer][NFC] Don't bind values to ObjCForCollectionStmt, replace it with a GDM trait

2020-09-11 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2020-09-11T15:58:48+02:00 New Revision: b9bca883c970d36f408db80df21838c713c326db URL: https://github.com/llvm/llvm-project/commit/b9bca883c970d36f408db80df21838c713c326db DIFF: https://github.com/llvm/llvm-project/commit/b9bca883c970d36f408db80df21838c713c326db.diff

[clang] 7527898 - [analyzer][MacroExpansion][NFC] Fix a missing test output check

2020-09-11 Thread Kristóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-09-11T13:48:26+02:00 New Revision: 7527898fef47da929e70c81100a0248c2f445762 URL: https://github.com/llvm/llvm-project/commit/7527898fef47da929e70c81100a0248c2f445762 DIFF: https://github.com/llvm/llvm-project/commit/7527898fef47da929e70c81100a0248c2f445762.diff

[clang] 26d9a94 - [analyzer][MacroExpansion][NFC] Fix incorrectly calling parameters arguments

2020-09-11 Thread Kristóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-09-11T13:33:02+02:00 New Revision: 26d9a94681056f88bd3e892f8113093268fa0907 URL: https://github.com/llvm/llvm-project/commit/26d9a94681056f88bd3e892f8113093268fa0907 DIFF: https://github.com/llvm/llvm-project/commit/26d9a94681056f88bd3e892f8113093268fa0907.diff

[clang] 1c08da3 - [analyzer][MacroExpansion] Add a few dumps functions

2020-09-11 Thread Kristóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-09-11T13:29:14+02:00 New Revision: 1c08da38676d15600b5c707cf7522eb4273a5347 URL: https://github.com/llvm/llvm-project/commit/1c08da38676d15600b5c707cf7522eb4273a5347 DIFF: https://github.com/llvm/llvm-project/commit/1c08da38676d15600b5c707cf7522eb4273a5347.diff

Re: [clang] e4b3fc1 - Get rid of -Wunused warnings in release build, NFC.

2020-06-16 Thread Kristóf Umann via cfe-commits
Apologies for the inconvenience, though I wonder why I haven't gotten builtbot mails :/ On Tue, 16 Jun 2020 at 09:54, Haojian Wu wrote: > On Mon, 15 Jun 2020 at 18:29, David Blaikie wrote: > >> I don't think the comment's adding value here - it should be fairly >> clear from the context that

Re: [clang] 1d393ea - [analyzer] Fix a null FunctionDecl dereference bug after D75432

2020-05-20 Thread Kristóf Umann via cfe-commits
Yup, I'm working on it already, thanks. On Thu, 21 May 2020 at 01:36, Nico Weber wrote: > This breaks tests: http://45.33.8.238/linux/18215/step_7.txt > > On Wed, May 20, 2020 at 7:05 PM Kirstóf Umann via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> >> Author: Kirstóf Umann >> Date:

[clang] e551333 - [analyzer][MallocChecker][NFC] Change the use of IdentifierInfo* to CallDescription

2020-02-25 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2020-02-25T15:43:33+01:00 New Revision: e5513336aee4a9b10cb98f234145aeb4763fdd69 URL: https://github.com/llvm/llvm-project/commit/e5513336aee4a9b10cb98f234145aeb4763fdd69 DIFF: https://github.com/llvm/llvm-project/commit/e5513336aee4a9b10cb98f234145aeb4763fdd69.diff

[clang] 9fd7ce7 - [analyzer][MallocChecker][NFC] Communicate the allocation family to auxiliary functions with parameters

2020-02-25 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2020-02-25T11:17:32+01:00 New Revision: 9fd7ce7f4449619bc85ab4d2643e656836a2d5e2 URL: https://github.com/llvm/llvm-project/commit/9fd7ce7f4449619bc85ab4d2643e656836a2d5e2 DIFF: https://github.com/llvm/llvm-project/commit/9fd7ce7f4449619bc85ab4d2643e656836a2d5e2.diff

Re: [clang-tools-extra] r369763 - [clang-tidy] Possibility of displaying duplicate warnings

2019-08-26 Thread Kristóf Umann via cfe-commits
Apologies for not picking this up, I just recently changed my commit email. I can see that it was fixed in the meanwhile. On Sat, 24 Aug 2019 at 01:45, Galina Kistanova via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hello Kristof, > > This commit broke test to few builders: > > >

Re: r369616 - [analyzer] Enable control dependency condition tracking by default

2019-08-23 Thread Kristóf Umann via cfe-commits
Totally possible, thanks for letting me know! There should be plenty of room for caching, because I do calculate control dependencies in an excess for the same CFG, and the retrieval of a basic block from an ExplodedNode is anything but efficient, though I honestly didnt expect a performance hit

Re: r365030 - Make a buildbot using a buggy gcc happy

2019-07-08 Thread Kristóf Umann via cfe-commits
Thank you so much! Sorry for the inconvencience, I'll be that much more careful next time :) On Mon, 8 Jul 2019, 21:42 Richard Smith, wrote: > I'll commit the change below once my testing finishes :) > > On Mon, 8 Jul 2019 at 12:40, Kristóf Umann via cfe-commits < > cfe-commits

Re: r365030 - Make a buildbot using a buggy gcc happy

2019-07-08 Thread Kristóf Umann via cfe-commits
Noted, thanks! Gabor, could you please fix this? On Mon, 8 Jul 2019, 21:37 Richard Smith, wrote: > This is in any case the wrong fix. The code *is* wrong, for the reason > this compiler is reporting. > > The correct fix is to declare the explicit specializations in the header > file: > >

Re: r365030 - Make a buildbot using a buggy gcc happy

2019-07-08 Thread Kristóf Umann via cfe-commits
Hi! Unfortunately, I'm out of town for the week -- I'll see whether I can ask someone in the office to help out with this. On Mon, 8 Jul 2019, 21:29 JF Bastien, wrote: > Kristof, > > It looks like your fix didn’t address all the bots: > >