etyloppihacilem wrote:

Hi, thank you for your feedback !

I removed all logic from clangd `getSignature` as you suggested, this approach 
is cleaner. I removed `CK_FunctionQualifier` as well.

At the moment, `IsAddressOfOperand` is needed as `FunctionCanBeCalled` is not 
able to determine whether a completion is a call or a pointer.

I realized that the _class scope simulation_ was not directly related to this 
PR anymore, let me know if you want me to remove those modification and open a 
different PR for clangd/clangd#880.

It can be found at `SemaCodeComplete.cpp:6969` and now uses `Sema::ContextRAII`:
```cpp
std::optional<Sema::ContextRAII> SavedContext;
// When completing a definition, simulate that we are in class scope to access
// private methods.
if (IsInDeclarationContext && Ctx != nullptr)
  SavedContext.emplace(SemaRef, Ctx);
```

https://github.com/llvm/llvm-project/pull/165916
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to