[Lldb-commits] [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 lldb-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

[Lldb-commits] [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 lldb-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 clang/

[Lldb-commits] [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 lldb-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 err_referen

[Lldb-commits] [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 lldb-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 https://revie

[Lldb-commits] [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 lldb-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 wr

[Lldb-commits] [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 lldb-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 work

[Lldb-commits] [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 lldb-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 clang/

[Lldb-commits] [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 lldb-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 clang/docs/Releas

[Lldb-commits] [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 lldb-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 w

[Lldb-commits] [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 lldb-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 wr

[Lldb-commits] [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 lldb-commits
bolshakov-a added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4579 + if (CE->hasAPValueResult()) +mangleValueInTemplateArg(ParamType, CE->getResultAsAPValue(), false, + /*NeedExactType=*/true); efriedm

[Lldb-commits] [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 lldb-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 w

[Lldb-commits] [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 lldb-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 clang/docs/Releas

[Lldb-commits] [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 lldb-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: clang-tools-extra

[Lldb-commits] [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 lldb-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 https://reviews.l

[Lldb-commits] [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 lldb-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 SI

[Lldb-commits] [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 lldb-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 clang/docs/Releas

[Lldb-commits] [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 lldb-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*)&s.n> {}; template<> struct S<&s.n> {}; Add test on structural type NTTP USR. Jus

[Lldb-commits] [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 lldb-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 clang-tools-extra/clangd/FindTarget

[Lldb-commits] [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 lldb-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 clang/d

[Lldb-commits] [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 lldb-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 clang-tools-extra/cl

[Lldb-commits] [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 lldb-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

[Lldb-commits] [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 lldb-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 w

[Lldb-commits] [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 lldb-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: > > > > erichkeane

[Lldb-commits] [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 lldb-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: > > > > aaron.ba

[Lldb-commits] [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 lldb-commits
bolshakov-a added a comment. It works, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[Lldb-commits] [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 lldb-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 clang-tools-extra/clangd/FindTarget.

[Lldb-commits] [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 lldb-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 https://reviews.llvm

[Lldb-commits] [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 lldb-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 clang/docs

[Lldb-commits] [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 lldb-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/ https://reviews.llvm.org/D1409

[Lldb-commits] [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 lldb-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/ https://reviews.llvm.org/

[Lldb-commits] [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 lldb-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 clang-tools-extra/clangd/FindTarg

[Lldb-commits] [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 lldb-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 clang-to

[Lldb-commits] [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 lldb-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 clang/

[Lldb-commits] [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 lldb-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 clang-t

[Lldb-commits] [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 lldb-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: clang-tool

[Lldb-commits] [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 lldb-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 clang-tools-extra/clangd/F

[Lldb-commits] [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 lldb-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 clang/in

[Lldb-commits] [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 lldb-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: clang/include/clang/AST/PropertiesBase

[Lldb-commits] [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 lldb-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 clang/include/cla

[Lldb-commits] [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 lldb-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/ https://revie

[Lldb-commits] [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 lldb-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 *V

[Lldb-commits] [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 lldb-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 *V

[Lldb-commits] [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 lldb-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 taking

[Lldb-commits] [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 lldb-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

[Lldb-commits] [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 lldb-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: