MitalAshok wrote: Could you also add tests that calling it returns zero and doesn't evaluate its arguments:
```c++ static_assert([]{ return __noop(4); }() == 0); extern int not_accessed; void not_called(); static_assert([]{ return __noop(not_accessed *= 6); }() == 0); static_assert([]{ return __noop(not_called()); }() == 0); static_assert([]{ return __noop(throw ""); }() == 0); static_assert([]{ return __noop(throw "", throw ""); }() == 0); static_assert([]{ int a = 5; __noop(++a); return a; }() == 5); ``` This passes on MSVC (<https://godbolt.org/z/nvxr3GxT4>) but currently crashes Clang. https://github.com/llvm/llvm-project/pull/106849 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits