Skip to content

Commit eca112c

Browse files
committed
C++: More autoformatting.
1 parent 250cb30 commit eca112c

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,7 @@ class FlowSummaryNode extends Node, TFlowSummaryNode {
756756
* Gets the enclosing callable. For a `FlowSummaryNode` this is always the
757757
* summarized function this node is part of.
758758
*/
759-
override Declaration getEnclosingCallable() {
760-
result = this.getSummarizedCallable()
761-
}
759+
override Declaration getEnclosingCallable() { result = this.getSummarizedCallable() }
762760

763761
override Location getLocationImpl() { result = this.getSummarizedCallable().getLocation() }
764762

@@ -1013,9 +1011,7 @@ private module RawIndirectNodes {
10131011
result = this.getOperand().getDef().getEnclosingFunction()
10141012
}
10151013

1016-
override Declaration getEnclosingCallable() {
1017-
result = this.getFunction()
1018-
}
1014+
override Declaration getEnclosingCallable() { result = this.getFunction() }
10191015

10201016
override predicate isGLValue() { this.getOperand().isGLValue() }
10211017

@@ -1059,9 +1055,7 @@ private module RawIndirectNodes {
10591055

10601056
override Declaration getFunction() { result = this.getInstruction().getEnclosingFunction() }
10611057

1062-
override Declaration getEnclosingCallable() {
1063-
result = this.getFunction()
1064-
}
1058+
override Declaration getEnclosingCallable() { result = this.getFunction() }
10651059

10661060
override predicate isGLValue() { this.getInstruction().isGLValue() }
10671061

@@ -1977,7 +1971,7 @@ private module Cached {
19771971
// through calls to modeled functions, without relying on global dataflow to join
19781972
// the dots).
19791973
FlowSummaryImpl::Private::Steps::summaryThroughStepValue(nodeFrom, nodeTo, _)
1980-
}
1974+
}
19811975

19821976
private predicate indirectionOperandFlow(RawIndirectOperand nodeFrom, Node nodeTo) {
19831977
nodeFrom != nodeTo and
@@ -2377,9 +2371,8 @@ class Content extends TContent {
23772371
* Gets a string consisting of `n` star characters ("*"), where n >= 0. This is
23782372
* used to represent indirection.
23792373
*/
2380-
bindingset[n] string repeatStars(int n) {
2381-
result = concat(int i | i in [1 .. n] | "*")
2382-
}
2374+
bindingset[n]
2375+
string repeatStars(int n) { result = concat(int i | i in [1 .. n] | "*") }
23832376

23842377
private module ContentStars {
23852378
/**

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ string describe(DataFlow::Node n) {
1515
}
1616

1717
from FlowSummaryNode n
18-
select n, concat(describe(n), ", "), concat(n.getSummarizedCallable().toString(), ", "), concat(n.getEnclosingCallable().toString(), ", ")
18+
select n, concat(describe(n), ", "), concat(n.getSummarizedCallable().toString(), ", "),
19+
concat(n.getEnclosingCallable().toString(), ", ")

0 commit comments

Comments
 (0)