Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
steakhal wrote:
> This functionality could be
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1158,6 +1173,118 @@ void
steakhal wrote:
I had to push a fixup commit, because I forgot about one switch-case.
https://github.com/llvm/llvm-project/commit/f07157eb2e8212068cb9469d77f9bc3779ef2ea4
I pushed it already to fix the build bot, but let me know if you disagree with
the fix.
https://github.com/llvm/llvm-projec
Author: Balazs Benics
Date: 2024-03-08T14:55:10+01:00
New Revision: f07157eb2e8212068cb9469d77f9bc3779ef2ea4
URL:
https://github.com/llvm/llvm-project/commit/f07157eb2e8212068cb9469d77f9bc3779ef2ea4
DIFF:
https://github.com/llvm/llvm-project/commit/f07157eb2e8212068cb9469d77f9bc3779ef2ea4.diff
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/steakhal edited
https://gi
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=,
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=,
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=,
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=,
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=,
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=
Message-ID:
=?utf-8?q?Donát?= Nagy
Message-ID:
In-Reply-To:
@@ -109,6 +136,33 @@ int *potentialAfterTheEndPtr(int idx) {
// &TenElements[idx].
}
+int overflowOrUnderflow(int arg) {
+ // expected-note@+2 {{Assuming 'arg' is < 0}}
+ // expected-note@+1 {{Taking false branch}}
+ if (
=?utf-8?q?Donát?= Nagy ,
=?utf-8?q?Donát?= Nagy
Message-ID:
In-Reply-To:
https://github.com/steakhal commented:
Looks good to me, but I'd be more eased if had seen some unittests for this
matter.
You could use AST-matchers selecting different FunctionDecls and query them
using this free-func
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call, CharKind CK) const {
+ Dest
@@ -529,3 +529,42 @@ void nocrash_on_locint_offset(void *addr, void* from,
struct S s) {
size_t iAdd = (size_t) addr;
memcpy(((void *) &(s.f)), from, iAdd);
}
+
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+/* present in both glibc 2.25 and musl
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call, CharKind CK) const {
+ Dest
@@ -219,6 +221,7 @@ class CStringChecker : public Checker< eval::Call,
void evalSnprintf(CheckerContext &C, const CallEvent &Call) const;
void evalSprintfCommon(CheckerContext &C, const CallEvent &Call,
bool IsBounded, bool IsBuiltin) const;
+ void
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call, CharKind CK) const {
+ Dest
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call) const {
+ DestinationArgExp
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call, CharKind CK) const {
+ Dest
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call, CharKind CK) const {
---
@@ -529,3 +529,42 @@ void nocrash_on_locint_offset(void *addr, void* from,
struct S s) {
size_t iAdd = (size_t) addr;
memcpy(((void *) &(s.f)), from, iAdd);
}
+
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+/* present in both glibc 2.25 and musl
@@ -165,6 +165,8 @@ class CStringChecker : public Checker< eval::Call,
{{CDM::CLibrary, {"explicit_bzero"}, 2}, &CStringChecker::evalBzero},
{{CDM::CLibrary, {"sprintf"}, 2}, &CStringChecker::evalSprintf},
{{CDM::CLibrary, {"snprintf"}, 2}, &CStringChecker::ev
https://github.com/steakhal requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/83675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/84446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
Thanks for the prompt review @PiotrZSL!
I plan to merge it by the end of the day, unless someone objects.
https://github.com/llvm/llvm-project/pull/84446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/84446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/84446
Note that this patch will be necessary to fix `forEachArgumentWithParam()` and
`forEachArgumentWithParamType()` matchers for deducing "this"; which is my true
motivation.
>From 9ffc1b9ec60a9638c5b07cb25574ddb2
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
https://github.com/steakhal approved this pull request.
I haven't gone deep into this PR, but it looks good to me.
Please wait for someone else to sign it too.
https://github.com/llvm/llvm-project/pull/84191
___
cfe-commits mailing list
cfe-commits@lis
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1158,6 +1173,123 @@ void StreamChecker::evalUngetc(const FnDescription
*Desc, const CallEvent &Call,
C.addTransition(StateFailed);
}
+ProgramStateRef
+StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1158,6 +1173,123 @@ void StreamChecker::evalUngetc(const FnDescription
*Desc, const CallEvent &Call,
C.addTransition(StateFailed);
}
+ProgramStateRef
+StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1196,6 +1342,11 @@ void StreamChecker::evalGetdelim(const FnDescription
*Desc,
E.isStreamEof() ? ErrorFEof : ErrorFEof | ErrorFError;
StateFailed = E.setStreamState(
StateFailed, StreamState::getOp
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1183,6 +1315,20 @@ void StreamChecker::evalGetdelim(const FnDescription
*Desc,
State->BindExpr(E.CE, C.getLocationContext(), RetVal);
StateNotFailed =
E.assumeBinOpNN(StateNotFailed, BO_GE, R
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=
Message-ID:
In-Reply-To:
https://github.com/steakhal requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/83027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
@@ -880,6 +883,24 @@ void StreamChecker::preReadWrite(const FnDescription *Desc,
}
}
+void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call,
steakhal wrote:
Let me share my experience with `std::bind` and with this checker.
Unfortuna
steakhal wrote:
I'm thinking of backporting this to clang-18, but given that it's only
developer-facing, I don't think it worth it.
WDYT @NagyDonat?
https://github.com/llvm/llvm-project/pull/79446
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/83585
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/83138
___
cfe-commits mailing list
cfe
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/82919
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy ,
=?utf-8?q?Don=C3=A1t?= Nagy
Message-ID:
In-Reply-To:
https://github.com/steakhal approved this pull request.
Still looks good.
https://github.com/llvm/llvm-project/pull/78442
___
cfe-commits mailing list
cfe-commits@lis
@@ -0,0 +1,327 @@
+// RUN: %clang_analyze_cc1
-analyzer-checker=core,alpha.unix.Stream,debug.ExprInspection -verify %s
+
+#include "Inputs/system-header-simulator.h"
+#include "Inputs/system-header-simulator-for-malloc.h"
+#include "Inputs/system-header-simulator-for-valist.h"
+
@@ -13,6 +13,9 @@
#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CHECKERHELPERS_H
#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CHECKERHELPERS_H
+#include "ProgramState_Fwd.h"
+#include "SVals.h"
+
steakhal wrote:
```suggestion
```
https://gith
@@ -1158,6 +1173,123 @@ void StreamChecker::evalUngetc(const FnDescription
*Desc, const CallEvent &Call,
C.addTransition(StateFailed);
}
+ProgramStateRef
+StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr,
+CheckerContext &C, P
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/83585
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,10 +1,10 @@
-//===- unittest/ASTMatchers/Dynamic/VariantValueTest.cpp - VariantValue unit
tests -===//
+// unittest/ASTMatchers/Dynamic/VariantValueTest.cpp - VariantValue unit tests
steakhal wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/82919
_
https://github.com/steakhal updated
https://github.com/llvm/llvm-project/pull/82919
>From 319329630e0d2a86b22dd435985026ea236f8e56 Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Sun, 25 Feb 2024 12:48:06 +0100
Subject: [PATCH 1/2] [clang][NFC] Trim license header comments to 81
characters
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/84160
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,30 +33,33 @@ namespace ento {
/// checking.
///
/// \sa CheckerContext
-class CheckerDocumentation : public Checker< check::PreStmt,
- check::PostStmt,
- check::PreObjCMessage,
-
https://github.com/steakhal updated
https://github.com/llvm/llvm-project/pull/84160
>From a3da80aa7114d938e9cc3f03ec7941c91fbf Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Wed, 6 Mar 2024 13:05:44 +0100
Subject: [PATCH 1/2] [analyzer][NFC] Document check::ASTCodeBody checker
callback
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/84160
Fixes #73764
With this patch, now all the callbacks are demonstrated here.
>From a3da80aa7114d938e9cc3f03ec7941c91fbf Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Wed, 6 Mar 2024 13:05:44 +0100
Subje
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/83281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/steakhal updated
https://github.com/llvm/llvm-project/pull/83281
>From a9419bc3ffa3d383a9373f0a116795162632dd40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Wed, 28 Feb 2
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=
Message-ID:
In-Reply-To:
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/83281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/78442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/82089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/82089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/82089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=
Message-ID:
In-Reply-To:
steakhal wrote:
@alejandro-alvarez-sonarsource Should we merge this, and give it a try?
https://github.com/llvm/llvm-project/pull/83281
___
cfe-commits mailing list
cfe-commits@l
@@ -0,0 +1,11 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core -std=c++23 -verify %s
+// expected-no-diagnostics
+
+struct S {
+ bool operator==(this auto, S) {
+return true;
+ }
+};
+int use_deducing_this() {
+ return S{} == S{};
steakhal wrote:
```s
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83585
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal commented:
The patch looks a lot better this way. Thanks!
I'd recommend adding this test to the existing
`clang/test/Analysis/cxx2b-deducing-this.cpp` test file to have all deducing
this testcases at a common place.
https://github.com/llvm/llvm-project/pull/83585
_
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call) const {
+ DestinationArgExp
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of
stream APIs: ``fopen, fcl
alpha.unix.Stream (C)
"
-Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite,
steakhal wrote:
I'm fine with the change.
https://github.com/llvm/llvm-project/pull/83985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/83973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
> LGTM.
>
> Minor remark: "signatires" is misspelled in the commit message.
Fixed the typos. Thanks!
https://github.com/llvm/llvm-project/pull/83973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call) const {
+ DestinationArgExp
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call) const {
+ DestinationArgExp
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call) const {
+ DestinationArgExp
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
&C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+const CallEvent &Call) const {
+ DestinationArgExp
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal requested changes to this pull request.
Thanks for the PR!
At first I was hesitant if this checker is the right place for this API.
But actually, it should be fine to have it here.
Maybe the stdlibraryfunctionschecker would be a better place in long term, but
I don't
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/83973
In PR #83677 I was surprised to see that outdated checker callback signatures
are a problem. It turns out, we need the `registerChecker...` function to
invoke the `Mgr.registerChecker<>()` which would instantia
steakhal wrote:
I did some grepping.
Inside the `clang` project:
`^/+=(.*)/(.*)...$`: 297 files
`^/+=([^\n/]*)\.(h|cpp)([^\n/]*)...$`: 1766 files
This suggests to me that indeed, absolute paths are the used way fewer times.
https://github.com/llvm/llvm-project/pull/82919
___
steakhal wrote:
> +1 to @pogo59's comment about pruning complete paths - I suspect they're in
> the minority. Might be worth checking whether the `===` at the start and end
> is markup for any particular thing (I /think/ the `-*- C++ -*-` is load
> bearing for some editors to inform them this
steakhal wrote:
Please merge it once approved.
https://github.com/llvm/llvm-project/pull/83968
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/83968
None
>From 3a7f862398a5168028f2d3d66d6b8986e7d528da Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Tue, 5 Mar 2024 08:47:56 +0100
Subject: [PATCH] [analyzer][NFC] Remove dead code
---
.../StaticAnalyzer/C
@@ -0,0 +1,15 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++23
-verify %s
+// expected-no-diagnostics
+
+struct S
+{
+constexpr auto operator==(this auto, S)
+{
+return true;
+}
+};
+
+int main()
+{
+return S {} == S {};
+}
-
@@ -0,0 +1,15 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++23
-verify %s
steakhal wrote:
```suggestion
// RUN: %clang_analyze_cc1 -analyzer-checker=core -std=c++23 -verify %s
```
https://github.com/llvm/llvm-project/pull/83585
__
@@ -0,0 +1,15 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++23
-verify %s
+// expected-no-diagnostics
+
+struct S
+{
+constexpr auto operator==(this auto, S)
+{
+return true;
+}
+};
+
+int main()
+{
+return S {} == S {};
+}
-
https://github.com/steakhal commented:
I feel like it's better than crashing, but I suspect it only resolves that,
right?
https://github.com/llvm/llvm-project/pull/83585
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83585
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/83585
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/83677
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
Makes sense, but how did it build before the fix?
I thought by inheriting from `Checker` it would take the address of the member
function with the expected signature to store them inside vectors. How could it
take the address of a nonexisting member function?
https://github.com
Author: Balazs Benics
Date: 2024-02-28T14:10:22+01:00
New Revision: 570bc5d291f92e19f6264262b02ddff1a2f2e09b
URL:
https://github.com/llvm/llvm-project/commit/570bc5d291f92e19f6264262b02ddff1a2f2e09b
DIFF:
https://github.com/llvm/llvm-project/commit/570bc5d291f92e19f6264262b02ddff1a2f2e09b.diff
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Aylló
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Aylló
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/82920
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
> (In case you do intend to merge changes related to formatting, consider
> adding the resulting commit hash into the blame-ignore file.)
I dont intend to merge this.
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mai
steakhal wrote:
I've submitted PRs to resolve the pending formatting issues.
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/82921
This is the followup PR for #82599 to fix the cases where clang-format would
regress the flow of the code.
>From 245de9ea5c33649ff7b3e359cd360361d4dc5ae3 Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Sun,
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/82920
None
>From fd85686af33570f0baf8ba60a0b0b8113e999c4a Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Sun, 25 Feb 2024 12:37:49 +0100
Subject: [PATCH] [clang][NFC] Prefer usings over typedefs
---
.../clang/A
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/82919
clang-format would format these headers poorly by splitting it into multiple
lines.
```regex
//=.{78,}
```
>From 319329630e0d2a86b22dd435985026ea236f8e56 Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Sun
@@ -33,30 +33,17 @@ namespace ento {
/// checking.
///
/// \sa CheckerContext
-class CheckerDocumentation : public Checker< check::PreStmt,
- check::PostStmt,
- check::PreObjCMessage,
-
@@ -1,4 +1,5 @@
-//===-- STLAlgorithmModeling.cpp ---*- C++
-*--//
+//===-- STLAlgorithmModeling.cpp ---*- C++
+//-*--//
steakhal wrote:
```suggestion
//===-- STLAlgorithmModeling.cpp --
@@ -1,4 +1,5 @@
-//=- DirectIvarAssignment.cpp - Check rules on ObjC properties -*- C++
*-==//
+//=- DirectIvarAssignment.cpp - Check rules on ObjC properties -*- C++
+//*-==//
steakhal wrote:
Bad formatting.
```suggestion
//=- DirectIvarAssignment.cpp -
@@ -219,17 +219,19 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrncatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-PathDiagnosticLocation::createBegin(LenArg
@@ -110,21 +111,41 @@ void ExprEngine::VisitBinaryOperator(const
BinaryOperator* B,
continue;
}
-assert (B->isCompoundAssignmentOp());
+assert(B->isCompoundAssignmentOp());
switch (Op) {
- default:
-llvm_unreachable("Invalid opcode for co
@@ -49,54 +50,44 @@ const char *IsARPBind = "isautoreleasepoolbind";
class ObjCAutoreleaseWriteChecker : public Checker {
public:
- void checkASTCodeBody(const Decl *D,
-AnalysisManager &AM,
+ void checkASTCodeBody(const Decl *D, AnalysisManager &AM,
@@ -1,4 +1,5 @@
-//===-- SimpleStreamChecker.cpp -*-
C++ -*--//
+//===-- SimpleStreamChecker.cpp -*- C++
+//-*--//
steakhal wrote:
```suggestion
//===-- SimpleStreamChecker.cpp -
801 - 900 of 1526 matches
Mail list logo