Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3e96c5f

Browse filesBrowse files
committed
refine RULE-6-1
Use the fact that `resolveTypedefs` is an identity operation with types that have no type alias (typedef).
1 parent 831cf03 commit 3e96c5f
Copy full SHA for 3e96c5f

File tree

1 file changed

+2
-5
lines changed
Filter options

1 file changed

+2
-5
lines changed

‎c/misra/src/rules/RULE-6-1/BitFieldsShallOnlyBeDeclaredWithAnAppropriateType.ql

Copy file name to clipboardExpand all lines: c/misra/src/rules/RULE-6-1/BitFieldsShallOnlyBeDeclaredWithAnAppropriateType.ql
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ from BitField bitField
2828
where
2929
not isExcluded(bitField,
3030
BitfieldTypesPackage::bitFieldsShallOnlyBeDeclaredWithAnAppropriateTypeQuery()) and
31-
/* A violation would neither an appropriate primitive type nor an appropriate typedef. */
32-
not (
33-
isAppropriatePrimitive(bitField.getType()) or
34-
isAppropriatePrimitive(bitField.getType().resolveTypedefs())
35-
)
31+
/* A violation would neither be an appropriate primitive type nor an appropriate typedef. */
32+
not isAppropriatePrimitive(bitField.getType().resolveTypedefs())
3633
select bitField, "Bit-field " + bitField + " is declared on type " + bitField.getType() + "."

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.