[PATCH] D158733: [Clang] Fix a crash when an invalid immediate function call appears in a cast

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 08:02:26 PDT 2023


shafik added inline comments.


================
Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:1120
+
+void k() { (int)h{nullptr}; }
+// expected-error at -1 {{call to consteval function 'GH64949::h::h' is not a constant expression}}
----------------
Another variety maybe worthing adding a test for 

```
int k() { return h{nullptr}; }
``` 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158733



More information about the cfe-commits mailing list