Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ signature module BitFieldsShouldNotBeDeclaredConfigSig {
}

module BitFieldsShouldNotBeDeclared<BitFieldsShouldNotBeDeclaredConfigSig Config> {
query predicate problems(
BitField bf, Class c, string message, Class linkLocation, string linkDescription
) {
query predicate problems(BitField bf, string message, Class c, string className) {
/*
* The condition that is allowed that is IF this is a bit-field, then it should be part of a class
* that is flagged as a hardware or protocol class. To detect this we look for violations of that form.
Comment thread
knewbury01 marked this conversation as resolved.
Expand All @@ -28,8 +26,7 @@ module BitFieldsShouldNotBeDeclared<BitFieldsShouldNotBeDeclaredConfigSig Config
not isExcluded(bf, Config::getQuery()) and
not isExcluded(c, Config::getQuery()) and
bf = c.getAField() and
linkLocation = c and
linkDescription = c.getName() and
className = c.getName() and
not c instanceof HardwareOrProtocolInterfaceClass and
message = "Bit-field used within a class $@ that is not a hardware or protocol class."
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| test.cpp:57:8:57:8 | c | test.cpp:53:7:53:8 | B2 | Bit-field used within a class $@ that is not a hardware or protocol class. | test.cpp:53:7:53:8 | B2 | B2 |
| test.cpp:57:8:57:8 | c | Bit-field used within a class $@ that is not a hardware or protocol class. | test.cpp:53:7:53:8 | B2 | B2 |
Loading