|
| 1 | +//** THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY. **/ |
| 2 | +import cpp |
| 3 | +import RuleMetadata |
| 4 | +import codingstandards.cpp.exclusions.RuleMetadata |
| 5 | + |
| 6 | +newtype Concurrency2Query = |
| 7 | + TDoNotDestroyAMutexWhileItIsLockedQuery() or |
| 8 | + TDeadlockByLockingInPredefinedOrderQuery() or |
| 9 | + TWrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery() |
| 10 | + |
| 11 | +predicate isConcurrency2QueryMetadata(Query query, string queryId, string ruleId) { |
| 12 | + query = |
| 13 | + // `Query` instance for the `doNotDestroyAMutexWhileItIsLocked` query |
| 14 | + Concurrency2Package::doNotDestroyAMutexWhileItIsLockedQuery() and |
| 15 | + queryId = |
| 16 | + // `@id` for the `doNotDestroyAMutexWhileItIsLocked` query |
| 17 | + "c/cert/do-not-destroy-a-mutex-while-it-is-locked" and |
| 18 | + ruleId = "CON31-C" |
| 19 | + or |
| 20 | + query = |
| 21 | + // `Query` instance for the `deadlockByLockingInPredefinedOrder` query |
| 22 | + Concurrency2Package::deadlockByLockingInPredefinedOrderQuery() and |
| 23 | + queryId = |
| 24 | + // `@id` for the `deadlockByLockingInPredefinedOrder` query |
| 25 | + "c/cert/deadlock-by-locking-in-predefined-order" and |
| 26 | + ruleId = "CON35-C" |
| 27 | + or |
| 28 | + query = |
| 29 | + // `Query` instance for the `wrapFunctionsThatCanSpuriouslyWakeUpInLoop` query |
| 30 | + Concurrency2Package::wrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery() and |
| 31 | + queryId = |
| 32 | + // `@id` for the `wrapFunctionsThatCanSpuriouslyWakeUpInLoop` query |
| 33 | + "c/cert/wrap-functions-that-can-spuriously-wake-up-in-loop" and |
| 34 | + ruleId = "CON36-C" |
| 35 | +} |
| 36 | + |
| 37 | +module Concurrency2Package { |
| 38 | + Query doNotDestroyAMutexWhileItIsLockedQuery() { |
| 39 | + //autogenerate `Query` type |
| 40 | + result = |
| 41 | + // `Query` type for `doNotDestroyAMutexWhileItIsLocked` query |
| 42 | + TQueryC(TConcurrency2PackageQuery(TDoNotDestroyAMutexWhileItIsLockedQuery())) |
| 43 | + } |
| 44 | + |
| 45 | + Query deadlockByLockingInPredefinedOrderQuery() { |
| 46 | + //autogenerate `Query` type |
| 47 | + result = |
| 48 | + // `Query` type for `deadlockByLockingInPredefinedOrder` query |
| 49 | + TQueryC(TConcurrency2PackageQuery(TDeadlockByLockingInPredefinedOrderQuery())) |
| 50 | + } |
| 51 | + |
| 52 | + Query wrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery() { |
| 53 | + //autogenerate `Query` type |
| 54 | + result = |
| 55 | + // `Query` type for `wrapFunctionsThatCanSpuriouslyWakeUpInLoop` query |
| 56 | + TQueryC(TConcurrency2PackageQuery(TWrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery())) |
| 57 | + } |
| 58 | +} |
0 commit comments