[CodeCompletion] Don't attach attr to decl if blank line exists

```
@#^COMPLETE^#

public func something() {}
```
In this case, we can't say the user is adding attribute to the func or
starting a new declaration. So if there're one or more blank lines after the
completion, suggest context free attribute list.

rdar://problem/50441643
This commit is contained in:
Rintaro Ishizaki
2019-06-20 17:03:34 -07:00
parent 16bc322cd3
commit 09ca68e485
4 changed files with 34 additions and 5 deletions

View File

@@ -189,7 +189,7 @@ public:
virtual void completeAccessorBeginning(CodeCompletionExpr *E) {};
/// Complete the keyword in attribute, for instance, @available.
virtual void completeDeclAttrBeginning(bool Sil) {};
virtual void completeDeclAttrBeginning(bool Sil, bool isIndependent) {};
/// Complete the parameters in attribute, for instance, version specifier for
/// @available.