[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

Richard Dzenis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 3 08:21:53 PDT 2023


RIscRIpt updated this revision to Diff 528112.
RIscRIpt added a comment.

Added diagnostics for [[msvc::constexpr]] virtual

Regarding [[msvc::constexpr]] constructors, unfortunatelly I cannot find a reasonable way to support it.

During development I found out about Clang's experimental Constant Interpreter (`-fexperimental-new-constant-interpreter`),
I suppose it would be much easier to implement complete support for `[[msvc::constexpr]]` there.
I am not aware about policy regarding constant evaulation/interpreter:
do you approve new constant evaluation features in the current (AST-based) approach without extending the experimental one?
Because I'd rather tacke with experimental Constant Interpreter in a follow-up (if I ever find time for this).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134475

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/include/clang/Basic/DiagnosticASTKinds.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/AST/ExprConstant.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/lib/Sema/SemaStmtAttr.cpp
  clang/test/AST/msvc-attrs-invalid.cpp
  clang/test/AST/msvc-attrs.cpp
  clang/test/AST/msvc-constexpr-new.cpp
  clang/test/Misc/pragma-attribute-supported-attributes-list.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134475.528112.patch
Type: text/x-patch
Size: 18763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230603/5a0cfb25/attachment-0001.bin>


More information about the cfe-commits mailing list