[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-05-13 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. @Tyker @rsmith You might be interested in reading https://llvm.org/PR45912, which describes what I believe to be an issue with this patch (or another related patch for `consteval` -- not sure). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-02-04 Thread Tyker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG008e7bf92343: [C++20] Add consteval-specific semantic for functions (authored by Tyker). Changed prior to commit: https://reviews.llvm.org/D63960?vs=232450=242391#toc Repository: rG LLVM Github

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-02-04 Thread Tyker via Phabricator via cfe-commits
Tyker marked 8 inline comments as done. Tyker added a comment. thank you for the review. i am sorry there were so many back and forth. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-02-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Some nits and very minor things, but I think this is generally good to go with those fixed. Sorry for the long review delay, and thanks for working on it! Comment at:

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-02-03 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @aaron.ballman do you think you can review this ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-01-13 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @rsmith friendly reminder CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2020-01-04 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-12-14 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-12-05 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 232450. Tyker marked 14 inline comments as done. Tyker added a comment. comments were fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/Expr.h

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-12-05 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13618 + if (InPlace) { +LValue LVal; +if (!::EvaluateInPlace(Result.Val, Info, LVal, this) || rsmith wrote: > This isn't sufficient: the evaluation process can refer back to the

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-11-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/Expr.h:1033-1035 + bool IsCausedByImmediateInvocation() const { +return ConstantExprBits.IsCausedByImmediateInvocation; + } I'd remove the "CausedBy" here -- the `ConstantExpr` is our

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-11-21 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @rsmith ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-11-13 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @rsmith ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-11-07 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 228197. Tyker added a comment. minor fixes improved tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/CXXRecordDeclDefinitionBits.def clang/include/clang/AST/DeclCXX.h

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-11-05 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 227909. Tyker added a comment. @rsmith Changes: - Rebased on recent master. - Adapted this patch to constexpr destructors. - Fixed issues with handling of temporaries. - Improve Tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D63960#1712398 , @Tyker wrote: > The now that constexpr destructors are legal. The code in this patch need to > be adapted, I have question about the following code. > > struct A { > constexpr ~A() {} > }; > >

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-25 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-18 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-17 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. The now that constexpr destructors are legal. The code in this patch need to be adapted, I have question about the following code. struct A { constexpr ~A() {} }; consteval A f() { return A{}; } void test() { A a; a = f(); // <-- here

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-11 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 224588. Tyker added a comment. improve performance in a bad case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/AST/Expr.h

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-07 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 223624. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/Basic/DiagnosticASTKinds.td clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-03 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 223021. Tyker marked 16 inline comments as done. Tyker added a comment. i addressed almost all comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/DeclCXX.h

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-03 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11188-11189 + ConstexprSpecKind ConstexprKind = DetermineSpecialMemberConstexprKind( + Constexpr, ClassDecl->hasDefaultedConstevalDefaultCtor()); + rsmith wrote: > I don't think this

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-09-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Very cool, this is an elegant approach. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:57 +def note_consteval_address_accessible : Note< + "%select{pointer|reference}0 on a consteval declaration " + "is not a constant expression">;

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-09-22 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-09-14 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @rsmith Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-09-07 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 219240. Tyker added a comment. Changes: - Rebased - Fixed typos CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/Basic/DiagnosticASTKinds.td