Skip to content
Unverified Commit eda2eaab authored by Jun Zhang's avatar Jun Zhang
Browse files

[clang][dataflow] Fix crash when having boolean-to-integral casts.

Since now we just ignore all (implicit) integral casts, treating the
resulting value as the same as the underlying value, it could cause
inconsistency between values after `Join` if in some paths the type
doesn't strictly match. This could cause intermittent crashes.

std::optional<bool> o;
int x;
if (o.has_value()) {
  x = o.value();
}

Fixes: https://github.com/llvm/llvm-project/issues/59728



Signed-off-by: default avatarJun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D140753
parent 5d4cebfa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment