[clang] [clang-tools-extra] [clangd] Autocomplete fixes for methods (PR #165916)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 7 23:07:21 PST 2026
================
@@ -4568,7 +4575,23 @@ class Parser : public CodeCompletionHandler {
bool EnteringContext, bool *MayBePseudoDestructor = nullptr,
bool IsTypename = false, const IdentifierInfo **LastII = nullptr,
bool OnlyNamespace = false, bool InUsingDeclaration = false,
- bool Disambiguation = false);
+ bool Disambiguation = false, bool IsAddressOfOperand = false,
----------------
HighCommander4 wrote:
Please extend the comment above this function to describe the new parameters.
In that comment, please include a disclaimer that these parameters are used by code completion and may not be set by all callers.
Please do the same for `TryAnnotateTypeOrScopeToken` as well.
(Rationale: these functions have a lot of call sites, and I haven't evaluated in detail for each of them whether e.g. `isAddressOfOperand=true` should potentially be passed in that scenario, nor do I have the level of knowledge of the parser code to do that evaluation. Hence the "may not be set by all callers" disclaimer. This is fine for code completion, but we wouldn't want a future change starting to rely on these flags for some semantic/correctness purpose.)
https://github.com/llvm/llvm-project/pull/165916
More information about the cfe-commits
mailing list