Skip to content

Commit 7317d11

Browse files
authored
Merge pull request #860 from github/lcartey/iofstream-performance
`IOFStreamMissingPositioning`: Improve performance
2 parents 214480a + 614c7ab commit 7317d11

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `A27-0-3`, `FIO309-C`, `FIO50-CPP`, `RULE-30-0-2` - `InterleavedInputOutputWithoutFlush.ql`, `DoNotAlternatelyIOFromStreamWithoutPositioning.ql`, `InterleavedInputOutputWithoutPosition.ql`, `ReadsAndWritesOnStreamNotSeparatedByPositioning.ql`:
2+
- Reduce evaluation time on complex codebases.

cpp/common/src/codingstandards/cpp/rules/iofstreammissingpositioning/IOFstreamMissingPositioning.qll

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,19 @@ predicate sameSource(FunctionCall a, FunctionCall b) {
5757
sameFileSource(a, b)
5858
}
5959

60+
bindingset[a, b]
6061
predicate sameAccessDirection(ReadWriteCall a, ReadWriteCall b) {
6162
a.getAccessDirection() = b.getAccessDirection()
6263
}
6364

65+
bindingset[a, b]
6466
predicate oppositeAccessDirection(ReadWriteCall a, ReadWriteCall b) {
6567
not sameAccessDirection(a, b)
6668
}
6769

6870
/**
6971
* A write operation reaching a read and vice versa
70-
* without intervening filepositioning
72+
* without intervening file positioning calls.
7173
*/
7274
ControlFlowNode reachesInExOperator(ReadWriteCall op) {
7375
result = op

0 commit comments

Comments
 (0)