2 Commits

Author SHA1 Message Date
Richard Dzenis
4cfdef76a2
[clang] Fix '__cdecl' CC is not supported for this target (#74932)
Fixes regression introduced in b3e6ff331925dde24a4707452d657da0fdf7f588
Fixes bot failure https://lab.llvm.org/buildbot/#/builders/60/builds/15037
```
    .---command stderr------------
    | error: 'supported-warning' diagnostics seen but not expected:
    | File C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\SemaCXX\ms-constexpr-new.cpp Line 7: '__cdecl' calling convention is not supported for this target
    | 1 error generated.
    `-----------------------------
```
2023-12-09 18:40:04 +04:00
Richard Dzenis
b3e6ff3319
[clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (#71300)
This commit introduces support for the MSVC-specific C++11-style
attribute `[[msvc::constexpr]]`, which was introduced in MSVC 14.33.
The semantics of this attribute are enabled only under
MSVC compatibility (`-fms-compatibility-version`) 14.33 and higher.
Additionally, the default value of `_MSC_VER` has been raised to 1433.

The current implementation lacks support for:
- `[[msvc::constexpr]]` constructors (see #72149);
  at the time of this implementation, such support would have required
  an unreasonable number of changes in Clang.
- `[[msvc::constexpr]] return ::new` (constexpr placement new) from
  non-std namespaces (see #74924).

Relevant to: #57696
2023-12-09 14:35:38 +04:00