llvm-project
ff929a21 - [Sema] Guard transformed loop-hint expression before use (#182752)

Commit
2 days ago
[Sema] Guard transformed loop-hint expression before use (#182752) `TransformLoopHintAttr` called `TransformExpr(...).get()` without checking that the transformed expression was usable. For `#pragma GCC unroll v()` instantiated with `v = int`, expression transformation fails and Clang can assert while validating the loop hint. Check `ExprResult::isUsable()` before calling `get()` and keep the original attribute on failure. Fixes https://github.com/llvm/llvm-project/issues/49502
Author
Parents
Loading