[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

Richard Dzenis via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 4 16:57:23 PDT 2023


RIscRIpt wrote:

Discussion initiated by @AaronBallman of one of important design decisions, which was forgotten (?):

> @AaronBallman:
> It's a good question as to whether we want to support that only when passing `-fms-extensions` or not (it seems like a generally useful attribute); we don't do the same for GNU attributes, but maybe we don't want to follow that pattern? This will be the first attribute we add with the `msvc` vendor namespace.

> @RIscRIpt:
> IMO, this attribute is a clearly Microsoft's extension, thus it should be available only when `-fms-extensions` are enabled.

Note: in the current implementation I enable `[[msvc::constexpr]]` only under `-fms-compatibility -fms-compatibility-version=19.33`, (MSVC 19.33), where this attribute has first appeared.

https://github.com/llvm/llvm-project/pull/71300


More information about the cfe-commits mailing list