[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute
Richard Dzenis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 16 06:31:05 PDT 2023
RIscRIpt added inline comments.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:3543
+definition or a return statement. It has no effect on function declarations.
+This attribute permits constant evaluation of ``[[msvc::constexpr]]`` functions
+in ``[[msvc::constexpr]] return`` statements inside ``constexpr`` or
----------------
RIscRIpt wrote:
> erichkeane wrote:
> > Does it prohibit the inverse? I think this documentation overall needs a much better description of what the semantics are here, particularly anything that you found in experimentation on the MS implementation.
> > Does it prohibit the inverse?
> Do you mean, can `[[msvc::constexpr]]` function call `constexpr` and remain const-evaluated? Yes.
>
> I elaborated on semantics in non-inline comment.
Tried to make doc notes more clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134475/new/
https://reviews.llvm.org/D134475
More information about the cfe-commits
mailing list