-
Notifications
You must be signed in to change notification settings - Fork 36
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
Bump clang-tidy to 19 and fix linter errors #306
Conversation
.clang-tidy
Outdated
@@ -44,7 +43,6 @@ Checks: >- | |||
-readability-function-cognitive-complexity, | |||
-readability-identifier-length, | |||
-readability-magic-numbers, | |||
-readability-enum-initial-value, |
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 don't really like this. The standard is pretty clear about what the values would be. So no need to enforce use writing +1, +2 etc. Really, I have no idea why somebody thinks this is less error prone.
src/virtio-p9fs.h
Outdated
@@ -55,73 +55,73 @@ enum virtio_p9fs_constants : uint32_t { | |||
/// \brief 9P2000.L opcodes | |||
enum p9_opcode : uint8_t { | |||
P9_TLERROR = 6, |
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 here was just being lazy. :)
src/machine-reg.h
Outdated
@@ -177,15 +177,15 @@ enum class machine_reg : uint64_t { | |||
uarch_last_ = uarch_x31, | |||
|
|||
// Views of registers | |||
htif_tohost_dev, |
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.
How do you know PMA_SHADOW_STATE_LENGTH+8 doesn't fall inside PMA_SHADOW_UARCH_STATE? See? The compiler will not warn about repeated enums, because we use repeated enums all the time.
@@ -795,7 +795,7 @@ const pma_entry &machine::find_pma_entry(const CONTAINER &pmas, uint64_t paddr, | |||
|
|||
template <typename T> |
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 want to get rid of this entirely. I want to remove machine::find_pma_entry altogether, and have the update_merkle_tree_page or whatever that uses it t o simply use std::find on the m_merkle_pmas array.
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 just don't like the enum one.
da65e33
to
711f920
Compare
No description provided.