[code-completion] Fix type context for single-expression implicit getter

This adds an implicit body so that we can dig out the return type
context the same way as a normal function. For now, we are also treating
the first expression in a multi-statement implicit getter body the same
way; we'll need to refactor how we complete in accessors to
differentiate those cases.
This commit is contained in:
Ben Langmuir
2019-03-26 14:35:34 -07:00
parent b14cd916a3
commit e255bac6be
6 changed files with 30 additions and 12 deletions

View File

@@ -180,7 +180,7 @@ public:
SmallVectorImpl<StringRef> &Keywords, SourceLoc introducerLoc) {};
/// Complete at the beginning of accessor in a accessor block.
virtual void completeAccessorBeginning() {};
virtual void completeAccessorBeginning(CodeCompletionExpr *E) {};
/// Complete the keyword in attribute, for instance, @available.
virtual void completeDeclAttrKeyword(Decl *D, bool Sil, bool Param) {};