https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/117792
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
The PR description needs to update as well.
https://github.com/llvm/llvm-project/pull/117315
___
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/117315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1763,6 +1763,8 @@ class Sema final : public SemaBase {
/// Add [[gsl::Pointer]] attributes for std:: types.
void inferGslPointerAttribute(TypedefNameDecl *TD);
+ static bool isPointerLikeType(QualType QT);
hokein wrote:
nit: please add some comments
@@ -1763,6 +1763,8 @@ class Sema final : public SemaBase {
/// Add [[gsl::Pointer]] attributes for std:: types.
void inferGslPointerAttribute(TypedefNameDecl *TD);
+ static bool isPointerLikeType(QualType QT);
hokein wrote:
Oh, nice! Moving to `checkExpr
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/117315
___
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/117792
>From edd8e7354c4ff96446d32830f4cd5e6c3c333a84 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 26 Nov 2024 21:42:45 +0100
Subject: [PATCH 1/3] [clang] Improve the lifetime_capture_by diagnostic on the
const
@@ -623,6 +623,26 @@ static void visitFunctionCallArguments(IndirectLocalPath
&Path, Expr *Call,
}
if (CheckCoroCall || Callee->getParamDecl(I)->hasAttr())
VisitLifetimeBoundArg(Callee->getParamDecl(I), Arg);
+else if (const auto *CaptureAttr =
+
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/118001
None
>From feb9445efffa69c158407bda6f5981a033197567 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 28 Nov 2024 14:27:23 +0100
Subject: [PATCH] [clang] NFC, simplify the attr-lifetime-capture-by.test
---
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/118013
We incorrectly annotate the iterator parameter for `insert` method (`void
insert(const_iterator, const value_type& value)`), because iterator is also a
gsl-pointer type.
This patch fixes it.
>From feb9445efffa
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/117733
___
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/117733
___
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/117733
>From 30235e403de2130795201b00e2d23e25cdb68baa Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 26 Nov 2024 17:14:49 +0100
Subject: [PATCH] [clang] Add a lifetime capture testcase for temporary
capturing obj
hokein wrote:
> It is possible that the temporary capturing object uses the captured entity
> in its destructor.
This is a good point. We could potentially limit the suppression to cases where
the destructor is trivial, but that might not be worth the added complexity.
Agree that this is pro
hokein wrote:
> Can you not remove the check-not. It makes sure we are matching all the
> capture by attr.
I’m not sure they're necessary here. We’ve already verified that the relevant
parameters have the attached capture_by attribute using CHECK-NEXT, I think it
should be sufficient. The add
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/118088
___
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/114044
>From ac8f934144cfa657ae7ba0c8797fe058aa0a9c53 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 1 Nov 2024 16:51:03 +0100
Subject: [PATCH 1/5] [clang] Fix the post-filtering heuristics for GSLPointer
case.
hokein wrote:
> Just discover a new false positive:
>
> ```
> namespace std {
> template
> class [[gsl::Pointer]] Iterator2 {
> public:
> using reference = T&;
> Iterator2() {}
> reference operator*() const;
> };
> }
>
> template
> class AnySpan {
> public:
> AnySpan() {}
> std::I
@@ -793,3 +793,108 @@ void test13() {
}
} // namespace GH100526
+
+namespace lifetime_capture_by {
+struct S {
+ const int *x;
+ void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x
= &x; }
+ void captureSV(std::string_view sv [[clang::lifetime_captu
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a
function
-parameter or implicit object parameter indicates that that objects t
hokein wrote:
Just discover a new false positive:
```
namespace std {
template
class [[gsl::Pointer]] Iterator2 {
public:
using reference = T&;
Iterator2() {}
reference operator*() const;
};
}
template
class AnySpan {
public:
AnySpan() {}
std::Iterator2 begin() const [[clang::life
@@ -0,0 +1,233 @@
+// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field
-Wreturn-stack-address -verify %s
+
+#include "Inputs/lifetime-analysis.h"
+
+struct X {
+ const int *x;
+ void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x
=
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a
function
-parameter or implicit object parameter indicates that that objects t
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a
function
-parameter or implicit object parameter indicates that that objects t
@@ -1110,13 +1117,14 @@ static bool shouldRunGSLAssignmentAnalysis(const Sema
&SemaRef,
isAssignmentOperatorLifetimeBound(Entity.AssignmentOperator)));
}
-static void checkExprLifetimeImpl(Sema &SemaRef,
- const InitializedEntity *I
@@ -0,0 +1,233 @@
+// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field
-Wreturn-stack-address -verify %s
+
+#include "Inputs/lifetime-analysis.h"
+
+struct X {
+ const int *x;
+ void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x
=
@@ -0,0 +1,220 @@
+// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field
-Wreturn-stack-address -verify %s
+
+#include "Inputs/lifetime-analysis.h"
hokein wrote:
In my experience, a single and well-organized test file works effectively, as
it
https://github.com/hokein commented:
Thanks, this is nice.
Can you also add a release note?
https://github.com/llvm/llvm-project/pull/114684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
@@ -1412,17 +1438,34 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
return false;
};
+ bool HasReferenceBinding = Init->isGLValue();
llvm::SmallVector Path;
- if (LK == LK_Assignment &&
- shouldRunGSLAssignmentAnalysis(SemaRef, *AEntity)) {
-Path.push_
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/114044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1412,17 +1438,34 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
return false;
};
+ bool HasReferenceBinding = Init->isGLValue();
llvm::SmallVector Path;
- if (LK == LK_Assignment &&
- shouldRunGSLAssignmentAnalysis(SemaRef, *AEntity)) {
-Path.push_
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a
function
-parameter or implicit object parameter indicates that that objects t
https://github.com/hokein approved this pull request.
The description of the PR is stale and needs to be updated.
https://github.com/llvm/llvm-project/pull/111616
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/116531
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1412,17 +1438,34 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
return false;
};
+ bool HasReferenceBinding = Init->isGLValue();
llvm::SmallVector Path;
- if (LK == LK_Assignment &&
- shouldRunGSLAssignmentAnalysis(SemaRef, *AEntity)) {
-Path.push_
@@ -1460,7 +1497,15 @@ void checkExprLifetime(Sema &SemaRef, const
AssignedEntity &Entity,
checkExprLifetimeImpl(SemaRef, /*InitEntity=*/nullptr,
/*ExtendingEntity=*/nullptr, LK_Assignment, &Entity,
-Init);
+
@@ -1460,7 +1486,18 @@ void checkExprLifetime(Sema &SemaRef, const
AssignedEntity &Entity,
checkExprLifetimeImpl(SemaRef, /*InitEntity=*/nullptr,
/*ExtendingEntity=*/nullptr, LK_Assignment, &Entity,
-Init);
+
@@ -32,6 +32,26 @@ void test_invalid_call(int s) {
int var = some_func(undef1);
}
+int some_func2(int a, int b);
+void test_invalid_call_2() {
+ // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors
+ // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} ''
lvalue (ADL) = 'some_
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/115921
___
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, this looks good to me! I think we should ship it. Let’s check if
@bricknerb has any additional concerns before landing it.
>From my understanding, the follow-ups outlined in the description should cover
>everything during the code r
@@ -32,6 +32,21 @@ void test_invalid_call(int s) {
int var = some_func(undef1);
}
+int some_func2(int a, int b);
+void test_invalid_call_2() {
+ // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors
+ // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} ''
lvalue (ADL) = 'some_
@@ -32,6 +32,21 @@ void test_invalid_call(int s) {
int var = some_func(undef1);
}
+int some_func2(int a, int b);
+void test_invalid_call_2() {
+ // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors
+ // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} ''
lvalue (ADL) = 'some_
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/114684
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -32,6 +32,21 @@ void test_invalid_call(int s) {
int var = some_func(undef1);
}
+int some_func2(int a, int b);
+void test_invalid_call_2() {
+ // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors
+ // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} ''
lvalue (ADL) = 'some_
@@ -793,3 +800,86 @@ void test13() {
}
} // namespace GH100526
+
+namespace LifetimeboundInterleave {
+
+const std::string& Ref(const std::string& abc [[clang::lifetimebound]]);
+
+std::string_view TakeSv(std::string_view abc [[clang::lifetimebound]]);
+std::string_view TakeSt
@@ -793,3 +800,86 @@ void test13() {
}
} // namespace GH100526
+
+namespace LifetimeboundInterleave {
+
+const std::string& Ref(const std::string& abc [[clang::lifetimebound]]);
+
+std::string_view TakeSv(std::string_view abc [[clang::lifetimebound]]);
+std::string_view TakeSt
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a
function
-parameter or implicit object parameter indicates that that objects t
@@ -793,3 +806,202 @@ void test13() {
}
} // namespace GH100526
+
+namespace lifetime_capture_by {
hokein wrote:
I think it is probably worth having a separated test for this capture_by
attribute. We could move the std types to a common header to reuse the c
@@ -1420,9 +1446,18 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
? IndirectLocalPathEntry::LifetimeBoundCall
: IndirectLocalPathEntry::GslPointerAssignment,
Init});
+ } else if (LK == LK_LifetimeCapture) {
+Path.push_back({Indirect
@@ -793,3 +806,202 @@ void test13() {
}
} // namespace GH100526
+
+namespace lifetime_capture_by {
+struct X {
+ const int *x;
+ void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x
= &x; }
+ void captureSV(std::string_view sv [[clang::lifetime_capt
@@ -249,7 +254,7 @@ static void
visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
LocalVisitor Visit);
template static bool isRecordWithAttr(QualType Type) {
- if (auto *RD = Type->getAsCXXRecordDecl())
+ if (a
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/117792
With this change, the lifetime_capture_by code path will not handle the
constructor decl to avoid bogus diagnostics (see the testcase).
Instead, we reuse the lifetimebound code as the lifetime_capture_by(this) h
@@ -253,9 +253,12 @@ static void
visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
LocalVisitor Visit);
template static bool isRecordWithAttr(QualType Type) {
- if (auto *RD = Type->getAsCXXRecordDecl())
-re
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/117733
Fixes #117728
>From bf697889ec6681dffc22120fef6d49ffddbd0b87 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 26 Nov 2024 17:14:49 +0100
Subject: [PATCH] [clang] Don't warn if the capturing object is also te
@@ -961,6 +963,17 @@ static void
visitLocalsRetainedByInitializer(IndirectLocalPath &Path,
if (isa(Init) || isa(Init))
return visitFunctionCallArguments(Path, Init, Visit);
+ if (auto *CPE = dyn_cast(Init)) {
+Path.push_back({IndirectLocalPathEntry::ParenAggInit, C
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/117690
>From 8d159e95f67b4954e1a273658e612d05498748ab Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 26 Nov 2024 10:31:12 +0100
Subject: [PATCH 1/2] [clang] Diagnose dangling references for parethesized
aggregate
https://github.com/hokein approved this pull request.
Thanks, this looks good to me.
https://github.com/llvm/llvm-project/pull/117450
___
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/118165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -270,34 +270,49 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
}
void Sema::inferLifetimeCaptureByAttribute(FunctionDecl *FD) {
- if (!FD)
+ auto *MD = dyn_cast_if_present(FD);
+ if (!MD || !MD->getParent()->isInStdNamespace())
return;
- auto *MD = d
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/118078
>From 4db8f43507d6d36ef1cfeabb4c308e781a1b061e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 29 Nov 2024 11:07:56 +0100
Subject: [PATCH 1/2] [clang] Infer lifetime_capture_by for map's subscript
operator.
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/118078
___
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/118281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8612,7 +8612,11 @@ static void HandleLifetimeBoundAttr(TypeProcessingState
&State,
CurType = State.getAttributedType(
createSimpleAttr(State.getSema().Context, Attr),
CurType, CurType);
+return;
}
+ State.getSema().Diag(Attr.getLoc(), diag::err_
@@ -9,11 +9,20 @@ namespace usage_invalid {
~A() [[clang::lifetimebound]]; // expected-error {{cannot be applied to a
destructor}}
static int *static_class_member() [[clang::lifetimebound]]; //
expected-error {{static member function has no implicit object parameter}}
https://github.com/hokein commented:
Can you add a note in llvm-project/clang/docs/ReleaseNotes.rst?
https://github.com/llvm/llvm-project/pull/118281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/117690
Fixes #101957
>From c92065b91a6d1898c1d61ba95c1108501a259944 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 26 Nov 2024 10:31:12 +0100
Subject: [PATCH] [clang] Diagnose dangling references for parethesize
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/117690
___
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/117690
>From 8d159e95f67b4954e1a273658e612d05498748ab Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 26 Nov 2024 10:31:12 +0100
Subject: [PATCH] [clang] Diagnose dangling references for parethesized
aggregate ini
@@ -116,6 +116,7 @@ void foo(int n) { // expected-note {{declared here}}
B b2(A(1), {}, 1);
// beforecxx20-warning@-1 {{aggregate initialization of type 'A' from a
parenthesized list of values is a C++20 extension}}
// beforecxx20-warning@-2 {{aggregate initialization of
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -verify -std=c++20 %s -fsyntax-only
+
+namespace std {
+template struct remove_reference { typedef T type; };
+template struct remove_reference { typedef T type; };
+template struct remove_reference { typedef T type; };
+
+template typename
hokein wrote:
> LGTM, could you add a summary of the change to the commit message? I know the
> context is available in the linked issue, but I'd like the gist of it to be
> preserved in the commit history directly.
Done.
https://github.com/llvm/llvm-project/pull/117690
__
https://github.com/hokein commented:
The change looks good to me (please wait for @erichkeane review before
landing). I’d suggest adding a brief rationale in the commit message instead of
just including links, to make it more self-contained.
https://github.com/llvm/llvm-project/pull/118165
__
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/118281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> Thanks for the reviews! Please merge the PR (I don't have write access).
Done.
https://github.com/llvm/llvm-project/pull/118281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/113049
___
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/113049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -750,6 +750,18 @@ void InitListChecker::FillInEmptyInitForField(unsigned
Init, FieldDecl *Field,
if (Field->hasInClassInitializer()) {
if (VerifyOnly)
return;
+
+ // We do not want to aggressively set the hadError flag and cutoff
+ // parsing. Tr
https://github.com/hokein commented:
Is the PR description still update-to-date?
https://github.com/llvm/llvm-project/pull/113049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2024-12-03T12:13:13+01:00
New Revision: 356df2dd72e8299b5de58e9390283110c19f7c76
URL:
https://github.com/llvm/llvm-project/commit/356df2dd72e8299b5de58e9390283110c19f7c76
DIFF:
https://github.com/llvm/llvm-project/commit/356df2dd72e8299b5de58e9390283110c19f7c76.diff
LO
https://github.com/hokein approved this pull request.
The change looks good to me.
https://github.com/llvm/llvm-project/pull/118567
___
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/118501
___
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/119107
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein commented:
I have mixed feelings about this. The change is small, but it seems tied to a
particular coding style, and the implementation appears to be "optimized"
specifically for that style, which isn’t we do generally.
https://github.com/llvm/llvm-project/pull/11916
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/119197
___
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/119197
`DiagsInGroup` is a `map`, we store a dangling string_view in
the key.
>From 85f1d54459125568bfbe2088827040c3b05a7804 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 9 Dec 2024 11:48:59 +0100
Subject: [PAT
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/119197
>From 85f1d54459125568bfbe2088827040c3b05a7804 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 9 Dec 2024 11:48:59 +0100
Subject: [PATCH 1/2] [clang] Fix a dangling reference in
clang/utils/TableGen/ClangDi
@@ -1908,7 +1908,7 @@ void clang::EmitClangDiagDocs(const RecordKeeper
&Records, raw_ostream &OS) {
for (const Record *G : DiagGroups) {
bool IsRemarkGroup = isRemarkGroup(G, DiagsInGroup);
auto &GroupInfo =
-DiagsInGroup[std::string(G->getValueAsString("Grou
Author: Haojian Wu
Date: 2025-01-03T14:16:47+01:00
New Revision: 119fc720a19e047fee59d7f7446c911b158563e0
URL:
https://github.com/llvm/llvm-project/commit/119fc720a19e047fee59d7f7446c911b158563e0
DIFF:
https://github.com/llvm/llvm-project/commit/119fc720a19e047fee59d7f7446c911b158563e0.diff
LO
https://github.com/hokein approved this pull request.
Thanks, this looks nice.
https://github.com/llvm/llvm-project/pull/121313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,540 @@
+//===-- HeuristicResolverTests.cpp --*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/121313
___
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/121341
___
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/125520
This WIP PR explores the idea of introducing `[[clang::lifetimebound_if()]]`, a built-in attribute that conditionally applies
`[[clang::lifetimebound]]` based on the given boolean expression.
One of the key
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/125520
___
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/125478
Fixes #103016
This is the last missing piece for the C++20 CTAD alias feature. No release
note being added in this PR yet, I will send out a follow-up patch to mark this
feature done.
(Since the release 20 br
@@ -740,6 +740,24 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+// Returns all source deduction guides associated with the declared
+// deduction guides that have the specified deduction guide name.
+llvm::DenseSet getSourceDed
@@ -1191,13 +1209,10 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
if (AliasTemplate->isInvalidDecl())
return;
auto &Context = SemaRef.Context;
- // FIXME: if there is an explicit deduction guide after the first use of the
- // type alias usage, we will not cove
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/125478
___
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/125478
>From 62328c6ab0c9965712aea1d484fca4afa1294acd Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 3 Feb 2025 11:55:17 +0100
Subject: [PATCH 1/2] [clang] CTAD alias: Respecte explicit deduction guides
defined a
hokein wrote:
The lldb code needs to be updated as well
https://github.com/llvm/llvm-project/blob/d5488f157c74332646d2b6e9d16c88e61d5a789e/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp#L277-L283
https://github.com/llvm/llvm-project/pull/125372
_
2801 - 2900 of 3165 matches
Mail list logo