aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2025-05-19 11:27:51 -0700
committerGitHub <noreply@github.com>2025-05-19 11:27:51 -0700
commit021443cd2a8127ab0432c5e48f9dbba30d9bc6ce (patch)
tree98e232d6dfe26f1f10f962eb450b71ff39fe2ca4 /llvm/lib
parent99720bbb87d4f1968a3e25075e616063fbc18936 (diff)
downloadllvm-021443cd2a8127ab0432c5e48f9dbba30d9bc6ce.zip
llvm-021443cd2a8127ab0432c5e48f9dbba30d9bc6ce.tar.gz
llvm-021443cd2a8127ab0432c5e48f9dbba30d9bc6ce.tar.bz2
[clang] fix constexpr-unknown handling of self-references. (#132990)
Usually, in constant evaluation, references which are local to the evaluation have to be initialized before they're accessed. However, there's one funny special case: the initializer of a reference can refer to itself. This generally ends up being undefined behavior if it's used in an evaluated context, but it isn't otherwise forbidden. In constant evaluation, this splits into two cases: global variables, and local variables in constexpr functions. This patch handles both of those cases. (Local variables tends to trip other errors in most cases, but if you try hard enough, you can get an accepts-invalid.) Fixes #131330 .
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions