[PATCH] D132031: Do not evaluate dependent immediate invocations

Utkarsh Saxena via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 22:58:43 PDT 2022


usaxena95 added a comment.

Addressed comments. Added release note.



================
Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:665
+Bar<int> f;
+Bar<float> g;
+} // namespace issue_55601
----------------
aaron.ballman wrote:
> Do you think it's worth it to add a test case like:
> ```
> struct derp {
>   derp(int); // Can't be used in a constant expression
> 
>   consteval operator int() const { return 5; }
> };
> 
> Bar<derp> d; // Error
> ```
> to demonstrate that we evaluated properly at instantiation time, or do you think existing coverage already demonstrates this well enough?
Added the test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132031/new/

https://reviews.llvm.org/D132031



More information about the cfe-commits mailing list