https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/96501
The checker could report false positives if pointer arithmetic was done on
pointers to non-array data before pointer subtraction. Another problem is fixed
that could cause false positive if members of the same
balazske wrote:
These results look correct according to the checker, but I am not sure if such
results are useful or really invalid:
https://codechecker-demo.eastus.cloudapp.azure.com/Default/reports?run=vim_v8.2.1920_pointersub1&is-unique=on&diff-type=New&checker-name=alpha.core.PointerSub
In t
balazske wrote:
The warning message may be still misleading if the LHS or RHS "arrays" are
non-array variables. Is it better to improve the messages in this case (or
detect if `offsetof` can be used and include it in the message)?
https://github.com/llvm/llvm-project/pull/96501
___
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/96295
From 0c57ad1ca36a841dff700eb98f878475e0243b88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 21 Jun 2024 12:13:02 +0200
Subject: [PATCH 1/3] [clang][analyzer] Improve documentation
balazske wrote:
I fixed a test that contained the entire option help description. I think this
is not needed, removed it and only included the first line of the description.
https://github.com/llvm/llvm-project/pull/96295
___
cfe-commits mailing list
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/96295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
If the array bounds checker does the same job then the array bounds check it is
not needed in this checker. Specially if it makes no difference if the indexing
is used at pointer subtraction.
https://github.com/llvm/llvm-project/pull/96501
__
balazske wrote:
Even protobuf contains this type of code:
https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=protobuf_v3.13.0_pointersub1&is-unique=on&diff-type=New&checker-name=alpha.core.PointerSub&report-id=5545776&report-hash=1bcd310fbaeccbcc13645b9b277239a2&report-f
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/97078
Read the 'mmap' flags from macro values and use a better test for the error
situation.
From 1f04ce794a3aefc0f5622a9dea0a92a1e2b50be9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/108586
The checker was indicated as a 'C' language checker but is only applicable to
'ObjC' code.
From 620a17fca9e6c011099e223cb965cd4bcc8f413a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/111846
From a9e1790691e01892f7e1b17523cd43421445f3ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 10 Oct 2024 16:28:50 +0200
Subject: [PATCH 1/3] [clang][analyzer] PointerSubChecker sh
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/111846
___
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/112019
CStringChecker has a sub-checker alpha.unix.cstring.NotNullTerminated which
checks for invalid objects passed to string functions. The checker and its name
are not exact and more functions could be checked, th
balazske wrote:
I was thinking about using `check::Location` in this checker. The real problem
is when the fixed address is used (to store or load), not if it is assigned to
a pointer. (Or a fixed address becomes escaped.) Or both cases (with the
current checks) can be used, but then multiple
balazske wrote:
When `check::Location` is used it looks better to extend the
`DereferenceChecker` with this new check that looks simple to add to it (it
uses `check::Bind` too, probably this finds the cases when location does not
work). Only difficulty is that this is a non-fatal error.
https
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/110977
From 36d99fc59b675737ce952087b7a71ec6e4b579a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 30 Sep 2024 16:51:35 +0200
Subject: [PATCH 1/3] [clang][analyzer] Check initialization
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/107596
___
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/110458
If a fixed value is assigned to a pointer variable, the checker did emit a
warning. If the pointer variable is assigned to another pointer variable, this
resulted in another warning. The checker now emits warn
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/110458
From eb03076eca550ea53143bc753639f22bbb7caa35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 30 Sep 2024 09:19:52 +0200
Subject: [PATCH 1/2] [clang][analyzer] Less redundant warni
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/112019
___
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/112688
After a previous fix and commit 30a9cac error handling in function
'importTemplateParameterDefaultArgument' was not correct because std::move was
removed from return of an Error object and this caused crash "E
balazske wrote:
The fix looks acceptable, but a test is needed. The test code in the bug report
can be used somehow in at the AST merge LIT tests or in the `ASTImporterTest`.
https://github.com/llvm/llvm-project/pull/112534
___
cfe-commits mailing lis
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/112688
___
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/111846
Pointer values casted to integer (non-pointer) type should be able to be
subtracted as usual.
From a9e1790691e01892f7e1b17523cd43421445f3ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
D
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/111846
From a9e1790691e01892f7e1b17523cd43421445f3ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 10 Oct 2024 16:28:50 +0200
Subject: [PATCH 1/2] [clang][analyzer] PointerSubChecker sh
@@ -61,6 +61,10 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator *B,
if (LR->getSymbolicBase() || RR->getSymbolicBase())
return;
+ if (!B->getLHS()->getType()->isPointerType() ||
+ !B->getRHS()->getType()->isPointerType())
+return;
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/113899
From 9cf4203652f06a140288a5c1ab6d14bcc3612380 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 28 Oct 2024 11:23:55 +0100
Subject: [PATCH 1/2] [clang][analyzer] Bring checker
'alph
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/113899
I have tested it on the usual amount of C and C++ projects, no results were
found. This checker is only for very rare cases, I do not know if it is really
useful but it is there and can be moved out of alpha.
balazske wrote:
Currently one of the tests fail, the problem is fixed if #115518 is applied.
https://github.com/llvm/llvm-project/pull/115734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/115734
The fix applies to a case that occurs when the AST contains a friend template
that is contained within another template and this (outer) template has
specialization. (See the added test code in the commit.)
Th
balazske wrote:
I had another simple fix when the cache is used only if
`IgnoreTemplateParmDepth` is false which is the often used case. During one
structural equivalence comparison `IgnoreTemplateParmDepth` does not change,
just one set of the cached values (for `IgnoreTemplateParmDepth`) is
balazske wrote:
It is a realistic requirement that new similar parameters are added, I had
already an (experimental) fix where this is needed. Still I like better the
solution with separate caches because efficiency reasons
(`IgnoreTemplateParmDepth = true` is rarely used, not at all for C cod
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/115518
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
Another possible solution: Use two `NonEquivalentDecls` sets, one for
`IgnoreTemplateParmDepth` = true and one for false. This may use less memory
(no rarely used third value in the key) but requires more code changes.
Probably use these two caches only in `ASTImporter` where t
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/115518
Structural equivalence check uses a cache to store already found non-equivalent
values. This cache can be reused for calls (ASTImporter does this). Value of
"IgnoreTemplateParmDepth" can have an effect on the
@@ -53,3 +53,7 @@ struct TestNotNullTerm {
strlen((char *)&x); // expected-warning{{Argument to string length
function is not a null-terminated string}}
}
};
+
+void test_notcstring_tempobject() {
+ strlen((char[]){'a', 0}); // expected-warning{{Argument to string lengt
@@ -6120,6 +6119,19 @@ ExpectedDecl
ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
// see ASTTests test ImportExistingFriendClassTemplateDef.
continue;
}
+// When importing a friend, it is possible that multiple declarations
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/108993
___
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/107596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I moved the checker now into package `security`. The main reason is that the
checker should not be turned on by default because use of such low-level
features may be valid in some projects. The checker is not absolutely
security-related but there was no better place for it (`o
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/107596
From be6fbcad245bd16b013e9337270e0ade23a5b9c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 6 Sep 2024 16:30:59 +0200
Subject: [PATCH 1/2] [clang][analyzer] Move 'alpha.core.Poin
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/110977
None
From 36d99fc59b675737ce952087b7a71ec6e4b579a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 30 Sep 2024 16:51:35 +0200
Subject: [PATCH] [clang][analyzer] Check initializati
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/110977
From 36d99fc59b675737ce952087b7a71ec6e4b579a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 30 Sep 2024 16:51:35 +0200
Subject: [PATCH 1/2] [clang][analyzer] Check initialization
@@ -23,38 +25,35 @@ using namespace ento;
namespace {
class FixedAddressChecker
- : public Checker< check::PreStmt > {
+: public Checker, check::PreStmt,
+ check::PreStmt> {
const BugType BT{this, "Use fixed address"};
+ void checkUseOfFixedAddre
balazske wrote:
I changed the variable names and now `PreCall` is used so it should work with
other call cases. Tests are not added for all cases like default values. I plan
to split the tests from **ptr-arith.c** into separate C and C++ files (the
checker is planned to be moved into the `opti
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/110458
___
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/112688
From 0694ea396728fe34f031fa1102460f56da4d3822 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 17 Oct 2024 12:03:55 +0200
Subject: [PATCH 1/2] [clang][ASTImporter] Fix of unchecked
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/112688
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I do not want now to check what is exactly happening, the case is a bit
interesting. Normally `return Err` should work and is used at other functions
too. And why did not a similar crash happen at the unit tests? Probably it is
caused by different compilation on other platform
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/115734
From eca94b1ff721d8ec857a5fdee8b358ce22d210aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 11 Nov 2024 16:53:59 +0100
Subject: [PATCH 1/2] [clang][ASTImporter] Allow import of s
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/115734
From eca94b1ff721d8ec857a5fdee8b358ce22d210aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 11 Nov 2024 16:53:59 +0100
Subject: [PATCH] [clang][ASTImporter] Allow import of simil
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/113899
___
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/108993
None
From c13a4d7ed344209359ddb838b2688805ceb06304 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 17 Sep 2024 17:33:34 +0200
Subject: [PATCH] [clang][analyzer] FixedAddressChecke
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/115734
___
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/113899
From 9cf4203652f06a140288a5c1ab6d14bcc3612380 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 28 Oct 2024 11:23:55 +0100
Subject: [PATCH 1/3] [clang][analyzer] Bring checker
'alph
balazske wrote:
I have added a FIXME to the place where no warning should appear. Additionally
a new test file is added where only this checker is turned on (not the full
`cstring`).
https://github.com/llvm/llvm-project/pull/113899
___
cfe-commits ma
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/118466
`ASTImporterLookupTable` did use the `getPrimaryContext` function to get the
declaration context of the inserted items. This is problematic because the
primary context can change during import of AST items, mo
@@ -3165,6 +3165,7 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl
*D) {
if (Error Err = ImportImplicitMethods(DCXX, FoundCXX))
return std::move(Err);
}
+return FoundDef;
balazske wrote:
I
balazske wrote:
I have tested the change with CTU analysis and did not see significant
difference, and no new crashes (in these tests there was one known instance of
unreachable at ASTImporterLookupTable.cpp:121 that is fixed by the change).
There were some differences in the found reports, pr
https://github.com/balazske converted_to_draft
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 edited
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
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue,
FromD, FromDInherited);
}
+TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1)
{
+ const char *ToCode =
+ R"(
+ namespace a {
+ }
+ namespace a {
+
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue,
FromD, FromDInherited);
}
+TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1)
{
+ const char *ToCode =
+ R"(
+ namespace a {
+ }
+ namespace a {
+
@@ -6082,6 +6084,7 @@ TEST_P(ASTImporterLookupTableTest,
LookupSearchesInTheWholeRedeclChain) {
auto Res = LT.lookup(N1, Name);
ASSERT_EQ(Res.size(), 1u);
EXPECT_EQ(*Res.begin(), A);
+ EXPECT_TRUE(LT.lookup(N2, Name).empty());
balazske wrote:
Yes, prev
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue,
FromD, FromDInherited);
}
+TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1)
{
+ const char *ToCode =
+ R"(
+ namespace a {
+ }
+ namespace a {
+
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/118466
From e97972c18fd88129bb868b1bfc880f7fdb8e8c73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 29 Nov 2024 18:00:04 +0100
Subject: [PATCH 1/2] [clang][ASTImporter] Not using primary
@@ -3165,6 +3165,7 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl
*D) {
if (Error Err = ImportImplicitMethods(DCXX, FoundCXX))
return std::move(Err);
}
+return FoundDef;
balazske wrote:
Th
balazske wrote:
> Does this have any affect on other redeclarable `DeclContext`s such as class
> forward declarations?
In the code of `DeclContext::getPrimaryContext` it is visible that it has only
effect on declarations and it depends on whether it has a definition or not
(except namespace a
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/118466
From e97972c18fd88129bb868b1bfc880f7fdb8e8c73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 29 Nov 2024 18:00:04 +0100
Subject: [PATCH] [clang][ASTImporter] Not using primary con
https://github.com/balazske ready_for_review
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
@@ -155,22 +155,27 @@ static bool isDeclRefExprToReference(const Expr *E) {
void DereferenceChecker::reportBug(DerefKind K, ProgramStateRef State,
const Stmt *S, CheckerContext &C) const {
+ if (!CheckNullDereference) {
+C.addSink();
---
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/122139
From 135839a993f1cad32d65d21c6aeaef6f074a1997 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 8 Jan 2025 17:22:10 +0100
Subject: [PATCH 1/2] [clang][analyzer] Split NullDereference
balazske wrote:
Our plan is to add a new check for dereference of fixed address (like `(*0x111)
= 1`). This is similar to the current `FixedAddressChecker` but has less false
positives (if a fixed value is used as placeholder but never dereferenced).
Additionally the existing checks for undefi
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/122139
The checker currently reports beneath the null dereference dereferences of
undefined value and of label addresses. If we want to add more kinds of invalid
dereferences (or split the existing functionality) it
balazske wrote:
I wanted to avoid change the current behavior of `core.NullDereference`. But it
is better to move the option of address space suppression into the modeling
part, I guess this option should be used for all types of invalid dereferences.
https://github.com/llvm/llvm-project/pull/
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
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 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
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 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 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/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 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
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 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
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?)
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
@@ -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
@@ -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
@@ -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
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
@@ -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();
-
@@ -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
@@ -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
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
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
701 - 800 of 829 matches
Mail list logo