-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Suppress a number of warnings in no-assert builds #17721
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
@swift-ci please test |
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.
Mostly looks good. Some suggestions for better options.
lib/AST/ASTMangler.cpp
Outdated
@@ -654,6 +654,7 @@ void ASTMangler::appendDeclName(const ValueDecl *decl) { | |||
assert(((relatedEntityKind[0] >= 'a' && relatedEntityKind[0] <= 'j') || | |||
(relatedEntityKind[0] >= 'A' && relatedEntityKind[0] <= 'J')) && | |||
"Only [a-jA-J] are reserved for related entity kinds"); | |||
(void)relatedEntityKind; | |||
return appendOperatorParam("L", synthesizedTypeAttr->getManglingName()); |
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 think this was just supposed to use relatedEntityKind
instead of calling getManglingName
again.
lib/IRGen/GenMeta.cpp
Outdated
@@ -874,6 +874,7 @@ namespace { | |||
|
|||
auto *dc = fn.getDecl()->getDeclContext(); | |||
assert(!isa<ExtensionDecl>(dc)); | |||
(void)dc; | |||
|
|||
if (fn.getDecl()->getDeclContext() == getType()) { |
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.
Also a place to reuse dc
.
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test Linux platform |
Lots of variables used only in asserts were warning in non-assert builds.