-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Completion] Only provide macro completions when they are valid #64986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
58afce1
to
2d77803
Compare
@swift-ci please test |
Ah that's annoying, warning/error are macros on MacOS but not on Linux/Windows (for obvious reasons). |
2d77803
to
fbd91b0
Compare
584cc87
to
921b40d
Compare
@swift-ci please test |
Only return macros that are valid in their current position, ie. an attached macro is not valid on a nominal. Also return freestanding expression macros in code block item position and handle the new freestanding code item macros. Resolves rdar://105563583.
921b40d
to
31dee1c
Compare
@swift-ci please test |
@@ -1130,6 +1130,8 @@ static void addPoundDirectives(CodeCompletionResultSink &Sink) { | |||
Builder.addSimpleTypedParameter("Int"); | |||
Builder.addRightParen(); | |||
}); | |||
|
|||
#ifndef SWIFT_SWIFT_PARSER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had originally removed this, but better to keep it for linux/windows for now. We can remove after SWIFT_SWIFT_PARSER is enabled in all the places.
Only return macros that are valid in their current position, ie. an attached macro is not valid on a nominal.
Also return freestanding expression macros in code block item position and handle the new freestanding code item macros.
Resolves rdar://105563583.