[clang] `__noop` not marked as constexpr #102064 (PR #105983)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 28 11:55:38 PDT 2024
================
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -std=c++20 -fms-extensions %s
+// expected-no-diagnostics
+constexpr int x = []{ __noop; return 0; }();
----------------
cor3ntin wrote:
oh, because it's a MSVC extensions you can write
```
#ifdef _MSC_VER
constexpr int x = []{ __noop; return 0; }();
#endif
```
(clang defines _MSC_VER, you do not need to do it)
Sorry, i did not realize it was a MS only extension
https://github.com/llvm/llvm-project/pull/105983
More information about the cfe-commits
mailing list