@@ -13530,9 +13530,12 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
}
if (VDecl->isInvalidDecl()) {
-CorrectDelayedTyposInExpr(Init, VDecl);
+ExprResult Res = CorrectDelayedTyposInExpr(Init, VDecl);
+std::vector SubExprs;
--
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/90948
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/90948
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90894
>From 40365147f7aabeaaefd7e9bf6f2b96d6f7135992 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 10:53:54 +0200
Subject: [PATCH 1/3] Refactor: Extract the core deduction-guide construction
implement
@@ -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 {{.*}} 'a
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given unde
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From bf6acda6c7cb9a08b82b149c0df38d90e395f9e1 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/4] [clang] CTAD: implement the missing IsDeducible
constraint for a
hokein wrote:
> > I agree with you -- having a well-described diagnostic message is better
> > and clearer. I'm happy to improve it once we settle on the final
> > implementation approach (the current diagnostic because
> > '__is_deducible(AFoo, Foo)' evaluated to false seems okay to me. GCC a
@@ -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 {{.*}} 'a
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/90894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/91401
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/91454
By default (`shouldVisitImplicitCode()` returns `false`), RAV should not
traverse AST nodes that are not spelled in the source code. Deduction guides
for alias templates are always synthesized, so they should not
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/89358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3239,6 +3239,40 @@ static TemplateDeductionResult
FinishTemplateArgumentDeduction(
return TemplateDeductionResult::Success;
}
+/// Complete template argument deduction for DeduceTemplateArgumentsFromType.
+/// FIXME: this is mostly duplicated with the above two versions
@@ -27,7 +27,8 @@ enum TypeTrait {
,
#define TYPE_TRAIT_2(Spelling, Name, Key) BTT_##Name,
#include "clang/Basic/TokenKinds.def"
- BTT_Last = UTT_Last // BTT_Last == last BTT_XX in the enum.
+ BTT_Last = UTT_Last
hokein wrote:
oops, this is not intended. T
@@ -190,13 +196,15 @@ template struct Foo { Foo(T); };
template using AFoo = Foo;
template concept False = false;
-template using BFoo = AFoo;
+template
+using BFoo = AFoo; // expected-note {{candidate template ignored:
constraints not satisfied [with V = int]}} \
+
@@ -3307,6 +3341,58 @@
Sema::DeduceTemplateArguments(VarTemplatePartialSpecializationDecl *Partial,
return ::DeduceTemplateArguments(*this, Partial, TemplateArgs, Info);
}
+TemplateDeductionResult
+Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType,
-
https://github.com/hokein commented:
Replied some review comments. I haven't updated the code yet (plan to do it
after #90961)
https://github.com/llvm/llvm-project/pull/89358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
https://github.com/hokein commented:
The fix looks good to me, and thanks for the comprehensive explanation in the
description.
https://github.com/llvm/llvm-project/pull/91628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/91628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -84,3 +84,17 @@ nested_init_list::concept_fail nil_invalid{1, ""};
// expected-note@#INIT_LIST_INNER_INVALID {{candidate template ignored:
substitution failure [with F = const char *]: constraints not satisfied for
class template 'concept_fail' [with F = const char *]}}
//
@@ -2583,11 +2580,27 @@ struct ConvertConstructorToDeductionGuideTransform {
//-- The types of the function parameters are those of the constructor.
for (auto *OldParam : TL.getParams()) {
- ParmVarDecl *NewParam =
- transformFunctionTypeParam(OldPara
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/91750
None
>From e7b23e02e9b4c98d9e24dd1debcdefada7a16004 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 10 May 2024 16:31:20 +0200
Subject: [PATCH] [AST] Print the separator , for template arguments in
ConceptR
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/91750
>From e7b23e02e9b4c98d9e24dd1debcdefada7a16004 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 10 May 2024 16:31:20 +0200
Subject: [PATCH 1/2] [AST] Print the separator , for template arguments in
ConceptRef
@@ -106,9 +106,15 @@ void ConceptReference::print(llvm::raw_ostream &OS,
ConceptName.printName(OS, Policy);
if (hasExplicitTemplateArgs()) {
OS << "<";
+bool First = true;
// FIXME: Find corresponding parameter for argument
-for (auto &ArgLoc : ArgsAsWritte
@@ -24,6 +24,7 @@ add_clang_unittest(ASTTests
CommentLexer.cpp
CommentParser.cpp
CommentTextTest.cpp
+ ConceptPrinterTest.cpp
hokein wrote:
Done (we're not required to update gn build files, and there's a bot that can
automate the porting).
https://gi
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/91750
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/90961
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90961
>From 9cc438e2def2fa98af71ba79eb82e033f3d5905a Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 11:04:21 +0200
Subject: [PATCH] [clang] CTAD alias: refine the transformation for the
require-clause
Author: Haojian Wu
Date: 2024-05-11T22:07:21+02:00
New Revision: 2b386888b78327db4906b12401e1a89438471548
URL:
https://github.com/llvm/llvm-project/commit/2b386888b78327db4906b12401e1a89438471548
DIFF:
https://github.com/llvm/llvm-project/commit/2b386888b78327db4906b12401e1a89438471548.diff
LO
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90961
>From 0bdb18c0ffc37b38e81487b45e0e00e4480473aa Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 11:04:21 +0200
Subject: [PATCH 1/2] [clang] CTAD alias: refine the transformation for the
require-cla
hokein wrote:
I'm merging it now (happy to address any post-comments).
https://github.com/llvm/llvm-project/pull/90961
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/90961
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 20947c1a34fae3593a98dba125e5d70d652c7190 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH] [clang] CTAD: implement the missing IsDeducible constraint
for alias
@@ -190,13 +196,15 @@ template struct Foo { Foo(T); };
template using AFoo = Foo;
template concept False = false;
-template using BFoo = AFoo;
+template
+using BFoo = AFoo; // expected-note {{candidate template ignored:
constraints not satisfied [with V = int]}} \
+
@@ -18,6 +18,7 @@
#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/TemplateName.h"
+#include "clang/AST/Type.h"
hokein wrote:
Done.
https://github.com/llvm/llvm-project/pull/89358
__
@@ -27,7 +27,8 @@ enum TypeTrait {
,
#define TYPE_TRAIT_2(Spelling, Name, Key) BTT_##Name,
#include "clang/Basic/TokenKinds.def"
- BTT_Last = UTT_Last // BTT_Last == last BTT_XX in the enum.
+ BTT_Last = UTT_Last
hokein wrote:
Reverted the change.
https:/
@@ -6116,6 +6116,17 @@ static bool EvaluateBinaryTypeTrait(Sema &Self,
TypeTrait BTT, const TypeSourceI
tok::kw___is_pointer_interconvertible_base_of);
return Self.IsPointerInterconvertibleBaseOf(Lhs, Rhs);
+ }
+ case BTT_IsDeducible: {
+
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema &SemaRef,
FunctionTemplateDecl *FTD,
return E.getAs();
}
+// Build the associated constraints for the alias deduction guides.
+// C++ [over.match.class.deduct]p3.3:
+// The associated constraints ([temp.constr.decl]
https://github.com/hokein approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/92104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 20947c1a34fae3593a98dba125e5d70d652c7190 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
hokein wrote:
Thanks for the review.
> I'll approve that modulo nit but i think we want
>
> * An issue to keep track of the duplication in
> `FinishTemplateArgumentDeduction`
Filed #92224.
> * A follow up PR to improve diagnostics
Filed #92225, and assigned to myself. Will do it.
> Thanks!
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema &SemaRef,
FunctionTemplateDecl *FTD,
return E.getAs();
}
+// Build the associated constraints for the alias deduction guides.
+// C++ [over.match.class.deduct]p3.3:
+// The associated constraints ([temp.constr.decl]
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/89358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
thanks, this looks good to me, a small nit.
https://github.com/llvm/llvm-project/pull/92266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
hokein wrote:
For ast-dump lit tests, we usually place them in `clang/test/AST/` dir with
name `ast-dump*.cpp` (or we can add it to the existing `ast-dump-expr.cpp`).
https://github.com/llvm/
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 10d06e728d836f4aaad7dbf1a6b06b57e4092bb1 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH 1/3] [clang] Implement a bitwise_copyable builtin type trait.
This pa
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/86512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3958,6 +3958,50 @@ Note that the `size` argument must be a compile time
constant.
Note that this intrinsic cannot yet be called in a ``constexpr`` context.
+``__is_bitwise_cloneable``
+-
+
+A type trait is used to check whether a type can be safel
https://github.com/hokein commented:
thanks for the review.
https://github.com/llvm/llvm-project/pull/86512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType = getCa
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType = getCa
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/91454
>From e560fe2bf2d4bdc07a71682aa4d3a4bee8730b80 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 8 May 2024 12:11:10 +0200
Subject: [PATCH 1/2] [AST] RecursiveASTVisitor: Don't traverse the alias
deduction gui
https://github.com/hokein approved this pull request.
thanks, still good.
https://github.com/llvm/llvm-project/pull/92266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -583,3 +583,8 @@ void NonADLCall3() {
f(x);
}
} // namespace test_adl_call_three
+
hokein wrote:
nit: wrap the code within `namespace GH35300 { ...}`.
https://github.com/llvm/llvm-project/pull/92266
___
cfe-com
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/91454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/89358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/92389
Fixes https://github.com/llvm/llvm-project/issues/92225
>From 20294489121be7a68519280da8e144c2b9be398c Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 16 May 2024 14:05:57 +0200
Subject: [PATCH] [clang] CTAD
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/92389
>From ada7f47eae6ef66a51cdeb91ab5aca0e188e5704 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 16 May 2024 14:05:57 +0200
Subject: [PATCH] [clang] CTAD alias: Emit a more descriptive diagnostic
message when
@@ -111,7 +111,7 @@ struct Foo {
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
// expected-note {{candidate template ignored:
constraints not satisfied [with X = int]}} \
-
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/92389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
Thanks @mizvekov for the quick fix.
https://github.com/llvm/llvm-project/pull/92389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/92535
clang rejects some valid code (see testcases) because of an incorrect
transformed deduction guides. This patch fixes it.
We miss the template argument packs during the transformation (`auto
(type-parameter-0-0..
https://github.com/hokein approved this pull request.
nit: add a note in `clang/docs/ReleaseNotes.rst`
https://github.com/llvm/llvm-project/pull/92654
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/92721
None
>From 2aa2caf15282d28e9fda99d51776d842d3d57e95 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Sun, 19 May 2024 22:47:14 +0200
Subject: [PATCH] [Sema] Fix an out-of-bounds crash when diagnosing bad
conversi
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/92535
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/92721
>From e2dc2cecee5891b88ff4c2e473220cc9fd36df34 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Sun, 19 May 2024 22:47:14 +0200
Subject: [PATCH 1/2] [Sema] Fix an out-of-bounds crash when diagnosing bad
conversion
@@ -11298,8 +11298,14 @@ static void DiagnoseBadConversion(Sema &S,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ? Fn->g
@@ -11298,8 +11298,14 @@ static void DiagnoseBadConversion(Sema &S,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ? Fn->g
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
The crash is already fixed by
https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f
https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
Author: Haojian Wu
Date: 2024-08-05T14:05:14+02:00
New Revision: 31bb759d78576bec4c5b844edd52686eb6cc9fc3
URL:
https://github.com/llvm/llvm-project/commit/31bb759d78576bec4c5b844edd52686eb6cc9fc3
DIFF:
https://github.com/llvm/llvm-project/commit/31bb759d78576bec4c5b844edd52686eb6cc9fc3.diff
LO
Author: Haojian Wu
Date: 2024-08-05T14:21:34+02:00
New Revision: 69c6a3faafe8fa3fa8d7554e0ebe64aae3c3d10b
URL:
https://github.com/llvm/llvm-project/commit/69c6a3faafe8fa3fa8d7554e0ebe64aae3c3d10b
DIFF:
https://github.com/llvm/llvm-project/commit/69c6a3faafe8fa3fa8d7554e0ebe64aae3c3d10b.diff
LO
https://github.com/hokein commented:
The current implementation strictly follows the standard's specification for
replacing the return type of an alias deduction guide.
However, this approach adds some implicit declarations in the AST (in terms of
the partial class template specialization), wh
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+// Build the type for a deduction guide generated from an inherited constructor
+// [over.match.class.deduct]p1.10:
+// ... the
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef,
Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate));
};
+ TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate;
+
SmallVector IsDeducibleTypeTraitArgs = {
@@ -1388,6 +1695,33 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl
*Template,
if (!AddedAny)
Transform.buildSimpleDeductionGuide(std::nullopt);
+ // FIXME: Handle explicit deduction guides from inherited constructors
+ // when the base deduction guides are
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+// Build the type for a deduction guide generated from an inherited constructor
+// [over.match.class.deduct]p1.10:
+// ... the
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+// Build the type for a deduction guide generated from an inherited constructor
+// [over.match.class.deduct]p1.10:
+// ... the
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+// Build the type for a deduction guide generated from an inherited constructor
+// [over.match.class.deduct]p1.10:
+// ... the
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1388,6 +1695,33 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl
*Template,
if (!AddedAny)
Transform.buildSimpleDeductionGuide(std::nullopt);
+ // FIXME: Handle explicit deduction guides from inherited constructors
hokein wrote:
I think i
Author: Haojian Wu
Date: 2022-01-18T10:22:26+01:00
New Revision: fd598e185972f76a50c45e1402ab3b0fd70664b9
URL:
https://github.com/llvm/llvm-project/commit/fd598e185972f76a50c45e1402ab3b0fd70664b9
DIFF:
https://github.com/llvm/llvm-project/commit/fd598e185972f76a50c45e1402ab3b0fd70664b9.diff
LO
Author: Haojian Wu
Date: 2022-01-19T14:18:38+01:00
New Revision: 6c78703e3abcd9c76aefbf066869fe6a32d59516
URL:
https://github.com/llvm/llvm-project/commit/6c78703e3abcd9c76aefbf066869fe6a32d59516
DIFF:
https://github.com/llvm/llvm-project/commit/6c78703e3abcd9c76aefbf066869fe6a32d59516.diff
LO
Author: Haojian Wu
Date: 2022-01-19T16:06:58+01:00
New Revision: 55b702c37b7e8b5fde04b6a60b5bb12806bdb697
URL:
https://github.com/llvm/llvm-project/commit/55b702c37b7e8b5fde04b6a60b5bb12806bdb697
DIFF:
https://github.com/llvm/llvm-project/commit/55b702c37b7e8b5fde04b6a60b5bb12806bdb697.diff
LO
Author: Haojian Wu
Date: 2022-01-27T21:21:40+01:00
New Revision: 4cb1686bfe8ef847b583922bb5650c33453ad096
URL:
https://github.com/llvm/llvm-project/commit/4cb1686bfe8ef847b583922bb5650c33453ad096
DIFF:
https://github.com/llvm/llvm-project/commit/4cb1686bfe8ef847b583922bb5650c33453ad096.diff
LO
Author: Haojian Wu
Date: 2022-01-27T21:22:03+01:00
New Revision: 0cf75aac42eb6bd800405d152dfe7414a9ab6d99
URL:
https://github.com/llvm/llvm-project/commit/0cf75aac42eb6bd800405d152dfe7414a9ab6d99
DIFF:
https://github.com/llvm/llvm-project/commit/0cf75aac42eb6bd800405d152dfe7414a9ab6d99.diff
LO
2401 - 2500 of 3165 matches
Mail list logo