Skip to content

Commit 84e9229

Browse files
committed
Merge branch 'main' into koa
2 parents f94f82a + c6a69e1 commit 84e9229

File tree

302 files changed

+6266
-2252
lines changed

Some content is hidden

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

302 files changed

+6266
-2252
lines changed

.github/workflows/check-change-note.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Check change note
2+
13
on:
24
pull_request_target:
35
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"omnisharp.autoStart": false
3-
}
3+
}

cpp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.Build" Version="16.0.461" />
20+
<PackageReference Include="Microsoft.Build" Version="16.9.0" />
2121
</ItemGroup>
2222

2323
<ItemGroup>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lgtm,codescanning
2+
* The 'Resource not released in destructor' (cpp/resource-not-released-in-destructor) query has been improved to recognize more releases of resources.

cpp/ql/src/Summary/LinesOfCode.ql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @id cpp/summary/lines-of-code
3+
* @name Total lines of C/C++ code in the database
4+
* @description The total number of lines of C/C++ code across all files, including system headers, libraries, and auto-generated files. This is a useful metric of the size of a database. For all files that were seen during the build, this query counts the lines of code, excluding whitespace or comments.
5+
* @kind metric
6+
* @tags summary
7+
*/
8+
9+
import cpp
10+
11+
select sum(File f | f.fromSource() | f.getMetrics().getNumberOfLinesOfCode())

cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import cpp
1515
import Critical.NewDelete
16+
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
1617

1718
/**
1819
* An expression that acquires a resource, and the kind of resource that is acquired. The
@@ -98,7 +99,8 @@ private predicate exprReleases(Expr e, Expr released, string kind) {
9899
e.(FunctionCall).getTarget().(MemberFunction).getAnOverridingFunction+() = f
99100
) and
100101
e.(FunctionCall).getArgument(arg) = released and
101-
exprReleases(_, exprOrDereference(f.getParameter(arg).getAnAccess()), kind)
102+
exprReleases(_,
103+
exprOrDereference(globalValueNumber(f.getParameter(arg).getAnAccess()).getAnExpr()), kind)
102104
)
103105
or
104106
exists(Function f, ThisExpr innerThis |
@@ -110,7 +112,7 @@ private predicate exprReleases(Expr e, Expr released, string kind) {
110112
) and
111113
e.(FunctionCall).getQualifier() = exprOrDereference(released) and
112114
innerThis.getEnclosingFunction() = f and
113-
exprReleases(_, innerThis, kind)
115+
exprReleases(_, globalValueNumber(innerThis).getAnExpr(), kind)
114116
)
115117
}
116118

0 commit comments

Comments
 (0)