@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo , bool PartialTemplateArgs,
+
Author: Matheus Izvekov
Date: 2024-06-09T13:44:45-03:00
New Revision: e090bac638e56ff9db87e622cdf925f2b99dfc30
URL:
https://github.com/llvm/llvm-project/commit/e090bac638e56ff9db87e622cdf925f2b99dfc30
DIFF:
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/94905
These will work as AST Text node dumpers, as usual, instead of AST printers.
Note that for now, the TemplateName dumper is using the TemplateArgument dumper
through an implicit conversion.
This can be fixed in
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/94905
___
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/94905
>From f918649a9208c2250873eb63641e106478371b43 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sat, 8 Jun 2024 11:07:27 -0300
Subject: [PATCH] [clang] improve TemplateArgument and TemplateName dump
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/94905
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -360,3 +360,34 @@ LLVM_DUMP_METHOD void ConceptReference::dump(raw_ostream
) const {
ASTDumper P(OS, Ctx, Ctx.getDiagnostics().getShowColors());
P.Visit(this);
}
+
+//===--===//
+// TemplateName method
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/94981
This extends default argument deduction to cover class templates as well, and
also applies outside of partial ordering, adding to the provisional wording
introduced in
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From 015a05707caad5d39909bc68a5371161de464d9d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From ea98dec85a9817eb4e35ce97389433e4a5b9676d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
@@ -18112,7 +18112,8 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc,
FunctionDecl *Func,
if (FirstInstantiation || TSK != TSK_ImplicitInstantiation ||
Func->isConstexpr()) {
- if (isa(Func->getDeclContext()) &&
+ if
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/95660
___
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/95660
___
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/95202
>From dadb9244bee22bc303af154b47f527b973940b40 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 12 Jun 2024 00:42:48 -0300
Subject: [PATCH] [clang] fix broken canonicalization of
mizvekov wrote:
I don't think regression tests are the right level here, we risk creating an
unstable test.
I have added a new unittest module for Profiling tests. I hope some day we will
have time to add one test case for each property of each AST node.
Though I still think the first line
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/95202
>From 5c4fa3ce2ce23fdaf877b71b2775244d15a149d3 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 12 Jun 2024 00:42:48 -0300
Subject: [PATCH] [clang] fix broken canonicalization of
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/95202
This reverts the functional elements of commit
3e78fa860235431323aaf08c8fa922d75a7cfffa and redoes it, by fixing the true root
cause of #61317.
A TemplateName can be non-canonical; profiling it based on the
mizvekov wrote:
It still fixes the original bug report though.
Otherwise adding a test which directly tests all observable effects of the
profiling fix would be a bit arbitrary, as we don't have any unit tests for the
gazillion ways this could go wrong for the other AST nodes.
This usually
mizvekov wrote:
> Or, are you saying it is too hard to get reduced?
>
>
I don't have a reduced test case. It's not impossible to reduce. Though we
usually do a poor job of preserving TemplateNames in other places, which makes
this harder to test. I have patches on my pipeline dealing with
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const
TemplateArgument ,
return TemplateName(Subst);
}
+/// Retrieve the template name that represents a template name
+/// deduced from a specialization.
+TemplateName
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo , bool PartialTemplateArgs,
+
mizvekov wrote:
FYI https://github.com/itanium-cxx-abi/cxx-abi/issues/184 is the tracking issue
for the mangling rules we need here.
We will probably end up with something quite different than what I coded here
so far.
https://github.com/llvm/llvm-project/pull/94981
https://github.com/mizvekov approved this pull request.
I think what I tried to do here is generally consistent: The convention on the
Text node dumper is to add a space at the beginning of the field you want to
append.
I think the true issue here is the label: It breaks convention by adding
mizvekov wrote:
I think this is missing one detail: We now have the same qualifier in two
places: The elaborated type node attached to the TST, and in the name of the
TST itself.
While this is not ideal situation, I think it makes sense to just drop the
TemplateName qualifier in the
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/95202
>From 8bd63f109c2bc1888b4d8dbd5e880900bbb4cef7 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 12 Jun 2024 00:42:48 -0300
Subject: [PATCH] [clang] fix broken canonicalization of
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From f05e8590c7fae599d0658829949fa907942e83f2 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov requested changes to this pull request.
Needs changes as discussed.
https://github.com/llvm/llvm-project/pull/94725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const
TemplateArgument ,
return TemplateName(Subst);
}
+/// Retrieve the template name that represents a template name
+/// deduced from a specialization.
+TemplateName
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/95202
___
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.
This is much better, thanks!
LGTM
https://github.com/llvm/llvm-project/pull/94515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -2402,10 +2405,9 @@ Expr *VarDecl::getInit() {
auto *Eval = getEvaluatedStmt();
- return cast_if_present(
- Eval->Value.isOffset()
- ? Eval->Value.get(getASTContext().getExternalSource())
- : Eval->Value.get(nullptr));
+ return
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/94515
___
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.
https://github.com/llvm/llvm-project/pull/94208
___
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/94981
>From 68791782b7a1a0eafa98950f6e03aa1585be5223 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From b238961ba3a174d7dc211caf36ff8fd6c8429a76 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/97425
___
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.
https://github.com/llvm/llvm-project/pull/93533
___
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.
https://github.com/llvm/llvm-project/pull/97596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2896,6 +2896,9 @@ class TreeTransform {
SS.Adopt(QualifierLoc);
Base = BaseResult.get();
+if (Base->containsErrors())
+ return ExprError();
mizvekov wrote:
I am still traveling back from St Louis, so I can't double check this:
Why is
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/97455
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
For reference, see https://reviews.llvm.org/D136533 for similar expansion of
diagnostics for uses of declarations, and how that lead to trouble in MacOS
land.
I'd suggest building libc++ on MacOS, to be sure this won't cause regressions
and a future revert.
I have a MacOS
mizvekov wrote:
FYI, the commit 99873b35da7ecb905143c8a6b8deca4d4416f1a9, which lists this PR
as a motivator, causes breakage building a project, which I am still looking
for a reduced test case.
The commit is not NFC despite what is says, just by cursory inspection of the
change.
Please
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/98167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
The reproducer turned out to be pretty simple:
```C++
export module a;
module :private;
static void f() {}
void g() {
f();
}
```
Compiles without that patch, otherwise produces:
```
error: no matching function for call to 'f'
```
> Oh, sorry, I took another look at the
@@ -99,3 +99,28 @@ BFoo b2(1.0, 2.0);
// CHECK-NEXT: | | |-ParmVarDecl {{.*}} 'type-parameter-0-0'
// CHECK-NEXT: | | `-ParmVarDecl {{.*}} 'type-parameter-0-0'
// CHECK-NEXT: | `-CXXDeductionGuideDecl {{.*}} implicit used 'auto (double, double) -> Foo' implicit_instantiation
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector
https://github.com/mizvekov approved this pull request.
LGTM, sans:
* missing newline at end of test file
* A similar test for template template parameter.
https://github.com/llvm/llvm-project/pull/98013
___
cfe-commits mailing list
https://github.com/mizvekov approved this pull request.
LGTM, as a clean up, and I see no notable performance implications.
Is there any follow up work for this?
https://github.com/llvm/llvm-project/pull/98567
___
cfe-commits mailing list
mizvekov wrote:
> Clarifying a couple of things here
I think we need the distinction between simple NFC, for trivial,
non-controversial and non-surprising changes like some renames, small
whitespace / formatting change, documentation changes, and complex NFC, which
requires some thinking and
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
https://github.com/mizvekov approved this pull request.
LGTM.
If it does fix the mentioned issue, please add a release note.
https://github.com/llvm/llvm-project/pull/98699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
https://github.com/mizvekov approved this pull request.
LGTM, I agree that we currently don't use it, so we might as well remove it.
But the overall situation is all wrong, we shouldn't be storing fully formed
diagnostic strings in the AST, we should be storing them as PartialDiagnostics.
But
https://github.com/mizvekov requested changes to this pull request.
See previous comments, I think this is primarily an error recovery issue on the
decltype, we shouldn't let it escape an undeduced auto, as that would confuse
further analysis.
https://github.com/llvm/llvm-project/pull/98622
@@ -99,3 +99,28 @@ BFoo b2(1.0, 2.0);
// CHECK-NEXT: | | |-ParmVarDecl {{.*}} 'type-parameter-0-0'
// CHECK-NEXT: | | `-ParmVarDecl {{.*}} 'type-parameter-0-0'
// CHECK-NEXT: | `-CXXDeductionGuideDecl {{.*}} implicit used 'auto (double, double) -> Foo' implicit_instantiation
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/98027
___
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/97215
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -6300,7 +6300,7 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc,
NamedDecl *D,
getTrivialTemplateArgumentLoc(UnpackedArg, QualType(), Loc));
}
QualType T =
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/96051
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
After we fork for clang-20, we can entirely remove
`frelaxed-template-template-args`, and so won't need to worry about testing
that non-conforming mode. Would it be reasonable to postpone that until then?
mizvekov wrote:
> @mizvekov After looking into the code, I think we should transform qualifier
> in TST. Consider the following code:
So the NNS is already dependent, that's great.
I still don't understand why you are saying we didn't or can't build a
DependentTemplateSpecializationType
mizvekov wrote:
> I mean we can transform `QualifiedTemplateName` to `DependentTemplateName`
> and this is what this patch does.
But that goes against the natural flow of template instantiation. We can't go
back from non-dependent into dependent.
We can't transform a regular TemplateName back
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/96364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1254,8 +1341,221 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+
mizvekov wrote:
I don't believe we currently have any code coverage at all for the line
affected.
So with this change, which we don't fully understand, we could be breaking
currently working code, and we could not even be fixing the known broken cases,
as there could be further UB down the
mizvekov wrote:
> That said... an example like the following sidesteps all these issues and
> still crashes clang, so I think the above comments are somewhat orthogonal to
> this patch (except that I think we should have something like this as a test
> case instead of the current test case):
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/100692
>From 89e016886fd87ab54856ed61a0a419d25f7df9e5 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 24 Jul 2024 03:59:41 -0300
Subject: [PATCH] [clang] check deduction consistency when partial ordering
@@ -5399,11 +5434,85 @@ static QualType
GetImplicitObjectParameterType(ASTContext ,
return Context.getLValueReferenceType(RawType);
}
+static TemplateDeductionResult FinishTemplateArgumentDeduction(
+Sema , FunctionTemplateDecl *FTD, int ArgIdx, QualType P, QualType A,
@@ -5346,7 +5346,6 @@ static EvalStmtResult EvaluateStmt(StmtResult ,
EvalInfo ,
const Expr *RetExpr = cast(S)->getRetValue();
FullExpressionRAII Scope(Info);
if (RetExpr && RetExpr->isValueDependent()) {
- EvaluateDependentExpr(RetExpr, Info);
@@ -767,6 +757,7 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *S,
NestedNameSpecInfo ,
else
Diag(IdInfo.IdentifierLoc, diag::err_undeclared_var_use)
<< IdInfo.Identifier;
+#endif
mizvekov wrote:
You should probably remove these before
@@ -698,13 +685,15 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *S,
NestedNameSpecInfo ,
if (ErrorRecoveryLookup)
return true;
+#if 0
// If we didn't find anything during our lookup, try again with
// ordinary name lookup, which can help us produce better
mizvekov wrote:
@MaskRay the latest version fixes libc++ regressions.
Also abseil-cpp builds correctly on MacOS, according to those instructions.
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/100692
___
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/100692
>From 89e5db41f3d3bc939078b63d43b7181bfc765fd1 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 24 Jul 2024 03:59:41 -0300
Subject: [PATCH] [clang] check deduction consistency when partial ordering
mizvekov wrote:
Another option would be to apply the resolution to all modes, but recover and
issue a warning instead of an error.
How feasible would that be?
https://github.com/llvm/llvm-project/pull/98547
___
cfe-commits mailing list
https://github.com/mizvekov approved this pull request.
LGTM as well.
https://github.com/llvm/llvm-project/pull/97619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> WDYAT?
We generally try to avoid issuing more than one error diagnostic for the same
problem.
Couldn't we instead issue a note `note: maybe missing 'template' keyword prior
to dependent template name 'A'`
attached to the first error instead?
mizvekov wrote:
> @mizvekov Without unannotated tentative parsing (to be _properly_ introduced
> by #96364), issuing a warning is infeasible. Either way, by the time we
> detect the error we could be who knows how deep into the second operand of a
> `>` operator.
So when we are parsing
mizvekov wrote:
I don't think I'll be able to provide a reproducer today. Regardless, bugs in
modules are in general not easy to reduce.
Unless you think you can fix this soon enough, I think a revert is appropriate
here.
https://github.com/llvm/llvm-project/pull/90574
mizvekov wrote:
I am also seeing breakages which are solved by reverting this change.
The failure occurs when importing modules from within header files:
```
error: expected a module name after 'import'
11 | import std;
```
https://github.com/llvm/llvm-project/pull/90574
mizvekov wrote:
> It would be nice to have a reproducer. I can't tell the root cause from this
> error, so I can't use it to strengthen the current tests.
I intend to provide a reproducer. I just can't do it today. So don't wait on it
as a justification to avoid reverting.
mizvekov wrote:
> We already do that :) the problem is when what follows `A` _doesn't_
> unambiguously look like a template argument list:
Sure, but before CWG1835, we would perform the lookup anyway and treat the
`<0>` as a template argument list, even if it isn't unambiguously a template
mizvekov wrote:
> I'm not sure I follow. If we "treat the `<0>` as a template argument list,
> even if it isn't unambiguously a template argument list.", then aren't
> applying CWG1835 at all.
Yes, in that case. But I am arguing for selectively applying it. I thought that
could work, but I
https://github.com/mizvekov commented:
Hi.
The change looks good.
There are some other examples of bad diagnostics in that issue, and it would be
ideal if they are preserved in case this PR closes that issue.
Please also add an entry to `clang/docs/ReleaseNotes.rst`.
mizvekov wrote:
> I doubt anyone is intentionally depending on equality here.
>
The difference wrt the gnu::cleanup behavior looks plausible:
https://github.com/llvm/llvm-project/issues/100868
https://github.com/llvm/llvm-project/pull/101038
___
mizvekov wrote:
>From my testing in compiler explorer, GCC and Clang always produce programs
>that return 1 as far back as we can test.
ICC and MSVC do otherwise, they return 0.
So I think this supports the notion that this should be a dialect, and we have
to wire defaults differently in MSVC
mizvekov wrote:
I agree it's strange choice the effects of elide-constructor are applied on the
CodeGen side, by ignoring the AST, instead of on the AST directly.
https://github.com/llvm/llvm-project/pull/101038
___
cfe-commits mailing list
mizvekov wrote:
It doesn't seem like elide-constructors is wired to control this behavior.
Seems to be wired only to the StaticAnalyzer presently.
Regardless, the decision where to apply NRVO is currently centralized in
SemaStmt.
I think "Sema::getNamedReturnInfo(const VarDecl *VD)" would be
mizvekov wrote:
Nice!
Please keep track and let us know which parts we haven't seen and have
important changes we need to pay more attention to during re-review.
Otherwise the patch is getting quite big already :)
https://github.com/llvm/llvm-project/pull/100425
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/98736
___
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 as well
https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> That's a pretty substantial policy change to propose, and this probably isn't
> the place to propose/discuss it. If that's your intent, probably best to take
> that up on discord.
>
I am not proposing a policy change. I believe the current policy is aimed at
giving an
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -442,6 +442,9 @@ def warn_drv_deprecated_arg : Warning<
def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning<
"argument '-fno-relaxed-template-template-args' is deprecated">,
InGroup;
+def warn_drv_deprecated_arg_ofast : Warning<
+ "argument '-Ofast'
@@ -5425,34 +5534,112 @@ static bool isAtLeastAsSpecializedAs(Sema ,
SourceLocation Loc,
// the partial ordering is done:
TemplateDeductionInfo Info(Loc);
switch (TPOC) {
- case TPOC_Call:
+ case TPOC_Call: {
if (DeduceTemplateArguments(S, TemplateParams,
501 - 600 of 662 matches
Mail list logo