https://github.com/ziqingluo-90 unassigned
https://github.com/llvm/llvm-project/pull/124477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/124477
In `VisitObjCForCollectionStmt`, the function does `evalLocation` for the
current element at the original source state `Pred`. The evaluation may result
in a new state, say `PredNew`. I.e., there is a tran
@@ -124,24 +124,26 @@ void ExprEngine::VisitObjCForCollectionStmt(const
ObjCForCollectionStmt *S,
bool isContainerNull = state->isNull(collectionV).isConstrainedTrue();
- ExplodedNodeSet dstLocation;
- evalLocation(dstLocation, S, elem, Pred, state, elementV, false);
---
https://github.com/ziqingluo-90 unassigned
https://github.com/llvm/llvm-project/pull/124477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 unassigned
https://github.com/llvm/llvm-project/pull/124477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 unassigned
https://github.com/llvm/llvm-project/pull/124477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
Unfortunately, I cannot forge a minimal example to reproduce this bug due to
the aforementioned fact that `evalLocation` alters the state very rarely.
A minimal example would be just execute an objective-c for loop like this:
```
for (T * element in collection) {
}
```
Then
https://github.com/ziqingluo-90 unassigned
https://github.com/llvm/llvm-project/pull/124477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
CC: @dtarditi
https://github.com/llvm/llvm-project/pull/124477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
> When possible we should always add tests, I think the right place would be:
>
> https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/warn-unsafe-buffer-usage-libc-functions.cpp
>
> CC @ziqingluo-90
>
> Do we need a release note or is this feature clang-20?
T
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker
llvm::raw_ostream &Out) const override;
ValueConstraintPtr negate() const override {
- NotNullBufferConstraint Tmp(*this);
+ BufferNullnessConstraint Tmp(*this);
Tmp.Cannot
ziqingluo-90 wrote:
Hi @ilya-biryukov, thank you for continuing to improve this!
I'm currently dealing with downstream conflicts with your previous patch.
Please do not merge this PR this week, otherwise it may slow down our CI.
Thanks!
https://github.com/llvm/llvm-project/pull/132387
_
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/131374
>From fdc265eeca36dc877f56389d8dba39b517e6 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Fri, 14 Mar 2025 11:13:46 -0700
Subject: [PATCH 1/3] [NFC][Static Analyzer] Rename `NotNullConstraint` &
`NotN
@@ -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/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/131374
>From fdc265eeca36dc877f56389d8dba39b517e6 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Fri, 14 Mar 2025 11:13:46 -0700
Subject: [PATCH 1/2] [NFC][Static Analyzer] Rename `NotNullConstraint` &
`NotN
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/131374
NotNullConstraint is used to check both null and non-null of a pointer. So the
name, which was created originally for just checking non-nullness, becomes less
suitable.
The same reason applies to `NotNull
@@ -1165,7 +1165,7 @@ ProgramStateRef
StdLibraryFunctionsChecker::NotNullConstraint::apply(
return State->assume(L, CannotBeNull);
}
-void StdLibraryFunctionsChecker::NotNullConstraint::describe(
+void StdLibraryFunctionsChecker::NullnessConstraint::describe(
Descripti
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker
llvm::raw_ostream &Out) const override;
ValueConstraintPtr negate() const override {
- NotNullBufferConstraint Tmp(*this);
+ BufferNullnessConstraint Tmp(*this);
Tmp.Cannot
ziqingluo-90 wrote:
> @ziqingluo-90 I had already responded here: [#130778
> (comment)](https://github.com/llvm/llvm-project/issues/130778#issuecomment-2843256610)
>
> I think you moved your post between issues after I had responded.
@mizvekov Oh, I see! Thank you!
https://github.com/llvm/ll
ziqingluo-90 wrote:
Hi @mizvekov
I believe this change is impacting our downstream compiler. Here is a minimal
example:
```
#include
#include
namespace {
template
class ForEach; // intentionally undefined
ziqingluo-90 wrote:
> Hi @mizvekov
>
> I believe this change is impacting our downstream compiler. Here is a minimal
> example:
>
> ```
> #include
> #include
> namespace {
>
> template
> class ForEach; // intentionally undefined
>
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/138594
Previously, Static Analyzer initializes empty type fields with zeroes. This can
cause problems when those fields have no unique addresses. For example,
https://github.com/llvm/llvm-project/issues/137252.
ziqingluo-90 wrote:
CC: @dtarditi
https://github.com/llvm/llvm-project/pull/138594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -715,7 +717,11 @@ void ExprEngine::handleConstructor(const Expr *E,
// actually make things worse. Placement new makes this tricky as well,
// since it's then possible to be initializing one part of a multi-
// dimensional array.
-State = Stat
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/137248
>From f9e68fd71677e047ee82992f2034bd62958ecbed Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Thu, 24 Apr 2025 13:29:24 -0700
Subject: [PATCH 1/3] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed
CX
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/137248
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
CC: @dtarditi
https://github.com/llvm/llvm-project/pull/137248
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
CC: @dtarditi
https://github.com/llvm/llvm-project/pull/129169
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/129169
`MeasureTokenLength` may return an unsigned 0 representing failure in obtaining
length of a token. The analysis now gives up on such cases. Otherwise, there
might be issues caused by unsigned integer "ove
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/114894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/130683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
Thanks for reviewing! I will create another PR for my questions.
https://github.com/llvm/llvm-project/pull/130683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/129169
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1139,26 +1276,30 @@ class ArraySubscriptGadget : public WarningGadget {
const ArraySubscriptExpr *ASE;
public:
- ArraySubscriptGadget(const MatchFinder::MatchResult &Result)
+ ArraySubscriptGadget(const MatchResult &Result)
: WarningGadget(Kind::ArraySubscript),
@@ -1139,26 +1276,30 @@ class ArraySubscriptGadget : public WarningGadget {
const ArraySubscriptExpr *ASE;
public:
- ArraySubscriptGadget(const MatchFinder::MatchResult &Result)
+ ArraySubscriptGadget(const MatchResult &Result)
: WarningGadget(Kind::ArraySubscript),
@@ -68,32 +70,57 @@ static std::string getDREAncestorString(const DeclRefExpr
*DRE,
if (StParents.size() > 1)
return "unavailable due to multiple parents";
-if (StParents.size() == 0)
+if (StParents.empty())
break;
St = StParents.begin()->get();
@@ -1670,30 +1936,41 @@ class ULCArraySubscriptGadget : public FixableGadget {
};
// Fixable gadget to handle stand alone pointers of the form `UPC(DRE)` in the
-// unspecified pointer context (isInUnspecifiedPointerContext). The gadget
emits
-// fixit of the form `UPC(DRE.da
ziqingluo-90 wrote:
Please wait a day or two for @jkorous-apple , @malavikasamak and @dtarditi to
take another look.
https://github.com/llvm/llvm-project/pull/125492
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
ziqingluo-90 wrote:
I don't have big concerns here. Thank you again @ivanaivanovska and
@ilya-biryukov for this effort!
It is also going to be easier to debug and will open more opportunities for
optimization this way. (E.g., I'd like to optimize how "printf" functions are
matched, but was ho
https://github.com/ziqingluo-90 approved this pull request.
https://github.com/llvm/llvm-project/pull/125492
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -186,106 +212,193 @@ class MatchDescendantVisitor : public
DynamicRecursiveASTVisitor {
return DynamicRecursiveASTVisitor::TraverseStmt(Node);
}
+ void setASTContext(ASTContext &Context) { ActiveASTContext = &Context; }
+
+ void setHandler(const UnsafeBufferUsageHa
ziqingluo-90 wrote:
Thank you @tsepez
https://github.com/llvm/llvm-project/pull/126826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 approved this pull request.
LGTM, but I think we can keep the test of `sizeof(b)` and add yours at a new
line.
Thanks.
https://github.com/llvm/llvm-project/pull/126826
___
cfe-commits mailing list
cfe-commits@lists.ll
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/126975
`-Wunsafe-buffer-usage-in-libc-call` is a subgroup of `-Wunsafe-buffer-usage`
that warns about unsafe libc function calls.
>From 49cfb174e21290918d30928397e6d0d44a521b66 Mon Sep 17 00:00:00 2001
From: Ziqi
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/126975
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/138594
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,s
@@ -715,7 +716,11 @@ void ExprEngine::handleConstructor(const Expr *E,
// actually make things worse. Placement new makes this tricky as well,
// since it's then possible to be initializing one part of a multi-
// dimensional array.
-State = Stat
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/139188
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,s
Author: Ziqing Luo
Date: 2025-05-07T15:55:52-07:00
New Revision: b756c82bfacb2822cd516c32ae3c406e71448c0a
URL:
https://github.com/llvm/llvm-project/commit/b756c82bfacb2822cd516c32ae3c406e71448c0a
DIFF:
https://github.com/llvm/llvm-project/commit/b756c82bfacb2822cd516c32ae3c406e71448c0a.diff
LO
@@ -715,7 +716,11 @@ void ExprEngine::handleConstructor(const Expr *E,
// actually make things worse. Placement new makes this tricky as well,
// since it's then possible to be initializing one part of a multi-
// dimensional array.
-State = Stat
ziqingluo-90 wrote:
Re-landed:
https://github.com/llvm/llvm-project/commit/b756c82bfacb2822cd516c32ae3c406e71448c0a
https://github.com/llvm/llvm-project/pull/138594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
@@ -285,15 +285,43 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const
Expr *Ex,
ExplodedNodeSet dstPreStmt;
getCheckerManager().runCheckersForPreStmt(dstPreStmt, Pred, CastE, *this);
- if (CastE->getCastKind() == CK_LValueToRValue ||
- CastE->getCastKind() =
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/139188
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,s
ziqingluo-90 wrote:
Thanks for reviewing!
https://github.com/llvm/llvm-project/pull/139188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
This fix should solve https://github.com/llvm/llvm-project/issues/71174, and
https://github.com/llvm/llvm-project/issues/137417
https://github.com/llvm/llvm-project/pull/139188
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
@@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -triple x86_64-unknown-unknown -verify %s \
-// RUN: -analyzer-checker=core,debug.ExprInspection
+// RUN: -analyzer-checker=debug.ExprInspection -analyzer-disable-checker=core
ziqingluo-90 wrote:
Oh, I was going to
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/139188
I am investigating a CSA crash: https://godbolt.org/z/fEExYqoWM. If one
changes the `__builtin_bit_cast` to a C-style cast, the test will be fine. So
the problem is specific to `__builtin_bit_cast`.
Loo
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/139188
>From 95ac7cf69dbd683f70b123446115fe3893844526 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Thu, 8 May 2025 17:48:41 -0700
Subject: [PATCH 1/2] [StaticAnalyzer] Handle __builtin_bit_cast
Previously, CSA
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/138594
>From 4e6f2ce82744322a35614532732281eacb2fe79a Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Mon, 5 May 2025 14:27:48 -0700
Subject: [PATCH 1/2] [StaticAnalyzer] Make it a noop when initializing a field
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/139188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
```
typedef __attribute__((__ext_vector_type__(2))) float float2;
struct vec2 {
float2 _v;
public:
constexpr vec2(float x, float y) {
_v.x = x;
_v.y = y;
}
};
constexpr struct vec2 f() {
return vec2(1.0, 1.0);
}
int main() {
vec2 S = f();
}
`
https://github.com/ziqingluo-90 approved this pull request.
LGTM!
(AI comments in this PR aren't very helpful IMO 😅)
https://github.com/llvm/llvm-project/pull/140113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
ziqingluo-90 wrote:
> Can you file an issue so we don't lose track of the bug?
Looks like we have an issue already #140348
@AaronBallman do you think my original example is well-defined according to the
standard? I saw there is a warning
`constexpr constructor that does not initialize all memb
ziqingluo-90 wrote:
hi, what is the motivation of changing `std::sort` to `llvm:sort`?
https://github.com/llvm/llvm-project/pull/140337
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
201 - 264 of 264 matches
Mail list logo