|
| 1 | +//** THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY. **/ |
| 2 | +import cpp |
| 3 | +import RuleMetadata |
| 4 | +import codingstandards.cpp.exclusions.RuleMetadata |
| 5 | + |
| 6 | +newtype ConversionsQuery = |
| 7 | + TNoConversionFromBoolQuery() or |
| 8 | + TNoImplicitBoolConversionQuery() or |
| 9 | + TNoCharacterNumericalValueQuery() or |
| 10 | + TNoSignednessChangeFromPromotionQuery() or |
| 11 | + TNumericAssignmentTypeMismatchQuery() or |
| 12 | + TFunctionPointerConversionContextQuery() or |
| 13 | + TVirtualBaseClassCastToDerivedQuery() or |
| 14 | + TNoCStyleOrFunctionalCastsQuery() or |
| 15 | + TIntToPointerCastProhibitedQuery() or |
| 16 | + TNoPointerToIntegralCastQuery() or |
| 17 | + TPointerToIntegralCastQuery() or |
| 18 | + TNoStandaloneTypeCastExpressionQuery() |
| 19 | + |
| 20 | +predicate isConversionsQueryMetadata(Query query, string queryId, string ruleId, string category) { |
| 21 | + query = |
| 22 | + // `Query` instance for the `noConversionFromBool` query |
| 23 | + ConversionsPackage::noConversionFromBoolQuery() and |
| 24 | + queryId = |
| 25 | + // `@id` for the `noConversionFromBool` query |
| 26 | + "cpp/misra/no-conversion-from-bool" and |
| 27 | + ruleId = "RULE-7-0-1" and |
| 28 | + category = "required" |
| 29 | + or |
| 30 | + query = |
| 31 | + // `Query` instance for the `noImplicitBoolConversion` query |
| 32 | + ConversionsPackage::noImplicitBoolConversionQuery() and |
| 33 | + queryId = |
| 34 | + // `@id` for the `noImplicitBoolConversion` query |
| 35 | + "cpp/misra/no-implicit-bool-conversion" and |
| 36 | + ruleId = "RULE-7-0-2" and |
| 37 | + category = "required" |
| 38 | + or |
| 39 | + query = |
| 40 | + // `Query` instance for the `noCharacterNumericalValue` query |
| 41 | + ConversionsPackage::noCharacterNumericalValueQuery() and |
| 42 | + queryId = |
| 43 | + // `@id` for the `noCharacterNumericalValue` query |
| 44 | + "cpp/misra/no-character-numerical-value" and |
| 45 | + ruleId = "RULE-7-0-3" and |
| 46 | + category = "required" |
| 47 | + or |
| 48 | + query = |
| 49 | + // `Query` instance for the `noSignednessChangeFromPromotion` query |
| 50 | + ConversionsPackage::noSignednessChangeFromPromotionQuery() and |
| 51 | + queryId = |
| 52 | + // `@id` for the `noSignednessChangeFromPromotion` query |
| 53 | + "cpp/misra/no-signedness-change-from-promotion" and |
| 54 | + ruleId = "RULE-7-0-5" and |
| 55 | + category = "required" |
| 56 | + or |
| 57 | + query = |
| 58 | + // `Query` instance for the `numericAssignmentTypeMismatch` query |
| 59 | + ConversionsPackage::numericAssignmentTypeMismatchQuery() and |
| 60 | + queryId = |
| 61 | + // `@id` for the `numericAssignmentTypeMismatch` query |
| 62 | + "cpp/misra/numeric-assignment-type-mismatch" and |
| 63 | + ruleId = "RULE-7-0-6" and |
| 64 | + category = "required" |
| 65 | + or |
| 66 | + query = |
| 67 | + // `Query` instance for the `functionPointerConversionContext` query |
| 68 | + ConversionsPackage::functionPointerConversionContextQuery() and |
| 69 | + queryId = |
| 70 | + // `@id` for the `functionPointerConversionContext` query |
| 71 | + "cpp/misra/function-pointer-conversion-context" and |
| 72 | + ruleId = "RULE-7-11-3" and |
| 73 | + category = "required" |
| 74 | + or |
| 75 | + query = |
| 76 | + // `Query` instance for the `virtualBaseClassCastToDerived` query |
| 77 | + ConversionsPackage::virtualBaseClassCastToDerivedQuery() and |
| 78 | + queryId = |
| 79 | + // `@id` for the `virtualBaseClassCastToDerived` query |
| 80 | + "cpp/misra/virtual-base-class-cast-to-derived" and |
| 81 | + ruleId = "RULE-8-2-1" and |
| 82 | + category = "required" |
| 83 | + or |
| 84 | + query = |
| 85 | + // `Query` instance for the `noCStyleOrFunctionalCasts` query |
| 86 | + ConversionsPackage::noCStyleOrFunctionalCastsQuery() and |
| 87 | + queryId = |
| 88 | + // `@id` for the `noCStyleOrFunctionalCasts` query |
| 89 | + "cpp/misra/no-c-style-or-functional-casts" and |
| 90 | + ruleId = "RULE-8-2-2" and |
| 91 | + category = "required" |
| 92 | + or |
| 93 | + query = |
| 94 | + // `Query` instance for the `intToPointerCastProhibited` query |
| 95 | + ConversionsPackage::intToPointerCastProhibitedQuery() and |
| 96 | + queryId = |
| 97 | + // `@id` for the `intToPointerCastProhibited` query |
| 98 | + "cpp/misra/int-to-pointer-cast-prohibited" and |
| 99 | + ruleId = "RULE-8-2-6" and |
| 100 | + category = "required" |
| 101 | + or |
| 102 | + query = |
| 103 | + // `Query` instance for the `noPointerToIntegralCast` query |
| 104 | + ConversionsPackage::noPointerToIntegralCastQuery() and |
| 105 | + queryId = |
| 106 | + // `@id` for the `noPointerToIntegralCast` query |
| 107 | + "cpp/misra/no-pointer-to-integral-cast" and |
| 108 | + ruleId = "RULE-8-2-7" and |
| 109 | + category = "advisory" |
| 110 | + or |
| 111 | + query = |
| 112 | + // `Query` instance for the `pointerToIntegralCast` query |
| 113 | + ConversionsPackage::pointerToIntegralCastQuery() and |
| 114 | + queryId = |
| 115 | + // `@id` for the `pointerToIntegralCast` query |
| 116 | + "cpp/misra/pointer-to-integral-cast" and |
| 117 | + ruleId = "RULE-8-2-8" and |
| 118 | + category = "required" |
| 119 | + or |
| 120 | + query = |
| 121 | + // `Query` instance for the `noStandaloneTypeCastExpression` query |
| 122 | + ConversionsPackage::noStandaloneTypeCastExpressionQuery() and |
| 123 | + queryId = |
| 124 | + // `@id` for the `noStandaloneTypeCastExpression` query |
| 125 | + "cpp/misra/no-standalone-type-cast-expression" and |
| 126 | + ruleId = "RULE-9-2-1" and |
| 127 | + category = "required" |
| 128 | +} |
| 129 | + |
| 130 | +module ConversionsPackage { |
| 131 | + Query noConversionFromBoolQuery() { |
| 132 | + //autogenerate `Query` type |
| 133 | + result = |
| 134 | + // `Query` type for `noConversionFromBool` query |
| 135 | + TQueryCPP(TConversionsPackageQuery(TNoConversionFromBoolQuery())) |
| 136 | + } |
| 137 | + |
| 138 | + Query noImplicitBoolConversionQuery() { |
| 139 | + //autogenerate `Query` type |
| 140 | + result = |
| 141 | + // `Query` type for `noImplicitBoolConversion` query |
| 142 | + TQueryCPP(TConversionsPackageQuery(TNoImplicitBoolConversionQuery())) |
| 143 | + } |
| 144 | + |
| 145 | + Query noCharacterNumericalValueQuery() { |
| 146 | + //autogenerate `Query` type |
| 147 | + result = |
| 148 | + // `Query` type for `noCharacterNumericalValue` query |
| 149 | + TQueryCPP(TConversionsPackageQuery(TNoCharacterNumericalValueQuery())) |
| 150 | + } |
| 151 | + |
| 152 | + Query noSignednessChangeFromPromotionQuery() { |
| 153 | + //autogenerate `Query` type |
| 154 | + result = |
| 155 | + // `Query` type for `noSignednessChangeFromPromotion` query |
| 156 | + TQueryCPP(TConversionsPackageQuery(TNoSignednessChangeFromPromotionQuery())) |
| 157 | + } |
| 158 | + |
| 159 | + Query numericAssignmentTypeMismatchQuery() { |
| 160 | + //autogenerate `Query` type |
| 161 | + result = |
| 162 | + // `Query` type for `numericAssignmentTypeMismatch` query |
| 163 | + TQueryCPP(TConversionsPackageQuery(TNumericAssignmentTypeMismatchQuery())) |
| 164 | + } |
| 165 | + |
| 166 | + Query functionPointerConversionContextQuery() { |
| 167 | + //autogenerate `Query` type |
| 168 | + result = |
| 169 | + // `Query` type for `functionPointerConversionContext` query |
| 170 | + TQueryCPP(TConversionsPackageQuery(TFunctionPointerConversionContextQuery())) |
| 171 | + } |
| 172 | + |
| 173 | + Query virtualBaseClassCastToDerivedQuery() { |
| 174 | + //autogenerate `Query` type |
| 175 | + result = |
| 176 | + // `Query` type for `virtualBaseClassCastToDerived` query |
| 177 | + TQueryCPP(TConversionsPackageQuery(TVirtualBaseClassCastToDerivedQuery())) |
| 178 | + } |
| 179 | + |
| 180 | + Query noCStyleOrFunctionalCastsQuery() { |
| 181 | + //autogenerate `Query` type |
| 182 | + result = |
| 183 | + // `Query` type for `noCStyleOrFunctionalCasts` query |
| 184 | + TQueryCPP(TConversionsPackageQuery(TNoCStyleOrFunctionalCastsQuery())) |
| 185 | + } |
| 186 | + |
| 187 | + Query intToPointerCastProhibitedQuery() { |
| 188 | + //autogenerate `Query` type |
| 189 | + result = |
| 190 | + // `Query` type for `intToPointerCastProhibited` query |
| 191 | + TQueryCPP(TConversionsPackageQuery(TIntToPointerCastProhibitedQuery())) |
| 192 | + } |
| 193 | + |
| 194 | + Query noPointerToIntegralCastQuery() { |
| 195 | + //autogenerate `Query` type |
| 196 | + result = |
| 197 | + // `Query` type for `noPointerToIntegralCast` query |
| 198 | + TQueryCPP(TConversionsPackageQuery(TNoPointerToIntegralCastQuery())) |
| 199 | + } |
| 200 | + |
| 201 | + Query pointerToIntegralCastQuery() { |
| 202 | + //autogenerate `Query` type |
| 203 | + result = |
| 204 | + // `Query` type for `pointerToIntegralCast` query |
| 205 | + TQueryCPP(TConversionsPackageQuery(TPointerToIntegralCastQuery())) |
| 206 | + } |
| 207 | + |
| 208 | + Query noStandaloneTypeCastExpressionQuery() { |
| 209 | + //autogenerate `Query` type |
| 210 | + result = |
| 211 | + // `Query` type for `noStandaloneTypeCastExpression` query |
| 212 | + TQueryCPP(TConversionsPackageQuery(TNoStandaloneTypeCastExpressionQuery())) |
| 213 | + } |
| 214 | +} |
0 commit comments