Skip to content

Commit 36db493

Browse files
committed
C++: Autoformat.
1 parent cbab24b commit 36db493

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ module Input implements InputSig<Location, DataFlowImplSpecific::CppDataFlow> {
5252
* Supports ranges (`Argument[x..y]`), qualifiers (`Argument[-1]`), indirections
5353
* (`Argument[*x]`) and combinations (such as `Argument[**0..1]`).
5454
*/
55-
private bindingset[argString] TPosition decodePosition(string argString) {
55+
bindingset[argString]
56+
private TPosition decodePosition(string argString) {
5657
exists(int indirection, string posString, int pos |
5758
argString = repeatStars(indirection) + posString and
5859
pos = AccessPath::parseInt(posString) and
@@ -118,7 +119,9 @@ module SourceSinkInterpretationInput implements
118119
* Holds if an external source specification exists for `e` with output specification
119120
* `output`, kind `kind`, and provenance `provenance`.
120121
*/
121-
predicate sourceElement(SourceOrSinkElement e, string output, string kind, Public::Provenance provenance) {
122+
predicate sourceElement(
123+
SourceOrSinkElement e, string output, string kind, Public::Provenance provenance
124+
) {
122125
exists(
123126
string namespace, string type, boolean subtypes, string name, string signature, string ext
124127
|
@@ -131,7 +134,9 @@ module SourceSinkInterpretationInput implements
131134
* Holds if an external sink specification exists for `e` with input specification
132135
* `input`, kind `kind` and provenance `provenance`.
133136
*/
134-
predicate sinkElement(SourceOrSinkElement e, string input, string kind, Public::Provenance provenance) {
137+
predicate sinkElement(
138+
SourceOrSinkElement e, string input, string kind, Public::Provenance provenance
139+
) {
135140
exists(
136141
string package, string type, boolean subtypes, string name, string signature, string ext
137142
|

cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ module ExposedSystemDataConfig implements DataFlow::ConfigSig {
2828
or
2929
// workaround for cases where the sink contains the tainted thing as a child; this could
3030
// probably be handled better with taint inheriting content or similar modeling.
31-
exists(RemoteFlowSink sinkNode |
32-
sinkNode.asIndirectExpr().getAChild*() = sink.asIndirectExpr()
33-
)
31+
exists(RemoteFlowSink sinkNode | sinkNode.asIndirectExpr().getAChild*() = sink.asIndirectExpr())
3432
}
3533

3634
predicate isBarrier(DataFlow::Node node) {

cpp/ql/test/library-tests/dataflow/models-as-data/SummaryCall.ql

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ import testModels
22
private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate
33
private import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil
44

5-
query predicate summaryCalls(SummaryCall c) {
6-
any()
7-
}
5+
query predicate summaryCalls(SummaryCall c) { any() }
86

9-
query predicate summarizedCallables(DataFlowCallable c) {
10-
c = TSummarizedCallable(_)
11-
}
7+
query predicate summarizedCallables(DataFlowCallable c) { c = TSummarizedCallable(_) }
128

139
query predicate sourceCallables(DataFlowCallable c) {
14-
c = TSourceCallable(_) and
15-
c.getLocation().getFile().toString() != ""
10+
c = TSourceCallable(_) and
11+
c.getLocation().getFile().toString() != ""
1612
}

0 commit comments

Comments
 (0)