Skip to content

Commit e1b2773

Browse files
committed
Fix non-US spellings: s/analyse/analyze
1 parent 2d246a4 commit e1b2773

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

cpp/ql/lib/semmle/code/cpp/commons/Printf.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ class FormatLiteral extends Literal {
13121312
len =
13131313
min(int v |
13141314
v = this.getPrecision(n) or
1315-
v = this.getUse().getFormatArgument(n).(AnalysedString).getMaxLength() - 1 // (don't count null terminator)
1315+
v = this.getUse().getFormatArgument(n).(AnalyzedString).getMaxLength() - 1 // (don't count null terminator)
13161316
) and
13171317
reason = TValueFlowAnalysis()
13181318
)

cpp/ql/lib/semmle/code/cpp/commons/StringAnalysis.qll

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ predicate canValueFlow(Expr fromExpr, Expr toExpr) {
2727
fromExpr = toExpr.(ConditionalExpr).getElse()
2828
}
2929

30+
/** DEPRECATED: Alias for AnalyzedString */
31+
deprecated class AnalysedString = AnalyzedString;
32+
3033
/**
31-
* An analysed null terminated string.
34+
* An analyzed null terminated string.
3235
*/
33-
class AnalysedString extends Expr {
34-
AnalysedString() {
36+
class AnalyzedString extends Expr {
37+
AnalyzedString() {
3538
this.getUnspecifiedType() instanceof ArrayType or
3639
this.getUnspecifiedType() instanceof PointerType
3740
}
@@ -44,12 +47,12 @@ class AnalysedString extends Expr {
4447
// take the longest AnalysedString it's value could 'flow' from; however if even one doesn't
4548
// return a value (this essentially means 'infinity') we can't return a value either.
4649
result =
47-
max(AnalysedString expr, int toMax |
50+
max(AnalyzedString expr, int toMax |
4851
canValueFlow*(expr, this) and toMax = expr.(StringLiteral).getOriginalLength()
4952
|
5053
toMax
5154
) and // maximum length
52-
forall(AnalysedString expr | canValueFlow(expr, this) | exists(expr.getMaxLength())) // all sources return a value (recursive)
55+
forall(AnalyzedString expr | canValueFlow(expr, this) | exists(expr.getMaxLength())) // all sources return a value (recursive)
5356
}
5457
}
5558

cpp/ql/lib/semmle/code/cpp/security/BufferWrite.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class StrCopyBW extends BufferWriteCall {
155155
// when result exists, it is an exact flow analysis
156156
reason instanceof ValueFlowAnalysis and
157157
result =
158-
this.getArgument(this.getParamSrc()).(AnalysedString).getMaxLength() * this.getCharSize()
158+
this.getArgument(this.getParamSrc()).(AnalyzedString).getMaxLength() * this.getCharSize()
159159
}
160160

161161
override int getMaxData(BufferWriteEstimationReason reason) {

cpp/ql/test/library-tests/string_analysis/StringAnalysis.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import cpp
77

8-
from AnalysedString s, string str
8+
from AnalyzedString s, string str
99
where
1010
if s.(StringLiteral).getUnspecifiedType().(DerivedType).getBaseType() instanceof Wchar_t
1111
then str = "[?]"

java/ql/lib/semmle/code/java/dataflow/StringPrefixes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private import semmle.code.java.StringFormat
3434
* A string constant that contains a prefix whose possibly-appended strings are
3535
* returned by `getAnAppendedExpression`.
3636
*
37-
* Extend this class to specify prefixes whose possibly-appended strings should be analysed.
37+
* Extend this class to specify prefixes whose possibly-appended strings should be analyzed.
3838
*/
3939
abstract class InterestingPrefix extends CompileTimeConstantExpr {
4040
/**

python/ql/lib/semmle/python/objects/ObjectInternal.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ObjectInternal extends TObject {
4949
abstract ObjectInternal getClass();
5050

5151
/**
52-
* True if this "object" can be meaningfully analysed to determine the boolean value of
52+
* True if this "object" can be meaningfully analyzed to determine the boolean value of
5353
* equality tests on it.
5454
* For example, `None` or `int` can be, but `int()` or an unknown string cannot.
5555
*/

python/ql/lib/semmle/python/objects/Sequences.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ abstract class TupleObjectInternal extends SequenceObjectInternal {
7070
override ObjectInternal getClass() { result = ObjectInternal::builtin("tuple") }
7171

7272
/**
73-
* True if this "object" can be meaningfully analysed for
73+
* True if this "object" can be meaningfully analyzed for
7474
* truth or false in comparisons. For example, `None` or `int` can be, but `int()`
7575
* or an unknown string cannot.
7676
*/

0 commit comments

Comments
 (0)