|
| 1 | +//** THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY. **/ |
| 2 | +import cpp |
| 3 | +import RuleMetadata |
| 4 | +import codingstandards.cpp.exclusions.RuleMetadata |
| 5 | + |
| 6 | +newtype Pointers3Query = |
| 7 | + TDoNotAccessVolatileObjectWithNonVolatileReferenceQuery() or |
| 8 | + TDoNotCastPointerToMoreStrictlyAlignedPointerTypeQuery() or |
| 9 | + TDoNotAccessVariableViaPointerOfIncompatibleTypeQuery() or |
| 10 | + TUndefinedBehaviorWithRestrictQualifiedPointersQuery() |
| 11 | + |
| 12 | +predicate isPointers3QueryMetadata(Query query, string queryId, string ruleId) { |
| 13 | + query = |
| 14 | + // `Query` instance for the `doNotAccessVolatileObjectWithNonVolatileReference` query |
| 15 | + Pointers3Package::doNotAccessVolatileObjectWithNonVolatileReferenceQuery() and |
| 16 | + queryId = |
| 17 | + // `@id` for the `doNotAccessVolatileObjectWithNonVolatileReference` query |
| 18 | + "c/cert/do-not-access-volatile-object-with-non-volatile-reference" and |
| 19 | + ruleId = "EXP32-C" |
| 20 | + or |
| 21 | + query = |
| 22 | + // `Query` instance for the `doNotCastPointerToMoreStrictlyAlignedPointerType` query |
| 23 | + Pointers3Package::doNotCastPointerToMoreStrictlyAlignedPointerTypeQuery() and |
| 24 | + queryId = |
| 25 | + // `@id` for the `doNotCastPointerToMoreStrictlyAlignedPointerType` query |
| 26 | + "c/cert/do-not-cast-pointer-to-more-strictly-aligned-pointer-type" and |
| 27 | + ruleId = "EXP36-C" |
| 28 | + or |
| 29 | + query = |
| 30 | + // `Query` instance for the `doNotAccessVariableViaPointerOfIncompatibleType` query |
| 31 | + Pointers3Package::doNotAccessVariableViaPointerOfIncompatibleTypeQuery() and |
| 32 | + queryId = |
| 33 | + // `@id` for the `doNotAccessVariableViaPointerOfIncompatibleType` query |
| 34 | + "c/cert/do-not-access-variable-via-pointer-of-incompatible-type" and |
| 35 | + ruleId = "EXP39-C" |
| 36 | + or |
| 37 | + query = |
| 38 | + // `Query` instance for the `undefinedBehaviorWithRestrictQualifiedPointers` query |
| 39 | + Pointers3Package::undefinedBehaviorWithRestrictQualifiedPointersQuery() and |
| 40 | + queryId = |
| 41 | + // `@id` for the `undefinedBehaviorWithRestrictQualifiedPointers` query |
| 42 | + "c/cert/undefined-behavior-with-restrict-qualified-pointers" and |
| 43 | + ruleId = "EXP43-C" |
| 44 | +} |
| 45 | + |
| 46 | +module Pointers3Package { |
| 47 | + Query doNotAccessVolatileObjectWithNonVolatileReferenceQuery() { |
| 48 | + //autogenerate `Query` type |
| 49 | + result = |
| 50 | + // `Query` type for `doNotAccessVolatileObjectWithNonVolatileReference` query |
| 51 | + TQueryC(TPointers3PackageQuery(TDoNotAccessVolatileObjectWithNonVolatileReferenceQuery())) |
| 52 | + } |
| 53 | + |
| 54 | + Query doNotCastPointerToMoreStrictlyAlignedPointerTypeQuery() { |
| 55 | + //autogenerate `Query` type |
| 56 | + result = |
| 57 | + // `Query` type for `doNotCastPointerToMoreStrictlyAlignedPointerType` query |
| 58 | + TQueryC(TPointers3PackageQuery(TDoNotCastPointerToMoreStrictlyAlignedPointerTypeQuery())) |
| 59 | + } |
| 60 | + |
| 61 | + Query doNotAccessVariableViaPointerOfIncompatibleTypeQuery() { |
| 62 | + //autogenerate `Query` type |
| 63 | + result = |
| 64 | + // `Query` type for `doNotAccessVariableViaPointerOfIncompatibleType` query |
| 65 | + TQueryC(TPointers3PackageQuery(TDoNotAccessVariableViaPointerOfIncompatibleTypeQuery())) |
| 66 | + } |
| 67 | + |
| 68 | + Query undefinedBehaviorWithRestrictQualifiedPointersQuery() { |
| 69 | + //autogenerate `Query` type |
| 70 | + result = |
| 71 | + // `Query` type for `undefinedBehaviorWithRestrictQualifiedPointers` query |
| 72 | + TQueryC(TPointers3PackageQuery(TUndefinedBehaviorWithRestrictQualifiedPointersQuery())) |
| 73 | + } |
| 74 | +} |
0 commit comments