[PATCH] D151515: [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization

2023-09-10 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 abandoned this revision. HerrCai0907 added a comment. https://github.com/llvm/llvm-project/pull/65918 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151515/new/ https://reviews.llvm.org/D151515

[PATCH] D151515: [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization

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

[PATCH] D158480: [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

2023-08-22 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 rG9b6859dc89b9: [clang-tidy][readability-braces-around-statements] ignore false-positive for… (authored by HerrCai0907). Repository: rG LLVM

[PATCH] D158480: [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

2023-08-22 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 552227. HerrCai0907 added a comment. update release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158480/new/ https://reviews.llvm.org/D158480 Files:

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-21 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 rG1c9412441b87: [clang-tidy]mark record initList as non-const param (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-21 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 552199. HerrCai0907 added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158152/new/ https://reviews.llvm.org/D158152 Files:

[PATCH] D158480: [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

2023-08-21 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Fixed:

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-19 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 551802. HerrCai0907 added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158152/new/ https://reviews.llvm.org/D158152 Files:

[PATCH] D158244: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-18 Thread Congcong Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9be33de4f397: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158244: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 551379. HerrCai0907 added a comment. update release-note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158244/new/ https://reviews.llvm.org/D158244 Files:

[PATCH] D158244: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added reviewers: njames93, PiotrZSL, aaron.ballman, Eugene.Zelenko. Herald added subscribers: carlosgalvezp, kbarton, xazax.hun, nemanjai. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project:

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 551344. HerrCai0907 added a comment. update release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158152/new/ https://reviews.llvm.org/D158152 Files:

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 551030. HerrCai0907 added a comment. add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158152/new/ https://reviews.llvm.org/D158152 Files:

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-17 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang-tools-extra.

[PATCH] D151515: [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization

2023-05-30 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4433 +// where H is the initializer list. +Sequence.AddQualificationConversionStep(cv1T1, VK_XValue); + } erichkeane wrote: > Is `VK_XValue` correct here? The

[PATCH] D151515: [CodeGen] add additional cast when checking call arguments

2023-05-27 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 526245. HerrCai0907 added a comment. add cast Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151515/new/ https://reviews.llvm.org/D151515 Files: clang/lib/Sema/SemaInit.cpp

[PATCH] D151515: [CodeGen] add additional cast when checking call arguments

2023-05-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added reviewers: shafik, erichkeane, aaron.ballman. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixed:

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-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 rG5df593a35471: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method (authored by HerrCai0907). Repository: rG LLVM Github

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 525754. HerrCai0907 added a comment. remove not related change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151365/new/ https://reviews.llvm.org/D151365 Files: clang/docs/ReleaseNotes.rst

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 525752. HerrCai0907 added a comment. avoid desurger Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151365/new/ https://reviews.llvm.org/D151365 Files: clang/docs/ReleaseNotes.rst

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:969 << (int)DFK.asComparison() -<< Context.getTagDeclType( - cast(FD->getLexicalDeclContext())); +<<

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 525718. HerrCai0907 added a comment. Herald added subscribers: pmatos, asb, aheejin, jgravelle-google, sbc100, dschuff. getLocallyUnqualifiedSingleStepDesugaredType to find the whole record name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-25 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 525452. HerrCai0907 added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151365/new/ https://reviews.llvm.org/D151365 Files: clang/docs/ReleaseNotes.rst

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-24 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 525333. HerrCai0907 added a comment. change solution Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151365/new/ https://reviews.llvm.org/D151365 Files: clang/docs/ReleaseNotes.rst

[PATCH] D151365: [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

2023-05-24 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. In D151365#4369605 , @erichkeane wrote: > As Richard says, we should just be taking the first parameter type and using > that instead (obviously de-qualified and removing reference if necessary). But we still can find the

[PATCH] D151365: [Sema] cast to CXXRecoradDecl correctly when diag a default comparison method

2023-05-24 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/62791 in c++20, default comparison is supported.

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

2023-05-23 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 rGca9683651e52: [Sema] `setInvalidDecl` for error deduction declaration (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES

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

2023-05-23 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 524849. HerrCai0907 added a comment. format 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

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

2023-05-23 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 524824. HerrCai0907 added a comment. add std option 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

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

2023-05-23 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 reopened this revision. HerrCai0907 added a comment. This revision is now accepted and ready to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149516/new/ https://reviews.llvm.org/D149516

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

2023-05-23 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 rGeb5902ffc971: [Sema] `setInvalidDecl` for error deduction declaration (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES

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

2023-05-23 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 524582. HerrCai0907 added a comment. update comment 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

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

2023-05-20 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 rGef107afd48a9: [Sema] avoid merge error type (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-05-20 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. @rsmith could you review it again? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149516/new/ https://reviews.llvm.org/D149516 ___ cfe-commits mailing list

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

2023-05-20 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 524001. HerrCai0907 added a comment. simplify test case 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

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

2023-05-19 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/D149516/new/ https://reviews.llvm.org/D149516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-05-19 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 523870. HerrCai0907 added a comment. revert untill first version 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

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

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

2023-05-15 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/D149516/new/ https://reviews.llvm.org/D149516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-05-09 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2583 +if (ArraySize->containsErrors()) { + RecoveryExpr *RE = RecoveryExpr::Create( + Context, ArraySize->getType(), ArraySize->getBeginLoc(), erichkeane wrote: >

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

2023-05-09 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 520808. HerrCai0907 added a comment. add more test cases 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

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

2023-05-09 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 520807. HerrCai0907 added a comment. add more test case 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

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

2023-05-08 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 520496. HerrCai0907 marked 2 inline comments as done. HerrCai0907 added a comment. use 1 replace 0 as length Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/ https://reviews.llvm.org/D149612

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

2023-05-08 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2583 +if (ArraySize->containsErrors()) { + RecoveryExpr *RE = RecoveryExpr::Create( + Context, ArraySize->getType(), ArraySize->getBeginLoc(), erichkeane wrote: >

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

2023-05-08 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/D149516/new/ https://reviews.llvm.org/D149516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-05-05 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. > So I'm still not sure this is the 'right' away about it. I think we should > instead properly handle the containsErrors case and just always create a > non-dependent sized array, except with the RecoveryExpr having the correct > type. You are right. Fix as your

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

2023-05-05 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 519972. HerrCai0907 added a comment. update 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/lib/Sema/SemaType.cpp

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

2023-05-05 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 519847. HerrCai0907 added a comment. return Diag 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

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2582 } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) { -T = Context.getDependentSizedArrayType(T, ArraySize, ASM, Quals, Brackets); +if (getLangOpts().CPlusPlus) { +

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 519675. HerrCai0907 added a comment. use nullpt as SizeExpr 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

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 519671. HerrCai0907 added a comment. getConstantArrayType instal QualType() 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

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. Dependent type for CPP is a common case due to template. But for `mergeTypes` in C, dependent type cannot be handled correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/

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

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

[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

[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

[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

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

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

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

[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

[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

[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

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

[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

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

[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

[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

[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

[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

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

[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

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

2023-04-14 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. > While this will fix the crash I am a little concerned that I don't a > diagnostic for each place we call ActOnParamDefaultArgumentError(...), there > is only once place where we diagnose this the rest don't. So I wonder if this > was purposeful or not. No,

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

2023-04-14 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added reviewers: aaron.ballman, cjdb. 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/62122 This

[PATCH] D147946: [clang-tidy] support nested inline namespace in c++20 for modernize-concat-nested-namespaces

2023-04-11 Thread Congcong Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG32aaacc609e7: [clang-tidy] support nested inline namespace in c++20 for modernize-concat… (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147946: [clang-tidy] support nested inline namespace in c++20 for modernize-concat-nested-namespaces

2023-04-11 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 512541. HerrCai0907 added a comment. update acc. comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147946/new/ https://reviews.llvm.org/D147946 Files:

[PATCH] D147946: [clang-tidy] support nested inline namespace in c++20 for modernize-concat-nested-namespaces

2023-04-10 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 512231. HerrCai0907 added a comment. fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147946/new/ https://reviews.llvm.org/D147946 Files:

[PATCH] D147946: [clang-tidy] support nested inline namespace in c++20 for modernize-concat-nested-namespaces

2023-04-10 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 512165. HerrCai0907 added a comment. remove lamda Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147946/new/ https://reviews.llvm.org/D147946 Files:

[PATCH] D147946: [clang-tidy] support inline namespace in c++20

2023-04-10 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added a reviewer: PiotrZSL. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D147893: [clang-tidy] avoid colon in namespace cause false positve

2023-04-10 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 rG72777dc000ac: [clang-tidy] avoid colon in namespace cause false positve (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D147893: [clang-tidy] avoid colon in namespace cause false positve

2023-04-10 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 512116. HerrCai0907 added a comment. remove debug log Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147893/new/ https://reviews.llvm.org/D147893 Files:

[PATCH] D147893: [clang-tidy] avoid colon in namespace cause false positve

2023-04-09 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added a reviewer: PiotrZSL. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D147857: [clang-tidy] fix false positve for namespace with attrs in modernize-concat-nested-namespaces

2023-04-09 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 rGbdf7fd8297bc: [clang-tidy] fix false positve for namespace with attrs in modernize-concat… (authored by HerrCai0907). Repository: rG LLVM Github

[PATCH] D147857: [clang-tidy] fix false positve for namespace with attrs in modernize-concat-nested-namespaces

2023-04-09 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 512004. HerrCai0907 edited the summary of this revision. HerrCai0907 added a comment. merge items in release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147857/new/ https://reviews.llvm.org/D147857

[PATCH] D147857: [clang-tidy] fix false positve for namespace with attrs in modernize-concat-nested-namespaces

2023-04-08 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. It should fix https://github.com/llvm/llvm-project/issues/57530 due to side effect instead of root cause.\ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147857/new/ https://reviews.llvm.org/D147857

[PATCH] D147857: [clang-tidy] fix false positve for namespace with attrs in modernize-concat-nested-namespaces

2023-04-08 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added a reviewer: PiotrZSL. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D147843: [clang-tidy] fix hint use correct range to replace last NamespaceDecl

2023-04-08 Thread Congcong Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0f9b71d11b91: [clang-tidy] fix hint use correct range to replace last NamespaceDecl (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147843: [clang-tidy] fix hint use correct range to replace last NamespaceDecl

2023-04-08 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. HerrCai0907 added a reviewer: PiotrZSL. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-07 Thread Congcong Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92910a51b904: [clang-tidy] fix concat-nest-namespace fix hint remove the macro (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-07 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 marked 2 inline comments as done. HerrCai0907 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:88 + StringRef TokText = getRawStringRef(TokRange, SM, LangOpts); + if (TokText != "// namespace " +

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-07 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 511763. HerrCai0907 marked 4 inline comments as done. HerrCai0907 added a comment. reorder fixhint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147194/new/ https://reviews.llvm.org/D147194 Files:

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-07 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 511757. HerrCai0907 added a comment. Herald added a subscriber: ChuanqiXu. update according to comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147194/new/ https://reviews.llvm.org/D147194 Files:

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-03 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 510658. HerrCai0907 edited the summary of this revision. HerrCai0907 added a comment. add feature update close comment in fixhint update acc. comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-04-03 Thread Congcong Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGedd6a33984ee: [clang-tidy] support unscoped enumerations in readability-static-accessed… (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-04-01 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. In D147315#4238596 , @carlosgalvezp wrote: > Would it make sense to add a scoped enum to the test, to ensure it doesn't > warn/fix? It is not possible to visit scoped enum by instance. I think adding an invalid expression

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-04-01 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 510241. HerrCai0907 added a comment. update description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147315/new/ https://reviews.llvm.org/D147315 Files:

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-03-31 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. In D147315#4236403 , @PiotrZSL wrote: > Add test with scoped enums, to validate that it works correctly. > In theory this change should suport them also. scoped enum not support to visit by member. `EnumName::` is needed for

  1   2   >