[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 327300. ychen added a comment. - Revert to use std::function since MCContext needs to own the handler callback - Fix a typo in BackendConsumer::SrcMgrDiagHandler: DI.getKind() -> DI.getSeverity() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97449#2595415 , @MaskRay wrote: > LG. Can you attach an example triggering clang `InlineAsmDiagHandler2`? I > want to check what the diagnostics look like before and now. `clang/test/CodeGen/asm-errors.c` should trigger it. R

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 327304. ychen added a comment. - Remove dead code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97449/new/ https://reviews.llvm.org/D97449 Files: clang/include/clang/Basic/DiagnosticCategories.td clang/inclu

[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5de2d189e6ad: [Diagnose] Unify MCContext and LLVMContext diagnosing (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D97816: [clang] Note that -debug-pass only works with legacy PM when using new PM

2021-03-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Sorry, I forgot that codegen is still legacy PM, so `-debug-pass=Structure` does give the correct output. Then users need to specify both -debug-pass-manager and `-debug-pass=x` to get the pass information. Hmm, not a big deal but seems hassles. Maybe we should bridge `-

[PATCH] D97831: [Clang][Sema] Implement GCC -Wcast-function-type

2021-03-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: aaron.ballman, rsmith. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Warn when a function pointer is cast to an incompatible function pointer. In a cast involving function type

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: rjmccall, lxfind, GorNishanov. Herald added a subscriber: hiraditya. ychen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. by over-allocating and emitting `alignTo` code

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 328036. ychen added a comment. Herald added a subscriber: jdoerfert. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files: clang/lib/CodeGen/CGBuiltin.cpp c

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. I didn't add any new tests. Instead, added checks for the new code sequence: 1. check that `llvm.assume` is there to make sure the adjusted address is correctly aligned. 2. check that `llvm.coro.align` and the associated instructions are there to over-allocate heap memory

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 328232. ychen edited the summary of this revision. ychen added a comment. - Add docs for `coro.align` - clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915 Files

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2603912 , @lxfind wrote: > Could you describe in more detail what problem this patch solves? Yes, updated description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/ne

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:4450 +Value *Extra = Builder.CreateSelect(Cmp, Diff, Zero); +return RValue::get(Builder.CreateAdd(SizeCall, Extra)); } rjmccall wrote: > Okay, so you're implicitly increasing the

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:4450 +Value *Extra = Builder.CreateSelect(Cmp, Diff, Zero); +return RValue::get(Builder.CreateAdd(SizeCall, Extra)); } ychen wrote: > rjmccall wrote: > > Okay, so you're implicitl

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:4450 +Value *Extra = Builder.CreateSelect(Cmp, Diff, Zero); +return RValue::get(Builder.CreateAdd(SizeCall, Extra)); } rjmccall wrote: > ychen wrote: > > ychen wrote: > > > rjmcca

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-05 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2605398 , @ChuanqiXu wrote: > I am a little confusing about the problem. The example in the link tells the > align of the `promise` instead of the `frame`. The address of `promise` and > `frame` is not same. It looks like

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-05 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2607338 , @rjmccall wrote: > Let's try to avoid adding a new builtin for what we acknowledge is a > workaround. Builtins become part of the language supported by the compiler, > so we shouldn't add them casually. If we'

[PATCH] D98110: [NFC][clangd] Use table to collect option aliases

2021-03-06 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. ychen requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. - Suppress a lot of `-Wtautological-compar

[PATCH] D97831: [Clang][Sema] Implement GCC -Wcast-function-type

2021-03-08 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/D97831/new/ https://reviews.llvm.org/D97831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D113245: [Sema] Mark explicit specialization declaration in a friend invalid

2021-11-22 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/D113245/new/ https://reviews.llvm.org/D113245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D114728: [Coroutine] Remove the prologue data of `-fsanitize=function` for split functions

2021-11-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: pcc, rjmccall. Herald added subscribers: ChuanqiXu, lxfind, hiraditya. ychen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. There are no proper RTTI for these split func

[PATCH] D114728: [Coroutine] Remove the prologue data of `-fsanitize=function` for split functions

2021-11-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D114728#3159303 , @rjmccall wrote: > I agree that coroutine resumption functions have a different formal type from > the ramp function and so would need different treatment from > `-fsanitize=functions` if it wants to sanitize

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 468602. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/DeclTemplate.h

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3864612 , @mizvekov wrote: > Is the pre-commit CI failure here related to the patch? Seems not. It should've been fixed by 606245ad542491400a5475c796df86a99f5c8c12

[PATCH] D136133: [Clang] update cxx_dr_status.html by running make_cxx_dr_status

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/test/CXX/drs/dr25xx.cpp:3 -namespace dr2565 { // dr252: 16 +namespace dr2565 { // dr2565: partial template erichkeane wrote: > If you could add a comment explaining this status for me, I would be grateful: > >

[PATCH] D136120: [Clang] follow-up D128745, remove ClangABICompat checks

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 468630. ychen added a comment. - update Release notes - remove obsolete CodeGen tests which was used to test ClangABICompat checks, similar Sema tests are already in place. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D136133: [Clang] update cxx_dr_status.html by running make_cxx_dr_status

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 468631. ychen added a comment. - DR2565 is fully implemented. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136133/new/ https://reviews.llvm.org/D136133 Files: clang/test/CXX/drs/dr25xx.cpp clang/test/CXX/dr

[PATCH] D136133: [Clang] update cxx_dr_status.html by running make_cxx_dr_status

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6bca52be0349: [Clang] update cxx_dr_status.html by running make_cxx_dr_status (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. @mizvekov Thanks for the review and provided valuable feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 ___ cfe-commits mailing l

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG340eac01f7da: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained… (authored by ychen). Repository: rG LLVM Github Monorepo

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-10-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp:106 template - constexpr int goo(const int b) requires AtLeast2 { + constexpr int goo(const int b) requires AtLeast2 { // expected-note {{candidate function}} return 2; --

[PATCH] D136545: [Clang] use non-template function declaration for constraints partial ordering

2022-10-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: erichkeane, royjacobson, mizvekov. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per wordings in - https://eel.is/c++draft/over.match#best.general-2.6

[PATCH] D136545: [Clang] use non-template function declaration for constraints partial ordering

2022-10-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/test/CXX/over/over.match/over.match.best/p2.cpp:10 }; - bool k1 = A() < A(); // not ordered by constraints: prefer non-rewritten form - bool k2 = A() < A(); // prefer more-constrained 'operator<=>' Remove this

[PATCH] D136545: [Clang] use non-template function declaration for constraints partial ordering

2022-10-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 469963. ychen added a comment. - add a release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136545/new/ https://reviews.llvm.org/D136545 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaOverload.

[PATCH] D136533: Fix missing diagnostic of declaration use when accessing TypeDecls through typename access

2022-10-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Looks straightforward to me with one suggestion. Is the CI fail related? Comment at: clang/include/clang/Sema/Sema.h:2569 + enum class TypeAccessKind { Explicit, Implicit, Typename }; + QualType getTypeDeclType(DeclContext *LookupCtx, TypeAccessKind

[PATCH] D136120: [Clang] follow-up D128745, remove ClangABICompat checks

2022-10-24 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/D136120/new/ https://reviews.llvm.org/D136120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access

2022-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/include/clang/Sema/Sema.h:2569 + enum class TypeAccessKind { Explicit, Implicit, Typename }; + QualType getTypeDeclType(DeclContext *LookupCtx, TypeAccessKind AK, mizvekov wrote: > ychen wrote: > > I find it hard

[PATCH] D136545: [Clang] use non-template function declaration for constraints partial ordering

2022-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 470374. ychen marked an inline comment as done. ychen added a comment. - do the same when 1. taking the address of a non-template function 2. computing SMF eligibility. - restore removed test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D136545: [Clang] use non-template function declaration for constraints partial ordering

2022-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D136545#3877899 , @royjacobson wrote: > LGTM, thanks for picking it up! I wonder how much effect this has on > compilation times given that `SubsumptionCache` caches subsumption by the > `Decl *` pair... It seems neutral htt

[PATCH] D136545: [Clang] use non-instantiated function declaration for constraints partial ordering

2022-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/test/CXX/over/over.match/over.match.best/p2.cpp:10 }; - bool k1 = A() < A(); // not ordered by constraints: prefer non-rewritten form - bool k2 = A() < A(); // prefer more-constrained 'operator<=>' erichkeane w

[PATCH] D136545: [Clang] use non-instantiated function declaration for constraints partial ordering

2022-10-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 470546. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136545/new/ https://reviews.llvm.org/D136545 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaConcept.cpp clang/li

[PATCH] D136744: [Clang] perform "maximum TLS alignment" check for template instantiation

2022-10-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: probinson, mizvekov. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. follow up d30e2eefc3cf8dfd2210aefd62f13a6e7c011b43 Repository: rG LLVM Github Mo

[PATCH] D136744: [Clang] perform "maximum TLS alignment" check for template instantiation

2022-10-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 470858. ychen added a comment. Herald added a reviewer: aaron.ballman. - remove unnecessary check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136744/new/ https://reviews.llvm.org/D136744 Files: clang/include

[PATCH] D136744: [Clang] perform "maximum TLS alignment" check for template instantiation

2022-10-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14038-14039 + + if (!Context.getTargetInfo().isTLSSupported()) +return; + mizvekov wrote: > Is this needed? It seems `getMaxTLSAlign()` will return 0 in that case anyway. It is checked in t

[PATCH] D136744: [Clang] perform "maximum TLS alignment" check for template instantiation

2022-10-30 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5d086cce8b92: [Clang] perform "maximum TLS alignment" check for template instantiation (authored by ychen). Repository: rG LLVM Github Monorepo C

[PATCH] D136545: [Clang] use non-instantiated function declaration for constraints partial ordering

2022-10-30 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe18c2c5548f6: [Clang] use non-instantiated function declaration for constraints partial… (authored by ychen). Changed prior to commit: https://reviews.llvm.org/D136545?vs=470546&id=471902#toc Repositor

[PATCH] D136975: [Concepts] Correctly handle failure when checking concepts recursively

2022-11-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Thanks for the patch. It looks good to me. About > Note that we DO need to be careful to make sure we still check > constraints properly that are caused by a previous constraint, but not > derived from (such as when a check causes us to check special member > function gene

[PATCH] D136975: [Concepts] Correctly handle failure when checking concepts recursively

2022-11-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D136975#3899717 , @erichkeane wrote: > In D136975#3899703 , @ychen wrote: > >> Thanks for the patch. It looks good to me. >> >> About >> >>> Note that we DO need to be careful to make su

[PATCH] D136975: [Concepts] Correctly handle failure when checking concepts recursively

2022-11-01 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision as: ychen. ychen added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136975/new/ https://reviews.llvm.org/D136975 ___ cfe-commits mailing list cfe-c

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452311. ychen added a comment. - Remove code for temp.func.order p6.2.1 - Add missing handling for partial ordering of partial specialization - Add more tests - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3680607 , @royjacobson wrote: > In D128750#3663161 , @ychen wrote: > >> In D128750#3662898 , @royjacobson >> wrote: >> >>> but in your

[PATCH] D131820: [PS4][driver] make -fjmc work with LTO driver linking stage

2022-08-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added a reviewer: probinson. Herald added a subscriber: inglorion. Herald added a project: All. ychen requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452561. ychen marked 3 inline comments as done. ychen added a comment. - address Roy's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 Files: clang/docs/Rel

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5183 if (!Better1 && !Better2) // Neither is better than the other -return JudgeByConstraints(); +return nullptr; + royjacobson wrote: > Previously we continued to check

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3721441 , @royjacobson wrote: > Some documentation/test nits, and one question, but otherwise LGTM. > Could you fix the merge conflict? It would be nice to see pre-commit CI > results. > > Given the complexity of the te

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452564. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128745/new/ https://reviews.llvm.org/D128745 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6afcc4a459ea: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering… (authored by ychen). Repository: rG LLVM Github Monor

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 452579. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/DeclTemplate.h

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-15 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/D127233/new/ https://reviews.llvm.org/D127233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:544 } + llvm::stable_sort(GlobalCtors, [](const Structor &L, const Structor &R) { +return L.LexOrder < R.LexOrder; rnk wrote: > Please move this sorting into EmitCtorList and app

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:580 +I = DelayedCXXInitPosition.find(D); +unsigned LexOrder = I == DelayedCXXInitPosition.end() ? ~0U : I->second; +AddGlobalCtor(Fn, 65535, LexOrder, COMDATKey); efriedma wrote:

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 453094. ychen added a comment. - use correct lexing order for non-deferred constructors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files: clang/lib/CodeGen/CGDe

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 453095. ychen added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:580 +I = DelayedCXXInitPosition.find(D); +unsigned LexOrder = I == DelayedCXXInitPosition.end() ? ~0U : I->second; +AddGlobalCtor(Fn, 65535, LexOrder, COMDATKey); efriedma wrote:

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3727697 , @abrachet wrote: > This is breaking us. > > template struct S; // #1 > > template struct S {}; // #2 > > The following compiled before but is now broken, (we use > `-fclang-abi-compat=13.0`). We get a

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3727715 , @ychen wrote: > In D128745#3727697 , @abrachet > wrote: > >> This is breaking us. >> >> template struct S; // #1 >> >> template struct S {}; // #2 >> >> The fo

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3727770 , @abrachet wrote: > In D128745#3727715 , @ychen wrote: > >> In D128745#3727697 , @abrachet >> wrote: >> >>> This is breaking us

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. > Since the coroutines are going to split into pieces in the middle end so the > address of labels are ambiguous that time. Do we split in the middle or copy the whole computed goto CFG? I'd imagine the branch on a dynamic block address is like `n`-way branch which is not

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3728087 , @michele.scandale wrote: > I can see failures related to this change in a downstream version of clang > where the default `ClangABICompat` value is not `Latest` (after the followup > https://reviews.llvm.org/

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3728196 , @royjacobson wrote: > Stopping by - I assume this targets Clang 16 now, so the abi compat level > should be adjusted to 15. Sure, I'll make a new patch for that. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexing order before emission

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 453373. ychen added a comment. - add more explanation as comments - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files: clang/lib/CodeGen/CGDeclCXX.cpp cl

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexing order before emission

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:580 +I = DelayedCXXInitPosition.find(D); +unsigned LexOrder = I == DelayedCXXInitPosition.end() ? ~0U : I->second; +AddGlobalCtor(Fn, 65535, LexOrder, COMDATKey); efriedma wrote:

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexing order before emission

2022-08-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 453403. ychen added a comment. - add more test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGe

[PATCH] D132414: [Clang] follow-up D128745, use ClangABICompat15 instead of ClangABICompat14 Since the patch missed release 15.x and will be included in release 16.x.

2022-08-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: aaron.ballman, royjacobson. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Also, simplify related tests. Repository: rG LLVM Github Monorepo https:

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. I'll land this tomorrow if no objections. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/ https://reviews.llvm.org/D128750 ___ cfe-commits mailing list cfe-commit

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexing order before emission

2022-08-22 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf9969a3d28e7: [CodeGen] Sort llvm.global_ctors by lexing order before emission (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/

[PATCH] D132414: [Clang] follow-up D128745, use ClangABICompat15 instead of ClangABICompat14

2022-08-23 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG088ba8efeb49: [Clang] follow-up D128745, use ClangABICompat15 instead of ClangABICompat14 (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D127259: [CodeGen] guarantee templated static variables are initialized in the reverse instantiation order

2022-08-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen planned changes to this revision. ychen added a comment. I'll do a compile-time impact measurement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127259/new/ https://reviews.llvm.org/D127259 ___ cf

[PATCH] D132592: Clang] Implement function attribute nouwtable

2022-08-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: aaron.ballman, rnk, rsmith. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. To have finer control of IR uwtable attribute generation. For target code ge

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 455395. ychen added a comment. Herald added a subscriber: jdoerfert. - update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132592/new/ https://reviews.llvm.org/D132592 Files: clang/include/clang/Basic/At

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen planned changes to this revision. ychen added a comment. In D128750#3741043 , @ychen wrote: > I'll land this tomorrow if no objections. Thanks. Sorry. Before submitting, I found an unhandled case involving the constrained placeholder type. Will up

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Thanks for taking a look! In D132592#3749261 , @aaron.ballman wrote: > Do we have any evidence that users need this level of control or will > understand how to properly use the attribute? The command line option makes > sense t

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3751471 , @joanahalili wrote: > We have some compilation failures on our end because of function template > parameter deduction when passing the function template to a function pointer. > > typedef void (*f)(const int

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3752148 , @ychen wrote: > In D128745#3751471 , @joanahalili > wrote: > >> We have some compilation failures on our end because of function template >> parameter deduction when p

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-08-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128745#3752593 , @ychen wrote: > In D128745#3752148 , @ychen wrote: > >> In D128745#3751471 , @joanahalili >> wrote: >> >>> We have some compil

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 456069. ychen added a comment. - change from `FunctionLike` to `Function` - add a Sema test - update doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132592/new/ https://reviews.llvm.org/D132592 Files: clang/

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-26 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D132592#3751561 , @aaron.ballman wrote: > In D132592#3749567 , @ychen wrote: > >> Thanks for taking a look! >> >> In D132592#3749261 , >> @aaro

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision. ychen added a comment. This revision is now accepted and ready to land. LGTM. Give it a few days in case @rjmccall have comments. Comment at: clang/test/SemaCXX/coroutine-alloc-4.cpp:49 +void return_value(int) {} +void *operator new(std::si

[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 clang/tes

[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 Te

[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 Te

[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 parame

[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 = T1->castAs();

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D133052#3792121 , @ilya-biryukov wrote: > It seems wrong to change semantics of initialization when instantiating > concept requirements. It implies that semantic checking may behave > differently inside requires expressions,

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-09-22 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. In the same spirit of da6187f566b7881cb

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-09-22 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Address comments in https://reviews.llvm.org/D128745/new/#3809692. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134507/new/ https://reviews.llvm.org/D134507 ___ cfe-commits mailin

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. The patch looks good. Two high-level questions: - Does the similar thing happen for class templates? Like a constraint expr of a partial specialization has an error. Maybe we don't assert in this case? - I suppose the constraint error does not always affect the overload re

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D134542#3812292 , @erichkeane wrote: > In D134542#3812211 , @ychen wrote: > >> The patch looks good. Two high-level questions: >> >> - Does the similar thing happen for class templates?

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision as: ychen. ychen added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134542/new/ https://reviews.llvm.org/D134542 ___ cfe-commits mailing list cfe-

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D134507#3811488 , @probinson wrote: > Would this be clearer if the BEFORE-15/AFTER-15 test cases used the same > template construct? Currently they are different so it's hard to work out > the effect of the change. In particu

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2022-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen abandoned this revision. ychen added a comment. Herald added a project: All. 327141f is landed as an alternative. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/

<    1   2   3   4   5   6   7   >