@@ -7326,11 +7326,13 @@ void
ItaniumMangleContextImpl::mangleCXXCtorVTable(const CXXRecordDecl *RD,
raw_ostream &Out) {
// ::= TC _
CXXNameMangler Mangler(*this, Out);
+ QualType RDType = getASTContext().getRecordType
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/109882
___
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/109882
>From b1a659af4fccba0f7511ab52f0932d5a32958eb7 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Tue, 24 Sep 2024 20:02:05 -0300
Subject: [PATCH 1/2] [clang] fix assert in ADL finding entity in the implicit
@@ -115,7 +115,7 @@ C++ Language Changes
- Allow single element access of GCC vector/ext_vector_type object to be
constant expression. Supports the `V.xyzw` syntax and other tidbits
as seen in OpenCL. Selecting multiple elements is left as a future work.
-- Implement `CWG18
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/109882
This adds to the assert the implicit global module case as in module purview.
Fixes #109879
>From b1a659af4fccba0f7511ab52f0932d5a32958eb7 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Tue, 24 Sep 2024
@@ -9509,6 +9509,19 @@ Sema::ActOnStartRequiresExpr(SourceLocation
RequiresKWLoc,
PushDeclContext(BodyScope, Body);
for (ParmVarDecl *Param : LocalParameters) {
+if (Param->getType()->isVoidType()) {
+ if (LocalParameters.size() > 1) {
+Diag(Param->getBeg
mizvekov wrote:
Yep, I agree that the reduction indicates the original code was IFNDR.
We need a new reduction with no rename in order to locate this on QT code base
and know for sure.
https://github.com/llvm/llvm-project/pull/106585
___
cfe-commits
@@ -1306,3 +1306,18 @@ constexpr int field(int a) {
static_assert(field(3), ""); // expected-error {{constant expression}} \
// expected-note {{in call to 'field(3)'}}
}
+
+namespace literal_comparison {
+
+constexpr bool different_in_loop(bool b =
mizvekov wrote:
> Wow, I would never have thought it was a problem. Making these the same type
> removes the compilation error. Can you explain why this is a problem from the
> C++ standard PoV?
That's https://eel.is/c++draft/temp.deduct.type#20
In deduced contexts for an NTTP, the type of th
mizvekov wrote:
@alexfh Your third test case reduces to:
```C++
template struct InlinedVector {};
template
void PackArgsHelper(InlinedVector, unsigned char);
template
void PackArgsHelper(InlinedVector packed_args, T0,
TRest... args_rest) {
PackArgsHelper(packed_args, a
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/109065
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
It's one thing that we might tweak the rules to account for redundant
parenthesis.
But the more complete example shows there is no way to order these unrelated
things.
Note that we hadn't so far implemented these rules for partial ordering of
function templates, but the same i
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int {
BTK__make_integer_seq,
/// This names the __type_pack_element BuiltinTemplateDecl.
- BTK__type_pack_element
+ BTK__type_pack_element,
+
+ /// This names the __type_list_dedup BuiltinTemplateDecl.
+ BTK__type_list_de
@@ -3158,6 +3161,33 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
int64_t N = Index.getExtValue();
return Ts.getPackAsArray()[N].getAsType();
}
+ case BTK__type_pack_dedup: {
+assert(Converted.size() == 2 && "__builtin_type_pack_dedup sh
mizvekov wrote:
Regarding test case 2, that further reduces to:
```C++
template class Q {};
template void F(Q);
template void F(Q) = delete;
void test() {
F(Q());
}
```
The problem is that we consider the parenthesized expression significant in
terms of forming a distinct type.
You can s
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int {
BTK__make_integer_seq,
/// This names the __type_pack_element BuiltinTemplateDecl.
- BTK__type_pack_element
+ BTK__type_pack_element,
+
+ /// This names the __type_list_dedup BuiltinTemplateDecl.
+ BTK__type_list_de
@@ -3158,6 +3161,33 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
int64_t N = Index.getExtValue();
return Ts.getPackAsArray()[N].getAsType();
}
+ case BTK__type_pack_dedup: {
+assert(Converted.size() == 2 && "__builtin_type_pack_dedup sh
https://github.com/mizvekov requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/106730
___
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/106730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov commented:
Thanks for working on this problem!
I think the current approach is limited in ABI stability, we could broaden the
usability here by designing this builtin so it produces a type list which is
unique per set of types (order independent).
I had a chat with
mizvekov wrote:
@alexfh https://github.com/llvm/llvm-project/pull/109065 Fixes test case 1.
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-com
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/109065
When checking deduction consistency, a substitution can be incomplete such that
only sugar parts refer to non-deduced template parameters.
This would not otherwise lead to an inconsistent deduction, so this pa
mizvekov wrote:
AFAIK the bazel build scripts are externally automatically updated based on the
cmake scripts, so I don't think we should be touching them.
https://github.com/llvm/llvm-project/pull/108988
___
cfe-commits mailing list
cfe-commits@lists
mizvekov wrote:
> Now I think these should cover all remaining issues we see after this commit
> (and up to the current ToT):
>
>
>
> * Test case 1: https://gcc.godbolt.org/z/zMG5nsda3
>
> * Test case 2: https://gcc.godbolt.org/z/YbTKzao7d
>
> * Test case 3: https://gcc.godbolt.org/z/89Yn3d
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/108491
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
@alexfh thanks, the latest push should fix it.
https://github.com/llvm/llvm-project/pull/108491
___
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/108491
___
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/108491
>From d0863742db50da3ac9b4ea2ec12ba55001a7ce63 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 13 Sep 2024 02:21:36 -0300
Subject: [PATCH] [clang] Fix incorrect partial ordering context setting
Fixes
mizvekov wrote:
@alexfh Thanks, fixed in https://github.com/llvm/llvm-project/pull/108491
https://github.com/llvm/llvm-project/pull/94981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/108491
Fixes regression introduced in #94981, reported on the pull-request.
Since this fixes a commit which was never released, there are no release notes.
>From 2d79745e93cdda66cec9781efa7e10bce5544e8f Mon Sep 17 00
mizvekov wrote:
Thanks for the repro! I am taking a look.
https://github.com/llvm/llvm-project/pull/94981
___
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/107972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -19000,7 +19056,7 @@ bool Sema::tryCaptureVariable(
Explicit = false;
FunctionScopesIndex--;
if (IsInScopeDeclarationContext)
- DC = ParentDC;
+ DC = skipRequiresBody(ParentDC);
mizvekov wrote:
That is one of your tests actually:
`cla
@@ -18770,12 +18832,6 @@ bool Sema::tryCaptureVariable(
if (CapturingFunctionScopes == 0 && (!BuildAndDiagnose || VarDC == DC))
return true;
- // Exception: Function parameters are not tied to the function's DeclContext
- // until we enter the function definition. Capt
@@ -961,6 +961,7 @@ static const Expr
*SubstituteConstraintExpressionWithoutSatisfaction(
if (MLTAL.getNumSubstitutedLevels() == 0)
return ConstrExpr;
+ MLTAL.setKind(TemplateSubstitutionKind::Rewrite);
mizvekov wrote:
The new difference introduced in
@@ -254,6 +254,33 @@ class CXXBaseSpecifier {
TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; }
};
+class ContextDeclOrSentinel {
+ uintptr_t Pointer;
+
+public:
+ ContextDeclOrSentinel(Decl *Pointer) : Pointer(uintptr_t(Pointer)) {}
+ explicit ContextDec
@@ -6291,7 +6307,8 @@ bool Parser::isDeclarationSpecifier(
bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide,
DeclSpec::FriendSpecified IsFriend,
const ParsedTemplateInfo *Templ
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/107972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
@alexfh That's a bug in the patch, thanks for reporting.
This patch fixes it: https://github.com/llvm/llvm-project/pull/107972
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/107972
This fixes a bug in #18291, that was reported in the PR.
Since this is a bug fix for a patch that was never released, no entries are
added to the changelog.
>From 395ddd73b4dd366155a8718c13410b03bf8c6d32 Mon
mizvekov wrote:
I believe we have achieved consensus on getting rid of the fallback rules, and
this patch does not do much beyond that, if anything.
https://github.com/llvm/llvm-project/pull/96023
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/96023
>From b29e3d3285a414df74a75404c6fe4a39f4a0725d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 17 Jun 2024 21:39:08 -0300
Subject: [PATCH] [clang] Finish implementation of P0522
This finishes the clan
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/96023
___
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/94981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6753,16 +6758,41 @@ ASTContext::getNameForTemplate(TemplateName Name,
case TemplateName::UsingTemplate:
return DeclarationNameInfo(Name.getAsUsingShadowDecl()->getDeclName(),
NameLoc);
+ case TemplateName::DeducedTemplate: {
+Deduce
@@ -6803,9 +6809,6 @@ bool CXXNameMangler::mangleSubstitution(QualType T) {
}
bool CXXNameMangler::mangleSubstitution(TemplateName Template) {
- if (TemplateDecl *TD = Template.getAsTemplateDecl())
-return mangleSubstitution(TD);
-
mizvekov wrote:
This o
@@ -2143,15 +2107,17 @@ static TemplateDeductionResult
DeduceTemplateArgumentsByTypeMatch(
unsigned SubTDF = TDF & TDF_IgnoreQualifiers;
if (auto Result = DeduceTemplateArgumentsByTypeMatch(
S, TemplateParams, PPT, APT, Info, Deduced, SubTDF,
-
@@ -139,28 +165,63 @@ TemplateName::NameKind TemplateName::getKind() const {
return AssumedTemplate;
if (uncommon->getAsSubstTemplateTemplateParm())
return SubstTemplateTemplateParm;
+ if (uncommon->getAsDeducedTemplateName())
+return DeducedTemplate;
+
+ assert
@@ -5327,9 +5332,29 @@ bool Sema::CheckTemplateArgumentList(
SmallVector CanonicalArgumentPack;
unsigned ArgIdx = 0, NumArgs = NewArgs.size();
LocalInstantiationScope InstScope(*this, true);
- for (TemplateParameterList::iterator Param = Params->begin(),
-
@@ -1198,6 +1198,18 @@ void TextNodeDumper::dumpBareTemplateName(TemplateName
TN) {
dumpTemplateName(STS->getReplacement(), "replacement");
return;
}
+ case TemplateName::DeducedTemplate: {
+OS << " deduced";
+const DeducedTemplateStorage *DTS = TN.getAsDedu
@@ -139,28 +165,63 @@ TemplateName::NameKind TemplateName::getKind() const {
return AssumedTemplate;
if (uncommon->getAsSubstTemplateTemplateParm())
return SubstTemplateTemplateParm;
+ if (uncommon->getAsDeducedTemplateName())
+return DeducedTemplate;
+
+ assert
@@ -326,6 +320,48 @@ namespace classes {
// expected-error@-1 {{no matching function for call}}
}
} // namespace packs
+ namespace nested {
mizvekov wrote:
The test case from 100692 doesn't have anything interesting new on top of this
one. There
@@ -1371,11 +1371,17 @@ class TemplateDiff {
/// argument info into a tree.
void DiffTemplate(const TemplateSpecializationType *FromTST,
const TemplateSpecializationType *ToTST) {
+// FIXME: With P3310R0, A TST formed from a DeducedTemplateName might
@@ -645,6 +645,9 @@ static bool
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
// It is sufficient to check value of getAsTemplateDecl.
break;
+ case TemplateName::DeducedTemplate:
+ // FIXME: We can't reach here.
+ llvm_unreachable("unimp
@@ -412,6 +445,30 @@ class SubstTemplateTemplateParmStorage
std::optional PackIndex);
};
+class DeducedTemplateStorage : public UncommonTemplateNameStorage,
mizvekov wrote:
This one is a too internal detail of how the different kinds of
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateA
mizvekov wrote:
By the way, just realized I should mention this, but we still support
'-fno-relaxed-template-template-args', if anything, you could compile SPEC with
that flag in order to workaround this breakage meanwhile, until the above patch
is merged.
https://github.com/llvm/llvm-project
mizvekov wrote:
Yep, GCC gates __cpp_template_template_args on C++17 and above.
We went with unrestricted enablement on clang, mainly because we thought we
would have a full backwards compatibility solution by now.
As I said, this is fixed by https://github.com/llvm/llvm-project/pull/94981,
b
mizvekov wrote:
Yep, there is probably a macro somewhere guarding against GCC and possibly also
c++ standards from C++17 up.
That should be replaced by a macro guarding for `__cpp_template_template_args
<= 201611L` instead.
https://github.com/llvm/llvm-project/pull/100692
_
mizvekov wrote:
Oh cool, this is CWG2398 TTP-on-Class, this is fixed by
https://github.com/llvm/llvm-project/pull/94981 :)
On the SPEC source code side, this is probably similar to the xtensor breakage
we got a while ago, there is probably a macro guard somewhere that should be
expanded to co
mizvekov wrote:
The problem is that I am not sure yet whether this is a breakage that is
intended by this patch, and so SPEC should be fixed, or if that is otherwise
something that could be fixed in this patch.
It's bedtime now, my shift for today is over, so I'll only be able to take a
look
mizvekov wrote:
Thanks for the reduction.
I can work with this reduction, but keep in mind that it's better to disable
the c-reduce pass which renames things.
The reason is that if this is a problem in SPEC that needs to be fixed, then
having the names preserved would help locate which part o
mizvekov wrote:
@lukel97
If you can reduce, I would appreciate it.
You can also post here an unreduced pre-processed unit which compiles fine with
clang before this patch.
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing lis
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/106882
___
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/106882
We were incorrectly applying [temp.deduct]p5 to partial ordering.
Marked as NFCI as I don't think the difference is actually observable in
practice.
During partial ordering, the deduced arguments will mostly b
@@ -3237,6 +3237,40 @@ static TemplateDeductionResult
FinishTemplateArgumentDeduction(
return TemplateDeductionResult::Success;
}
+/// Complete template argument deduction for DeduceTemplateArgumentsFromType.
+/// FIXME: this is mostly duplicated with the above two versions
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
https://github.com/mizvekov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/101836
___
cfe-commits mailing list
cfe-commits@lis
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -5968,11 +5962,21 @@
ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) {
}
if (D->hasDefaultArgument()) {
+// Default argument can be "inherited" when it has a reference
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/106829
___
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/106829
>From a3c08127868fb3b77c8cc79355e43ab5288371fc Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 30 Aug 2024 17:37:55 -0300
Subject: [PATCH] [clang] function template non-call partial ordering fixes
Th
mizvekov wrote:
@DavidTruby @DavidSpickett A fix for this issue is up at
https://github.com/llvm/llvm-project/pull/106829
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
mizvekov wrote:
FYI @DavidTruby @DavidSpickett
https://github.com/llvm/llvm-project/pull/106829
___
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/106829
This applies to function template non-call partial ordering the same
provisional wording change applied in the call context: Don't perform the
consistency check on return type and parameters which didn't have
mizvekov wrote:
Reduction:
```
template struct __promote {
using type = float;
};
template class complex {};
template
complex<_Tp> pow(const complex<_Tp> &) {};
template
complex::type> pow(_Tp) = delete;
using F0 = complex (*)(const complex &);
F0 ptr{pow};
```
This is the same as the
mizvekov wrote:
Thanks.
I'll be happy to continue on post-commit if @zygoloid or @rjmccall have any
concerns.
https://github.com/llvm/llvm-project/pull/106335
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/106335
___
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/106335
>From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 28 Aug 2024 00:34:12 -0300
Subject: [PATCH 1/2] [clang] mangle placeholder for deduced type as a
templat
Author: Matheus Izvekov
Date: 2024-08-29T16:03:42-03:00
New Revision: a0441ced7a770036e00610989e2fabba5caeb31b
URL:
https://github.com/llvm/llvm-project/commit/a0441ced7a770036e00610989e2fabba5caeb31b
DIFF:
https://github.com/llvm/llvm-project/commit/a0441ced7a770036e00610989e2fabba5caeb31b.dif
@@ -1144,6 +1164,46 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints(
PointOfInstantiation, Satisfaction);
}
+bool Sema::CheckFunctionConstraintsWithoutInstantiation(
+SourceLocation PointOfInstantiation, FunctionTemplateDecl
@@ -1144,6 +1164,46 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints(
PointOfInstantiation, Satisfaction);
}
+bool Sema::CheckFunctionConstraintsWithoutInstantiation(
+SourceLocation PointOfInstantiation, FunctionTemplateDecl
@@ -13051,11 +13051,14 @@ class Sema final : public SemaBase {
/// instantiation arguments.
///
/// \param DC In the event we don't HAVE a declaration yet, we instead
provide
- /// the decl context where it will be created. In this case, the
`Innermost`
- /// shoul
mizvekov wrote:
Awesome, thanks!
I will give a review later, but just want to note a different (but much
smaller) PR touching the same area:
https://github.com/llvm/llvm-project/pull/102922
Just to keep in mind that the idea is to later further simplify
`getTemplateInstantiationArgs` by remo
mizvekov wrote:
FWIW, I meant to review this, but somehow this disappeared from my waiting for
review list and I lost track of it :)
https://github.com/llvm/llvm-project/pull/102444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/94981
___
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/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/106335
>From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 28 Aug 2024 00:34:12 -0300
Subject: [PATCH 1/2] [clang] mangle placeholder for deduced type as a
templat
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - |
FileCheck %s
+
+template class S>
+void create_unique()
+ requires (S{0}, true) {}
+
+template struct A {
+ constexpr A(Fn) {};
+};
+
+template void create_unique();
+// CHECK: @_
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/106335
>From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 28 Aug 2024 00:34:12 -0300
Subject: [PATCH] [clang] mangle placeholder for deduced type as a
template-pr
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/106335
As agreed on https://github.com/itanium-cxx-abi/cxx-abi/issues/109 these
placeholders should be mangled as a `template-prefix` production.
```
::=# global
template
::=
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/100692
>From f8fd471a954f5e304f3118df3236cf7ff4ef1020 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 24 Jul 2024 03:59:41 -0300
Subject: [PATCH 1/3] [clang] check deduction consistency when partial ordering
@@ -1307,6 +1304,62 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList
*TemplateParams,
return TemplateDeductionResult::Success;
}
+/// Deduce the template arguments by comparing the list of parameter
+/// types to the list of argument types, as in the parameter-type
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/100692
>From f8fd471a954f5e304f3118df3236cf7ff4ef1020 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 24 Jul 2024 03:59:41 -0300
Subject: [PATCH 1/2] [clang] check deduction consistency when partial ordering
@@ -5554,38 +5869,50 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate(
// "that is a member function with no expicit object argument".
// Otherwise the ordering rules for methods with expicit objet arguments
// against anything else make no sense.
-Shou
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
@@ -5554,38 +5869,50 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate(
// "that is a member function with no expicit object argument".
// Otherwise the ordering rules for methods with expicit objet arguments
// against anything else make no sense.
-Shou
@@ -5346,7 +5346,6 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result,
EvalInfo &Info,
const Expr *RetExpr = cast(S)->getRetValue();
FullExpressionRAII Scope(Info);
if (RetExpr && RetExpr->isValueDependent()) {
- EvaluateDependentExpr(RetExpr, Info);
---
@@ -7425,6 +7425,13 @@ void Sema::AddMethodCandidate(DeclAccessPair FoundDecl,
QualType ObjectType,
/*ExplicitArgs*/ nullptr, ObjectType,
ObjectClassification, Args, CandidateSet,
Supp
@@ -972,8 +972,30 @@ static const Expr
*SubstituteConstraintExpressionWithoutSatisfaction(
// equivalence.
LocalInstantiationScope ScopeForParameters(S);
if (auto *FD = DeclInfo.getDecl()->getAsFunction())
-for (auto *PVD : FD->parameters())
- ScopeForParameters
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/89934
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -91,15 +91,84 @@ void bar() {
namespace GH82104 {
-template int Zero = 0;
+template int Value = sizeof...(D);
mizvekov wrote:
```suggestion
template constexpr int Value = sizeof...(D);
```
https://github.com/llvm/llvm-project/pull/89934
__
1 - 100 of 854 matches
Mail list logo