-
Notifications
You must be signed in to change notification settings - Fork 48
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
Enable clang warnings used by LLVM #774
Conversation
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.
Thanks for dealing with these warnings. I could not test it yet because it does not compile in my sandbox (I think Tim already pointed out why).
// For switch statements whose cases have return statements for | ||
// all possibilities. Clang emits warnings if the default: is | ||
// present, gcc emits warnings if it is absent. | ||
#if __clang__ |
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.
Please update the style guide.
@@ -585,9 +585,6 @@ void OmpStructureChecker::Enter( | |||
OmpClauseSet allowed{OmpClause::DEPEND}; | |||
SetContextAllowed(allowed); | |||
} break; | |||
default: | |||
// TODO others | |||
break; |
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.
This switch statement should also have SWITCH_COVERS_ALL_CASES
as per the updated style guide
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.
@klausler looks like @DavidTruby's comment fell through the cracks. @DavidTruby - can you submit a separate PR for it?
Original-commit: flang-compiler/f18@c6b3420 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@8ebfd8d Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@b2a0503 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@48b81a2 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@7e11f81 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@6e269b4 Reviewed-on: flang-compiler/f18#774
…/pmk-more-warnings Enable clang warnings used by LLVM Original-commit: flang-compiler/f18@c098156 Reviewed-on: flang-compiler/f18#774
Original-commit: flang-compiler/f18@c6b3420 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@8ebfd8d Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@b2a0503 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@48b81a2 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@7e11f81 Reviewed-on: flang-compiler/f18#774 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@6e269b4 Reviewed-on: flang-compiler/f18#774
Enable
-Wstring-conversion
and-Wcovered-switch-default
warnings when building with clang. Patch sources to dodge the warnings.