Skip to content

Commit c140fe4

Browse files
committed
[CodeCompletion] Only show type annotations for macros that return non-void
Showing the type annotation only makes sense if they are not `Void`. That’s consistent with functions where we also don’t show a `Void` return type. Most importantly, we shouldn’t be showing a `Void` type annotation for attached macros. rdar://108870970
1 parent ed3555a commit c140fe4

File tree

3 files changed

+119
-109
lines changed

3 files changed

+119
-109
lines changed

include/swift/IDE/CompletionLookup.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,12 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
324324

325325
bool isUnresolvedMemberIdealType(Type Ty);
326326

327+
/// Creates a \c CodeCompletionResultBuilder in this lookup’s sink and sets
328+
/// the current expected type context in it
329+
CodeCompletionResultBuilder
330+
makeResultBuilder(CodeCompletionResultKind kind,
331+
SemanticContextKind semanticContext) const;
332+
327333
void addValueBaseName(CodeCompletionResultBuilder &Builder,
328334
DeclBaseName Name);
329335

0 commit comments

Comments
 (0)