@@ -21,7 +21,6 @@ import codingstandards.cpp.misra
2121import codingstandards.cpp.types.Pointers
2222import codingstandards.cpp.Call
2323import codingstandards.cpp.SideEffect
24- import codingstandards.cpp.alertreporting.HoldsForAllCopies
2524
2625/**
2726 * Holds if the function is in a template scope and should be excluded.
@@ -35,7 +34,7 @@ predicate isInTemplateScope(Function f) {
3534/**
3635 * A `Type` that may be a pointer, array, or reference, to a const or a non-const type.
3736 *
38- * For example, `const int*`, `int* const`, `cont int* const`, `int*`, `int&`, `const int&` are all
37+ * For example, `const int*`, `int* const`, `const int* const`, `int*`, `int&`, `const int&` are all
3938 * `PointerLikeType`s, while `int`, `int&&`, and `const int` are not.
4039 *
4140 * To check if a `PointerLikeType` points/refers to a const-qualified type, use the `pointsToConst()`
@@ -61,12 +60,12 @@ class PointerLikeType extends Type {
6160 }
6261
6362 /**
64- * Get the pointed to or referred to type, for instance `int` for `int*` or `const int&`.
63+ * Gets the pointed to or referred to type, for instance `int` for `int*` or `const int&`.
6564 */
6665 Type getInnerType ( ) { result = innerType }
6766
6867 /**
69- * Get the resolved pointer, array, or reference type itself, for instance `int*` in `int* const`.
68+ * Gets the resolved pointer, array, or reference type itself, for instance `int*` in `int* const`.
7069 *
7170 * Removes cv-qualification and resolves typedefs and decltypes and specifiers via
7271 * `stripTopLevelSpecifiers()`.
@@ -80,7 +79,7 @@ class PointerLikeType extends Type {
8079 predicate pointsToConst ( ) { innerType .isConst ( ) }
8180
8281 /**
83- * Holds when this type points to non-const -- for example, `int*` and `int&` and `int const* `
82+ * Holds when this type points to non-const -- for example, `int*` and `int&` and `int *const `
8483 * point to non-const, while `const int*`, `const int&` do not.
8584 */
8685 predicate pointsToNonConst ( ) { not innerType .isConst ( ) }
@@ -100,12 +99,12 @@ class PointerLikeParam extends Parameter {
10099 }
101100
102101 /**
103- * Get the pointer like type of this parameter.
102+ * Gets the pointer like type of this parameter.
104103 */
105104 PointerLikeType getPointerLikeType ( ) { result = pointerLikeType }
106105
107106 /**
108- * Get usages of this parameter that maintain pointer-like semantics -- typically this means
107+ * Gets usages of this parameter that maintain pointer-like semantics -- typically this means
109108 * either a normal access, or switching between pointers and reference semantics.
110109 *
111110 * Examples of accesses with pointer-like semantics include:
@@ -177,7 +176,6 @@ class PointerLikeEffect extends VariableEffect {
177176class NonConstParam extends PointerLikeParam {
178177 NonConstParam ( ) {
179178 not pointerLikeType .pointsToConst ( ) and
180- not pointerLikeType .getInnerType ( ) instanceof VoidType and
181179 // Ignore parameters in functions without bodies
182180 exists ( this .getFunction ( ) .getBlock ( ) ) and
183181 // Ignore unnamed parameters
0 commit comments