Jump to conversation
Unresolved conversations (2)
@zyn0217 zyn0217 Jan 31, 2024
While I haven’t had time to go through this PR, these lines appear to be the reason for the test failure. We had been relying on these different CallExprs to tell whether we should drop the explicit object parameter at the clangd site (IsFunctor). And this seemingly breaks that expectation as well as changes the AST?
clang/lib/Sema/SemaOverload.cpp
SuperSodaSea zyn0217
@shafik shafik Jan 12, 2024
Does this change have a functional change wrt this change or is this just a correctness fix?
clang/lib/Sema/SemaOverload.cpp
SuperSodaSea
Resolved conversations (8)
@AaronBallman AaronBallman Jan 30, 2024
```suggestion unsigned NumParamsToSkip = 0; if (StaticOperator) { // If we're calling a static operator, we need to emit the object argument // and ignore it. EmitIgnoredExpr(E->getArg(0)); NumParamsToSkip = 1; } EmitCallArgs(Args, dyn_cast<FunctionProtoType>(FnType), E->arguments(), E->getDirectCallee(), NumParamsToSkip, Order); ```
Outdated
clang/lib/CodeGen/CGExpr.cpp
AaronBallman efriedma-quic
SuperSodaSea
@AaronBallman AaronBallman Jan 30, 2024
```suggestion if (auto *OCE = dyn_cast<CXXOperatorCallExpr>(E)) { ```
Outdated
clang/lib/CodeGen/CGExpr.cpp
@cor3ntin cor3ntin Jan 11, 2024
The best wording i can find is this one https://eel.is/c++draft/over.match#funcs.general-4.sentence-5 ```suggestion C++23 [over.match.funcs.general] p4.2 For static member functions, the implicit object parameter is considered to match any object. ```
Outdated
clang/lib/Sema/SemaOverload.cpp
SuperSodaSea
@cor3ntin cor3ntin Jan 11, 2024
```suggestion - Fix incorrect code generation caused by the object argument of ``static operator()`` and ``static operator[]`` calls not being evaluated. ```
Outdated
clang/docs/ReleaseNotes.rst
@shafik shafik Oct 10, 2023
nit ```suggestion E->getDirectCallee(), /*ParamsToSkip=*/0, Order); ```
Outdated
clang/lib/CodeGen/CGExpr.cpp
@shafik shafik Oct 10, 2023
nit ```suggestion /*ParamsToSkip=*/0, Order); ```
Outdated
clang/lib/CodeGen/CGExpr.cpp
@shafik shafik Oct 10, 2023
So in the static case, what value do we expect `ThisVal` to have and does that have consequences that the code after this is prepared for?
clang/lib/AST/ExprConstant.cpp
SuperSodaSea
@cor3ntin cor3ntin Oct 10, 2023
```suggestion // Initialize the object parameter. ```
Outdated
clang/lib/Sema/SemaOverload.cpp