Skip to content

Commit a7efa0d

Browse files
committed
Merge branch 'master' into ir-this-parameter-2
2 parents 2a96856 + ae46a8d commit a7efa0d

File tree

359 files changed

+6943
-937
lines changed

Some content is hidden

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

359 files changed

+6943
-937
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We welcome contributions to our CodeQL libraries and queries. Got an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
44

5-
There is lots of useful documentation to help you write queries, ranging from information about query file structure to tutorials for specific target languages. For more information on the documentation available, see [Writing CodeQL queries](https://help.semmle.com/QL/learn-ql/writing-queries/writing-queries.html) on [help.semmle.com](https://help.semmle.com).
5+
There is lots of useful documentation to help you write queries, ranging from information about query file structure to tutorials for specific target languages. For more information on the documentation available, see [CodeQL queries](https://help.semmle.com/QL/learn-ql/writing-queries/writing-queries.html) on [help.semmle.com](https://help.semmle.com).
66

77

88
## Submitting a new experimental query
@@ -32,7 +32,7 @@ If you have an idea for a query that you would like to share with other CodeQL u
3232

3333
For details, see the [guide on query metadata](docs/query-metadata-style-guide.md).
3434

35-
Make sure the `select` statement is compatible with the query `@kind`. See [Introduction to query files](https://help.semmle.com/QL/learn-ql/writing-queries/introduction-to-queries.html#select-clause) on help.semmle.com.
35+
Make sure the `select` statement is compatible with the query `@kind`. See [About CodeQL queries](https://help.semmle.com/QL/learn-ql/writing-queries/introduction-to-queries.html#select-clause) on help.semmle.com.
3636

3737
3. **Formatting**
3838

@@ -53,14 +53,6 @@ After the experimental query is merged, we welcome pull requests to improve it.
5353

5454
## Using your personal data
5555

56-
If you contribute to this project, we will record your name and email
57-
address (as provided by you with your contributions) as part of the code
58-
repositories, which are public. We might also use this information
59-
to contact you in relation to your contributions, as well as in the
60-
normal course of software development. We also store records of your
61-
CLA agreements. Under GDPR legislation, we do this
62-
on the basis of our legitimate interest in creating the CodeQL product.
63-
64-
Please do get in touch ([email protected]) if you have any questions about
65-
this or our data protection policies.
56+
If you contribute to this project, we will record your name and email address (as provided by you with your contributions) as part of the code repositories, which are public. We might also use this information to contact you in relation to your contributions, as well as in the normal course of software development. We also store records of CLA agreements signed in the past, but no longer require contributors to sign a CLA. Under GDPR legislation, we do this on the basis of our legitimate interest in creating the CodeQL product.
6657

58+
Please do get in touch ([email protected]) if you have any questions about this or our data protection policies.

config/identical-files.json

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -53,114 +53,114 @@
5353
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll",
5454
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll",
5555
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll",
56-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/Instruction.qll",
57-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/Instruction.qll"
56+
"csharp/ql/src/experimental/ir/implementation/raw/Instruction.qll",
57+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Instruction.qll"
5858
],
5959
"IR IRBlock": [
6060
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRBlock.qll",
6161
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRBlock.qll",
6262
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll",
63-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRBlock.qll",
64-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IRBlock.qll"
63+
"csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll",
64+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll"
6565
],
6666
"IR IRVariable": [
6767
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRVariable.qll",
6868
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll",
6969
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll",
70-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRVariable.qll",
71-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IRVariable.qll"
70+
"csharp/ql/src/experimental/ir/implementation/raw/IRVariable.qll",
71+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRVariable.qll"
7272
],
7373
"IR IRFunction": [
7474
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRFunction.qll",
7575
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRFunction.qll",
7676
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRFunction.qll",
77-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRFunction.qll",
78-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IRFunction.qll"
77+
"csharp/ql/src/experimental/ir/implementation/raw/IRFunction.qll",
78+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRFunction.qll"
7979
],
8080
"IR Operand": [
8181
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll",
8282
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll",
8383
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll",
84-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/Operand.qll",
85-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/Operand.qll"
84+
"csharp/ql/src/experimental/ir/implementation/raw/Operand.qll",
85+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll"
8686
],
8787
"IR IRType": [
8888
"cpp/ql/src/semmle/code/cpp/ir/implementation/IRType.qll",
89-
"csharp/ql/src/semmle/code/csharp/ir/implementation/IRType.qll"
89+
"csharp/ql/src/experimental/ir/implementation/IRType.qll"
9090
],
9191
"IR IRConfiguration": [
9292
"cpp/ql/src/semmle/code/cpp/ir/implementation/IRConfiguration.qll",
93-
"csharp/ql/src/semmle/code/csharp/ir/implementation/IRConfiguration.qll"
93+
"csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll"
9494
],
9595
"IR UseSoundEscapeAnalysis": [
9696
"cpp/ql/src/semmle/code/cpp/ir/implementation/UseSoundEscapeAnalysis.qll",
97-
"csharp/ql/src/semmle/code/csharp/ir/implementation/UseSoundEscapeAnalysis.qll"
97+
"csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll"
9898
],
9999
"IR Operand Tag": [
100100
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/OperandTag.qll",
101-
"csharp/ql/src/semmle/code/csharp/ir/implementation/internal/OperandTag.qll"
101+
"csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll"
102102
],
103103
"IR TIRVariable":[
104104
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/TIRVariable.qll",
105-
"csharp/ql/src/semmle/code/csharp/ir/implementation/internal/TIRVariable.qll"
105+
"csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll"
106106
],
107107
"IR IR": [
108108
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IR.qll",
109109
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IR.qll",
110110
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IR.qll",
111-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IR.qll",
112-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IR.qll"
111+
"csharp/ql/src/experimental/ir/implementation/raw/IR.qll",
112+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IR.qll"
113113
],
114114
"IR IRConsistency": [
115115
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll",
116116
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll",
117117
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll",
118-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRConsistency.qll",
119-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IRConsistency.qll"
118+
"csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll",
119+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll"
120120
],
121121
"IR PrintIR": [
122122
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/PrintIR.qll",
123123
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll",
124124
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll",
125-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/PrintIR.qll",
126-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/PrintIR.qll"
125+
"csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll",
126+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.qll"
127127
],
128128
"IR IntegerConstant": [
129129
"cpp/ql/src/semmle/code/cpp/ir/internal/IntegerConstant.qll",
130-
"csharp/ql/src/semmle/code/csharp/ir/internal/IntegerConstant.qll"
130+
"csharp/ql/src/experimental/ir/internal/IntegerConstant.qll"
131131
],
132132
"IR IntegerInteval": [
133133
"cpp/ql/src/semmle/code/cpp/ir/internal/IntegerInterval.qll",
134-
"csharp/ql/src/semmle/code/csharp/ir/internal/IntegerInterval.qll"
134+
"csharp/ql/src/experimental/ir/internal/IntegerInterval.qll"
135135
],
136136
"IR IntegerPartial": [
137137
"cpp/ql/src/semmle/code/cpp/ir/internal/IntegerPartial.qll",
138-
"csharp/ql/src/semmle/code/csharp/ir/internal/IntegerPartial.qll"
138+
"csharp/ql/src/experimental/ir/internal/IntegerPartial.qll"
139139
],
140140
"IR Overlap": [
141141
"cpp/ql/src/semmle/code/cpp/ir/internal/Overlap.qll",
142-
"csharp/ql/src/semmle/code/csharp/ir/internal/Overlap.qll"
142+
"csharp/ql/src/experimental/ir/internal/Overlap.qll"
143143
],
144144
"IR EdgeKind": [
145145
"cpp/ql/src/semmle/code/cpp/ir/implementation/EdgeKind.qll",
146-
"csharp/ql/src/semmle/code/csharp/ir/implementation/EdgeKind.qll"
146+
"csharp/ql/src/experimental/ir/implementation/EdgeKind.qll"
147147
],
148148
"IR MemoryAccessKind": [
149149
"cpp/ql/src/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll",
150-
"csharp/ql/src/semmle/code/csharp/ir/implementation/MemoryAccessKind.qll"
150+
"csharp/ql/src/experimental/ir/implementation/MemoryAccessKind.qll"
151151
],
152152
"IR TempVariableTag": [
153153
"cpp/ql/src/semmle/code/cpp/ir/implementation/TempVariableTag.qll",
154-
"csharp/ql/src/semmle/code/csharp/ir/implementation/TempVariableTag.qll"
154+
"csharp/ql/src/experimental/ir/implementation/TempVariableTag.qll"
155155
],
156156
"IR Opcode": [
157157
"cpp/ql/src/semmle/code/cpp/ir/implementation/Opcode.qll",
158-
"csharp/ql/src/semmle/code/csharp/ir/implementation/Opcode.qll"
158+
"csharp/ql/src/experimental/ir/implementation/Opcode.qll"
159159
],
160160
"IR SSAConsistency": [
161161
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll",
162162
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConsistency.qll",
163-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll"
163+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll"
164164
],
165165
"C++ IR InstructionImports": [
166166
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/InstructionImports.qll",
@@ -199,7 +199,7 @@
199199
"SSA AliasAnalysis": [
200200
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll",
201201
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll",
202-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll"
202+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll"
203203
],
204204
"C++ SSA AliasAnalysisImports": [
205205
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysisImports.qll",
@@ -212,42 +212,42 @@
212212
],
213213
"IR SSA SimpleSSA": [
214214
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll",
215-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll"
215+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll"
216216
],
217217
"IR AliasConfiguration (unaliased_ssa)": [
218218
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll",
219-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll"
219+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll"
220220
],
221221
"IR SSA SSAConstruction": [
222222
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll",
223223
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll",
224-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll"
224+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll"
225225
],
226226
"IR SSA PrintSSA": [
227227
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/PrintSSA.qll",
228228
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/PrintSSA.qll",
229-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/PrintSSA.qll"
229+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintSSA.qll"
230230
],
231231
"IR ValueNumberInternal": [
232232
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll",
233233
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll",
234234
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingInternal.qll",
235-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll",
236-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll"
235+
"csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll",
236+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll"
237237
],
238238
"C++ IR ValueNumber": [
239239
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll",
240240
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll",
241241
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll",
242-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/gvn/ValueNumbering.qll",
243-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll"
242+
"csharp/ql/src/experimental/ir/implementation/raw/gvn/ValueNumbering.qll",
243+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll"
244244
],
245245
"C++ IR PrintValueNumbering": [
246246
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/gvn/PrintValueNumbering.qll",
247247
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll",
248248
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/PrintValueNumbering.qll",
249-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/gvn/PrintValueNumbering.qll",
250-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll"
249+
"csharp/ql/src/experimental/ir/implementation/raw/gvn/PrintValueNumbering.qll",
250+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll"
251251
],
252252
"C++ IR ConstantAnalysis": [
253253
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/constant/ConstantAnalysis.qll",
@@ -276,32 +276,32 @@
276276
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/PrintDominance.qll"
277277
],
278278
"C# IR InstructionImports": [
279-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/InstructionImports.qll",
280-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/InstructionImports.qll"
279+
"csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionImports.qll",
280+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/InstructionImports.qll"
281281
],
282282
"C# IR IRImports": [
283-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/IRImports.qll",
284-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/IRImports.qll"
283+
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRImports.qll",
284+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRImports.qll"
285285
],
286286
"C# IR IRBlockImports": [
287-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/IRBlockImports.qll",
288-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll"
287+
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll",
288+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll"
289289
],
290290
"C# IR IRVariableImports": [
291-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/IRVariableImports.qll",
292-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll"
291+
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll",
292+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll"
293293
],
294294
"C# IR OperandImports": [
295-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/OperandImports.qll",
296-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/OperandImports.qll"
295+
"csharp/ql/src/experimental/ir/implementation/raw/internal/OperandImports.qll",
296+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandImports.qll"
297297
],
298298
"C# IR PrintIRImports": [
299-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/PrintIRImports.qll",
300-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll"
299+
"csharp/ql/src/experimental/ir/implementation/raw/internal/PrintIRImports.qll",
300+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll"
301301
],
302302
"C# IR ValueNumberingImports": [
303-
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll",
304-
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll"
303+
"csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll",
304+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll"
305305
],
306306
"XML": [
307307
"cpp/ql/src/semmle/code/cpp/XML.qll",

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,14 +2098,31 @@ class PathNode extends TPathNode {
20982098
/** Gets the associated configuration. */
20992099
Configuration getConfiguration() { none() }
21002100

2101+
private predicate isHidden() {
2102+
nodeIsHidden(this.getNode()) and
2103+
not this.isSource() and
2104+
not this instanceof PathNodeSink
2105+
}
2106+
2107+
private PathNode getASuccessorIfHidden() {
2108+
this.isHidden() and
2109+
result = this.(PathNodeImpl).getASuccessorImpl()
2110+
}
2111+
21012112
/** Gets a successor of this node, if any. */
2102-
PathNode getASuccessor() { none() }
2113+
final PathNode getASuccessor() {
2114+
result = this.(PathNodeImpl).getASuccessorImpl().getASuccessorIfHidden*() and
2115+
not this.isHidden() and
2116+
not result.isHidden()
2117+
}
21032118

21042119
/** Holds if this node is a source. */
21052120
predicate isSource() { none() }
21062121
}
21072122

21082123
abstract private class PathNodeImpl extends PathNode {
2124+
abstract PathNode getASuccessorImpl();
2125+
21092126
private string ppAp() {
21102127
this instanceof PathNodeSink and result = ""
21112128
or
@@ -2180,7 +2197,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid {
21802197
result.getConfiguration() = unbind(this.getConfiguration())
21812198
}
21822199

2183-
override PathNodeImpl getASuccessor() {
2200+
override PathNodeImpl getASuccessorImpl() {
21842201
// an intermediate step to another intermediate node
21852202
result = getSuccMid()
21862203
or
@@ -2217,7 +2234,7 @@ private class PathNodeSink extends PathNodeImpl, TPathNodeSink {
22172234

22182235
override Configuration getConfiguration() { result = config }
22192236

2220-
override PathNode getASuccessor() { none() }
2237+
override PathNode getASuccessorImpl() { none() }
22212238

22222239
override predicate isSource() { config.isSource(node) }
22232240
}

0 commit comments

Comments
 (0)