[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-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-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D140996#4655288 , @bolshakov-a wrote: > 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

[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-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D140996#4646880 , @cor3ntin wrote: > It would be nice to figure out a plan for this PR in the next few weeks, > before we get kicked out of Phab! Agreed -- @bolshakov-a are you still planning to actively work on this

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

2023-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It would be nice to figure out a plan for this PR in the next few weeks, before we get kicked out of Phab! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 ___ cfe-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 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 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-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 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-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Herald added a subscriber: wangpc. I've not spotted any major concerns with this patch, but I did have some minor nits to look into. I'd love to hear from @rsmith and @erichkeane before signing off on this, as the changes are pretty involved and they've both done

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

2023-06-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It would be great if we could make progress on this for clang 17, I was told it's forcing some people to use other compilers. Are the recent changes to the itanium abi enough to complete this work? Thanks! CHANGES SINCE LAST ACTION

[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-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-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 Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4579 + if (CE->hasAPValueResult()) +mangleValueInTemplateArg(ParamType, CE->getResultAsAPValue(), false, + /*NeedExactType=*/true); I'm not

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

[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-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-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] 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-21 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:1032 + case TemplateArgument::UncommonValue: +// FIXME: Visit value. +break; bolshakov-a wrote: > bnbarham wrote: > > bolshakov-a wrote: > > > bnbarham wrote: > > > >

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

2023-03-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: asl. erichkeane added a comment. I've got the 1 concern with the mangling that I REALLY want one of our codegen owners to chime in on, otherwise this LGTM. Comment at: clang/lib/AST/ItaniumMangle.cpp:4397 +// argument. +// As proposed in

[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-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 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 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-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:1032 + case TemplateArgument::UncommonValue: +// FIXME: Visit value. +break; bolshakov-a wrote: > bnbarham wrote: > > bolshakov-a wrote: > > > bnbarham wrote: > > > > akyrtzi

[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 Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:1032 + case TemplateArgument::UncommonValue: +// FIXME: Visit value. +break; bolshakov-a wrote: > bnbarham wrote: > > akyrtzi wrote: > > > erichkeane 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-03-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:1032 + case TemplateArgument::UncommonValue: +// FIXME: Visit value. +break; akyrtzi wrote: > erichkeane wrote: > > bolshakov-a wrote: > > > aaron.ballman wrote: > > > > Any

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

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

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

2023-03-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/www/cxx_status.html:1067 + Reference type template arguments referring to instantiation-dependent objects and subobjects + (i.e. delcared inside a template but neither type- nor value-dependent) aren't fully

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

2023-03-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added subscribers: eli.friedman, gribozavr2, akyrtzi, gribozavr. erichkeane added inline comments. Comment at: clang/include/clang/AST/TemplateBase.h:88 +/// so cannot be dependent. +UncommonValue, + bolshakov-a wrote: > shafik 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. 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 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 Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. In D140996#4189452 , @bolshakov-a wrote: > 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

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

2023-03-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D140996#4189452 , @bolshakov-a wrote: > 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

[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 Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Patch seems to be missing all the context. 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-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] 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-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D140996#4185795 , @bolshakov-a wrote: > @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?

[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] 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 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-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 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 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] 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 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 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 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 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 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-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane 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-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. There are no AST [de]serialization tests in this PR, right? Would be nice to add some. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996

[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 Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/include/clang/AST/TemplateBase.h:88 +/// so cannot be dependent. +UncommonValue, + erichkeane wrote: > I definitely hate the name here... Just `Value` makes a bit more sense, but > isn't perfectly

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

2023-02-24 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CodeGenCXX/template-arguments.cpp:4 + +template CONSTEXPR T id(T v) { return v; } +template auto value = id(V); I don't see any tests covering unions or enums. Comment at:

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

2023-02-24 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:204 +#if __cplusplus == 201703L + // cxx17-error@-3 {{non-type template argument refers to subobject '(int *)1'}} +#endif Shouldn't this be an error b/c it is a

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

2023-02-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D140996#4150848 , @bolshakov-a wrote: >> Should this also update the status in clang/www/cxx_status.html? > > I'm not sure. There still remains an issue with template parameters of > reference type, which was tried to

[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] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-02-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane 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 Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: erichkeane, royjacobson, clang-language-wg; removed: mizvekov. aaron.ballman added a subscriber: rjmccall. aaron.ballman added a comment. In D140996#4125177 , @bolshakov-a wrote: > @aaron.ballman, @rsmith,

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