Skip to content

Commit 7bb5665

Browse files
author
Nikita Kraiouchkine
committed
Regenerate Pointers3 package files
1 parent f2659d6 commit 7bb5665

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

c/cert/src/rules/EXP43-C/RestrictPointerReferencesOverlappingObject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EXP43-C: Do not assign the value of a restrict-qualified pointer to another restrict-qualified pointer.
1+
# EXP43-C: Do not assign the value of a restrict-qualified pointer to another restrict-qualified pointer
22

33
This query implements the CERT-C rule EXP43-C:
44

c/cert/src/rules/EXP43-C/RestrictPointerReferencesOverlappingObject.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @id c/cert/restrict-pointer-references-overlapping-object
3-
* @name EXP43-C: Do not assign the value of a restrict-qualified pointer to another restrict-qualified pointer.
3+
* @name EXP43-C: Do not assign the value of a restrict-qualified pointer to another restrict-qualified pointer
44
* @description Restrict qualified pointers referencing overlapping objects is undefined behavior.
55
* @kind problem
66
* @precision high

cpp/common/src/codingstandards/cpp/exclusions/c/Pointers3.qll

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,51 @@ newtype Pointers3Query =
1010
TDoNotPassAlisedPointerToRestrictQualifiedParameterQuery() or
1111
TRestrictPointerReferencesOverlappingObjectQuery()
1212

13-
predicate isPointers3QueryMetadata(Query query, string queryId, string ruleId) {
13+
predicate isPointers3QueryMetadata(Query query, string queryId, string ruleId, string category) {
1414
query =
1515
// `Query` instance for the `doNotAccessVolatileObjectWithNonVolatileReference` query
1616
Pointers3Package::doNotAccessVolatileObjectWithNonVolatileReferenceQuery() and
1717
queryId =
1818
// `@id` for the `doNotAccessVolatileObjectWithNonVolatileReference` query
1919
"c/cert/do-not-access-volatile-object-with-non-volatile-reference" and
20-
ruleId = "EXP32-C"
20+
ruleId = "EXP32-C" and
21+
category = "rule"
2122
or
2223
query =
2324
// `Query` instance for the `doNotCastPointerToMoreStrictlyAlignedPointerType` query
2425
Pointers3Package::doNotCastPointerToMoreStrictlyAlignedPointerTypeQuery() and
2526
queryId =
2627
// `@id` for the `doNotCastPointerToMoreStrictlyAlignedPointerType` query
2728
"c/cert/do-not-cast-pointer-to-more-strictly-aligned-pointer-type" and
28-
ruleId = "EXP36-C"
29+
ruleId = "EXP36-C" and
30+
category = "rule"
2931
or
3032
query =
3133
// `Query` instance for the `doNotAccessVariableViaPointerOfIncompatibleType` query
3234
Pointers3Package::doNotAccessVariableViaPointerOfIncompatibleTypeQuery() and
3335
queryId =
3436
// `@id` for the `doNotAccessVariableViaPointerOfIncompatibleType` query
3537
"c/cert/do-not-access-variable-via-pointer-of-incompatible-type" and
36-
ruleId = "EXP39-C"
38+
ruleId = "EXP39-C" and
39+
category = "rule"
3740
or
3841
query =
3942
// `Query` instance for the `doNotPassAlisedPointerToRestrictQualifiedParameter` query
4043
Pointers3Package::doNotPassAlisedPointerToRestrictQualifiedParameterQuery() and
4144
queryId =
4245
// `@id` for the `doNotPassAlisedPointerToRestrictQualifiedParameter` query
4346
"c/cert/do-not-pass-alised-pointer-to-restrict-qualified-parameter" and
44-
ruleId = "EXP43-C"
47+
ruleId = "EXP43-C" and
48+
category = "rule"
4549
or
4650
query =
4751
// `Query` instance for the `restrictPointerReferencesOverlappingObject` query
4852
Pointers3Package::restrictPointerReferencesOverlappingObjectQuery() and
4953
queryId =
5054
// `@id` for the `restrictPointerReferencesOverlappingObject` query
5155
"c/cert/restrict-pointer-references-overlapping-object" and
52-
ruleId = "EXP43-C"
56+
ruleId = "EXP43-C" and
57+
category = "rule"
5358
}
5459

5560
module Pointers3Package {

rule_packages/c/Pointers3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
{
8080
"description": "Restrict qualified pointers referencing overlapping objects is undefined behavior.",
8181
"kind": "problem",
82-
"name": "Do not assign the value of a restrict-qualified pointer to another restrict-qualified pointer.",
82+
"name": "Do not assign the value of a restrict-qualified pointer to another restrict-qualified pointer",
8383
"precision": "high",
8484
"severity": "error",
8585
"short_name": "RestrictPointerReferencesOverlappingObject",

0 commit comments

Comments
 (0)