[PATCH] D130791: [clang] Short-circuit trivial constexpr array constructors
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 1 12:46:45 PDT 2022
aaron.ballman added a comment.
Thank you for working on this! This should also include test coverage (hmmm, we don't have a reasonable way to lit test performance regressions though.... so perhaps we just need to ensure there's at least one test that would normally have been unreasonably slow?) and a release note.
================
Comment at: clang/lib/AST/ExprConstant.cpp:10836-10838
+ bool HasTrivialConstructor = CheckTrivialDefaultConstructor(
+ Info, E->getExprLoc(), E->getConstructor(),
+ E->requiresZeroInitialization());
----------------
The big question this raises for me is: will this cause constexpr to fail because of the note diagnostics when the type does not have a trivial default constructor? Or does this just bump the failure up a bit so that we fail before we start walking over the array elements?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130791/new/
https://reviews.llvm.org/D130791
More information about the cfe-commits
mailing list