https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/136823
From 4ce7497bb0dc89de3b9f139177c295291e7d3e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 17 Apr 2025 17:36:03 +0200
Subject: [PATCH 1/5] [clang-tidy] Add check
'bugprone-inva
balazske wrote:
The check can now warn for (default) initializations that are recursively
inside a type structure (members of structs, elements of arrays). In these
cases it can look difficult to find the member or place where the value with
enum type exists. The check now only makes a single
@@ -0,0 +1,112 @@
+//===--- InvalidEnumDefaultInitializationCheck.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: Ap
balazske wrote:
After #141104 clang should be buildable with dynamic linking too with this
change included. Only tests should be added for the new node types, but I can
do it only later.
https://github.com/llvm/llvm-project/pull/138845
___
cfe-commit
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/141076
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/141076
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/141076
Add extra branches for the case when the buffer argument is NULL.
From a82a775585ea473d6c29457b260848436071d0ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 22 May 2025 16:41:4
balazske wrote:
> > The problem was that nodes like `concepts::TypeRequirement` have
> > constructors (and probably other related functions) defined in
> > SemaConcepts.cpp. These can not be linked to the AST library, but are
> > needed in `ASTImporter` for the new import functions.
>
> Can y
balazske wrote:
This change can help to fix issue #129393 .
https://github.com/llvm/llvm-project/pull/140913
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/140913
It became necessary to add `Sema` as dependency of `ASTImporter`.
This is needed to implement import of concept related nodes.
`Sema` can not be a dependency of `AST`, but this split of
`ASTImporter` makes it po
balazske wrote:
I have renamed the check, if OK the class name will be changed too (in a new
commit).
https://github.com/llvm/llvm-project/pull/140086
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/140086
From 65d44a4eb9621e49a96f1ac43e5a1bbd6691dc13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 15 May 2025 17:41:16 +0200
Subject: [PATCH 1/3] [clang-tidy] Added check
'bugprone-fu
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
balazske wrote:
The current code is not finished. I want to check for false positives and
probably add options to disable check at destructors and operators.
https://github.com/llvm/llvm-project/pull/140086
___
cfe-commits mailing list
cfe-commits@lis
@@ -0,0 +1,74 @@
+//===--- FunctionVisibilityChangeCheck.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: Apa
@@ -0,0 +1,74 @@
+//===--- FunctionVisibilityChangeCheck.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: Apa
@@ -0,0 +1,74 @@
+//===--- FunctionVisibilityChangeCheck.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: Apa
@@ -0,0 +1,74 @@
+//===--- FunctionVisibilityChangeCheck.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: Apa
@@ -0,0 +1,74 @@
+//===--- FunctionVisibilityChangeCheck.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: Apa
@@ -0,0 +1,43 @@
+.. title:: clang-tidy - bugprone-function-visibility-change
+
+bugprone-function-visibility-change
+===
+
+Check changes in visibility of C++ member functions in subclasses. The check
balazske wrote:
fixed
https:
@@ -124,6 +124,11 @@ New checks
pointer and store it as class members without handle the copy and move
constructors and the assignments.
+- New :doc:`bugprone-function-visibility-change
+ ` check.
+
+ Check function visibility changes in subclasses.
bala
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/140086
From 65d44a4eb9621e49a96f1ac43e5a1bbd6691dc13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 15 May 2025 17:41:16 +0200
Subject: [PATCH 1/2] [clang-tidy] Added check
'bugprone-fu
balazske wrote:
I have now a working patch for "splitting" `ASTImporter` from `AST`. If this
change will be accepted it is possible to add the new visit functions. The
"split" change may require discussion on discord because it affects clang code
layout.
https://github.com/llvm/llvm-project/p
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/132242
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I checked the code and it looks difficult to split the `ASTImporter` to a
separate component. The problem is that `ExternalASTSource` is used for AST
related things and uses `ASTImporter` too.
Another way to fix the problem is to move code of classes like
`concepts::TypeRequire
balazske wrote:
I think that `ASTImporter` must be moved into a new component (directory in
"clang/lib") to fix this problem. `AST` is already dependency of `Sema` so
`Sema` can not be added to `AST` as dependency (but could be added to
`ASTImporter` if it would be a new component and `Sema` w
balazske wrote:
We should ensure that the code builds with `-DBUILD_SHARED_LIBS=ON` cmake
option. I think this is why I can not build it. I get this error:
```
/usr/bin/ld: tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o:
in function `std::conditional, llvm::Expected, llvm::E
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/140086
None
From 65d44a4eb9621e49a96f1ac43e5a1bbd6691dc13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 15 May 2025 17:41:16 +0200
Subject: [PATCH] [clang-tidy] Added check
'bugprone-
balazske wrote:
I have fixed the review issues.
https://github.com/llvm/llvm-project/pull/136823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/136823
From 4ce7497bb0dc89de3b9f139177c295291e7d3e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 17 Apr 2025 17:36:03 +0200
Subject: [PATCH 1/4] [clang-tidy] Add check
'bugprone-inva
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
@@ -0,0 +1,58 @@
+//===--- MisleadingSetterOfReferenceCheck.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: Apa
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132242
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132242
From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 19 Mar 2025 16:09:04 +0100
Subject: [PATCH 1/6] [clang-tidy] Add check
bugprone-misle
@@ -0,0 +1,58 @@
+//===--- MisleadingSetterOfReferenceCheck.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: Apa
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132242
From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 19 Mar 2025 16:09:04 +0100
Subject: [PATCH 1/5] [clang-tidy] Add check
bugprone-misle
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/128735
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I am now not really sure what happens, if there is a single anonymous namespace
for a TU or there are separate ones for the anonymous namespaces in for example
`extern "C"` blocks (and how it should work according to the C++ standard).
Probably adding more tests where there is
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/136823
From 4ce7497bb0dc89de3b9f139177c295291e7d3e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 17 Apr 2025 17:36:03 +0200
Subject: [PATCH 1/3] [clang-tidy] Add check
'bugprone-inva
balazske wrote:
The current behavior is the same for named or anonymous namespace: If there is
an existing namespace with same name in the target ("To") TU, the imported one
is merged into this (this is what was wrong before this fix, the anonymous
namespace was not merged if it was inside a `
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/136823
From 4ce7497bb0dc89de3b9f139177c295291e7d3e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 17 Apr 2025 17:36:03 +0200
Subject: [PATCH 1/2] [clang-tidy] Add check
'bugprone-inva
balazske wrote:
> I wonder if behavior of this check should be an extension to
> [optin.core.EnumCastOutOfRange](https://clang.llvm.org/docs/analyzer/checkers.html#optin-core-enumcastoutofrange).
> Sure, we don't have `static_cast` here but it's still considered as "cast
> out of range"? Maybe
@@ -0,0 +1,114 @@
+//===--- InvalidEnumDefaultInitializationCheck.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: Ap
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/134387
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker
llvm::raw_ostream &Out) const override;
ValueConstraintPtr negate() const override {
- NotNullBufferConstraint Tmp(*this);
+ BufferNullnessConstraint Tmp(*this);
Tmp.Cannot
balazske wrote:
The checker had only a few results from the usual C projects where we test it,
but more of these are difficult to understand.
[This](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=vim_v8.2.1920_fixedaddr_on_test&newcheck=vim_v8.2.1920_fixedaddr_off_
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/134387
From 8936d300045d96d8719ecee04c36b2b0cb5d96d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 4 Apr 2025 16:05:28 +0200
Subject: [PATCH 1/2] [clang][analyzer] Fix a possible crash
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132242
From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 19 Mar 2025 16:09:04 +0100
Subject: [PATCH 1/4] [clang-tidy] Add check
bugprone-misle
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/134387
None
From 8936d300045d96d8719ecee04c36b2b0cb5d96d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 4 Apr 2025 16:05:28 +0200
Subject: [PATCH] [clang][analyzer] Fix a possible cras
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132242
From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 19 Mar 2025 16:09:04 +0100
Subject: [PATCH 1/3] [clang-tidy] Add check
bugprone-misle
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132242
From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 19 Mar 2025 16:09:04 +0100
Subject: [PATCH 1/2] [clang-tidy] Add check
bugprone-misle
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/132404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1165,7 +1165,7 @@ ProgramStateRef
StdLibraryFunctionsChecker::NotNullConstraint::apply(
return State->assume(L, CannotBeNull);
}
-void StdLibraryFunctionsChecker::NotNullConstraint::describe(
+void StdLibraryFunctionsChecker::NullnessConstraint::describe(
Descripti
@@ -1165,7 +1165,7 @@ ProgramStateRef
StdLibraryFunctionsChecker::NotNullConstraint::apply(
return State->assume(L, CannotBeNull);
}
-void StdLibraryFunctionsChecker::NotNullConstraint::describe(
+void StdLibraryFunctionsChecker::NullnessConstraint::describe(
Descripti
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/132404
From ecbda095420a1ec300fd4793600c813acc310475 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 21 Mar 2025 15:02:38 +0100
Subject: [PATCH 1/2] [clang][analyzer] Move
'alpha.core.Fi
balazske wrote:
[This single
report](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=qtbase_v6.2.0_fixedaddr_on_test&is-unique=off&diff-type=New&checker-name=alpha.core.FixedAddressDereference&report-hash=fda7750beaa79c7f9c602febcf9a7bb9&report-id=6953322&report-file
balazske wrote:
On projects memcached,tmux,curl,twin,vim,openssl,sqlite,ffmpeg,postgres only
the following results were found:
| Project | Resolved Reports | New Reports |
|-|-|--|
| vim | [1
reports](https://codechecker-demo.eastus.cloudapp.azure.com/Default
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/131374
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/132404
None
From ecbda095420a1ec300fd4793600c813acc310475 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 21 Mar 2025 15:02:38 +0100
Subject: [PATCH] [clang][analyzer] Move 'alpha.core.F
https://github.com/balazske approved this pull request.
Rename looks good. According to the format check code should be reformatted. Do
not forget to remove the "discuss" part from the commit title.
https://github.com/llvm/llvm-project/pull/131374
___
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/132242
There can be concerns about the usefulness of this check but for some code it
can be useful.
From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Da
@@ -1165,7 +1165,7 @@ ProgramStateRef
StdLibraryFunctionsChecker::NotNullConstraint::apply(
return State->assume(L, CannotBeNull);
}
-void StdLibraryFunctionsChecker::NotNullConstraint::describe(
+void StdLibraryFunctionsChecker::NullnessConstraint::describe(
Descripti
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/128735
From 3fae6f2bed93144561138704accb43c6544cfb56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 25 Feb 2025 17:17:02 +0100
Subject: [PATCH 1/2] [clang][ASTImporter] Fix AST import if
@@ -1165,7 +1165,7 @@ ProgramStateRef
StdLibraryFunctionsChecker::NotNullConstraint::apply(
return State->assume(L, CannotBeNull);
}
-void StdLibraryFunctionsChecker::NotNullConstraint::describe(
+void StdLibraryFunctionsChecker::NullnessConstraint::describe(
Descripti
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/129557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/129557
From 8006fde8ad615dffcaf38bc017b58d6bbed59ae2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Mar 2025 17:57:19 +0100
Subject: [PATCH 1/4] [clang][analyzer] Add BugReporterVisito
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/129557
From 8006fde8ad615dffcaf38bc017b58d6bbed59ae2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Mar 2025 17:57:19 +0100
Subject: [PATCH 1/3] [clang][analyzer] Add BugReporterVisito
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/127191
From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Feb 2025 15:35:31 +0100
Subject: [PATCH 1/6] [clang][analyzer] Add checker
'alpha.c
@@ -395,6 +395,19 @@ ANALYZER_OPTION(
"flex\" won't be analyzed.",
true)
+ANALYZER_OPTION(
+bool, ShouldSuppressAddressSpaces, "suppress-all-address-spaces",
balazske wrote:
I think that "ignore-all-address-spaces" would be really problematic but
balazske wrote:
I could not find out why the buildkite check failures appear.
https://github.com/llvm/llvm-project/pull/128735
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I meant that I did not verify where a namespace declaration is allowed, if it
is allowed with another declaration as parent (which is not a `LinkageSpecDecl`
and not `NamespaceDecl` and not `TranslationUnitDecl`). It looks likely that no
other parent is possible.
https://githu
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/128735
I discovered one faulty case that is shown in the second of the added tests (an
anonymous namespace is imported that resides in a `extern "C"` block). I did
not check for other possibilities for namespaces tha
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/127191
From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Feb 2025 15:35:31 +0100
Subject: [PATCH 1/5] [clang][analyzer] Add checker
'alpha.c
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/127191
From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Feb 2025 15:35:31 +0100
Subject: [PATCH 1/4] [clang][analyzer] Add checker
'alpha.c
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/127191
From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Feb 2025 15:35:31 +0100
Subject: [PATCH 1/3] [clang][analyzer] Add checker
'alpha.c
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/127409
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -40,17 +40,28 @@ enum class OpenVariant {
OpenAt
};
+static CachedMacroValue getCreateFlagValue(const ASTContext &Ctx,
+ const Preprocessor &PP) {
+ CachedMacroValue MacroVal("O_CREAT", PP);
+ if (MacroVal.hasValue())
+retur
@@ -73,6 +73,23 @@ Nullability getNullabilityAnnotation(QualType Type);
/// returned.
std::optional tryExpandAsInteger(StringRef Macro, const Preprocessor &PP);
+class CachedMacroValue {
balazske wrote:
What is the advantage of using this instead of just `std
@@ -1,6 +1,6 @@
// NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple
reports are not issued.
-// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10
-analyzer-checker=core,alpha.core,osx.cocoa.AtSync -Wno-strict-prototypes
-Wno-pointer-to-int-cast -verif
@@ -1,7 +1,163 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -verify %s
-// expected-no-diagnostics
-void foo(void) {
+extern void __assert_fail (__const char *__assertion, __const char *__file,
+unsigned int __line, __const char *__function)
+ __attri
@@ -129,6 +129,8 @@ The ``SuppressAddressSpaces`` option suppresses
warnings for null dereferences of all pointers with address spaces. You can
disable this behavior with the option
``-analyzer-config core.NullDereference:SuppressAddressSpaces=false``.
+Value of this option is
@@ -155,30 +162,47 @@ static bool isDeclRefExprToReference(const Expr *E) {
void DereferenceChecker::reportBug(DerefKind K, ProgramStateRef State,
const Stmt *S, CheckerContext &C) const {
- if (!CheckNullDereference) {
-C.addSink();
-
balazske wrote:
The checker is alpha because there are known problems with it which I plan to
fix later.
A problem is with the bugpath messages where a constant pointer was assumed to
be a null pointer but after this checker (or even before it?) this is not true.
https://github.com/llvm/llvm-p
balazske wrote:
It may cause confusion that "NullDereference" checker checks not only null
dereference but undefined pointer and label address too. Probably these checks
(specially label address) can be moved into this checker. (Or add the new check
to NullDereference without a new checker?)
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/127191
From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Feb 2025 15:35:31 +0100
Subject: [PATCH 1/2] [clang][analyzer] Add checker
'alpha.c
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/127191
None
From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 3 Feb 2025 15:35:31 +0100
Subject: [PATCH] [clang][analyzer] Add checker
'alpha
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/124273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/124273
From 4109a5166b544c33af333505883b414db7c0c14d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 22 Jan 2025 17:55:51 +0100
Subject: [PATCH 1/3] fix test
---
clang/lib/AST/ASTImport
balazske wrote:
It seems that this test is not reducible any further (except very small
changes) (to get the original crash). I could remove only few lines.
https://github.com/llvm/llvm-project/pull/124273
___
cfe-commits mailing list
cfe-commits@list
https://github.com/balazske approved this pull request.
https://github.com/llvm/llvm-project/pull/124305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
If this case is not handled, the following `setDescribedFunctionTemplate` will
run into an assertion. The case happens in the test code. What exactly happens
is that because of the `__get_first_arg` mismatch a field
`basic_string::_M_allocated_capacity` is missing from `basic_s
@@ -3441,13 +3441,33 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportParmVarDecl) {
ASSERT_TRUE(FromVar);
ASSERT_TRUE(FromVar->hasUninstantiatedDefaultArg());
ASSERT_TRUE(FromVar->getUninstantiatedDefaultArg());
+ ASSERT_FALSE(FromVar->isExplicitObjectParameter());
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/124273
During import of a function template at specific conditions an assertion
"TemplateOrSpecialization.isNull()" can be triggered. This can
happen when the new AST is already incompatible after import failures.
Prob
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/122686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/122686
None
From 1b11dfc89cc81c1d48479cdcc7a4f5936d4ddb93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 13 Jan 2025 11:33:40 +0100
Subject: [PATCH] [clang][ASTImporter] Fix unused vari
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/118466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/122139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/122139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 875 matches
Mail list logo