mizvekov wrote:
It would not be splitting though, it would be wholesale duplication in that
case.
This file is the only part of the suite still testing the old non-conformant
mode, and I fail to see a test case we wouldn't be wanting to test on both.
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Matheus Izvekov
Date: 2024-05-02T13:55:33-03:00
New Revision: 62c29593be317f6cfaed8ffbcc016bd2c94c35d4
URL:
https://github.com/llvm/llvm-project/commit/62c29593be317f6cfaed8ffbcc016bd2c94c35d4
DIFF:
mizvekov wrote:
By the way, creduce/cvise won't help much here unless the interestingness test
accounts for 'works on GCC'.
Otherwise, It'd be trivial to conjure some snippet of code that works before
P0522, but breaks afterward as intended.
https://github.com/llvm/llvm-project/pull/89807
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/91822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
I am repeating myself here, but the crash happens after a bunch of errors: it's
not significant, we have evidence this sort of crash is associated with error
recovery.
This patch implements a standard mandated breaking change, and this 'stdexec'
is user code.
Without evidence
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/91811
This partially reverts b86e0992bfa6c58be077d82d824016f590ac5d90.
Just the default is changed back, on the Driver side.
No Frontend changes.
The positive spelling of the flag is undeprecated.
No documentation
mizvekov wrote:
@sam-mccall @bgra8 @ericniebler I believe this MR should fix your issues:
https://github.com/llvm/llvm-project/pull/91833
Can you double check?
You might consider applying https://github.com/llvm/llvm-project/pull/91837,
since that is stacked on that and will revert the
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/91833
When partial ordering alias templates against template template parameters,
allow pack expansions when the alias has a fixed-size parameter list.
These expansions were generally disallowed by proposed
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/91833
>From 06b9c19a1d194240be3199d50819090b10d697b6 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 10 May 2024 23:21:22 -0300
Subject: [PATCH] [clang] Allow pack expansions when partial ordering against
mizvekov wrote:
> @mizvekov Thank you! With that patch, clang not only doesn't crash on stdexec
> with `-frelaxed-template-template-args`, but in fact accepts the code.
Thanks! The crash is still there and is pre-existing, but it's a
'crash-on-invalid' issue, which is lower priority.
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/91833
>From f882dca5a53a6da8ad92492f28f9eacffb34a780 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 10 May 2024 23:21:22 -0300
Subject: [PATCH] [clang] Allow pack expansions when partial ordering against
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/91833
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/91837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov ready_for_review
https://github.com/llvm/llvm-project/pull/91837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
The fix was committed, and we just reverted the revert, so default is back to
`-frelaxed-template-template-args`.
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/91837
>From 1a5b4761ba804a0998faf009370d74fa486014d9 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sat, 11 May 2024 00:42:27 -0300
Subject: [PATCH] Revert "[clang] Revert default behavior change of P0522R0
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/91837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/90760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> Thanks, guarding the second specialization with the feature test macro works.
>
>
>
> I will try to reduce the test case tomorrow, if you still need this.
>
>
Thanks. If it's not too much work for you, that would be great. Otherwise, I
think a pretty good guess can be
mizvekov wrote:
> Hi, is there a way to make a compile-time check for this feature?
Yes, this is exposed by a standard feature testing macro:
https://en.cppreference.com/w/cpp/feature_test#cpp_template_template_args
>
> Looking at
>
Thanks for reporting this. A few questions:
* Does
mizvekov wrote:
Oh I see the code already includes workaround for GCC vs non-GCC. It's possible
in this case you may replace the workaround with a check for the feature
testing macro.
But if this is a new ambiguity not covered by any of the cases I am tracking,
it could still be worthwhile
mizvekov wrote:
Regarding @joanahalili 's post
Does it sound good for everyone that we revert the deprecation of the positive
spelling of the flag for a while, until we come up with a patch for a new flag
which helps ignore these deprecations?
mizvekov wrote:
> I think I prefer pretty fine-grained ones TBH, it makes our deprecation
> warnings more valuable. In a perfect world, it would change every release of
> the compiler so that folks would be frequently reminded of it, but it isn't a
> perfect world :)
I meant something fine
mizvekov wrote:
@joanahalili This is now merged in main:
https://github.com/llvm/llvm-project/pull/92324
You can pass `-Wno-deprecated-no-relaxed-template-template-args` to disable the
deprecation warning for `-fno-relaxed-template-template-args` specifically,
without affecting other
mizvekov wrote:
> Would it be reasonable to add a
> `-Wno-deprecated-relaxed-template-template-args` flag (or something like
> that) for this specific deprecation?
I had similar idea, but what about instead implementing something generic to
ignore deprecation of any driver flag?
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/92324
This allows the warning to be disabled in isolation, as it helps when treating
them as errors.
>From 8b70909746ec85483b6d7f54fec4989956fb4c21 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 15 May
https://github.com/mizvekov approved this pull request.
LGTM, Thanks!
https://github.com/llvm/llvm-project/pull/92299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/92324
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/90820
>From c4b72afa655c0e35005dca8aea18e651189f8938 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 1 May 2024 22:29:45 -0300
Subject: [PATCH] [clang] Implement provisional wording for CWG2398 regarding
@@ -5591,7 +5592,11 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate(
IsRValRef1);
Args2.push_back(Obj2Ty);
}
-size_t NumComparedArguments = NumCallArguments1 + ShouldConvert1;
+size_t
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/90820
>From 39e0af93163068f8de190649eccf91fda84178b6 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 1 May 2024 22:29:45 -0300
Subject: [PATCH] [clang] Implement provisional wording for CWG2398 regarding
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Matheus Izvekov
Date: 2024-05-16T02:45:50-03:00
New Revision: 70a926cfb1d4af326be5afe6419991aeff8f44b2
URL:
https://github.com/llvm/llvm-project/commit/70a926cfb1d4af326be5afe6419991aeff8f44b2
DIFF:
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
That test was merged after the last time pre-commit CI was run on this MR.
The change looks like a consequence of my refactoring, we now preserve the type
sugar from the injected arguments.
https://github.com/llvm/llvm-project/pull/90820
mizvekov wrote:
The quick fix would be to change the expectations of the test, I can do it for
you.
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
mizvekov wrote:
Weirdly enough the test passes on my machine, latest MacOS.
Maybe the test is not constrained on target, and this is causing differences
between machines?
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
mizvekov wrote:
Yep, I confirm the behavior happens if I add `-triple x86_64-windows-msvc` to
RUN line.
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Author: Matheus Izvekov
Date: 2024-05-16T19:56:45-03:00
New Revision: f210152e5fbcec1c50ff5ccc1f6680ab2c39b46f
URL:
https://github.com/llvm/llvm-project/commit/f210152e5fbcec1c50ff5ccc1f6680ab2c39b46f
DIFF:
Author: Matheus Izvekov
Date: 2024-05-16T19:56:45-03:00
New Revision: fe4d5f0d0e457a0a7dec2c7dc87996706b30a25e
URL:
https://github.com/llvm/llvm-project/commit/fe4d5f0d0e457a0a7dec2c7dc87996706b30a25e
DIFF:
mizvekov wrote:
I just pushed a fix.
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
LGTM, thanks for the fix!
https://github.com/llvm/llvm-project/pull/92263
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
I just double checked, the issue is present on main before this PR was merged,
it's completely unrelated.
https://github.com/llvm/llvm-project/pull/90820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
mizvekov wrote:
I already fixed this. We just had to constrain the triple, as there are
differences in size_t underlying type which affect diagnostics.
https://github.com/llvm/llvm-project/pull/92389
___
cfe-commits mailing list
@@ -261,6 +261,13 @@ AG ag = {1};
// CHECK: | `-BuiltinType {{.*}} 'int'
// CHECK: `-ParmVarDecl {{.*}} 'int'
+template
+using BG = G;
+BG bg(1.0);
+// CHECK-LABEL: Dumping
+// CHECK: FunctionTemplateDecl {{.*}} implicit
+// CHECK: |-CXXDeductionGuideDecl {{.*}}
@@ -261,6 +261,13 @@ AG ag = {1};
// CHECK: | `-BuiltinType {{.*}} 'int'
// CHECK: `-ParmVarDecl {{.*}} 'int'
+template
+using BG = G;
+BG bg(1.0);
+// CHECK-LABEL: Dumping
+// CHECK: FunctionTemplateDecl {{.*}} implicit
+// CHECK: |-CXXDeductionGuideDecl {{.*}}
mizvekov wrote:
@erichkeane this is kind of the same as
https://github.com/llvm/llvm-project/pull/92854, but for NTTP instead of
type-parameters.
https://github.com/llvm/llvm-project/pull/92852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
mizvekov wrote:
Was there ever an RFC on this whole 'splitting up Sema' project?
I have my own reservations as well.
I think starting up from the easier bits is a risky proposition, as we might
realize this whole thing will fail when we get to the harder parts.
I also think this can lead in
https://github.com/mizvekov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/92318
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
The change itself looks pretty good, but note that GCC only warns about this,
and more importantly MSVC still accepts the code without complaint.
So this means that we could find out from user feedback that we will need to
keep the old
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/93124
When printing template arguments of the template kind, a canonical template
template parameter would be printed as an empty string.
This fixes it so they are printed similarly to canonical template type
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema ,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ?
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema ,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ?
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/92855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/93124
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/93079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema ,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ?
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/93079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/93265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93266
>From 5b592204ddef177d612f8455f4e14ab9cf9c06bd Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Thu, 23 May 2024 23:57:01 -0300
Subject: [PATCH] [clang] add fallback to expr in the template differ when
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/93266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
Can you also add a test based on my example?
With also a variant on that in which the bad conversion happens on the last
element of the pack, instead of the last parameter.
Lastly, please namespace the tests with the name of, or add a
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93265
>From 2546c2c5d9e1bc6d1d4ddd818b4017073f17cec0 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Thu, 23 May 2024 21:23:21 -0300
Subject: [PATCH] [clang] Avoid crash due to unimplemented StructuralValue
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/93265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/93266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
We usually create new tests under the latest standard.
https://github.com/llvm/llvm-project/pull/93265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema ,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ?
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/93079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From f9892ebed002d73c74f44629e926386006f7bec1 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef
Label) {
});
}
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) {
+ llvm::SmallString<128> Str;
+ {
+llvm::raw_svector_ostream SS(Str);
+TA.print(PrintPolicy, SS,
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From 86e3852d0501bd24738c094359799c72781ad808 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
Author: Matheus Izvekov
Date: 2024-05-27T04:45:20-03:00
New Revision: 0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7
URL:
https://github.com/llvm/llvm-project/commit/0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7
DIFF:
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef
Label) {
});
}
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) {
+ llvm::SmallString<128> Str;
+ {
+llvm::raw_svector_ostream SS(Str);
+TA.print(PrintPolicy, SS,
@@ -55,15 +55,21 @@ namespace PR11856 {
template T *end(T*);
- class X { };
+ struct X { };
+ struct Y {
+int end;
+ };
template
void Foo2() {
T it1;
-if (it1->end < it1->end) {
-}
+if (it1->end < it1->end) { }
X *x;
-if (x->end <
mizvekov wrote:
No problem!
It looks like this example is salvageable, nothing is stopping us from just
applying the same rules when deducing a template template parameter against
other kinds of templates.
This shouldn't stop you from cleaning up the code, whatever rules we come up
here are
mizvekov wrote:
> Can you try to explain the what the patch does more and describe the
> rationale?
Done.
https://github.com/llvm/llvm-project/pull/92852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -1435,7 +1436,10 @@ class NonTypeTemplateParmDecl final
bool hasDefaultArgument() const { return DefaultArgument.isSet(); }
/// Retrieve the default argument, if any.
- Expr *getDefaultArgument() const { return DefaultArgument.get(); }
+ const TemplateArgumentLoc ()
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/92852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/92852
This is an enabler for a future patch.
>From 22964061e46ef0d37904f6c8e757dca9800c5cd0 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 00:39:55 -0300
Subject: [PATCH] [clang] NFCI: use
Author: Matheus Izvekov
Date: 2024-05-20T22:49:53-03:00
New Revision: 4cebe5a43ba83eab477358ef4da665b43463bb68
URL:
https://github.com/llvm/llvm-project/commit/4cebe5a43ba83eab477358ef4da665b43463bb68
DIFF:
mizvekov wrote:
One suggestion, if you are going to go about this problem systematically, try
to tackle the hardest problems first.
For example: Try to make `MultiLevelTemplateArgumentList` const correct. I
would like other suggestions as well.
https://github.com/llvm/llvm-project/pull/93493
mizvekov wrote:
> Errr, not certain I agree with this -- that basically is "admit defeat and
> stop aiming for const correctness."
Well, I am saying, add const to places we are pretty sure we will never change,
and leave const out when in doubt.
Don't add const just because we don't need
mizvekov wrote:
> `const_cast` here is a relatively recent addition, and I checked out with
> @erichkeane that the use case (pack expansion) is legit. According to the
> approach you're suggesting, the one who wrote this `const_cast` should
> instead refactor the MLTAL to use
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/93431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> @mizvekov - can you please take a look at https://godbolt.org/z/ahro3vnPd ?
> The reduced example fails somewhat differently, but it complains on `implicit
> instantiation of undefined template` _with_ relaxed argument matching enabled
> and compiles OK without...
Thank you,
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema ,
FunctionTemplateDecl *F,
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
const auto = DeduceResults[Index];
-if (D.isNull())
+if (D.isNull()) { // non-deduced template parameters of f
+
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema ,
FunctionTemplateDecl *F,
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
const auto = DeduceResults[Index];
-if (D.isNull())
+if (D.isNull()) { // non-deduced template parameters of f
+
@@ -2882,7 +2899,8 @@ buildAssociatedConstraints(Sema ,
FunctionTemplateDecl *F,
// We add the outer template arguments which is [int] to the multi-level arg
// list to ensure that the occurrence U in `C` will be replaced with int
// during the substitution.
- if
@@ -3100,6 +3118,7 @@ BuildDeductionGuideForTypeAlias(Sema ,
Context.getInjectedTemplateArg(NewParam));
TransformedDeducedAliasArgs[AliasTemplateParamIdx] = NewTemplateArgument;
}
+ unsigned UndeducedTemplateParameterStartIndex = FPrimeTemplateParams.size();
mizvekov wrote:
> That's the opposite of my view. Mutation needs to be justified. "What if we
> need it later" can be used to justify anything, and if we do need it later
> then we change the code then. Until that point, readers can see `const` and
> know that things aren't being changed out
mizvekov wrote:
> Could you please take another look?
Sure, but let's take the discussion to the other PR.
https://github.com/llvm/llvm-project/pull/93433
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/mizvekov commented:
So After we have formed a TemplateSpecializationType, we are done with the NNS.
We keep it around in an ElaboratedType for type sugar only, it should not be
needed to compile the program correctly anymore.
So I think this solution violates one important
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From fabcce0d7a4a1633b4d5ed49cb78fdf441e3c11e Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
@@ -3833,6 +3833,14 @@ def note_cannot_use_trivial_abi_reason : Note<
"it is polymorphic|"
"it has a base of a non-trivial class type|it has a virtual base|"
"it has a __weak field|it has a field of a non-trivial class type}1">;
+def err_ppc_impossible_musttail: Error<
+
301 - 400 of 556 matches
Mail list logo