[mlir][Math] Fix math-expand-ops crash on math.ctlz with index type (#181539)
Fixes #179847
math.ctlz expansion called getIntOrFloatBitWidth() on the operand type
without checking. Index type has no fixed bitwidth and is not int/float,
so the assertion in Type::getIntOrFloatBitWidth() could fire.
- In convertCtlzOp, bail out with notifyMatchFailure when the element
type is not integer or float, so expansion is only applied to types with
a defined bitwidth.
- Add a test in expand-math.mlir that math.ctlz on index is left
unchanged by the pass (no crash, op preserved).
[InstCombine] Avoid invalid bitcast across address spaces in foldIntegerTypedPHI (#181064)
Only use a PtrToInt's source pointer as an available pointer value when
its pointer type exactly matches the inttoptr target type. This prevents
creating an invalid bitcast between differing address spaces during
foldIntegerTypedPHI.
[clang][ObjC][CodeComplete] Fix crash on C-Style cast with parenthesized operand in ObjC++ (#180343)
In ObjC++ mode, code-completion after a C-style cast like
`(int*)(0x200)` crashed because the inner parenthesized expression was
parsed as a `ParenListExpr` (null type) due to `AllowTypes` propagation.
Fixes https://github.com/llvm/llvm-project/issues/180125
multimedia/mkvtoolnix: fix build with libc++ 21
With libc++ 21 multimedia/mkvtoolnix fails to build, with errors similar
to:
In file included from lib/fmt/src/os.cc:13:
In file included from lib/fmt/include/fmt/os.h:11:
lib/fmt/include/fmt/format.h:745:28: fatal error: use of undeclared identifier 'malloc'
745 | T* p = static_cast<T*>(malloc(n * sizeof(T)));
| ^~~~~~
This is because malloc and free are defined in <cstdlib>, and os.h does
not explicitly include it. (Before libc++ 21, the fmt library was
"lucky" that <cstdlib> was included transitively, but this is no longer
the case.)
PR: 293182
Approved by: riggs (maintainer)
MFH: 2026Q1
[2 lines not shown]
multimedia/mkvtoolnix: fix build with libc++ 21
With libc++ 21 multimedia/mkvtoolnix fails to build, with errors similar
to:
In file included from lib/fmt/src/os.cc:13:
In file included from lib/fmt/include/fmt/os.h:11:
lib/fmt/include/fmt/format.h:745:28: fatal error: use of undeclared identifier 'malloc'
745 | T* p = static_cast<T*>(malloc(n * sizeof(T)));
| ^~~~~~
This is because malloc and free are defined in <cstdlib>, and os.h does
not explicitly include it. (Before libc++ 21, the fmt library was
"lucky" that <cstdlib> was included transitively, but this is no longer
the case.)
PR: 293182
Approved by: riggs (maintainer)
MFH: 2026Q1
[LifetimeSafety] 'erase' does not invaldiate node-based containers (#181216)
```cpp
// This pattern was previously flagged as a lifetime violation
for (auto it = my_map.begin(); it != my_map.end(); ) {
if (should_delete(*it)) {
my_map.erase(it++); // Safe in map, but flagged as invalidating 'it'
} else {
++it;
}
}
```