@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent , CharKind CK) const {
+
@@ -219,6 +221,7 @@ class CStringChecker : public Checker< eval::Call,
void evalSnprintf(CheckerContext , const CallEvent ) const;
void evalSprintfCommon(CheckerContext , const CallEvent ,
bool IsBounded, bool IsBuiltin) const;
+ void
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent , CharKind CK) const {
+
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent ) const {
+ DestinationArgExpr Buffer =
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent , CharKind CK) const {
+
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent , 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}, ::evalBzero},
{{CDM::CLibrary, {"sprintf"}, 2}, ::evalSprintf},
{{CDM::CLibrary, {"snprintf"}, 2}, ::evalSnprintf},
+ {{CDM::CLibrary,
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://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
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://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
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1158,6 +1173,123 @@ void StreamChecker::evalUngetc(const FnDescription
*Desc, const CallEvent ,
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 ,
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,
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,
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
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
@@ -880,6 +883,24 @@ void StreamChecker::preReadWrite(const FnDescription *Desc,
}
}
+void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent ,
steakhal wrote:
Let me share my experience with `std::bind` and with this checker.
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
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
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
@@ -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
```
@@ -1158,6 +1173,123 @@ void StreamChecker::evalUngetc(const FnDescription
*Desc, const CallEvent ,
C.addTransition(StateFailed);
}
+ProgramStateRef
+StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr,
+CheckerContext ,
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
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
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
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
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://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
@@ -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:
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
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent ) const {
+ DestinationArgExpr Buffer =
=?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://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
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent ) const {
+ DestinationArgExpr Buffer =
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent ) const {
+ DestinationArgExpr Buffer =
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent ) const {
+ DestinationArgExpr Buffer =
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext
, const CallEvent ,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext ,
+const CallEvent ) const {
+ DestinationArgExpr Buffer =
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
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
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
---
@@ -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://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?
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
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
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
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:
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
---
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:
@@ -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 =
-
@@ -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
@@ -49,54 +50,44 @@ const char *IsARPBind = "isautoreleasepoolbind";
class ObjCAutoreleaseWriteChecker : public Checker {
public:
- void checkASTCodeBody(const Decl *D,
-AnalysisManager ,
+ void checkASTCodeBody(const Decl *D, AnalysisManager ,
@@ -1,4 +1,5 @@
-//===-- SimpleStreamChecker.cpp -*-
C++ -*--//
+//===-- SimpleStreamChecker.cpp -*- C++
+//-*--//
steakhal wrote:
```suggestion
//===-- SimpleStreamChecker.cpp
https://github.com/steakhal commented:
Yeey, my review is done.
We only have a handful (<50) debatable formatting problems.
I'll try to fix them in an other PR.
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrlcpyStrlcatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-
@@ -33,30 +33,17 @@ namespace ento {
/// checking.
///
/// \sa CheckerContext
-class CheckerDocumentation : public Checker< check::PreStmt,
- check::PostStmt,
- check::PreObjCMessage,
-
@@ -380,27 +376,41 @@ enum CFNumberType {
};
static std::optional GetCFNumberSize(ASTContext , uint64_t i) {
- static const unsigned char FixedSize[] = { 8, 16, 32, 64, 32, 64 };
+ static const unsigned char FixedSize[] = {8, 16, 32, 64, 32, 64};
if (i <
@@ -18,37 +18,57 @@ using namespace til;
StringRef til::getUnaryOpcodeString(TIL_UnaryOpcode Op) {
switch (Op) {
-case UOP_Minus:return "-";
-case UOP_BitNot: return "~";
-case UOP_LogicNot: return "!";
+ case UOP_Minus:
+return "-";
+ case
@@ -535,7 +545,8 @@ void CFNumberChecker::checkPreStmt(const CallExpr *CE,
}
//===--===//
-// CFRetain/CFRelease/CFMakeCollectable/CFAutorelease checking for null
arguments.
+//
https://github.com/steakhal edited
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
@@ -565,37 +565,67 @@ til::SExpr *SExprBuilder::translateBinaryOperator(const
BinaryOperator *BO,
case BO_PtrMemI:
return new (Arena) til::Undefined(BO);
- case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx);
- case BO_Div: return translateBinOp(til::BOP_Div,
steakhal wrote:
I've submitted a PR #82609 to backport this commit to release/18.x as it fixes
a crash and would be also important for us downstream.
https://github.com/llvm/llvm-project/pull/82281
___
cfe-commits mailing list
https://github.com/steakhal edited
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
301 - 400 of 1055 matches
Mail list logo