[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Tue May 14 12:58:31 PDT 2024
sdkrystian wrote:
Well this took forever to reduce:
```cpp
template<typename T>
struct A;
template<typename T>
bool operator==(const A<T>&, const A<T>&);
template<typename>
void f(int *x)
{
[&](auto *y) { return x == y; };
}
void g()
{
f<int>(nullptr);
}
```
We initially build a `CXXOperatorCallExpr` during parsing for the comparison, but `TreeTransform` prematurely rebuilds it as a builtin binary operator when `f` is instantiated.
https://github.com/llvm/llvm-project/pull/90500
More information about the cfe-commits
mailing list