aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorPierre van Houtryve <pierre.vanhoutryve@amd.com>2022-12-13 03:50:41 -0500
committerPierre van Houtryve <pierre.vanhoutryve@amd.com>2023-01-06 02:57:50 -0500
commitd6acd0196b3378bdeb5193053e290d7194c4f72d (patch)
treee777c84ba519bac6296188b9a8944afd0139aae0 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent2679fc3f42a5bdbb61b623452d5bc9e3d805f8ee (diff)
downloadllvm-d6acd0196b3378bdeb5193053e290d7194c4f72d.zip
llvm-d6acd0196b3378bdeb5193053e290d7194c4f72d.tar.gz
llvm-d6acd0196b3378bdeb5193053e290d7194c4f72d.tar.bz2
[Sema] Fix crash when evaluating nested call with value-dependent arg
Fix an edge case `ExprConstant.cpp`'s `EvaluateWithSubstitution` when called by `CheckEnableIf` The assertion in `CallStackFrame::getTemporary` could fail during evaluation of nested calls to a function using `enable_if` when the second argument was a value-dependent expression. This caused a temporary to be created for the second argument with a given version during the evaluation of the inner call, but we bailed out when evaluating the second argument of the outer call due to the expression being value-dependent. After bailing out, we tried to clean up the argument's value slot but it caused an assertion to trigger in `getTemporary` as a temporary for the second argument existed, but only for the inner call and not the outer call. See the test case for a more complete description of the issue. Reviewed By: ahatanak Differential Revision: https://reviews.llvm.org/D139713
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions