[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 13 08:55:23 PST 2023


shafik added inline comments.


================
Comment at: clang/test/AST/Interp/cxx17.cpp:7
+
+struct F { int a; int b;};
+constexpr F getF() {
----------------
tbaeder wrote:
> shafik wrote:
> > It would also be good to test references, bit-fields, volatile and tuple-like types if possible, if not then leave a FIXME.
> Clang doesn't seem to support `volatile` in constant expressions at all right now(?). Can you come up with a reproducer that works? All I get is errors about a non-literal type: https://godbolt.org/z/PbevGf3E8
Apologies, my mistake. In my enthusiasm I forgot that while `constexpr volatile` is a thing the variable is not usable in a constant expression. 


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

https://reviews.llvm.org/D138802



More information about the cfe-commits mailing list