llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux`
running on `premerge-linux-1` while building `clang` at step 7
"test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/153/builds/1796
Here is t
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 01/11] [Clang] Add diagnostic notes for implcitly generated
deduct
https://github.com/AaronBallman approved this pull request.
LGTM, thank you for the improvement to deduction guide diagnostics!
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
zyn0217 wrote:
Thank you folks for the review & suggestion. I plan to merge this PR next week
in case @AaronBallman or @cor3ntin has objections.
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 01/11] [Clang] Add diagnostic notes for implcitly generated
deduct
@@ -12078,6 +12079,43 @@ static void DiagnoseFailedExplicitSpec(Sema &S,
OverloadCandidate *Cand) {
<< (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange());
}
+static void NoteImplicitDeductionGuide(Sema &S, CXXDeductionGuideDecl *DG) {
+ // We want to alway
@@ -627,6 +627,9 @@ Improvements to Clang's diagnostics
used rather than when they are needed for constant evaluation or when code
is generated for them.
The check is now stricter to prevent crashes for some unsupported
declarations (Fixes #GH95495).
+- Clang now shows i
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/96084
___
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, looks good.
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12078,6 +12079,43 @@ static void DiagnoseFailedExplicitSpec(Sema &S,
OverloadCandidate *Cand) {
<< (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange());
}
+static void NoteImplicitDeductionGuide(Sema &S, CXXDeductionGuideDecl *DG) {
+ // We want to alway
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 01/10] [Clang] Add diagnostic notes for implcitly generated
deduct
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
zyn0217 wrote:
Good to know that, remove the FIXME now.
https://github.com/llvm/llvm-project/pull/96084
___
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/9] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
hokein wrote:
We have a open bug for this, https://github.com/llvm/llvm-project/issues/79798.
https://github.com/llvm/llvm-
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein commented:
Thanks, this looks good overall.
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/8] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/7] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/6] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/5] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/4] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
hokein wrote:
Thanks for the patch! +1 on the idea of printing deduction guides in
diagnostics. This improves the experience for both users and compiler
developers. This is https://github.com/llvm/llvm-project/issues/92393 :)
> Perhaps an approach more similar to what we display for ambiguous
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/3] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/3] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/2] [Clang] Add diagnostic notes for implcitly generated
deductio
Sirraide wrote:
> Thanks @Sirraide for the review! I'd like to wait a couple of days before
> landing given that some folks are out for a wg21 meeting in these two weeks -
> in case they have other opinions.
Sure, but afaik you’ll have to wait until July most likely if you want to give
other
zyn0217 wrote:
Thanks @Sirraide for the review! I'd like to wait a couple of days before
landing given that some folks are out for a wg21 meeting in these two weeks -
in case they have other opinions.
https://github.com/llvm/llvm-project/pull/96084
_
@@ -580,6 +580,9 @@ Improvements to Clang's diagnostics
- Clang no longer emits a "declared here" note for a builtin function that has
no declaration in source.
Fixes #GH93369.
+- Clang now emits implicit deduction guides corresponding to non-user-defined
constructors whil
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against a non-user-defined
+ // constructor, add a note for it. These deduction guides nor their
+ // corresponding cons
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Sirraide approved this pull request.
Two nits, but the rest seems reasonable. I agree that `make_scope_exit` is
probably the only sane way of doing this here.
While I still maintain that the formatting of this could be better, I also
agree that this is a problem that we’ll p
Sirraide wrote:
> I don't think this would exacerbate it much because this 1) only notes
> implicitly generated CTAD guides; 2) won't be chatty if the guide is
> generated over a user-defined constructor: we have already pointed to a
> feasible source location that makes things clear.
Hmm, y
zyn0217 wrote:
> C++ error messages already have a reputation of being rather long; I’m
> candidly doubtful as to whether this would help most users too much...
I think this is more about making us more accurate when we want to point out
there's something wrong with users' code. Admittedly, it
https://github.com/Endilll commented:
Changes to DR tests look fine.
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Sirraide wrote:
I will say, one worry that I do have is that this would end up issuing... a lot
of notes for a single error:
![image](https://github.com/llvm/llvm-project/assets/74590115/3f517fb4-a00d-4093-b690-c2e2e1f49380)
C++ error messages already have a reputation of being rather long; I’
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
50 matches
Mail list logo