[PATCH] D51917: [CodeCompletion] Enable signature help when initializing class/struct/union members.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 11 04:46:48 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: lib/Parse/ParseDeclCXX.cpp:3472
+ ParseExpressionList(ArgExprs, CommaLocs, [&] {
+ if (CalledSignatureHelp)
+ return;
----------------
Let's always call signature help and code completion here to be consistent with other cases.
We don't want to ever block completion, even in obscure cases when it's called twice.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:3784
+ IdentifierInfo *MemberOrBase) {
+ if (!SS.getScopeRep() && !TemplateTypeTy) {
+ // Look for a member, first.
----------------
NIT: invert condition to reduce nesting and simplify the code, i.e.
```
if (SS.getScopeRep() || TemplateTypeTy)
return nullptr;
// rest of the code
```
================
Comment at: lib/Sema/SemaDeclCXX.cpp:3785
+ if (!SS.getScopeRep() && !TemplateTypeTy) {
+ // Look for a member, first.
+ DeclContext::lookup_result Result = ClassDecl->lookup(MemberOrBase);
----------------
This comment does not look useful without a context, maybe move it to the previous call site in sema?
Repository:
rC Clang
https://reviews.llvm.org/D51917
More information about the cfe-commits
mailing list