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 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
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://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
@@ -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
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
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
@@ -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 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
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]
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 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 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
@@ -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
___
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
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
@@ -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
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType =
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType =
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
@@ -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
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
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
@@ -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/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://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 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
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
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
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
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema ,
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]) are
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.
>
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
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
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema ,
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]) are
@@ -6116,6 +6116,17 @@ static bool EvaluateBinaryTypeTrait(Sema ,
TypeTrait BTT, const TypeSourceI
tok::kw___is_pointer_interconvertible_base_of);
return Self.IsPointerInterconvertibleBaseOf(Lhs, Rhs);
+ }
+ case BTT_IsDeducible: {
+if
@@ -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.
@@ -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
@@ -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]}} \
+
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
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
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 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
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
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
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 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
@@ -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).
@@ -106,9 +106,15 @@ void ConceptReference::print(llvm::raw_ostream ,
ConceptName.printName(OS, Policy);
if (hasExplicitTemplateArgs()) {
OS << "<";
+bool First = true;
// FIXME: Find corresponding parameter for argument
-for (auto :
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
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
@@ -2583,11 +2580,27 @@ struct ConvertConstructorToDeductionGuideTransform {
//-- The types of the function parameters are those of the constructor.
for (auto *OldParam : TL.getParams()) {
- ParmVarDecl *NewParam =
-
@@ -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 *]}}
//
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
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://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
@@ -3307,6 +3341,58 @@
Sema::DeduceTemplateArguments(VarTemplatePartialSpecializationDecl *Partial,
return ::DeduceTemplateArguments(*this, Partial, TemplateArgs, Info);
}
+TemplateDeductionResult
+Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType,
@@ -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]}} \
+
@@ -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.
@@ -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
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 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
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 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
@@ -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 {{.*}}
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
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
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema ,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given underlying
@@ -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 {{.*}}
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
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 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
@@ -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 updated
https://github.com/llvm/llvm-project/pull/90948
>From 2f29011bae5bf1b285c2ab1700c887d74eaec4b0 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 10:06:39 +0200
Subject: [PATCH 1/2] [clang] Don't preserve the typo expr in the recovery expr
for
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema ,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given underlying
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -verify -ast-dump -ast-dump-decl-types
-ast-dump-filter "deduction guide" %s | FileCheck %s --strict-whitespace
+// RUN: %clang_cc1 -std=c++2a -verify -ast-dump -ast-dump-decl-types
-Wno-c++11-narrowing -ast-dump-filter "deduction
@@ -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
hokein wrote:
It is not possible to use the
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema ,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given underlying
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema ,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given underlying
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/2] Refactor: Extract the core deduction-guide construction
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90948
With the commit d5308949cf884d8e4b971d51a8b4f73584c4adec, we now preserve the
initializer for invalid decls with the recovery-expr.
However there is a chance that the original init expr is a typo-expr, we should
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema ,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given underlying
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90894
>From 67b790e8a0e3f86155c2569373ced29ddd61c16b Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 2 May 2024 21:06:15 +0200
Subject: [PATCH 1/2] [clang] CTAD: fix the aggregate deduction guide for alias
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90894
For alias templates, our current way of constructing their aggregate deduction
guides deviates from the standard approach. We should align it with how we
handle implicit deduction guides.
This patch has a
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/90466
___
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/90466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -107,3 +107,17 @@ auto FooFunc(C auto V) -> C decltype(auto) {
}
}
+
+namespace dump_unreslove_lookup_arguments {
hokein wrote:
ah, good catch. I moved to a generic place, ast-dump-templates.cpp.
https://github.com/llvm/llvm-project/pull/90466
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90466
>From b584fab7f2283535d4a04bc55efec6ff508870de Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 29 Apr 2024 15:04:01 +0200
Subject: [PATCH 1/2] [AST] Dump explicit template arguments for
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90466
>From b584fab7f2283535d4a04bc55efec6ff508870de Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 29 Apr 2024 15:04:01 +0200
Subject: [PATCH 1/2] [AST] Dump explicit template arguments for
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90466
Having them dump is useful for ad-hoc debugging (context:
https://github.com/llvm/llvm-project/issues/90046)
>From b584fab7f2283535d4a04bc55efec6ff508870de Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon,
hokein wrote:
Friendly ping.
https://github.com/llvm/llvm-project/pull/82776
___
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/82776
>From 3ab1a074592f85715c061007c56c69c24794a556 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 Feb 2024 10:03:16 +0100
Subject: [PATCH 1/2] [clang] Add __builtin_start_object_lifetime builtin.
This patch
hokein wrote:
> @hokein Independently of the direction taken I'd like to see a better
> diagnostic than "atomic constraint using an undocumented/cryptic trait that
> is not in the code is not satisfied".
> So when we try to print atomic constraints, we should do something more user
>
hokein wrote:
Friendly ping, it is ready for the second round of 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
hokein wrote:
It appears that the consensus is to avoid exposing the internal
`__is_deducible` type trait to end-users, as there are no compelling use cases
and it's not expected to be used in libc++. This also aligns with the approach
taken by GCC.
Regarding implementation, the current
hokein wrote:
> > Ah, I see. I haven't tried that, but one downside I can see is that it will
> > make diagnostics for CTAD worse, we need to spell the type trait name in
> > error messages when the __is_deducible trait fails.
>
> I think we should have a custom diag for that anyway "is not
hokein wrote:
> > OK, I have hidden the `__is_deducible` trait as suggested. Please take
> > another look.
>
> Sorry, I think my suggestion was not clear enough. did you try to put
> `TYPE_TRAIT_2(/**/, IsDeducible, KEYCXX)` in `TokenKinds.def` (and then other
> headers should _NOT_ be
hokein wrote:
OK, I have hidden the `__is_deducible` trait as suggested. Please take another
look.
https://github.com/llvm/llvm-project/pull/89358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
1 - 100 of 2240 matches
Mail list logo