|
| 1 | +//** THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY. **/ |
| 2 | +import cpp |
| 3 | +import RuleMetadata |
| 4 | +import codingstandards.cpp.exclusions.RuleMetadata |
| 5 | + |
| 6 | +newtype BitfieldTypesQuery = |
| 7 | + TBitFieldsShallOnlyBeDeclaredWithAnAppropriateTypeQuery() or |
| 8 | + TSingleBitNamedBitFieldsOfASignedTypeQuery() |
| 9 | + |
| 10 | +predicate isBitfieldTypesQueryMetadata(Query query, string queryId, string ruleId, string category) { |
| 11 | + query = |
| 12 | + // `Query` instance for the `bitFieldsShallOnlyBeDeclaredWithAnAppropriateType` query |
| 13 | + BitfieldTypesPackage::bitFieldsShallOnlyBeDeclaredWithAnAppropriateTypeQuery() and |
| 14 | + queryId = |
| 15 | + // `@id` for the `bitFieldsShallOnlyBeDeclaredWithAnAppropriateType` query |
| 16 | + "c/misra/bit-fields-shall-only-be-declared-with-an-appropriate-type" and |
| 17 | + ruleId = "RULE-6-1" and |
| 18 | + category = "required" |
| 19 | + or |
| 20 | + query = |
| 21 | + // `Query` instance for the `singleBitNamedBitFieldsOfASignedType` query |
| 22 | + BitfieldTypesPackage::singleBitNamedBitFieldsOfASignedTypeQuery() and |
| 23 | + queryId = |
| 24 | + // `@id` for the `singleBitNamedBitFieldsOfASignedType` query |
| 25 | + "c/misra/single-bit-named-bit-fields-of-a-signed-type" and |
| 26 | + ruleId = "RULE-6-2" and |
| 27 | + category = "required" |
| 28 | +} |
| 29 | + |
| 30 | +module BitfieldTypesPackage { |
| 31 | + Query bitFieldsShallOnlyBeDeclaredWithAnAppropriateTypeQuery() { |
| 32 | + //autogenerate `Query` type |
| 33 | + result = |
| 34 | + // `Query` type for `bitFieldsShallOnlyBeDeclaredWithAnAppropriateType` query |
| 35 | + TQueryC(TBitfieldTypesPackageQuery(TBitFieldsShallOnlyBeDeclaredWithAnAppropriateTypeQuery())) |
| 36 | + } |
| 37 | + |
| 38 | + Query singleBitNamedBitFieldsOfASignedTypeQuery() { |
| 39 | + //autogenerate `Query` type |
| 40 | + result = |
| 41 | + // `Query` type for `singleBitNamedBitFieldsOfASignedType` query |
| 42 | + TQueryC(TBitfieldTypesPackageQuery(TSingleBitNamedBitFieldsOfASignedTypeQuery())) |
| 43 | + } |
| 44 | +} |
0 commit comments