[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Matheus Izvekov via 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 {{.*}}

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Haojian Wu via 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 {{.*}}

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Matheus Izvekov via 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 {{.*}}

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Haojian Wu via 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 {{.*}}

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Krystian Stasiowski via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Krystian Stasiowski via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Krystian Stasiowski via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Matheus Izvekov via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Matheus Izvekov via 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 {{.*}}

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Matheus Izvekov via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Erich Keane via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Haojian Wu via cfe-commits
@@ -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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Haojian Wu via 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 hokein wrote: It is not possible to use the

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-03 Thread Haojian Wu via 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/2] Refactor: Extract the core deduction-guide construction

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Shafik Yaghmour via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Shafik Yaghmour via cfe-commits
@@ -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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Haojian Wu via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Krystian Stasiowski via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Erich Keane via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Erich Keane via 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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Erich Keane via 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 erichkeane wrote: Could these be

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread via cfe-commits
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 --

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Haojian Wu via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread via cfe-commits
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

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-02 Thread Haojian Wu via cfe-commits
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