[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
================
@@ -3273,18 +3307,18 @@ static std::string GetDefaultValueString(const ParmVarDecl *Param,
}
/// Add function parameter chunks to the given code completion string.
-static void AddFunctionParameterChunks(Preprocessor &PP,
- const PrintingPolicy &Policy,
- const FunctionDecl *Function,
- CodeCompletionBuilder &Result,
- unsigned Start = 0,
- bool InOptional = false) {
+static void AddFunctionParameterChunks(
+ Preprocessor &PP, const PrintingPolicy &Policy,
+ const FunctionDecl *Function, CodeCompletionBuilder &Result,
+ unsigned Start = 0, bool InOptional = false,
+ bool AsInformativeChunk = false, bool IsInDeclarationContext = false) {
----------------
HighCommander4 wrote:
With https://github.com/HighCommander4/llvm-project/commit/27df471cb6e0ad83b3d9a9a4a38998686ffb7c70, we are passing `AsInformativeChunk = FunctionCanBeCall || DeclaringEntity` and `IsInDeclarationContext = DeclaringEntity`.
It would probably be clearer to just pass `FunctionCanBeCall` and `DeclaringEntity` as parameters directly and compute their `||` inside this function.
https://github.com/llvm/llvm-project/pull/165916
More information about the cfe-commits
mailing list