[clang] add: NUMERIC_TYPE_SWITCH (PR #161755)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 3 21:33:14 PDT 2025
tbaederr wrote:
So, the problem is that _in general_ `IntAP`, `IntAPS` and `Floating` are different from the other numeric types because they _might_require memory to be allocated. That's currently handled transparently in `pushInteger()`, but for floats that doesn't automatically happen. That's why e.g. `builtin_inf` calls `allocFloat`.
I believe that's a non-issue for the code from #161302:
```c++
if (ElemPT == PT_Float) {
S.Stk.push<Floating>(Vec.elem<Floating>(Index));
return true;
}
```
because we're simply pushing an already existing, allocated, float on the stack. But we can't easily verify that that's always the case.
https://github.com/llvm/llvm-project/pull/161755
More information about the cfe-commits
mailing list