-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix eight warnings on Linux. #327
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
@@ -1318,6 +1315,7 @@ bool ModelASTWalker::findUrlStartingLoc(StringRef Text, | |||
return true; | |||
} | |||
} | |||
#endif | |||
return false; |
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.
Wouldn't this cause equivalent unreachable code warnings for return false
?
Could you do #ifdef ... #else ... #endif
instead?
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.
It looks like the 'return false' is reachable with and without SWIFT_HAVE_WORKING_STD_REGEX?
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.
Oh, I see. Cute.
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 patched it both ways but settled on this way because it looked cleaner.
Fix spurious docs warning that @in and @in_guaranteed should be ``fn``. Add ``#ifdef SWIFT_OBJC_INTEROP`` to silence a -Wunused-function on linux since that function is only used from within that #ifdef elsewhere. Fix three -Wunused-function warnings on linux. Fix two -Wunreachable-code warnings on linux dealing with SWIFT_HAVE_WORKING_STD_REGEX.
I think the latest version is OK. Merging. |
Fix eight warnings on Linux.
Merge upstream 2020 03 06
Add SwiftGraph for Swift 4.2
No description provided.