[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 25 11:13:53 PST 2019
ilya-biryukov added inline comments.
Comment at: clang/include/clang/Sema/Sema.h:294
+ /// function_ref, clients should make sure all calls to get() with the same
+ /// location happen while function_ref is alive.
+ void enterFunctionArgument(SourceLocation Tok,
> Is it only to avoid copy costs?
Using `std::function` won't help much, all functions we pass here actually capture local variables by reference.
Comment at: clang/lib/Parse/ParseDeclCXX.cpp:3490
- CalledSignatureHelp = true;
- Actions.CodeCompleteExpression(getCurScope(), PreferredType);
> IIUC, deleting this call is safe, since it is going to be called in `ParseAssignmentExpression`. Could you add a comment stating that?(same for other deleted call sites of this function.)
Exactly! I changed the description of the change instead of adding a comment.
In the new version `ParseExpressionList` is not responsible for the code completion anymore and leaving the comment merely for historical reasons does not look appealing.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits