https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/126206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
Thanks! Please add a release note.
https://github.com/llvm/llvm-project/pull/126206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/126532
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/125232
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein milestoned
https://github.com/llvm/llvm-project/pull/125232
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,10 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t
-I%S/Inputs/undefined-template \
+// RUN: -Wundefined-func-template \
+// RUN: -fimplicit-module-maps %s 2>&1 | grep "unreachable declaration of
template entity is her"
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/129031
>From 5bf873e8ab3b97956ca03ef6337baa0f52320003 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 27 Feb 2025 11:15:09 +0100
Subject: [PATCH 1/4] Improve the -Wundefined-func-template diagnostic note for
invis
@@ -0,0 +1,10 @@
+// RUN: rm -rf %t
hokein wrote:
Done.
https://github.com/llvm/llvm-project/pull/129031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -759,13 +759,11 @@ Sema::BuildDependentDeclRefExpr(const CXXScopeSpec &SS,
TemplateArgs);
}
-bool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation,
- NamedDecl *Instantiation,
-
@@ -5082,11 +5085,18 @@ void Sema::InstantiateFunctionDefinition(SourceLocation
PointOfInstantiation,
if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() &&
!getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {
Diag(PointOfInstantiation,
hokein wrote:
> Should this come with a release note as well?
Yeah, I think so. Done.
https://github.com/llvm/llvm-project/pull/129031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/131987
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
It would be nice to have have a test for it. I think it should not be too hard
to add one.
https://github.com/llvm/llvm-project/pull/131997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/129031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/131987
None
>From f15c7880c04597b2227e5189b8c3af2078338cf8 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 19 Mar 2025 10:26:51 +0100
Subject: [PATCH] [clang] Add a missing space to the
-Weager-load-cxx-named-mod
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/133395
None
>From 4095be6747a5d6f3cd619c644490c4170ab44d89 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 28 Mar 2025 09:32:50 +0100
Subject: [PATCH] [WIP] Fix the crash when dump the deserialized decl
---
.../
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/133395
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/133395
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/133395
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/129031
>From 184a449456f82d26ca8ea253b7c3913df512c1a3 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 27 Feb 2025 11:15:09 +0100
Subject: [PATCH 1/4] Improve the -Wundefined-func-template diagnostic note for
invis
@@ -5654,6 +5654,8 @@ def warn_func_template_missing : Warning<"instantiation
of function %q0 "
InGroup, DefaultIgnore;
def note_forward_template_decl : Note<
"forward declaration of template entity is here">;
+def note_unreachable_template_decl
+: Note<"unreachable de
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/129031
>From 184a449456f82d26ca8ea253b7c3913df512c1a3 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 27 Feb 2025 11:15:09 +0100
Subject: [PATCH 1/5] Improve the -Wundefined-func-template diagnostic note for
invis
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/127460
>From 3601ae837475da3c473f5be9c17687c439495ded Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 17 Feb 2025 10:08:14 +0100
Subject: [PATCH 1/2] [clang] Fix false positive regression for lifetime
analysis war
@@ -852,3 +852,27 @@ struct Test {
};
} // namespace GH120543
+
+namespace GH127195 {
+template
+struct StatusOr {
+ T* operator->() [[clang::lifetimebound]];
+ T* value() [[clang::lifetimebound]];
+};
+
+const char* foo() {
+ StatusOr s;
+ return s->data(); // expected-w
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/127460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/127460
>From 3601ae837475da3c473f5be9c17687c439495ded Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 17 Feb 2025 10:08:14 +0100
Subject: [PATCH 1/3] [clang] Fix false positive regression for lifetime
analysis war
hokein wrote:
/ cherry-pick 9c49b188b8e1434eb774ee8422124ad3e8870dce
https://github.com/llvm/llvm-project/pull/127460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
clang19 rejects this code as well, https://godbolt.org/z/Yf96W8KWv.
To make this case work, I think we should use the `__VA_OPT__`.
`#define debug_nok(...) fprintf(stderr, "qwerty" __VA_OPT__(,) ## __VA_ARGS__)`
https://github.com/llvm/llvm-project/pull/125232
__
https://github.com/hokein milestoned
https://github.com/llvm/llvm-project/pull/127460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
/cherry-pick
https://github.com/llvm/llvm-project/commit/9c49b188b8e1434eb774ee8422124ad3e8870dce
https://github.com/llvm/llvm-project/pull/127460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/129031
>From 5bf873e8ab3b97956ca03ef6337baa0f52320003 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 27 Feb 2025 11:15:09 +0100
Subject: [PATCH] Improve the -Wundefined-func-template diagnostic note for
invisible
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/129031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/129031
>From 5bf873e8ab3b97956ca03ef6337baa0f52320003 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 27 Feb 2025 11:15:09 +0100
Subject: [PATCH 1/3] Improve the -Wundefined-func-template diagnostic note for
invis
@@ -5654,6 +5654,8 @@ def warn_func_template_missing : Warning<"instantiation
of function %q0 "
InGroup, DefaultIgnore;
def note_forward_template_decl : Note<
"forward declaration of template entity is here">;
+def note_unreachable_template_decl
+: Note<"declaration of
@@ -5082,11 +5085,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation
PointOfInstantiation,
if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() &&
!getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {
Diag(PointOfInstantiation,
https://github.com/hokein ready_for_review
https://github.com/llvm/llvm-project/pull/129031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/129031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/129221
The commit missed a test file.
>From 7edbcad61eefd03fbb3cdf4d7759b0e41e348946 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 28 Feb 2025 11:20:33 +0100
Subject: [PATCH] [modules] Add missing test file for
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/129221
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/129031
See discussion in https://github.com/llvm/llvm-project/issues/125071.
>From ccd5da1bdc4c80bd3461458fc1f4360d766fb6e2 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 27 Feb 2025 11:15:09 +0100
Subject: [PATC
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/127460
>From 26cf4cd668f9a2d533014a85e8da4a91ce6c8994 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 17 Feb 2025 10:08:14 +0100
Subject: [PATCH] [clang] Fix false positive regression for lifetime analysis
warning
https://github.com/hokein commented:
The change looks good. We should be mindful of the potential performance
regression due to this (1% increase in preamble size, as noted
https://reviews.llvm.org/D124688#3483895).
I’ll leave the final approval to @kadircet.
https://github.com/llvm/llvm
Author: Haojian Wu
Date: 2025-02-17T10:46:11+01:00
New Revision: 82dc2d403066a84ef0051b06f1d179e00331f319
URL:
https://github.com/llvm/llvm-project/commit/82dc2d403066a84ef0051b06f1d179e00331f319
DIFF:
https://github.com/llvm/llvm-project/commit/82dc2d403066a84ef0051b06f1d179e00331f319.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/127460
This fixes a false positive caused by #114044.
For `GSLPointer*` types, it's less clear whether the lifetime issue is about
the GSLPointer object itself or the owner it points to. To avoid false
positives, we t
https://github.com/hokein ready_for_review
https://github.com/llvm/llvm-project/pull/127460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2025-02-17T10:47:43+01:00
New Revision: 262e4c19878175780c88da867e88fc4e202d4788
URL:
https://github.com/llvm/llvm-project/commit/262e4c19878175780c88da867e88fc4e202d4788
DIFF:
https://github.com/llvm/llvm-project/commit/262e4c19878175780c88da867e88fc4e202d4788.diff
LO
hokein wrote:
/cherry-pick
https://github.com/llvm/llvm-project/commit/922f339c4ef3631f66dc4b8caa4c356103dbf69d
https://github.com/llvm/llvm-project/pull/125232
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
hokein wrote:
Another thought for supporting the `emplace_back(Args...)` case (for STL only).
The underlying implementation of the `emplace_back` relies on
`std::allocator_traits::construct(Alloc& a, T* p, Args&&... args)`, so we could
use the `lifetime_capture_by` annotation in the instantia
hokein wrote:
> A moved from object could be reinitalized:
>
> ```
> void test() {
> std::vector abc;
> std::string b;
> add(abc, std::move(b));
> b = std::string(); // now b can be used again.
> }
> ```
>
> That being said, maybe this is rare enough that we could have
@@ -390,7 +393,7 @@ struct ConvertConstructorToDeductionGuideTransform {
/*EvaluateConstraint=*/false);
}
-assert(NewParam->getTemplateDepth() == 0 &&
+assert(getDepthAndIndex(NewParam).first == 0 &&
hokein wrote:
A heads
hokein wrote:
> auto& value = m[std::string_view(std::string())]; // Doesn't get caught
This case is supported as well, https://godbolt.org/z/KKsvd8Kx1.
https://github.com/llvm/llvm-project/pull/125520
___
cfe-commits mailing list
cfe-commits@lists.l
hokein wrote:
> It would be nice if you could share some code snippets how exactly this would
> be used in practice.
Some simple examples from Abseil. When using `lifetime_capture` in the `insert`
method, we currently have two overloads:
- [one
overload](https://github.com/abseil/abseil-cpp
hokein wrote:
It feels like the current direction & discussion is expanding into a broader
problem space beyond the specific issue this PR aims to address. We have two
major problems which seem to be orthogonal:
1. **avoiding code duplication** – specifically, reducing the number of
function
hokein wrote:
> > Need to add a release note as it fixes an existing issue.
>
> Do you think we need a backport? If so, we can add the release note in the
> backport PR
This is not a regression, but we have a change in clang20 which exposes this
issue in the assertion-build clang. I'd prefer
@@ -377,8 +377,12 @@ struct ConvertConstructorToDeductionGuideTransform {
if (NestedPattern)
Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth());
auto [Depth, Index] = getDepthAndIndex(Param);
+assert(Depth ||
+ cast(FT
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/128704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> (We should have been doing this wrong prior to 20, but it didn't crash
> because it called Decl::getTemplateDepth(), which returns 0 for the
> transformed template parameter declaration)
I think you're right. The depth is already incorrect in clang19 etc.
https://godbolt.org/z
https://github.com/hokein commented:
Thanks for the quick fix!
https://github.com/llvm/llvm-project/pull/128704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/128704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -377,8 +377,12 @@ struct ConvertConstructorToDeductionGuideTransform {
if (NestedPattern)
Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth());
auto [Depth, Index] = getDepthAndIndex(Param);
+assert(Depth ||
+ cast(FT
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/133424
>From 8eda8337877f85a2e59cb71faeb0da3ed6bff9ee Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 28 Mar 2025 12:05:41 +0100
Subject: [PATCH] [clang] Implement some missing interfaces for
DelegatingDeserializa
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/133424
Split from the https://github.com/llvm/llvm-project/pull/133395 per the review
comment.
This patch also moves the `DelegatingDeserializationListener` close to
`ASTDeserializationListener`.
>From b081c35a3a6b70
https://github.com/hokein ready_for_review
https://github.com/llvm/llvm-project/pull/133395
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> There are two parts to this patch:
>
> 1. forwarding more methods properly
> 2. updating the interface, adding new callbacks and changing the behavior of
> `-dump-deserialized-decls``
>
> I think (1) is a no-brainer. I would be very eager to LGTM it right away, but
> could you
@@ -57,6 +59,8 @@ class ASTDeserializationListener {
/// A module import was read from the AST file.
virtual void ModuleImportRead(serialization::SubmoduleID ID,
SourceLocation ImportLoc) {}
+ /// The deserialization of the AST file was fini
@@ -103,15 +120,30 @@ class DeserializedDeclsDumper : public
DelegatingDeserializationListener {
: DelegatingDeserializationListener(Previous, DeletePrevious) {}
void DeclRead(GlobalDeclID ID, const Decl *D) override {
-llvm::outs() << "PCH DECL: " << D->getDeclKi
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/133395
>From 228f45851d9c0c6b5b08aa725b6c53704d71630a Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 28 Mar 2025 09:32:50 +0100
Subject: [PATCH] Fix the crash when dumping the deserialized decls
---
clang/docs/R
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/133395
>From 517f66dd11729a833ea64350622d2a10d83c2c3b Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 28 Mar 2025 09:32:50 +0100
Subject: [PATCH] Fix the crash when dumping the deserialized decls
---
clang/docs/R
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/133424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/139253
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/139253
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/139253
>From b8ba1ae30227fd7c946c5f5e57fb83e47f3bbe69 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 9 May 2025 10:24:01 +0200
Subject: [PATCH 1/6] Reland "Reland [Modules] Remove unnecessary check when
generatin
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/139253
>From b8ba1ae30227fd7c946c5f5e57fb83e47f3bbe69 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 9 May 2025 10:24:01 +0200
Subject: [PATCH] Reland "Reland [Modules] Remove unnecessary check when
generating na
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/139253
This relands the patch
https://github.com/llvm/llvm-project/commit/67b298f6d82e0b4bb648ac0dabe895e816a77ef1
>From 47211ed01154f9b53395b1c4c33014c7d3bf3c25 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 9
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/139253
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/139253
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/139253
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/140865
See https://github.com/llvm/llvm-project/issues/120108
TODO: test the patch
>From 31b94099a420dc9606c84771e9ba6365fadafe20 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 21 May 2025 10:14:28 +0200
Subject
@@ -414,7 +414,7 @@ let Class = PropertyTypeCase in {
let Read = [{ node.getUnionValue() }];
}
def : Creator<[{
-return APValue(cast(fieldDecl), std::move(value));
+return APValue(cast_if_present(fieldDecl),
std::move(value));
hokein wrote:
Ad
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/140179
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
Thanks for the fix.
I think we need a release note in clang/docs/ReleaseNotes.rst
https://github.com/llvm/llvm-project/pull/140179
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/140905
Fixes #140898
>From d8a728d1e32c2bd317d11a0d8f46e6d66c0bb125 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 21 May 2025 16:07:54 +0200
Subject: [PATCH] [clang] Fixed an assertion failure triggered when
i
@@ -2901,34 +2907,44 @@ class CallExpr : public Expr {
//
// * An optional of type FPOptionsOverride.
//
- // Note that we store the offset in bytes from the this pointer to the start
- // of the trailing objects. It would be perfectly possible to compute it
- // based
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/141229
>From 7d6ba7c08e260d75ad33c06f069898a528fe6159 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 May 2025 14:16:52 +0200
Subject: [PATCH] [clang-tidy] Don't run use-nullptr check on objective-c code.
If we
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/141229
`nullptr` doesn't exist in objective-c.
Right now, if an objective-c file compiled with `-std=c23` flag, it will
trigger this check. This patch suppresses the check warning.
>From 07e1b67719f10d3fb31e2cdbe944
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/142467
This is a follow-up fix to https://github.com/llvm/llvm-project/pull/109167.
Previously, we stored a mapping between the enclosing function and the lambda
class declaration. When loading the enclosing function,
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/142585
This patch reduces the size of several AST nodes by moving some fields into the
free bitfield space in the base `Stmt` class:
* `CXXForRangeStmt`: 96 → 88 bytes
* `ChooseExpr`: 56 → 48 bytes
* `ArrayTypeTraitExp
@@ -1702,36 +1702,7 @@ static NamedDecl* getLambdaCallOperatorHelper(const
CXXRecordDecl &RD) {
assert(allLookupResultsAreTheSame(Calls) &&
"More than one lambda call operator!");
-
- // FIXME: If we have multiple call operators, we might be in a situation
- // w
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/145529
The delta encoding can produce values up to 33 bits, but the current decoding
logic only preserves the lower 32 bits, potentially causing data loss.
This patch fixes the issue by preserving the lower 33 bits for
hokein wrote:
> Sorry. I failed to understand the problem. In what case, may the encoder
> produce up to 33 bits?
The newly-added testcase shows the issue -- the encoded value for the delta is
`1<<32`, relevant code
https://github.com/llvm/llvm-project/blob/c3c923c8d62c1e85fe396a499c921c8a475
hokein wrote:
> > Yeah, the current situation conflicts with 64-bit source location. We
> > discussed this. The conclusion is, if we need large source location space,
> > use 48 bits and leave upper 16 bits for module file index. 48 bits should
> > be enough for most cases.
Thanks, this makes
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/145670
>From d2cac7f56f5adf2ddfe084e684562a56f5c5dc65 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 25 Jun 2025 12:30:18 +0200
Subject: [PATCH 1/2] [Serialization] Remove delta encoding.
---
clang/include/clang
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/145711
Introduce a type alias for the commonly used `std::pair` to
improve code readability, and make it easier for future updates (64-bit source
locations).
>From 2bd778b5b5c5ffc0a36cf0e0e71034fe16c48ad0 Mon Sep 17 0
Author: Haojian Wu
Date: 2025-06-25T16:26:40+02:00
New Revision: a945fb1481e01f9631fde5f6174276532c33fc98
URL:
https://github.com/llvm/llvm-project/commit/a945fb1481e01f9631fde5f6174276532c33fc98
DIFF:
https://github.com/llvm/llvm-project/commit/a945fb1481e01f9631fde5f6174276532c33fc98.diff
LO
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/145670
See the discussion in https://github.com/llvm/llvm-project/pull/145529.
This will slightly increase the PCM size (~5%), some data (in-memory preamble
size in clangd):
- SemaExpr.cpp: 77MB -> 80MB
- FindTarget.
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/142983
>From 61be4bfea92d52cfc3e48a3cabb1bc80cbebb7fa Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 5 Jun 2025 15:38:58 +0200
Subject: [PATCH 1/2] [clang] Reduce TemplateDeclInstantiator size.
---
clang/include
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/142840
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/142983
This gives us another ~1.85% improvement (1617->1647 for the
`instantiation-depth-default.cpp`) on clang's template instantiation depths,
No performance regressions have been observed:
https://llvm-compile-ti
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/142983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/143087
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
3001 - 3100 of 3165 matches
Mail list logo