[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-11-03 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 557997. bolshakov-a added a comment. Fixes after review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-11-03 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2205-2206 "bit-field%select{| %1}2">; +def err_reference_bind_to_bitfield_in_cce : Error< + "reference cannot bind to bit-field in converted constant expression">; def

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-11-03 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 558001. bolshakov-a added a comment. One more problem has been discovered and fixed: IR emitting didn't work when using a subobject as a template argument when the corresponding template parameter is used in an lvalue context. A test case has been added

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-10-26 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Sorry, but I don't know what remains to be done here. It seems that the only important question is about ABI, but I've already answered that the changes under discussion seem to be already fixed in the Itanium ABI document. CHANGES SINCE LAST ACTION

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-01-04 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a created this revision. bolshakov-a added reviewers: aaron.ballman, rsmith, mizvekov. Herald added subscribers: kadircet, arphaman, martong, kristof.beyls. Herald added a reviewer: shafik. Herald added a project: All. bolshakov-a requested review of this revision. Herald added projects:

[PATCH] D141826: [clang][TemplateBase] Add IsDefaulted bit to TemplateArgument

2023-03-08 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:6842 case TemplateArgument::Integral: return TemplateArgument(Arg, getCanonicalType(Arg.getIntegralType())); @Michael137, hasn't `IsDefaulted` parameter forgotten here?

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-11 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504402. bolshakov-a added a comment. Rebase and replace "Clang 16" with "Clang 17" in `cxx_status.html` (Clang 16 RC has already been branched off, AFAIK). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-11 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504407. bolshakov-a added a comment. Fix formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a created this revision. bolshakov-a added reviewers: erichkeane, rnk. Herald added a project: All. bolshakov-a requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Several issues have been discovered and (hopefully) fixed here: -

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 506413. bolshakov-a added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 Files: clang/lib/AST/MicrosoftMangle.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 506428. bolshakov-a added a comment. Add USR generation and a couple of minor fixes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 506429. bolshakov-a added a comment. Finalize renaming. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 506426. bolshakov-a added a comment. Rename `UncommonValue` to `StructuralValue` and add "TODO" about it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1670 + case TemplateArgument::UncommonValue: +if (ValueDecl *D = getAsArrayToPointerDecayedDecl( +TA.getUncommonValueType(), TA.getAsUncommonValue())) { erichkeane

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-19 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 506430. bolshakov-a added a comment. Finalize renaming one more time. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:3036 if (!std::is_trivially_destructible::value) { - auto DestroyPtr = [](void *V) { static_cast(V)->~T(); }; - AddDeallocation(DestroyPtr, Ptr); + auto DestroyPtr = [](void

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504247. bolshakov-a added a comment. Fix after rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang/include/clang/AST/PropertiesBase.td Index:

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504251. bolshakov-a added a comment. Add `ODRHash` calculation for `UncommonValue` (and test it). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504253. bolshakov-a added a comment. Add some testcases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504250. bolshakov-a added a comment. Herald added a subscriber: ChuanqiXu. Add `ODRHash` calculation for UncommonValue (and test it). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files:

[PATCH] D145814: Release notes and C++ status

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Occasional PR, sorry. I'm still learning Arcanist... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145814/new/ https://reviews.llvm.org/D145814 ___ cfe-commits mailing list

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504248. bolshakov-a added a comment. Fix after rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504255. bolshakov-a added a comment. Add relnote and update C++ status. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. I have some problems with Arcanist... It tries to open a new PR instead of updating this one. Probably because I've re-cloned my local repository. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504249. bolshakov-a added a comment. Refactor `TemplateArgument` constructors. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. @royjacobson, I've added some test cases for using the new NTTP arguments in clang modules. It uses serialization, in principle. Or more specialized tests are still needed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/

[PATCH] D145814: Release notes and C++ status

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a created this revision. Herald added a project: All. bolshakov-a 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/D145814 Files: clang/docs/ReleaseNotes.rst

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504242. bolshakov-a added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504254. bolshakov-a added a comment. Fix constness issue in `TemplateArgument` for `ASTContext`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-25 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 508305. bolshakov-a added a comment. Add type to USR so as not to get confused with template struct S {}; struct { int n; } s; template<> struct S<(void*)> {}; template<> struct S<> {}; Add test on structural type NTTP USR. Just a

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-25 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 508311. bolshakov-a added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-26 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 508437. bolshakov-a added a comment. Mangle pointer-to-members with conversion. Pointer-to-member-functions with conversions across hierarchy work fine, as I can see. I don't still understand how to mangle nested unnamed tags in general. CHANGES

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-26 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 508436. bolshakov-a added a comment. Add test cases on unspecified inheritance. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 Files: clang/lib/AST/MicrosoftMangle.cpp

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-26 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:720 +const CXXRecordDecl *RD, const ValueDecl *VD) { + MSInheritanceModel IM = RD->getMSInheritanceModel(); + // ::= rjmccall wrote: > efriedma wrote: > > It's not obvious

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-26 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. > Additional levels of nesting append 3's: @3, @33, > etc. Yes, but if you have such a code: struct A { union { union { struct B {}; using T = B; }; }; }; void f(A::T); you have `?f@@YAXUB@@2A@@@Z` for `f`, and for such a

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-03-26 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1247 + unsigned DiagID = Diags.getCustomDiagID( + DiagnosticsEngine::Error, "cannot mangle anonymous struct/union yet"); + Diags.Report(DiagID); efriedma wrote:

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-13 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Sorry! It's my first time using Phabricator. Maybe, the problem occurs because I've solved the issue with Arcanist just by means of copy-pasting patches into "Update Diff" Web GUI form. Maybe, I should reopen the PR? CHANGES SINCE LAST ACTION

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-13 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 504681. bolshakov-a added a comment. Update patch with more context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-13 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. It works, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-13 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:1032 + case TemplateArgument::UncommonValue: +// FIXME: Visit value. +break; bnbarham wrote: > bolshakov-a wrote: > > bnbarham wrote: > > > akyrtzi wrote: > > > >

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-13 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:1032 + case TemplateArgument::UncommonValue: +// FIXME: Visit value. +break; bnbarham wrote: > akyrtzi wrote: > > erichkeane wrote: > > > bolshakov-a wrote: > > > >

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-02-25 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:3036 if (!std::is_trivially_destructible::value) { - auto DestroyPtr = [](void *V) { static_cast(V)->~T(); }; - AddDeallocation(DestroyPtr, Ptr); + auto DestroyPtr = [](void

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-02-24 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a subscriber: mizvekov. bolshakov-a added a comment. Thanks for the review! I definitely can try to answer questions and fix issues, but I just want to note that I'm not the original author, and these changes already were upstream. (Maybe, @rsmith will find some time for

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-25 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-28 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1250 + for (unsigned I = 1, IE = ID->getChainingSize(); I < IE; ++I) +mangleSourceName(""); + efriedma wrote: > bolshakov-a wrote: > > efriedma wrote: > > > bolshakov-a

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-28 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1250 + for (unsigned I = 1, IE = ID->getChainingSize(); I < IE; ++I) +mangleSourceName(""); + efriedma wrote: > bolshakov-a wrote: > > efriedma wrote: > > > Weird

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-28 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1250 + for (unsigned I = 1, IE = ID->getChainingSize(); I < IE; ++I) +mangleSourceName(""); + bolshakov-a wrote: > efriedma wrote: > > bolshakov-a wrote: > > > efriedma

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-28 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1250 + for (unsigned I = 1, IE = ID->getChainingSize(); I < IE; ++I) +mangleSourceName(""); + efriedma wrote: > Weird indentation I agree. Don't know why clang-format

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-29 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 518226. bolshakov-a added a comment. `SmallVector` instead of `std::stack`; fixing formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 Files: clang/lib/AST/MicrosoftMangle.cpp

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-30 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1250 + for (unsigned I = 1, IE = ID->getChainingSize(); I < IE; ++I) +mangleSourceName(""); + efriedma wrote: > bolshakov-a wrote: > > bolshakov-a wrote: > > > efriedma

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-05-01 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. No, I don't have commit access. You could use just `Bolshakov ` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-01 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 510282. bolshakov-a edited the summary of this revision. bolshakov-a added a comment. Fix mangling of references to subobjects. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 Files:

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-01 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. > The following produces a name collision on MSVC Clang reproduces this buggy behavior. Should it produce an explicit error instead? Or, maybe, some temporary correct algorithm should be found? (It is pretty sad if clang cannot provide new language features for

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-01 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 510281. bolshakov-a edited the summary of this revision. bolshakov-a added a comment. Mangling of anonymous unions. @eli.friedman, thank you! > I don't know whether the aforementioned code is acceptable according to the > standard, honestly. It is not

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-02 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 510343. bolshakov-a edited the summary of this revision. bolshakov-a added a comment. Mangle array subscripts and base class members in references to subobjects. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-02 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 510345. bolshakov-a added a comment. Minor refactoring. Don't hide function parameter with local variable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 Files: clang/lib/AST/MicrosoftMangle.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-02-13 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. @aaron.ballman, @rsmith, @mizvekov, @shafik, has the mankind any chance to get this reviewed and merged? Btw, FYI, I've investigated the Chromium compilation crash that caused the rollback in 8ba442bc2136

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-05-04 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-06-06 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4397 +// argument. +// As proposed in https://github.com/itanium-cxx-abi/cxx-abi/issues/111. +auto *SNTTPE = cast(E); bolshakov-a wrote: > efriedma wrote: > > bolshakov-a

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-08-06 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 547589. bolshakov-a added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-08-06 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:56 +using CF = ComplexFloat<1.0f + 3.0fi>; +using CF = ComplexFloat<3.0fi + 1.0f>; bolshakov-a wrote: > aaron.ballman wrote: > > bolshakov-a wrote: > > > shafik

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-08-06 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 547603. bolshakov-a added a comment. Fixes after review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-08-06 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Btw, formatting of unrelated lines has leaked into `TemplateBase.h`. Sorry. Comment at: clang/lib/AST/MicrosoftMangle.cpp:1624-1626 + return const_cast( + V.getLValueBase().dyn_cast()); +} aaron.ballman wrote: > Does this

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-14 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4579 + if (CE->hasAPValueResult()) +mangleValueInTemplateArg(ParamType, CE->getResultAsAPValue(), false, + /*NeedExactType=*/true);

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-14 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4397 +// argument. +// As proposed in https://github.com/itanium-cxx-abi/cxx-abi/issues/111. +auto *SNTTPE = cast(E); efriedma wrote: > bolshakov-a wrote: > > erichkeane

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-06 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 520080. bolshakov-a added a comment. Rebased; somehow incorrectly merged `ReleaseNotes.rst` fixed. `CXX/drs/dr12xx.cpp` starts to show that clang accepts now references to bitfields as template arguments in C++20 mode. It is probably not OK. CHANGES

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-11 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a subscriber: efriedma. bolshakov-a added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4397 +// argument. +// As proposed in https://github.com/itanium-cxx-abi/cxx-abi/issues/111. +auto *SNTTPE = cast(E); erichkeane

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-08 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 520478. bolshakov-a added a subscriber: hubert.reinterpretcast. bolshakov-a added a comment. Avoid binding references in template arguments to bit-fields. @erichkeane, @hubert.reinterpretcast, please verify. CHANGES SINCE LAST ACTION

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-09 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 520716. bolshakov-a added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: clang-tools-extra/clangd/DumpAST.cpp clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-09 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 520678. bolshakov-a added a comment. Fix MS compatibility mangling algorithm. Tested with MSVC ver. 19.35 (toolset ver. 143). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 Files: