Skip to content

Commit cdeeefc

Browse files
committed
Merge commit '8f2094f' into yo-h/java15-merge
2 parents 7e8bc4a + 8f2094f commit cdeeefc

File tree

140 files changed

+41464
-30804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+41464
-30804
lines changed

cpp/ql/src/Best Practices/Magic Constants/MagicConstants.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ predicate arrayInitializerChild(AggregateLiteral parent, Expr e) {
291291

292292
// i.e. not a constant folded expression
293293
predicate literallyLiteral(Literal lit) {
294-
lit
295-
.getValueText()
294+
lit.getValueText()
296295
.regexpMatch(".*\".*|\\s*+[-+]?+\\s*+(0[xob][0-9a-fA-F]|[0-9])[0-9a-fA-F,._]*+([eE][-+]?+[0-9,._]*+)?+\\s*+[a-zA-Z]*+\\s*+")
297296
}
298297

cpp/ql/src/Security/CWE/CWE-457/InitializationFunctions.qll

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ class InitializationFunction extends Function {
189189
// Field wise assignment to the parameter
190190
any(Assignment e).getLValue() = getAFieldAccess(this.getParameter(i)) or
191191
i =
192-
this
193-
.(MemberFunction)
192+
this.(MemberFunction)
194193
.getAnOverridingFunction+()
195194
.(InitializationFunction)
196195
.initializedParameter() or
@@ -475,12 +474,9 @@ class ConditionalInitializationCall extends FunctionCall {
475474
fa.getASuccessor+() = result
476475
) and
477476
result =
478-
this
479-
.getArgument(getTarget(this)
480-
.(ConditionalInitializationFunction)
481-
.conditionallyInitializedParameter(_))
482-
.(AddressOfExpr)
483-
.getOperand()
477+
this.getArgument(getTarget(this)
478+
.(ConditionalInitializationFunction)
479+
.conditionallyInitializedParameter(_)).(AddressOfExpr).getOperand()
484480
}
485481

486482
Variable getStatusVariable() {

cpp/ql/src/jsf/4.09 Style/AV Rule 48.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ predicate canonicalName1(Declaration d, string canonical) {
3131

3232
predicate canonicalName2(Declaration d, string canonical) {
3333
canonical =
34-
d
35-
.getName()
34+
d.getName()
3635
.replaceAll("_", "")
3736
.replaceAll("0", "O")
3837
.replaceAll("D", "O")

cpp/ql/src/semmle/code/cpp/AutogeneratedFile.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ private predicate autogeneratedComment(string comment) {
3535
.regexpMatch("(?si).*(" +
3636
// replace `generated` with a regexp that also catches things like
3737
// `auto-generated`.
38-
cond
39-
.replaceAll("generated", "(auto[\\w-]*[\\s/\\*\\r\\n]*)?generated")
38+
cond.replaceAll("generated", "(auto[\\w-]*[\\s/\\*\\r\\n]*)?generated")
4039
// replace `!` with a regexp for end-of-sentence / separator characters.
4140
.replaceAll("!", "[\\.\\?\\!\\-\\;\\,]")
4241
// replace ` ` with a regexp for one or more whitespace characters

cpp/ql/src/semmle/code/cpp/Class.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,8 @@ class Class extends UserType {
236236
or
237237
exists(ClassDerivation cd | cd.getBaseClass() = base |
238238
result =
239-
this
240-
.accessOfBaseMemberMulti(cd.getDerivedClass(),
241-
fieldInBase.accessInDirectDerived(cd.getASpecifier().(AccessSpecifier)))
239+
this.accessOfBaseMemberMulti(cd.getDerivedClass(),
240+
fieldInBase.accessInDirectDerived(cd.getASpecifier().(AccessSpecifier)))
242241
)
243242
}
244243

cpp/ql/src/semmle/code/cpp/Declaration.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,8 @@ class AccessHolder extends Declaration, TAccessHolder {
478478
*/
479479
pragma[inline]
480480
predicate canAccessMember(Declaration member, Class derived) {
481-
this
482-
.couldAccessMember(member.getDeclaringType(), member.getASpecifier().(AccessSpecifier),
483-
derived)
481+
this.couldAccessMember(member.getDeclaringType(), member.getASpecifier().(AccessSpecifier),
482+
derived)
484483
}
485484

486485
/**

cpp/ql/src/semmle/code/cpp/PrintAST.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ private predicate shouldPrintFunction(Function func) {
3434
bindingset[s]
3535
private string escapeString(string s) {
3636
result =
37-
s
38-
.replaceAll("\\", "\\\\")
37+
s.replaceAll("\\", "\\\\")
3938
.replaceAll("\n", "\\n")
4039
.replaceAll("\r", "\\r")
4140
.replaceAll("\t", "\\t")

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,7 @@ class FormatLiteral extends Literal {
10891089
then result = this.getFormat().substring(0, this.getConvSpecOffset(0))
10901090
else
10911091
result =
1092-
this
1093-
.getFormat()
1092+
this.getFormat()
10941093
.substring(this.getConvSpecOffset(n - 1) + this.getConvSpec(n - 1).length(),
10951094
this.getConvSpecOffset(n))
10961095
}
@@ -1106,8 +1105,7 @@ class FormatLiteral extends Literal {
11061105
if n > 0
11071106
then
11081107
result =
1109-
this
1110-
.getFormat()
1108+
this.getFormat()
11111109
.substring(this.getConvSpecOffset(n - 1) + this.getConvSpec(n - 1).length(),
11121110
this.getFormat().length())
11131111
else result = this.getFormat()

0 commit comments

Comments
 (0)