Skip to content

Commit 9f410eb

Browse files
committed
Merge branch 'main' into ts-54
2 parents d73f434 + 9c51514 commit 9f410eb

File tree

1,371 files changed

+216104
-80214
lines changed

Some content is hidden

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

1,371 files changed

+216104
-80214
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,7 @@ javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/auto
7474

7575
# Auto-generated modeling for Python
7676
python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true
77+
78+
# auto-generated bazel lock file
79+
ruby/extractor/cargo-bazel-lock.json linguist-generated=true
80+
ruby/extractor/cargo-bazel-lock.json -merge

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ JS:
2020

2121
Kotlin:
2222
- java/kotlin-extractor/**/*
23-
- java/ql/test/kotlin/**/*
23+
- java/ql/test-kotlin*/**/*
2424

2525
Python:
2626
- python/**/*

.github/workflows/compile-queries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
key: all-queries
3030
- name: check formatting
31-
run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
31+
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
3232
- name: compile queries - check-only
3333
# run with --check-only if running in a PR (github.sha != main)
3434
if : ${{ github.event_name == 'pull_request' }}

.github/workflows/ruby-build.yml

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ jobs:
5151
run: |
5252
brew install gnu-tar
5353
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
54-
- name: Install cargo-cross
55-
if: runner.os == 'Linux'
56-
run: cargo install cross --version 0.2.5
54+
- name: Prepare Windows
55+
if: runner.os == 'Windows'
56+
shell: powershell
57+
run: |
58+
git config --global core.longpaths true
5759
- uses: ./.github/actions/os-version
5860
id: os_version
5961
- name: Cache entire extractor
@@ -82,16 +84,8 @@ jobs:
8284
- name: Run tests
8385
if: steps.cache-extractor.outputs.cache-hit != 'true'
8486
run: cd extractor && cargo test --verbose
85-
# On linux, build the extractor via cross in a centos7 container.
86-
# This ensures we don't depend on glibc > 2.17.
87-
- name: Release build (linux)
88-
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os == 'Linux'
89-
run: |
90-
cd extractor
91-
cross build --release
92-
mv target/x86_64-unknown-linux-gnu/release/codeql-extractor-ruby target/release/
93-
- name: Release build (windows and macos)
94-
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux'
87+
- name: Release build
88+
if: steps.cache-extractor.outputs.cache-hit != 'true'
9589
run: cd extractor && cargo build --release
9690
- name: Generate dbscheme
9791
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
@@ -123,7 +117,7 @@ jobs:
123117
- name: Cache compilation cache
124118
id: query-cache
125119
uses: ./.github/actions/cache-query-compilation
126-
with:
120+
with:
127121
key: ruby-build
128122
- name: Build Query Pack
129123
run: |
@@ -235,54 +229,3 @@ jobs:
235229
shell: bash
236230
run: |
237231
codeql database analyze --search-path "${{ runner.temp }}/ruby-bundle" --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls
238-
239-
# This is a copy of the 'test' job that runs in a centos7 container.
240-
# This tests that the extractor works correctly on systems with an old glibc.
241-
test-centos7:
242-
defaults:
243-
run:
244-
working-directory: ${{ github.workspace }}
245-
strategy:
246-
fail-fast: false
247-
runs-on: ubuntu-latest
248-
container:
249-
image: centos:centos7
250-
env:
251-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252-
needs: [package]
253-
steps:
254-
- name: Install gh cli
255-
run: |
256-
yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
257-
# fetch-codeql requires unzip and jq
258-
# jq is available in epel-release (https://docs.fedoraproject.org/en-US/epel/)
259-
yum install -y gh unzip epel-release
260-
yum install -y jq
261-
- uses: actions/checkout@v3
262-
- name: Fetch CodeQL
263-
uses: ./.github/actions/fetch-codeql
264-
265-
# Due to a bug in Actions, we can't use runner.temp in the run blocks here.
266-
# https://github.com/actions/runner/issues/2185
267-
268-
- name: Download Ruby bundle
269-
uses: actions/download-artifact@v3
270-
with:
271-
name: codeql-ruby-bundle
272-
path: ${{ runner.temp }}
273-
- name: Unzip Ruby bundle
274-
shell: bash
275-
run: unzip -q -d "$RUNNER_TEMP"/ruby-bundle "$RUNNER_TEMP"/codeql-ruby-bundle.zip
276-
277-
- name: Run QL test
278-
shell: bash
279-
run: |
280-
codeql test run --search-path "$RUNNER_TEMP"/ruby-bundle --additional-packs "$RUNNER_TEMP"/ruby-bundle ruby/ql/test/library-tests/ast/constants/
281-
- name: Create database
282-
shell: bash
283-
run: |
284-
codeql database create --search-path "$RUNNER_TEMP"/ruby-bundle --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database
285-
- name: Analyze database
286-
shell: bash
287-
run: |
288-
codeql database analyze --search-path "$RUNNER_TEMP"/ruby-bundle --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
# local bazel options
4040
/local.bazelrc
4141

42+
# generated cmake directory
43+
/.bazel-cmake
44+
4245
# CLion project files
4346
/.clwb
4447

config/identical-files.json

Lines changed: 16 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -88,123 +88,46 @@
8888
"IR Instruction": [
8989
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll",
9090
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll",
91-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll",
92-
"csharp/ql/src/experimental/ir/implementation/raw/Instruction.qll",
93-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Instruction.qll"
91+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll"
9492
],
9593
"IR IRBlock": [
9694
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRBlock.qll",
9795
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRBlock.qll",
98-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll",
99-
"csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll",
100-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll"
96+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll"
10197
],
10298
"IR IRVariable": [
10399
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRVariable.qll",
104100
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll",
105-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll",
106-
"csharp/ql/src/experimental/ir/implementation/raw/IRVariable.qll",
107-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRVariable.qll"
101+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll"
108102
],
109103
"IR IRFunction": [
110104
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRFunction.qll",
111105
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRFunction.qll",
112-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRFunction.qll",
113-
"csharp/ql/src/experimental/ir/implementation/raw/IRFunction.qll",
114-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRFunction.qll"
106+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRFunction.qll"
115107
],
116108
"IR Operand": [
117109
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Operand.qll",
118110
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll",
119-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll",
120-
"csharp/ql/src/experimental/ir/implementation/raw/Operand.qll",
121-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll"
122-
],
123-
"IR IRType": [
124-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/IRType.qll",
125-
"csharp/ql/src/experimental/ir/implementation/IRType.qll"
126-
],
127-
"IR IRConfiguration": [
128-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/IRConfiguration.qll",
129-
"csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll"
130-
],
131-
"IR UseSoundEscapeAnalysis": [
132-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/UseSoundEscapeAnalysis.qll",
133-
"csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll"
134-
],
135-
"IR IRFunctionBase": [
136-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/IRFunctionBase.qll",
137-
"csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBase.qll"
138-
],
139-
"IR Operand Tag": [
140-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/OperandTag.qll",
141-
"csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll"
142-
],
143-
"IR TInstruction": [
144-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll",
145-
"csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll"
146-
],
147-
"IR TIRVariable": [
148-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TIRVariable.qll",
149-
"csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll"
111+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll"
150112
],
151113
"IR IR": [
152114
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IR.qll",
153115
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IR.qll",
154-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IR.qll",
155-
"csharp/ql/src/experimental/ir/implementation/raw/IR.qll",
156-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IR.qll"
116+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IR.qll"
157117
],
158118
"IR IRConsistency": [
159119
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll",
160120
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll",
161-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll",
162-
"csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll",
163-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll"
121+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll"
164122
],
165123
"IR PrintIR": [
166124
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll",
167125
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll",
168-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll",
169-
"csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll",
170-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.qll"
171-
],
172-
"IR IntegerConstant": [
173-
"cpp/ql/lib/semmle/code/cpp/ir/internal/IntegerConstant.qll",
174-
"csharp/ql/src/experimental/ir/internal/IntegerConstant.qll"
175-
],
176-
"IR IntegerInteval": [
177-
"cpp/ql/lib/semmle/code/cpp/ir/internal/IntegerInterval.qll",
178-
"csharp/ql/src/experimental/ir/internal/IntegerInterval.qll"
179-
],
180-
"IR IntegerPartial": [
181-
"cpp/ql/lib/semmle/code/cpp/ir/internal/IntegerPartial.qll",
182-
"csharp/ql/src/experimental/ir/internal/IntegerPartial.qll"
183-
],
184-
"IR Overlap": [
185-
"cpp/ql/lib/semmle/code/cpp/ir/internal/Overlap.qll",
186-
"csharp/ql/src/experimental/ir/internal/Overlap.qll"
187-
],
188-
"IR EdgeKind": [
189-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/EdgeKind.qll",
190-
"csharp/ql/src/experimental/ir/implementation/EdgeKind.qll"
191-
],
192-
"IR MemoryAccessKind": [
193-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll",
194-
"csharp/ql/src/experimental/ir/implementation/MemoryAccessKind.qll"
195-
],
196-
"IR TempVariableTag": [
197-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/TempVariableTag.qll",
198-
"csharp/ql/src/experimental/ir/implementation/TempVariableTag.qll"
199-
],
200-
"IR Opcode": [
201-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll",
202-
"csharp/ql/src/experimental/ir/implementation/Opcode.qll"
126+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll"
203127
],
204128
"IR SSAConsistency": [
205129
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll",
206-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConsistency.qll",
207-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll"
130+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConsistency.qll"
208131
],
209132
"C++ IR InstructionImports": [
210133
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionImports.qll",
@@ -252,8 +175,7 @@
252175
],
253176
"SSA AliasAnalysis": [
254177
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll",
255-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll",
256-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll"
178+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll"
257179
],
258180
"SSA PrintAliasAnalysis": [
259181
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/PrintAliasAnalysis.qll",
@@ -268,44 +190,28 @@
268190
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll",
269191
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingImports.qll"
270192
],
271-
"IR SSA SimpleSSA": [
272-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll",
273-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll"
274-
],
275-
"IR AliasConfiguration (unaliased_ssa)": [
276-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll",
277-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll"
278-
],
279193
"IR SSA SSAConstruction": [
280194
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll",
281-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll",
282-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll"
195+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll"
283196
],
284197
"IR SSA PrintSSA": [
285198
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/PrintSSA.qll",
286-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/PrintSSA.qll",
287-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintSSA.qll"
199+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/PrintSSA.qll"
288200
],
289201
"IR ValueNumberInternal": [
290202
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll",
291203
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll",
292-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingInternal.qll",
293-
"csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll",
294-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll"
204+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingInternal.qll"
295205
],
296206
"C++ IR ValueNumber": [
297207
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll",
298208
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll",
299-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll",
300-
"csharp/ql/src/experimental/ir/implementation/raw/gvn/ValueNumbering.qll",
301-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll"
209+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll"
302210
],
303211
"C++ IR PrintValueNumbering": [
304212
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/PrintValueNumbering.qll",
305213
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll",
306-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/PrintValueNumbering.qll",
307-
"csharp/ql/src/experimental/ir/implementation/raw/gvn/PrintValueNumbering.qll",
308-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll"
214+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/PrintValueNumbering.qll"
309215
],
310216
"C++ IR ConstantAnalysis": [
311217
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/constant/ConstantAnalysis.qll",
@@ -333,38 +239,6 @@
333239
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/PrintDominance.qll",
334240
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/PrintDominance.qll"
335241
],
336-
"C# IR InstructionImports": [
337-
"csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionImports.qll",
338-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/InstructionImports.qll"
339-
],
340-
"C# IR IRImports": [
341-
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRImports.qll",
342-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRImports.qll"
343-
],
344-
"C# IR IRBlockImports": [
345-
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll",
346-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll"
347-
],
348-
"C# IR IRFunctionImports": [
349-
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRFunctionImports.qll",
350-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll"
351-
],
352-
"C# IR IRVariableImports": [
353-
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll",
354-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll"
355-
],
356-
"C# IR OperandImports": [
357-
"csharp/ql/src/experimental/ir/implementation/raw/internal/OperandImports.qll",
358-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandImports.qll"
359-
],
360-
"C# IR PrintIRImports": [
361-
"csharp/ql/src/experimental/ir/implementation/raw/internal/PrintIRImports.qll",
362-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll"
363-
],
364-
"C# IR ValueNumberingImports": [
365-
"csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll",
366-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll"
367-
],
368242
"C# ControlFlowReachability": [
369243
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/ControlFlowReachability.qll",
370244
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/ControlFlowReachability.qll"
@@ -498,4 +372,4 @@
498372
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
499373
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
500374
]
501-
}
375+
}

cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System;
2+
23
using Semmle.Autobuild.Shared;
4+
using Semmle.Util;
35

46
namespace Semmle.Autobuild.Cpp
57
{
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Added destructors for named objects to the intermediate representation.

cpp/ql/lib/semmle/code/cpp/Enclosing.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@ Element exprEnclosingElement(Expr e) {
6060
)
6161
else result = de.getDeclaration()
6262
)
63+
or
64+
result.(Stmt).getAnImplicitDestructorCall() = e
6365
}

0 commit comments

Comments
 (0)