ziqingluo-90 wrote:
> I think it's worth filing an issue over.
I will file an issue. I did bisect and verified that this commit is causing
the issue. It is also a mystery to me how this commit could affect AST shapes.
https://github.com/llvm/llvm-project/pull/136855
__
ziqingluo-90 wrote:
Hi @AaronBallman I noticed that this commit makes a difference on the example
below.
```
#include
typedef const struct T * T_Ref;
static T_Ref _Atomic x = ATOMIC_VAR_INIT((void*)NULL);
```
After this commit, the AST of the global variable declaration changes---a level
of `
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/151270
>From 50ea6041f13cdc4c9d4ae475d11b970f1e026fac Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 30 Jul 2025 11:23:32 +0800
Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Do not warn about class methods
w
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/151270
>From 50ea6041f13cdc4c9d4ae475d11b970f1e026fac Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 30 Jul 2025 11:23:32 +0800
Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Do not warn about class methods
w
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/151270
>From 50ea6041f13cdc4c9d4ae475d11b970f1e026fac Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 30 Jul 2025 11:23:32 +0800
Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Do not warn about class methods
w
@@ -0,0 +1,471 @@
+// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t
-- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+
+#include
+
+void Positive() {
+ std::mutex m;
+ {
+std::lock_guard l(m);
+// CHECK-MESSAGES: :[[@LINE-1]
@@ -0,0 +1,471 @@
+// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t
-- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+
+#include
+
+void Positive() {
+ std::mutex m;
+ {
+std::lock_guard l(m);
+// CHECK-MESSAGES: :[[@LINE-1]
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/145862
>From 28cda3e7ea3f14305342d3ea663646df164ff044 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 24 Jun 2025 16:45:30 +0800
Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Support safe patterns of "%.*s"
i
@@ -743,28 +808,81 @@ static bool hasUnsafeFormatOrSArg(const CallExpr *Call,
const Expr *&UnsafeArg,
const CallExpr *Call;
unsigned FmtArgIdx;
const Expr *&UnsafeArg;
+ASTContext &Ctx;
+
+// Returns an `Expr` representing the precision if specified, null
+
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/145862
>From 5c6a2f267f51dd321069ada7eb90f7bc5c794bdd Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 24 Jun 2025 11:25:52 +0800
Subject: [PATCH 1/3] [NFC][-Wunsafe-buffer-usage] Refactor safe pattern check
ziqingluo-90 wrote:
> https://lab.llvm.org/buildbot/#/builders/190/builds/23511
The failed test is `ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll`,
which can't be affected by this change.
https://github.com/llvm/llvm-project/pull/145626
_
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/145626
___
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/145626
>From 8c07b277562bd3d4f332a341eb1e0127545c8280 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 24 Jun 2025 11:25:52 +0800
Subject: [PATCH 1/3] [NFC][-Wunsafe-buffer-usage] Refactor safe pattern check
@@ -453,22 +453,108 @@ static bool areEqualIntegers(const Expr *E1, const Expr
*E2, ASTContext &Ctx) {
}
}
+// Providing that `Ptr` is a pointer and `Size` is an unsigned-integral
+// expression, returns true iff they follow one of the following safe
+// patterns:
+// 1. P
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/146645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
> The logic added in #143950 also handles line splices with 0 trailing
> whitespace characters, so this code is now redundant. (When removing it, the
> test run fine too.)
>
> Should removing this code be a separate PR?
Done
https://github.com/llvm/llvm-project/pull/14664
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/146645
>From 161d7b6def818f16a2f8ab82ae4643abd09e8982 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 2 Jul 2025 15:46:37 +0800
Subject: [PATCH 1/3] [clang-scan-deps] Fix "unterminated conditional
directive"
@@ -393,7 +393,7 @@ static bool isQuoteCppDigitSeparator(const char *const
Start,
}
void Scanner::skipLine(const char *&First, const char *const End) {
ziqingluo-90 wrote:
Yeah, this is much simpler. Thank you!
This fix relies on the input source being vali
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/146645
>From b9c3c4e0eca567937e59b2ae21f805d8156f7204 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 2 Jul 2025 15:46:37 +0800
Subject: [PATCH 1/3] [clang-scan-deps] Fix "unterminated conditional
directive"
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/146645
>From b9c3c4e0eca567937e59b2ae21f805d8156f7204 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 2 Jul 2025 15:46:37 +0800
Subject: [PATCH 1/2] [clang-scan-deps] Fix "unterminated conditional
directive"
@@ -880,6 +880,37 @@ TEST(MinimizeSourceToDependencyDirectivesTest,
EXPECT_EQ(pp_eof, Directives[22].Kind);
}
+TEST(MinimizeSourceToDependencyDirectivesTest,
+ TestFixedBugThatReportUnterminatedDirectiveFalsely) {
+ SmallVector Out;
+ SmallVector Tokens;
+ SmallVector
https://github.com/ziqingluo-90 edited
https://github.com/llvm/llvm-project/pull/146645
___
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/146645
`clang-scan-deps` threw "unterminated conditional directive" error falsely on
the following example:
```
#ifndef __TEST
#define __TEST
#if defined(__TEST_DUMMY)
#if defined(__TEST_DUMMY2)
#pragma GCC w
ziqingluo-90 wrote:
> LLVM Buildbot has detected a new failure on builder
> `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at
> step 7 "test-build-unified-tree-check-llvm".
>
> Full details are available at:
> https://lab.llvm.org/buildbot/#/builders/60/builds/31310
ziqingluo-90 wrote:
This PR depends on https://github.com/llvm/llvm-project/pull/145626
https://github.com/llvm/llvm-project/pull/145862
___
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/145862
The character buffer passed to a "%.*s" specifier may be safely bound if
the precision is properly specified, even if the buffer does not guarantee
null-termination.
For example,
```
void f(std::span span)
@@ -232,3 +268,27 @@ struct HoldsStdSpanAndNotInitializedInCtor {
: Ptr(P), Size(S)
{}
};
+
+namespace test_begin_end {
+ struct Object {
+int * begin();
+int * end();
+ };
+ void safe_cases(std::span Sp, std::array Arr, std::string Str,
std::initializer_lis
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/145626
>From 8c07b277562bd3d4f332a341eb1e0127545c8280 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 24 Jun 2025 11:25:52 +0800
Subject: [PATCH 1/2] [NFC][-Wunsafe-buffer-usage] Refactor safe pattern check
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/145311
>From 9826ba3dbb8223d948ac850ec81646eb6c3c76ed Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Mon, 23 Jun 2025 18:59:04 +0800
Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Support span creation from
std::i
@@ -130,6 +140,14 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder
*Finder) {
this);
}
+ if (WarnOnSizeOfInLoopTermination) {
+Finder->addMatcher(LoopExpr(hasDescendant(binaryOperator(
ziqingluo-90 wrote:
Since `hasDe
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/145311
Support safe construction of `std::span` from `begin` and `end` calls on
hardened containers or views or `std::initializer_list`s.
For example, the following code is safe:
```
void create(std::initializer_
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/143487
>From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 10 Jun 2025 15:50:10 +0800
Subject: [PATCH 1/7] [-Wunterminated-string-initialization] Handle C string
li
ziqingluo-90 wrote:
@shafik, @erichkeane @AaronBallman @tbaederr @zwuis
I believe all feedback has been addressed. Could you give it another look when
you are free?
https://github.com/llvm/llvm-project/pull/143487
___
cfe-commits mailing list
cfe-co
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/143487
>From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 10 Jun 2025 15:50:10 +0800
Subject: [PATCH 1/6] [-Wunterminated-string-initialization] Handle C string
li
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/143487
>From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 10 Jun 2025 15:50:10 +0800
Subject: [PATCH 1/5] [-Wunterminated-string-initialization] Handle C string
li
ziqingluo-90 wrote:
I do not have many suggestions for this change. It's great that we can get rid
of the meaningless `nullability.NullabilityBase` dummy checker. Thanks.
https://github.com/llvm/llvm-project/pull/143735
___
cfe-commits mailing list
@@ -113,25 +114,21 @@ class NullabilityChecker
void printState(raw_ostream &Out, ProgramStateRef State, const char *NL,
const char *Sep) const override;
- enum CheckKind {
-CK_NullPassedToNonnull,
-CK_NullReturnedFromNonnull,
-CK_NullableDerefe
ziqingluo-90 wrote:
Thank you all for valuable feedbacks. I have improved the PR by
- supporting different character encodings
- adding more test cases
- updating the release notes
https://github.com/llvm/llvm-project/pull/143487
___
cfe-commits maili
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/143487
>From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 10 Jun 2025 15:50:10 +0800
Subject: [PATCH 1/3] [-Wunterminated-string-initialization] Handle C string
li
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/143487
>From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Tue, 10 Jun 2025 15:50:10 +0800
Subject: [PATCH 1/2] [-Wunterminated-string-initialization] Handle C string
li
https://github.com/ziqingluo-90 closed
https://github.com/llvm/llvm-project/pull/142897
___
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 now!
https://github.com/llvm/llvm-project/pull/143408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -142,6 +144,8 @@ class RawPtrRefMemberChecker
if (auto *ID = dyn_cast(CD)) {
for (auto *Ivar : ID->ivars())
visitIvarDecl(CD, Ivar);
+ for (auto *PropImpl : ID->property_impls())
+visitPropImpl(CD, PropImpl);
ziqingluo-90 wrote
https://github.com/ziqingluo-90 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/142485
___
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
https://github.com/llvm/llvm-project/pull/141277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1261,6 +1261,28 @@ class CFGBuilder {
L2Result.Val.getKind() == APValue::Float) {
llvm::APFloat L1 = L1Result.Val.getFloat();
llvm::APFloat L2 = L2Result.Val.getFloat();
+ // Note that L1 and L2 do not necessarily have the same type. For
example
+
ziqingluo-90 wrote:
Overall, I think the change aligns with what you described. I've just left a
few questions to clarify my understanding.
https://github.com/llvm/llvm-project/pull/141293
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
@@ -99,3 +99,22 @@ @interface AnotherObject : NSObject {
@property(nonatomic, strong) NSString *prop_string;
// expected-warning@-1{{Property 'prop_string' in 'AnotherObject' is a raw
pointer to retainable type 'NSString'; member variables must be a RetainPtr}}
@end
+
+NS_REQU
@@ -64,3 +64,33 @@ void forceTmplToInstantiate(FooTmpl) {}
};
} // namespace ptr_to_ptr_to_retained
+
+@interface AnotherObject : NSObject {
+ NSString *ns_string;
+ CFStringRef cf_string;
+ // expected-warning@-1{{Instance variable 'cf_string' in 'AnotherObject' is
a re
@@ -174,7 +175,15 @@ class RawPtrRefMemberChecker
if (!PropType)
return;
-auto IsUnsafePtr = isUnsafePtr(QT);
+if (const ObjCInterfaceDecl *ID = dyn_cast(CD)) {
+ if (!RTC || !RTC->defaultSynthProperties() ||
+ ID->isObjCRequiresPropertyDefs())
@@ -44,6 +43,12 @@ inline Target* uncheckedDowncast(Source* source)
return static_cast(source);
}
+template
+Target* [[clang::annotate_type("webkit.pointerconversion")]]
newCastFunction(Source*);
ziqingluo-90 wrote:
If this function is a member function,
@@ -32,6 +32,22 @@ static void baz() {
} // namespace call_args_checked
+namespace call_args_member {
+
+void consume(CheckedObj&);
+
+struct WrapperObj {
+ CheckedObj checked;
+ CheckedObj& checkedRef;
+ void foo() {
+consume(checked);
ziqingluo-90 wr
@@ -1261,6 +1261,28 @@ class CFGBuilder {
L2Result.Val.getKind() == APValue::Float) {
llvm::APFloat L1 = L1Result.Val.getFloat();
llvm::APFloat L2 = L2Result.Val.getFloat();
+ // Note that L1 and L2 do not necessarily have the same type. For
example
+
ziqingluo-90 wrote:
Thanks for merging it for me. Buildbots failures seems irrelevant:
```
TEST 'lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py' FAILED
or
FAILED:
libc/src/math/amdgpu/CMakeFiles/libc.src.math.amdgpu.acosh.dir/acosh.cpp.o
```
https://github.com/llvm/llvm-project/pull/14272
ziqingluo-90 wrote:
Thank you for reviewing [steakhal](https://github.com/steakhal)!
https://github.com/llvm/llvm-project/pull/142722
___
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/142897
>From 99931f58846f361e409445d06fdfca4f5e7d3bb3 Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Thu, 5 Jun 2025 12:28:12 +0800
Subject: [PATCH 1/2] [clang][CFG] Fix assertion failure in
checkIncorrectLogicO
https://github.com/ziqingluo-90 updated
https://github.com/llvm/llvm-project/pull/142722
>From 3bd12ac6bb3c47b5e977cffec019df15a15426fc Mon Sep 17 00:00:00 2001
From: Ziqing Luo
Date: Wed, 4 Jun 2025 12:29:53 +0800
Subject: [PATCH 1/2] [StaticAnalyzer] Fix tryExpandAsInteger's failures on
macr
ziqingluo-90 wrote:
CC @dtarditi
https://github.com/llvm/llvm-project/pull/142722
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ziqingluo-90 wrote:
Godbolt example: https://godbolt.org/z/6dv3Kearx
CC @YutongZhuu as this issue was first introduced in
https://github.com/YutongZhuu/llvm-project/commit/9ae3368b3b912ae425b2fbe9a59949979286744f
https://github.com/llvm/llvm-project/pull/142897
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/142897
`checkIncorrectLogicOperator` checks if an expression, for example `x != 0 || x
!= 1.0`, is always true or false by comparing the two literals `0` and `1.0`.
But in case `x` is a 16-bit float, the two lit
https://github.com/ziqingluo-90 created
https://github.com/llvm/llvm-project/pull/142722
The function `tryExpandAsInteger` attempts to extract an integer from a macro
definition. Previously, the attempt would fail when the macro is from a PCH,
because the function tried to access the text buf
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
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:
```
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
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
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
@@ -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
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
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
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
@@ -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
>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 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
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
@@ -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
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
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/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
@@ -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
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:
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
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:
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 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
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
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
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
@@ -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/3] [NFC][Static Analyzer] Rename `NotNullConstraint` &
`NotN
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
_
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker
llvm::raw_ostream &Out) const override;
ValueConstraintPtr negate() const override {
- NotNullBufferConstraint Tmp(*this);
+ BufferNullnessConstraint Tmp(*this);
Tmp.Cannot
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker
llvm::raw_ostream &Out) const override;
ValueConstraintPtr negate() const override {
- NotNullBufferConstraint Tmp(*this);
+ BufferNullnessConstraint Tmp(*this);
Tmp.Cannot
@@ -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 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
@@ -186,106 +212,193 @@ class MatchDescendantVisitor : public
DynamicRecursiveASTVisitor {
return DynamicRecursiveASTVisitor::TraverseStmt(Node);
}
+ void setASTContext(ASTContext &Context) { ActiveASTContext = &Context; }
+
+ void setHandler(const UnsafeBufferUsageHa
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
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
1 - 100 of 325 matches
Mail list logo