[PATCH] D149612: [Sema] avoid merge error type

2023-05-15 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. Maybe return `QualType()` as a temporary solution to avoid crash? @erichkeane Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/ https://reviews.llvm.org/D149612 ___ c

[PATCH] D148372: [clang] add diagnose when member function contains invalid default argument

2023-04-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 514447. HerrCai0907 added a comment. better fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148372/new/ https://reviews.llvm.org/D148372 Files: clang/docs/ReleaseNotes.rst clang/lib/Parse/ParseDecl.c

[PATCH] D148372: [clang] add diagnose when member function contains invalid default argument

2023-04-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 marked an inline comment as done. HerrCai0907 added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:7385 if (!ConsumeAndStoreInitializer(*DefArgToks, CIK_DefaultArgument)) { DefArgToks.reset(); +Diag(ArgStartLoc, diag::er

[PATCH] D148914: [Sema][NFC] add check before using `BuildExpressionFromIntegralTemplateArgument`

2023-04-21 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch wants to avoid Sema crash for inline friend decl like template int foo(F1 X); template struct A {

[PATCH] D148372: [clang] add diagnose when member function contains invalid default argument

2023-04-22 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148372/new/ https://reviews.llvm.org/D148372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-22 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added reviewers: aaron.ballman, erichkeane, shafik. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch wants to fix inline friend decl like t

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-23 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 516151. HerrCai0907 added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149009/new/ https://reviews.llvm.org/D149009 Files: clang/lib/Sema/SemaTemplateDeduction.cpp clang/test/SemaTem

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-23 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 516152. HerrCai0907 added a comment. fix assert failed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149009/new/ https://reviews.llvm.org/D149009 Files: clang/lib/Sema/SemaTemplateDeduction.cpp clang/l

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-24 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3598 + FD->isDefined(FDFriend, true) && + FDFriend->getFriendObjectKind() != Decl::FriendObjectKind::FOK_None) { +// if Function defined by inline friend, use inline fried as Dec

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-24 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 516615. HerrCai0907 added a comment. add comment and more test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149009/new/ https://reviews.llvm.org/D149009 Files: clang/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D148372: [clang] add diagnose when member function contains invalid default argument

2023-04-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. > Are there any calls to Sema::ActOnParamDefaultArgumentError left? Yes, it has. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148372/new/ https://reviews.llvm.org/D148372 _

[PATCH] D148372: [clang] add diagnose when member function contains invalid default argument

2023-04-25 Thread Congcong Cai 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 rGe12753ed: [clang] add diagnose when member function contains invalid default argument (authored by HerrCai0907). Repository: rG LLVM Github Mo

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3598 + FD->isDefined(FDFriend, true) && + FDFriend->getFriendObjectKind() != Decl::FriendObjectKind::FOK_None) { +// if Function defined by inline friend, use inline fried as Dec

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 517019. HerrCai0907 added a comment. change LexicalDeclContext Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149009/new/ https://reviews.llvm.org/D149009 Files: clang/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-26 Thread Congcong Cai 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 rG921b45a855f0: [Sema]Select correct lexical context during template instantiate (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHA

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-04-29 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixed: https://github.com/llvm/llvm-project/issues/62408 `setInvalidDecl` for invalid `CXXDeductionGuideDecl` to avo

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-04-29 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 518155. HerrCai0907 added a comment. add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149516/new/ https://reviews.llvm.org/D149516 Files: clang/docs/ReleaseNotes.rst clang/include/clang/S

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-04-30 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 518403. HerrCai0907 marked an inline comment as done. HerrCai0907 added a comment. refactor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149516/new/ https://reviews.llvm.org/D149516 Files: clang/docs/Re

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-04-30 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 marked 2 inline comments as done. HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11196 if (D.isFunctionDefinition()) Diag(D.getIdentifierLoc(), diag::err_deduction_guide_defines_function); + return IsValid; rsmi

[PATCH] D149612: [Sema] avoid merge error type

2023-05-01 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added reviewers: aaron.ballman, rjmccall, shafik. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. fixed: https://github.com/llvm/llvm-project/issues/624

[PATCH] D149613: [NFC] fix clang-tidy `prefer-isa-or-dyn-cast-in-conditionals` and `namespace-comment`

2023-05-01 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. Herald added a subscriber: carlosgalvezp. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D149613 F

[PATCH] D149612: [Sema] avoid merge error type

2023-05-02 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. in SemaType.cpp#BuildArrayType, It will generate `DependentSizedArrayType` which cannot be merged. So we can either add additional check in `MergeVarDeclTypes` or directly ignore to generate this type in `BuildArrayType`. Which one is better? } else if (ArraySize

[PATCH] D149612: [Sema] avoid merge error type

2023-05-02 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 518915. HerrCai0907 added a comment. fix in `Sema::BuildArrayType` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/ https://reviews.llvm.org/D149612 Files: clang/docs/ReleaseNotes.rst clang/li

<    1   2