[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

Richard Dzenis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 08:18:21 PDT 2022


RIscRIpt added a comment.

In D133853#3799344 <https://reviews.llvm.org/D133853#3799344>, @aaron.ballman wrote:

> It's a conforming extension in older language modes like C++98, where we couldn't steal the `constexpr` keyword because it's not reserved, which is one benefit to it. Does MSVC support this as far back as C++98?

Tbh, I cannot understand your question in relation to your statement, and where did you get that statement from 🙂

> Does MSVC support this as far back as C++98?

I don't know. AFAIK - no.

@h-vetinari thanks for your input.

I'll try to update this patch as per our discussion:

1. `[[msvc::constexpr]]` handle like `constexpr` for functions with `-fms-extensions` (according to MSVC error message: `C7687: [[msvc::constexpr]] may only be applied to statements and functions`); I won't implement semantic meaning for statements, as I am now aware of it and there's no constexpr effect on statements.
2. Possibly take a look at `[[msvc::no_unique_address]]`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133853



More information about the cfe-commits mailing list