[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-09 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGda6a14b91ad9: [clang] Enforce instantiation of constexpr template functions during non… (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443459. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/CodeGenCXX/constexpr-late-instantiation.cp

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. LGTM, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/docs/ReleaseNotes.rst:184 initializer is not allowed this is now diagnosed as an error. +- Clang now correctly emit symbols for implicitly instanciated constexpr + template function. Fixes `Issue 55560

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443337. serge-sans-paille added a comment. ++review CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/t

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some test changes, assuming that precommit CI comes back green. Comment at: clang/docs/ReleaseNotes.rst:184 initializer is not allowed this i

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443276. serge-sans-paille added a comment. + release note + take review into account Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/docs/Rel

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the fix? Comment at: clang/test/SemaCXX/constexpr-late-instantiation.cpp:2 +// Make sure foo is instantiated and we don't get a link error +// RUN: not %clang_cc1 -S -emit-llvm %s -fsyntax-only 2>&1 | FileCheck

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443243. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/CodeGenCXX/constexpr-late-instantiation.cpp clang/test/SemaCXX/constex

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @shafik: I've implemented your patch which indeed looks closer to the original intent @aaron.ballman : test case and code updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.or

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443230. serge-sans-paille retitled this revision from "[clang] enforce instantiation of constexpr template functions" to "[clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation". serge-sans-paille edited the su

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-07-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Pinging about updates to this, because if this really does fix https://github.com/llvm/llvm-project/issues/55560, I think we want to get that fix into Clang 15. The release branch point is coming up pretty soon (https://discourse.llvm.org/t/llvm-15-0-0-release-sch

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-07-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. During the parsing of the assignment in `main` for the `constexpr` case we end up in `Sema::MarkFunctionReferenced` in particular this code: else if (Func->isConstexpr()) // Do not defer instantiations of constexpr functions, to avoid the // expression evalu

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-07-01 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:4859 << Function; + } else if (!Recursive) { +Function->setInstantiationIsPending(true); This condition seems a little aggressive, and will end

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rsmith, clang-language-wg. aaron.ballman added a comment. It's a bummer that patch application failed on precommit CI for reasons unrelated to your patch (as best I can tell, anyway)... Also, please update the patch summary to have some more details about what your

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-07-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. gentle ping o/ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 439022. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/SemaCXX/constexpr-late-instantiation.cpp Index: clang/test/SemaCXX/con

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. This also seems to fix https://github.com/llvm/llvm-project/issues/37522 and https://github.com/llvm/llvm-project/issues/55315 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 438114. serge-sans-paille added a comment. (rebased on main branch) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/SemaCXX/co

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. I"m not 100% sure of the fix but it fixes bug #55560 and does not introduce regression :-/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 _

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, tbaeder. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix #55560 Repository: rG LLVM Github Mon