https://github.com/mizvekov approved this pull request.
LGTM, though I would have preferred to keep the patches separate, it's less of
a revert risk.
https://github.com/llvm/llvm-project/pull/121044
___
cfe-commits mailing list
cfe-commits@lists.llvm.
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -1228,35 +1228,45 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL,
NonTypeTemplateParmDecl *NewConstrainedParm,
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/125453
>From ff34c10553ed645fc8277cb72247f6cb67a024e6 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 2 Feb 2025 23:47:15 -0300
Subject: [PATCH] [clang] print correct context for diagnostics suppressed by
d
mizvekov wrote:
> Thank you for tackling this longstanding issue! How much does saving this
> extra state add to the runtime and memory usage on a template-heavy
> compilation?
I tried building stdexec, the difference is within the noise.
Do you have any other examples of template-heavy code i
@@ -1654,11 +1654,20 @@ void Sema::EmitDiagnostic(unsigned DiagID, const
DiagnosticBuilder &DB) {
}
case DiagnosticIDs::SFINAE_Suppress:
+ if (DiagnosticsEngine::Level Level = getDiagnostics().getDiagnosticLevel(
+ DiagInfo.getID(), DiagInfo.getLocat
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
mizve
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
@@ -11714,27 +11714,44 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl
*Found, Decl *Templated,
return;
}
- case TemplateDeductionResult::InvalidExplicitArguments:
+ case TemplateDeductionResult::InvalidExplicitArguments: {
assert(ParamD && "no parameter f
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types :
Note<
"candidate template ignored: deduced values %diff{"
"of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|"
"%1 and %3 of conflicting types for parameter %0}2,4">;
mizvekov wrote:
Thanks for the report, this is the reduced reproducer:
```C++
template struct QWindowSystemHelper {
template static void handleEvent() {
QWindowSystemHelper::handleEvent();
}
};
template <>
template
void QWindowSystemHelper::handleEvent() {
static_assert(__is_same(Eve
mizvekov wrote:
> well
Thanks, I won't be able to for the next few hours. If it's not trivial to fix,
please go ahead and revert.
https://github.com/llvm/llvm-project/pull/125372
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
@@ -280,7 +280,8 @@ std::optional
CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) {
new_class_template->getDeclContext(),
new_class_template->getTemplatedDecl()->getLocation(),
new_class_template->getLocation(), new_class_template, imported_args,
-
mizvekov wrote:
> it's a permitted point of instantiation; we could try it and see if it works
> well enough in practice. We could also delay implicit definitions of special
> members like we do for template instantiations to reduce the impact.
Another possibility would be only saving the cont
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/125372
___
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/125418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types :
Note<
"candidate template ignored: deduced values %diff{"
"of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|"
"%1 and %3 of conflicting types for parameter %0}2,4">;
mizvekov wrote:
Yes, we don't have a generic document on automated reduction without modules.
The idea of this document here is to inform developers who already know how to
perform such reductions, so that they can target modules as well.
The key piece of information here that surprises most p
mizvekov wrote:
> I’m not in a position where I can test the patch properly right now, but if
> the whole qtbase can be built (not only the reduced testcase or the specific
> source file that triggered the issue before), I’m good with it - thanks!
Yes it does, no problem!
https://github.com/l
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/125266
This fixes instantiation of definition for friend function templates,
when the declaration found and the one containing the definition
have different template contexts.
In these cases, the the function declarat
@@ -5276,9 +5277,31 @@ void Sema::InstantiateFunctionDefinition(SourceLocation
PointOfInstantiation,
RebuildTypeSourceInfoForDefaultSpecialMembers();
SetDeclDefaulted(Function, PatternDecl->getLocation());
} else {
+NamedDecl *ND = Function;
+DeclContext *DC
mizvekov wrote:
Yeah this is just a bad automatic rebase by GitHub, only the top commit is
relevant.
https://github.com/llvm/llvm-project/pull/125418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/125791
___
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/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
/cherry-pick 346077aaa6bef5652a72a2f3d9fc134ea8fc6a5b
https://github.com/llvm/llvm-project/pull/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/125791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/126215
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/124313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/124498
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/124137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
/cherry-pick 28ad8978ee2054298d4198bf10c8cb68730af037
https://github.com/llvm/llvm-project/pull/124137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov milestoned
https://github.com/llvm/llvm-project/pull/124386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> Actually, @mizvekov, can we make the
> `ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl(ASTContext
> &C, Kind DK)` constructor default initialize the `StrictPackMatch` member to
> false? In that case users of `CreateDeserialized` wouldn't need to worry
> abo
mizvekov wrote:
> > > > > Actually, @mizvekov, can we make the
> > > > > `ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl(ASTContext
> > > > > &C, Kind DK)` constructor default initialize the `StrictPackMatch`
> > > > > member to false? In that case users of `CreateDeserialize
mizvekov wrote:
> > > Actually, @mizvekov, can we make the
> > > `ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl(ASTContext
> > > &C, Kind DK)` constructor default initialize the `StrictPackMatch`
> > > member to false? In that case users of `CreateDeserialized` wouldn't need
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/125453
>From adde9f1f8eabe4d98ba09fd978f8d152a9865347 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 2 Feb 2025 23:47:15 -0300
Subject: [PATCH] [clang] print correct context for diagnostics suppressed by
d
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/125418
>From 29c48b0785af13572a785f90747529ffe7a572ed Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 2 Feb 2025 13:31:20 -0300
Subject: [PATCH] [clang] NFC: rename MatchedPackOnParmToNonPackOnArg to
Strict
mizvekov wrote:
> Probably best to pass a constant `false`/`true` to preserve old behaviour. We
> can't even instantiate templates in the expression evaluator right now, so
> don't think we should be worrying about this at the moment
Please see
https://github.com/llvm/llvm-project/pull/125791
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/125418
___
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/125418
___
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/125266
>From 1282f6a3181fa37e8649e407fabd72893a01103a Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sat, 28 Sep 2024 14:28:58 -0300
Subject: [PATCH] [clang] Track function template instantiation from definition
mizvekov wrote:
https://llvm-compile-time-tracker.com/compare.php?from=4eab2194872d54e2d4496135a277b1610ff33ead&to=adde9f1f8eabe4d98ba09fd978f8d152a9865347&stat=instructions:u
These performance results don't indicate an impact either.
https://github.com/llvm/llvm-project/pull/125453
___
mizvekov wrote:
Hi,
We usually ask to include the reason for the revert in the commit message.
https://github.com/llvm/llvm-project/pull/126149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/126215
___
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/125453
>From a36dcb035a30b560eb9dd14fd3ce2f8e8952b8ee Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 2 Feb 2025 23:47:15 -0300
Subject: [PATCH] [clang] print correct context for diagnostics suppressed by
d
@@ -1104,9 +1104,13 @@ void Sema::ActOnStartOfTranslationUnit() {
}
void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) {
- // No explicit actions are required at the end of the global module fragment.
- if (Kind == TUFragmentKind::Global)
+ if (Kind == TUFrag
@@ -2525,8 +2525,11 @@ void TextNodeDumper::VisitCXXRecordDecl(const
CXXRecordDecl *D) {
OS << " instantiated_from";
dumpPointer(Instance);
}
- if (const auto *CTSD = dyn_cast(D))
+ if (const auto *CTSD = dyn_cast(D)) {
dumpTemplateSpecializationKind(CTSD->get
@@ -1841,15 +1841,21 @@ class ClassTemplateSpecializationDecl : public
CXXRecordDecl,
LLVM_PREFERRED_TYPE(TemplateSpecializationKind)
unsigned SpecializationKind : 3;
+ /// When matching the primary template, have we matched any packs on the
+ /// parameter side, versus
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/125372
___
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/125372
___
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/125372
>From a624adeb9a0b0af5c9370c6a97b2e2c874cdc066 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 31 Jan 2025 20:41:39 -0300
Subject: [PATCH] [clang] fix P3310 overload resolution flag propagation
Class
@@ -1841,15 +1841,21 @@ class ClassTemplateSpecializationDecl : public
CXXRecordDecl,
LLVM_PREFERRED_TYPE(TemplateSpecializationKind)
unsigned SpecializationKind : 3;
+ /// When matching the primary template, have we matched any packs on the
+ /// parameter side, versus
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/125372
>From 36cab9c0ae9bd24b86dcfa0c260f1b0701d7468e Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 31 Jan 2025 20:41:39 -0300
Subject: [PATCH] [clang] fix P3310 overload resolution flag propagation
Class
https://github.com/mizvekov approved this pull request.
LGTM, Thanks!
https://github.com/llvm/llvm-project/pull/121245
___
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/125453
This patch makes it so the correct instantiation context is printed for
diagnostics suppessed by template argument deduction.
The context is saved along with the suppressed diagnostic, and when the
declaratio
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/125372
Class templates might be only instantiated when they are required to be
complete, but checking the template args against the primary template is
immediate.
This result is cached so that later when the class i
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/125372
>From 9645f14d3b9aa016cb45ca27ad0425adbbc0e1c6 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 31 Jan 2025 20:41:39 -0300
Subject: [PATCH] [clang] fix P3310 overload resolution flag propagation
Class
@@ -5276,9 +5277,31 @@ void Sema::InstantiateFunctionDefinition(SourceLocation
PointOfInstantiation,
RebuildTypeSourceInfoForDefaultSpecialMembers();
SetDeclDefaulted(Function, PatternDecl->getLocation());
} else {
+NamedDecl *ND = Function;
+DeclContext *DC
@@ -8494,10 +8495,21 @@ DeclResult Sema::ActOnClassTemplateSpecialization(
return Specialization;
}
-Decl *Sema::ActOnTemplateDeclarator(Scope *S,
- MultiTemplateParamsArg TemplateParameterLists,
-Declarator &D
@@ -7946,6 +7980,8 @@ class Sema final : public SemaBase {
/// A stack of expression evaluation contexts.
SmallVector ExprEvalContexts;
+ SmallVector PendingLazyContextDecls;
mizvekov wrote:
The intention is that they are used for any declarations where
@@ -17658,8 +17662,49 @@ HandleImmediateInvocations(Sema &SemaRef,
}
}
+static void setContextDecl(Sema &S, Decl *Base, Decl *ContextDecl) {
+ switch (Base->getKind()) {
+ case Decl::CXXRecord: {
+auto *RD = cast(Base);
+RD->setLambdaContextDecl(ContextDecl);
+
@@ -17658,8 +17662,49 @@ HandleImmediateInvocations(Sema &SemaRef,
}
}
+static void setContextDecl(Sema &S, Decl *Base, Decl *ContextDecl) {
+ switch (Base->getKind()) {
+ case Decl::CXXRecord: {
+auto *RD = cast(Base);
+RD->setLambdaContextDecl(ContextDecl);
+
@@ -4692,6 +4692,17 @@ bool Sema::InstantiateDefaultArgument(SourceLocation
CallLoc, FunctionDecl *FD,
ParmVarDecl *Param) {
assert(Param->hasUninstantiatedDefaultArg());
+ // FIXME: We don't track member specialization info for non-de
mizvekov wrote:
I still find the current approach wrt the warning to be odd, we would basically
force every modules user to change their command line, either by adding the new
`-fmodules-reduced-bmi`, or add `-Wno-wathever` to suppress the warning, or
just learn to live with the warning I gue
https://github.com/mizvekov approved this pull request.
Thanks, LGTM!
https://github.com/llvm/llvm-project/pull/118236
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo
*GetFullTypeForDeclarator(TypeProcessingState &state,
case NestedNameSpecifier::TypeSpec:
case NestedNameSpecifier::TypeSpecWithTemplate:
- ClsType = QualType(NNS->getAsType(), 0);
+ const Type *N
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/124313
___
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/124313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult
Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
IsConvertedConstantExpression = false;
}
- if (getLangOpts().CPlusPlus17) {
+ if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) {
// C++17 [temp.arg.nontype]p1:
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase {
SmallVectorImpl &SugaredConverted,
SmallVectorImpl &CanonicalConverted,
CheckTemplateArgumentKind CTAK, bool PartialOrdering,
+
@@ -6930,17 +6934,20 @@ ExprResult
Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
IsConvertedConstantExpression = false;
}
- if (getLangOpts().CPlusPlus17) {
+ if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) {
// C++17 [temp.arg.nontype]p1:
@@ -6930,17 +6934,20 @@ ExprResult
Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
IsConvertedConstantExpression = false;
}
- if (getLangOpts().CPlusPlus17) {
+ if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) {
// C++17 [temp.arg.nontype]p1:
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/124313
>From 7a7950dd8fd6a01cdc0d1351b86962798d300ea6 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 12 Jan 2025 14:45:24 -0300
Subject: [PATCH] [clang] disallow narrowing when matching template template
p
@@ -6930,17 +6934,20 @@ ExprResult
Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
IsConvertedConstantExpression = false;
}
- if (getLangOpts().CPlusPlus17) {
+ if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) {
// C++17 [temp.arg.nontype]p1:
@@ -6930,17 +6934,20 @@ ExprResult
Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
IsConvertedConstantExpression = false;
}
- if (getLangOpts().CPlusPlus17) {
+ if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) {
// C++17 [temp.arg.nontype]p1:
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/124313
This fixes the core issue described in P3579, following the design intent of
P0522 to not introduce any new cases where a template template parameter match
is allowed for a template which is not valid for all
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase {
SmallVectorImpl &SugaredConverted,
SmallVectorImpl &CanonicalConverted,
CheckTemplateArgumentKind CTAK, bool PartialOrdering,
+
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/124313
>From 1d9605013487b8361ff471ef494b4be94bd37470 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 12 Jan 2025 14:45:24 -0300
Subject: [PATCH] [clang] disallow narrowing when matching template template
p
mizvekov wrote:
> Can you explain the revert-issue, and what you did to fix it? The github diff
> is making REALLY difficult to understand what you did..
If you go on the commit list, you can click on the commit which I pointed out
in the OP ([clang] Changes to template argument list checking"
@@ -5570,61 +5570,73 @@ bool Sema::CheckTemplateArgumentList(
}
if (ArgIdx < NumArgs) {
- // Check the template argument we were given.
- if (CheckTemplateArgument(*Param, NewArgs[ArgIdx], Template, TemplateLoc,
-RAngleLoc, Sug
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/124137
___
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.
I think the change is ok, but I don't think this fixes the underlying issue.
There is something generally wrong with type aliases which don't use all of
their parameters, and this needs more thought.
https://github.com/llvm/llvm-project/p
https://github.com/mizvekov approved this pull request.
LGTM, Thanks!
https://github.com/llvm/llvm-project/pull/124533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Matheus Izvekov
Date: 2025-01-27T00:26:38-03:00
New Revision: 7107f55d82f8d1077d5478e8f58c94851385c06f
URL:
https://github.com/llvm/llvm-project/commit/7107f55d82f8d1077d5478e8f58c94851385c06f
DIFF:
https://github.com/llvm/llvm-project/commit/7107f55d82f8d1077d5478e8f58c94851385c06f.dif
@@ -66,8 +66,9 @@ namespace DependentType {
using ok = Pt, tT0>;
using err1 = tT0; // expected-error {{too few template arguments
for class template 'ii'}}
// expected-note@-1 {{different template
parameters}}
- using err2 = tT0; // FIXME: sh
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/124313
>From f2df46da93aeeaed9f774322231866a7509e3fa0 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sun, 12 Jan 2025 14:45:24 -0300
Subject: [PATCH] [clang] disallow narrowing when matching template template
p
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/124605
ast-print: A DeclRef to an anonymous NTTP will print
'value-parameter--',
similar to how type parameters are printed.
ast-dump: A bareDeclRef to an anonymous entity will print some extra
identifying informati
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/124605
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1001 - 1100 of 1692 matches
Mail list logo