Skip to content

Commit 0d1be22

Browse files
authored
Merge branch 'main' into typealiastests
2 parents 8d666d0 + 9a5dbd0 commit 0d1be22

File tree

10 files changed

+1001
-6
lines changed

10 files changed

+1001
-6
lines changed

CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/csharp/ @github/codeql-csharp
33
/go/ @github/codeql-go
44
/java/ @github/codeql-java
5-
/javascript/ @github/codeql-dynamic
6-
/python/ @github/codeql-dynamic
7-
/ruby/ @github/codeql-dynamic
5+
/javascript/ @github/codeql-javascript
6+
/python/ @github/codeql-python
7+
/ruby/ @github/codeql-ruby
88
/swift/ @github/codeql-swift
99
/misc/codegen/ @github/codeql-swift
1010
/java/kotlin-extractor/ @github/codeql-kotlin

javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,8 @@ private void doExtract(FileExtractor extractor, Path file, ExtractorState state)
12341234
ParseResultInfo loc = extractor.extract(f, state);
12351235
if (!extractor.getConfig().isExterns() && (loc == null || loc.getLinesOfCode() != 0)) seenCode = true;
12361236
if (!extractor.getConfig().isExterns()) seenFiles = true;
1237-
for (ParseError err : loc.getParseErrors()) {
1237+
List<ParseError> errors = loc == null ? Collections.emptyList() : loc.getParseErrors();
1238+
for (ParseError err : errors) {
12381239
String msg = "A parse error occurred: " + StringUtil.escapeMarkdown(err.getMessage())
12391240
+ ". Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.";
12401241
// file, relative to the source root

misc/codegen/templates/ql_db.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ module Raw {
55
{{#final}}override string toString() { result = "{{name}}" }{{/final}}
66

77
{{#properties}}
8+
/**
9+
* {{>ql_property_doc}} *
10+
{{#has_description}}
11+
{{#description}}
12+
* {{.}}
13+
{{/description}}
14+
{{/has_description}}
15+
*/
816
{{type}} {{getter}}({{#is_repeated}}int index{{/is_repeated}}) {
917
{{tablename}}({{#tableparams}}{{^first}}, {{/first}}{{param}}{{/tableparams}})
1018
}

swift/ql/.generated.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ ql/lib/codeql/swift/generated/OtherAvailabilitySpec.qll 0e26a203b26ff0581b7396b0
385385
ql/lib/codeql/swift/generated/ParentChild.qll adf8af53ce18086eb28e5fe204ad2089f2ab516622c16055ccfdd1335f5ac72b 6f7464ecd8ca04b6aa261139b36a162e5b0636237d514b8431ef4f97a1c603dc
386386
ql/lib/codeql/swift/generated/PlatformVersionAvailabilitySpec.qll f82d9ca416fe8bd59b5531b65b1c74c9f317b3297a6101544a11339a1cffce38 7f5c6d3309e66c134107afe55bae76dfc9a72cb7cdd6d4c3706b6b34cee09fa0
387387
ql/lib/codeql/swift/generated/PureSynthConstructors.qll 173c0dd59396a1de26fe870e3bc2766c46de689da2a4d8807cb62023bbce1a98 173c0dd59396a1de26fe870e3bc2766c46de689da2a4d8807cb62023bbce1a98
388-
ql/lib/codeql/swift/generated/Raw.qll 6fe6560ff3533df93afa67dd98494ce985f1e8e402c0a608b7c163d0473f87e8 b6f5a443c25d094b224bdea6a6eced4293391af7f5a702bc4978bca29c84b6b4
388+
ql/lib/codeql/swift/generated/Raw.qll 30813233f18677b073e78713fbf144cd6e85a2fcafcd7bb29573f1ac1915784e 7c63093ca4f7643567151516341f4ba74f935813928b6af274b19d44d0f24941
389389
ql/lib/codeql/swift/generated/Synth.qll af02e0b49fe7b488592687996cc74d9525d4e3fbc9d324820b310b356f4d2612 5c740a660721173e9e4e45eb701d373ca19ff14d61cdaea309b65871e0deea90
390390
ql/lib/codeql/swift/generated/SynthConstructors.qll a1b3ca33017f82124286ccad317a05484fee144fb9c3cdd2e500ce38e5efcec4 a1b3ca33017f82124286ccad317a05484fee144fb9c3cdd2e500ce38e5efcec4
391391
ql/lib/codeql/swift/generated/UnknownFile.qll 0fcf9beb8de79440bcdfff4bb6ab3dd139bd273e6c32754e05e6a632651e85f6 0fcf9beb8de79440bcdfff4bb6ab3dd139bd273e6c32754e05e6a632651e85f6

swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,19 @@ private module ReturnNodes {
400400
override ReturnKind getKind() { result instanceof NormalReturnKind }
401401
}
402402

403+
/**
404+
* A data-flow node that represents the `self` value in a constructor being
405+
* implicitly returned as the newly-constructed object
406+
*/
407+
class SelfReturnNode extends InoutReturnNodeImpl {
408+
SelfReturnNode() {
409+
exit.getScope() instanceof ConstructorDecl and
410+
param instanceof SelfParamDecl
411+
}
412+
413+
override ReturnKind getKind() { result instanceof NormalReturnKind }
414+
}
415+
403416
class InoutReturnNodeImpl extends ReturnNode, TInoutReturnNode, NodeImpl {
404417
ParamDecl param;
405418
ControlFlowNode exit;

0 commit comments

Comments
 (0)