[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 13:49:10 PDT 2023
nickdesaulniers added a comment.
In D76096#4523718 <https://reviews.llvm.org/D76096#4523718>, @efriedma wrote:
> My primary concern here is making sure we don't actually blow up compile-time. D151587 <https://reviews.llvm.org/D151587> fixes the dependency from CGExprConstant, which was the most complicated one, but there are other places that call into Evaluate(). Some of those are probably unavoidable, but I'd like to make sure at least that we don't end up evaluating the initializers of global variables in C code.
>
> Not sure there's any good way to regression-test that, though...
I could probably add a call to abort() somewhere and then build the Linux kernel then verify that we don't abort. Which `Evaluate` method of which class should I try to add that to?
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