Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d93b37d

Browse files
committed
C++: Autoformat some more files.
1 parent 591c17d commit d93b37d

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

cpp/ql/src/Security/CWE/CWE-676/DangerousUseOfCin.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,12 @@ class IFStream extends Type {
6565
* The variable `std::cin` or `std::wcin`.
6666
*/
6767
class CinVariable extends NamespaceVariable {
68-
CinVariable() {
69-
this.hasQualifiedName("std", ["cin", "wcin"])
70-
}
68+
CinVariable() { this.hasQualifiedName("std", ["cin", "wcin"]) }
7169
}
7270

7371
/** A call to `std::operator>>`. */
7472
class OperatorRShiftCall extends FunctionCall {
75-
OperatorRShiftCall() {
76-
getTarget().hasQualifiedName("std", "operator>>")
77-
}
73+
OperatorRShiftCall() { getTarget().hasQualifiedName("std", "operator>>") }
7874

7975
/*
8076
* This is complicated by the fact this overload can be made

cpp/ql/src/semmle/code/cpp/models/implementations/IdentityFunction.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import semmle.code.cpp.models.interfaces.SideEffect
77
* The standard function templates `std::move` and `std::forward`.
88
*/
99
class IdentityFunction extends DataFlowFunction, SideEffectFunction, AliasFunction {
10-
IdentityFunction() {
11-
this.hasQualifiedName("std", ["move", "forward"])
12-
}
10+
IdentityFunction() { this.hasQualifiedName("std", ["move", "forward"]) }
1311

1412
override predicate hasOnlySpecificReadSideEffects() { any() }
1513

cpp/ql/src/semmle/code/cpp/security/TaintTrackingImpl.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ private predicate insideFunctionValueMoveTo(Element src, Element dest) {
276276
dest = formattingSend and
277277
formattingSend.getArgument(arg) = src and
278278
format = formattingSend.getFormat() and
279-
format.getConversionChar(arg - formattingSend.getTarget().getNumberOfParameters()) = ["s", "S", "@"]
279+
format.getConversionChar(arg - formattingSend.getTarget().getNumberOfParameters()) =
280+
["s", "S", "@"]
280281
)
281282
or
282283
// Expressions computed from tainted data are also tainted

0 commit comments

Comments
 (0)