[PATCH] D76096: [clang] allow const structs to be constant expressions in initializer lists

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 13 14:01:31 PDT 2020


efriedma added a comment.

> Removing those two LangOpt checks isn't enough for the test cases to run.

Removing those two checks should unblock const-eval for structs in general.  I wasn't thinking about whether there something else for global variables specifically, though.  It looks like there's a relevant FIXME in findCompleteObject() in ExprConstant.cpp.

> APValue is not especially space-efficient

Yes.  We should probably do something similar to what we do for LLVM constants: add specialized representations for simple cases, like ConstantDataArray.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76096





More information about the cfe-commits mailing list