|
| 1 | +//** THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY. **/ |
| 2 | +import cpp |
| 3 | +import RuleMetadata |
| 4 | +import codingstandards.cpp.exclusions.RuleMetadata |
| 5 | + |
| 6 | +newtype Concurrency3Query = |
| 7 | + TCleanUpThreadSpecificStorageQuery() or |
| 8 | + TDoNotAllowAMutexToGoOutOfScopeWhileLockedQuery() or |
| 9 | + TDoNotDestroyAMutexWhileItIsLockedQuery() or |
| 10 | + TDeclareThreadsWithAppropriateStorageDurationsQuery() or |
| 11 | + TPreserveSafetyWhenUsingConditionVariablesQuery() or |
| 12 | + TThreadPreviouslyJoinedOrDetachedQuery() or |
| 13 | + TDoNotReferToAnAtomicVariableTwiceInExpressionQuery() or |
| 14 | + TWrapFunctionsThatCanFailSpuriouslyInLoopQuery() |
| 15 | + |
| 16 | +predicate isConcurrency3QueryMetadata(Query query, string queryId, string ruleId) { |
| 17 | + query = |
| 18 | + // `Query` instance for the `cleanUpThreadSpecificStorage` query |
| 19 | + Concurrency3Package::cleanUpThreadSpecificStorageQuery() and |
| 20 | + queryId = |
| 21 | + // `@id` for the `cleanUpThreadSpecificStorage` query |
| 22 | + "c/cert/clean-up-thread-specific-storage" and |
| 23 | + ruleId = "CON30-C" |
| 24 | + or |
| 25 | + query = |
| 26 | + // `Query` instance for the `doNotAllowAMutexToGoOutOfScopeWhileLocked` query |
| 27 | + Concurrency3Package::doNotAllowAMutexToGoOutOfScopeWhileLockedQuery() and |
| 28 | + queryId = |
| 29 | + // `@id` for the `doNotAllowAMutexToGoOutOfScopeWhileLocked` query |
| 30 | + "c/cert/do-not-allow-a-mutex-to-go-out-of-scope-while-locked" and |
| 31 | + ruleId = "CON31-C" |
| 32 | + or |
| 33 | + query = |
| 34 | + // `Query` instance for the `doNotDestroyAMutexWhileItIsLocked` query |
| 35 | + Concurrency3Package::doNotDestroyAMutexWhileItIsLockedQuery() and |
| 36 | + queryId = |
| 37 | + // `@id` for the `doNotDestroyAMutexWhileItIsLocked` query |
| 38 | + "c/cert/do-not-destroy-a-mutex-while-it-is-locked" and |
| 39 | + ruleId = "CON31-C" |
| 40 | + or |
| 41 | + query = |
| 42 | + // `Query` instance for the `declareThreadsWithAppropriateStorageDurations` query |
| 43 | + Concurrency3Package::declareThreadsWithAppropriateStorageDurationsQuery() and |
| 44 | + queryId = |
| 45 | + // `@id` for the `declareThreadsWithAppropriateStorageDurations` query |
| 46 | + "c/cert/declare-threads-with-appropriate-storage-durations" and |
| 47 | + ruleId = "CON34-C" |
| 48 | + or |
| 49 | + query = |
| 50 | + // `Query` instance for the `preserveSafetyWhenUsingConditionVariables` query |
| 51 | + Concurrency3Package::preserveSafetyWhenUsingConditionVariablesQuery() and |
| 52 | + queryId = |
| 53 | + // `@id` for the `preserveSafetyWhenUsingConditionVariables` query |
| 54 | + "c/cert/preserve-safety-when-using-condition-variables" and |
| 55 | + ruleId = "CON38-C" |
| 56 | + or |
| 57 | + query = |
| 58 | + // `Query` instance for the `threadPreviouslyJoinedOrDetached` query |
| 59 | + Concurrency3Package::threadPreviouslyJoinedOrDetachedQuery() and |
| 60 | + queryId = |
| 61 | + // `@id` for the `threadPreviouslyJoinedOrDetached` query |
| 62 | + "c/cert/thread-previously-joined-or-detached" and |
| 63 | + ruleId = "CON39-C" |
| 64 | + or |
| 65 | + query = |
| 66 | + // `Query` instance for the `doNotReferToAnAtomicVariableTwiceInExpression` query |
| 67 | + Concurrency3Package::doNotReferToAnAtomicVariableTwiceInExpressionQuery() and |
| 68 | + queryId = |
| 69 | + // `@id` for the `doNotReferToAnAtomicVariableTwiceInExpression` query |
| 70 | + "c/cert/do-not-refer-to-an-atomic-variable-twice-in-expression" and |
| 71 | + ruleId = "CON40-C" |
| 72 | + or |
| 73 | + query = |
| 74 | + // `Query` instance for the `wrapFunctionsThatCanFailSpuriouslyInLoop` query |
| 75 | + Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery() and |
| 76 | + queryId = |
| 77 | + // `@id` for the `wrapFunctionsThatCanFailSpuriouslyInLoop` query |
| 78 | + "c/cert/wrap-functions-that-can-fail-spuriously-in-loop" and |
| 79 | + ruleId = "CON41-C" |
| 80 | +} |
| 81 | + |
| 82 | +module Concurrency3Package { |
| 83 | + Query cleanUpThreadSpecificStorageQuery() { |
| 84 | + //autogenerate `Query` type |
| 85 | + result = |
| 86 | + // `Query` type for `cleanUpThreadSpecificStorage` query |
| 87 | + TQueryC(TConcurrency3PackageQuery(TCleanUpThreadSpecificStorageQuery())) |
| 88 | + } |
| 89 | + |
| 90 | + Query doNotAllowAMutexToGoOutOfScopeWhileLockedQuery() { |
| 91 | + //autogenerate `Query` type |
| 92 | + result = |
| 93 | + // `Query` type for `doNotAllowAMutexToGoOutOfScopeWhileLocked` query |
| 94 | + TQueryC(TConcurrency3PackageQuery(TDoNotAllowAMutexToGoOutOfScopeWhileLockedQuery())) |
| 95 | + } |
| 96 | + |
| 97 | + Query doNotDestroyAMutexWhileItIsLockedQuery() { |
| 98 | + //autogenerate `Query` type |
| 99 | + result = |
| 100 | + // `Query` type for `doNotDestroyAMutexWhileItIsLocked` query |
| 101 | + TQueryC(TConcurrency3PackageQuery(TDoNotDestroyAMutexWhileItIsLockedQuery())) |
| 102 | + } |
| 103 | + |
| 104 | + Query declareThreadsWithAppropriateStorageDurationsQuery() { |
| 105 | + //autogenerate `Query` type |
| 106 | + result = |
| 107 | + // `Query` type for `declareThreadsWithAppropriateStorageDurations` query |
| 108 | + TQueryC(TConcurrency3PackageQuery(TDeclareThreadsWithAppropriateStorageDurationsQuery())) |
| 109 | + } |
| 110 | + |
| 111 | + Query preserveSafetyWhenUsingConditionVariablesQuery() { |
| 112 | + //autogenerate `Query` type |
| 113 | + result = |
| 114 | + // `Query` type for `preserveSafetyWhenUsingConditionVariables` query |
| 115 | + TQueryC(TConcurrency3PackageQuery(TPreserveSafetyWhenUsingConditionVariablesQuery())) |
| 116 | + } |
| 117 | + |
| 118 | + Query threadPreviouslyJoinedOrDetachedQuery() { |
| 119 | + //autogenerate `Query` type |
| 120 | + result = |
| 121 | + // `Query` type for `threadPreviouslyJoinedOrDetached` query |
| 122 | + TQueryC(TConcurrency3PackageQuery(TThreadPreviouslyJoinedOrDetachedQuery())) |
| 123 | + } |
| 124 | + |
| 125 | + Query doNotReferToAnAtomicVariableTwiceInExpressionQuery() { |
| 126 | + //autogenerate `Query` type |
| 127 | + result = |
| 128 | + // `Query` type for `doNotReferToAnAtomicVariableTwiceInExpression` query |
| 129 | + TQueryC(TConcurrency3PackageQuery(TDoNotReferToAnAtomicVariableTwiceInExpressionQuery())) |
| 130 | + } |
| 131 | + |
| 132 | + Query wrapFunctionsThatCanFailSpuriouslyInLoopQuery() { |
| 133 | + //autogenerate `Query` type |
| 134 | + result = |
| 135 | + // `Query` type for `wrapFunctionsThatCanFailSpuriouslyInLoop` query |
| 136 | + TQueryC(TConcurrency3PackageQuery(TWrapFunctionsThatCanFailSpuriouslyInLoopQuery())) |
| 137 | + } |
| 138 | +} |
0 commit comments