@@ -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 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 {{.*}}
@@ -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 {{.*}}
@@ -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/sdkrystian approved this pull request.
LGTM
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
@@ -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/sdkrystian edited
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/mizvekov approved this pull request.
This looks like a straightforward fix to me as well
LGTM
https://github.com/llvm/llvm-project/pull/90894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -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/mizvekov edited
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
@@ -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/erichkeane approved this pull request.
I think I'm ok with this, please give others a day or two to sign off as well.
https://github.com/llvm/llvm-project/pull/90894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -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
@@ -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
@@ -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
cor3ntin wrote:
> Also needs release note.
that's a clang 19 feature fix afaict, so nope
https://github.com/llvm/llvm-project/pull/90894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erichkeane wrote:
Also needs release note.
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
@@ -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
erichkeane wrote:
Could these be
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 2d4acb086541577ac6ab3a140b9ceb9659ce7094
67b790e8a0e3f86155c2569373ced29ddd61c16b --
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
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Haojian Wu (hokein)
Changes
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 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
33 matches
Mail list logo