[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1fb728e95c74: [c++] implements tentative DR1432 for partial ordering of function template (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D133683#3819003 , @mizvekov wrote: > In D133683#3818935 , @ychen wrote: > >> This is described in https://eel.is/c++draft/temp.deduct.partial#13. >> Parietal ordering currently doesn't

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133683#3818935 , @ychen wrote: > This is described in https://eel.is/c++draft/temp.deduct.partial#13. Parietal > ordering currently doesn't consider the number of deduced arguments. During > the partial ordering stage, by

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D133683#3818887 , @mizvekov wrote: > In D133683#3818858 , @ychen wrote: > >> It is clear cut by https://eel.is/c++draft/temp.deduct.partial#3.1. It is >> orthogonal to the DRs

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133683#3818858 , @ychen wrote: > It is clear cut by https://eel.is/c++draft/temp.deduct.partial#3.1. It is > orthogonal to the DRs implemented in D128745 > and here. >

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 463309. ychen added a comment. - Update release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133683/new/ https://reviews.llvm.org/D133683 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D133683#3818804 , @mizvekov wrote: > In D133683#3818752 , @ychen wrote: > >> I didn't add that because this patch is logically part of D128745 >>

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D133683#3818752 , @ychen wrote: > I didn't add that because this patch is logically part of D128745 > which has a release note already. Okay, I see that the existing release note entry

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D133683#3817523 , @mizvekov wrote: > - Missing release notes. I didn't add that because this patch is logically part of D128745 which has a release note already. > - FWIW GCC treats the

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 463283. ychen added a comment. - add test for the conditioning on `ClangABICompat15`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133683/new/ https://reviews.llvm.org/D133683 Files:

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. Just fix @mizvekov 's nits (the fixme, release notes, and ABI test), and LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133683/new/ https://reviews.llvm.org/D133683

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov accepted this revision. mizvekov added a comment. This revision is now accepted and ready to land. Looks good, aside some points: - Please add test for the conditioning on `ClangABICompat15`. - Missing release notes. - FWIW GCC treats the `g(42)` case as not ambiguous, as I expected, so

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. ping ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133683/new/ https://reviews.llvm.org/D133683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 463019. ychen added a comment. - update comments suggested by @mizvekov Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133683/new/ https://reviews.llvm.org/D133683 Files:

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a subscriber: hubert.reinterpretcast. ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5455-5456 if (!ClangABICompat15) { - // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 =

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5179-5231 if (!Better1 && !Better2) // Neither is better than the other return JudgeByConstraints(); // C++ [temp.deduct.partial]p11: // ... and if G has a trailing function

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5179-5231 if (!Better1 && !Better2) // Neither is better than the other return JudgeByConstraints(); // C++ [temp.deduct.partial]p11: // ... and if G has a trailing function

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5455-5456 if (!ClangABICompat15) { - // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 = T1->castAs(); auto *TST2 = T2->castAs(); +

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5455-5456 if (!ClangABICompat15) { - // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 = T1->castAs(); auto *TST2 = T2->castAs(); + const

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5179-5231 if (!Better1 && !Better2) // Neither is better than the other return JudgeByConstraints(); // C++ [temp.deduct.partial]p11: // ... and if G has a trailing function

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5455-5456 if (!ClangABICompat15) { - // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 = T1->castAs(); auto *TST2 = T2->castAs(); +

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5455-5456 if (!ClangABICompat15) { - // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 = T1->castAs(); auto *TST2 = T2->castAs(); + const

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 461051. ychen added a comment. - address comments - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133683/new/ https://reviews.llvm.org/D133683 Files: clang/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-13 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. @mizvekov Thanks for taking a look. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5195-5196 +for (int i = 0, e = std::min(NumParams1, NumParams2); i < e; ++i) { + QualType T1 = FD1->getParamDecl(i)->getType().getDesugaredType(Context); +

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5195-5196 +for (int i = 0, e = std::min(NumParams1, NumParams2); i < e; ++i) { + QualType T1 = FD1->getParamDecl(i)->getType().getDesugaredType(Context); + QualType T2 =

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-09-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: aaron.ballman, erichkeane. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. D128745 handled DR1432 for the partial