-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix warnings #27152
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
Fix warnings #27152
Conversation
#elif SWIFT_COMPILER_IS_MSVC | ||
#pragma warning(push) | ||
#pragma warning(disable : 4996) | ||
#endif |
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 can't believe I never thought of this. This is a great idea!
@swift-ci please smoke test |
b9a70cf
to
cc45e50
Compare
lib/AST/ASTScope.cpp
Outdated
#pragma warning(disable : 4996) | ||
#endif | ||
|
||
LLVM_ATTRIBUTE_DEPRECATED( |
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.
Can we place this on the declaration instead of the definition?
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.
OK so looks like declaration was already marked with this, and testing with clang-cl doesn't produce this warning. Therefore, I think we only have to worry about it if it's MSVC.
lib/SIL/SILPrinter.cpp
Outdated
#pragma warning(disable : 4996) | ||
#endif | ||
|
||
LLVM_ATTRIBUTE_DEPRECATED( |
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.
Similar
cc45e50
to
edc26bb
Compare
@swift-ci please smoke test |
This fixes a bunch of warnings, most of them complaining about not all code paths returning a value. Also fixes complaints about
dump
being for use only in the debugger when onedump
function calls another.