Factors out member decleration gathering and uses it in parsing to call signature
help. Doesn't support signature help for base class constructors, the code was too
coupled with diagnostic handling, but still can be factored out but just needs
more afford.
Details
- Reviewers
sammccall ilya-biryukov ioeric - Commits
- rG84774c3ae3df: [CodeCompletion] Enable signature help when initializing class/struct/union…
rL341949: [CodeCompletion] Enable signature help when initializing class/struct/union…
rC341949: [CodeCompletion] Enable signature help when initializing class/struct/union…
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 22469 Build 22469: arc lint + arc unit
Event Timeline
include/clang/Sema/Sema.h | ||
---|---|---|
10809 | The name is very generic, but the helper is only applicable to our specific case (looking up ctor member initializer). Maybe choose a different name? | |
lib/Parse/ParseDeclCXX.cpp | ||
3471 | We're calling completion in other instances, this gives us valuable information (preferred type). | |
3473 | That's a lot of code in parser. We could probably extract this as a helper in Sema (similar to ProduceConstructorSignatureHelp) to follow the same pattern that we have for all the other signature help calls. |
lib/Parse/ParseDeclCXX.cpp | ||
---|---|---|
3472 | Let's always call signature help and code completion here to be consistent with other cases. | |
lib/Sema/SemaDeclCXX.cpp | ||
3784 | NIT: invert condition to reduce nesting and simplify the code, i.e. if (SS.getScopeRep() || TemplateTypeTy) return nullptr; // rest of the code | |
3785 | This comment does not look useful without a context, maybe move it to the previous call site in sema? |
include/clang/Sema/Sema.h | ||
---|---|---|
4571 | s/decleration/declaration. Maybe even remove the comment? the name is self-descriptive |
s/decleration/declaration.
Maybe even remove the comment? the name is self-descriptive