From 5ec8e5dd301ebab4291b3830434c26635d7fcf2c Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 11:21:27 +0200 Subject: [PATCH 001/162] Python: Setup support for threat-models Naming in other languages: - `SourceNode` (for QL only modeling) - `ThreatModelFlowSource` (for active sources from QL or data-extensions) However, since we use `LocalSourceNode` in Python, and `SourceNode` in JS (for local source nodes), it seems a bit confusing to follow the same naming convention as other languages, and instead I came up with new names. --- python/ql/lib/qlpack.yml | 1 + python/ql/lib/semmle/python/Concepts.qll | 48 +++++++++++++++++++ .../python/dataflow/new/RemoteFlowSources.qll | 10 ++-- .../python/frameworks/data/ModelsAsData.qll | 13 +++-- 4 files changed, 61 insertions(+), 11 deletions(-) diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index 81d09c13b5d3..2abc452ef503 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -9,6 +9,7 @@ dependencies: codeql/dataflow: ${workspace} codeql/mad: ${workspace} codeql/regex: ${workspace} + codeql/threat-models: ${workspace} codeql/tutorial: ${workspace} codeql/util: ${workspace} codeql/xml: ${workspace} diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 75b884a9dd4d..4703249ab93d 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -10,6 +10,54 @@ private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.TaintTracking private import semmle.python.Frameworks private import semmle.python.security.internal.EncryptionKeySizes +private import codeql.threatmodels.ThreatModels + +/** + * A data flow source, for a specific threat-model. + * + * Extend this class to refine existing API models. If you want to model new APIs, + * extend `ThreatModelSource::Range` instead. + */ +class ThreatModelSource extends DataFlow::Node instanceof ThreatModelSource::Range { + /** + * Gets a string that represents the source kind with respect to threat modeling. + */ + string getThreatModel() { result = super.getThreatModel() } + + /** Gets a string that describes the type of this threat-model source. */ + string getSourceType() { result = super.getSourceType() } +} + +/** Provides a class for modeling new sources for specific threat-models. */ +module ThreatModelSource { + /** + * A data flow source, for a specific threat-model. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `ThreatModelSource` instead. + */ + abstract class Range extends DataFlow::Node { + /** + * Gets a string that represents the source kind with respect to threat modeling. + */ + abstract string getThreatModel(); + + /** Gets a string that describes the type of this threat-model source. */ + abstract string getSourceType(); + } +} + +/** + * A data flow source that is enabled in the current threat model configuration. + */ +class ActiveThreatModelSource extends DataFlow::Node { + ActiveThreatModelSource() { + exists(string kind | + currentThreatModel(kind) and + this.(ThreatModelSource).getThreatModel() = kind + ) + } +} /** * A data-flow node that executes an operating system command, diff --git a/python/ql/lib/semmle/python/dataflow/new/RemoteFlowSources.qll b/python/ql/lib/semmle/python/dataflow/new/RemoteFlowSources.qll index 4ad0aee1f313..8975b967c813 100644 --- a/python/ql/lib/semmle/python/dataflow/new/RemoteFlowSources.qll +++ b/python/ql/lib/semmle/python/dataflow/new/RemoteFlowSources.qll @@ -15,10 +15,7 @@ private import semmle.python.Concepts * Extend this class to refine existing API models. If you want to model new APIs, * extend `RemoteFlowSource::Range` instead. */ -class RemoteFlowSource extends DataFlow::Node instanceof RemoteFlowSource::Range { - /** Gets a string that describes the type of this remote flow source. */ - string getSourceType() { result = super.getSourceType() } -} +class RemoteFlowSource extends ThreatModelSource instanceof RemoteFlowSource::Range { } /** Provides a class for modeling new sources of remote user input. */ module RemoteFlowSource { @@ -28,8 +25,7 @@ module RemoteFlowSource { * Extend this class to model new APIs. If you want to refine existing API models, * extend `RemoteFlowSource` instead. */ - abstract class Range extends DataFlow::Node { - /** Gets a string that describes the type of this remote flow source. */ - abstract string getSourceType(); + abstract class Range extends ThreatModelSource::Range { + override string getThreatModel() { result = "remote" } } } diff --git a/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll b/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll index c2176c0644b9..11c6b285f2aa 100644 --- a/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll +++ b/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll @@ -18,14 +18,19 @@ private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.DataFlow private import semmle.python.ApiGraphs private import semmle.python.dataflow.new.FlowSummary +private import semmle.python.Concepts /** - * A remote flow source originating from a CSV source row. + * A threat-model flow source originating from a data extension. */ -private class RemoteFlowSourceFromCsv extends RemoteFlowSource::Range { - RemoteFlowSourceFromCsv() { this = ModelOutput::getASourceNode("remote").asSource() } +private class ThreatModelSourceFromDataExtension extends ThreatModelSource::Range { + ThreatModelSourceFromDataExtension() { this = ModelOutput::getASourceNode(_).asSource() } - override string getSourceType() { result = "Remote flow (from model)" } + override string getThreatModel() { this = ModelOutput::getASourceNode(result).asSource() } + + override string getSourceType() { + result = "Source node (" + this.getThreatModel() + ") [from data-extension]" + } } private class SummarizedCallableFromModel extends SummarizedCallable { From 766dcc4dd601e2e112de8c3a2f49ebdb4df7903b Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 11:21:51 +0200 Subject: [PATCH 002/162] ThreatModels: Expose `knownThreatModel` Without, it's impossible to write test showing what threat-models are active by default... unless I provide a hardcoded list in the test itself, which is not any fun. --- shared/threat-models/codeql/threatmodels/ThreatModels.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/threat-models/codeql/threatmodels/ThreatModels.qll b/shared/threat-models/codeql/threatmodels/ThreatModels.qll index d12139ef28ea..19dfd0d1a656 100644 --- a/shared/threat-models/codeql/threatmodels/ThreatModels.qll +++ b/shared/threat-models/codeql/threatmodels/ThreatModels.qll @@ -29,7 +29,7 @@ extensible predicate threatModelConfiguration(string kind, boolean enable, int p extensible private predicate threatModelGrouping(string kind, string group); /** Holds if the specified threat model kind is mentioned in either the configuration or grouping table. */ -private predicate knownThreatModel(string kind) { +predicate knownThreatModel(string kind) { threatModelConfiguration(kind, _, _) or threatModelGrouping(kind, _) or threatModelGrouping(_, kind) or From 617ab27c7502060d611224ef771b554ae1e65828 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 11:24:37 +0200 Subject: [PATCH 003/162] Python: Add test showing default active threat-models --- .../threat-models/default/ActiveKinds.expected | 4 ++++ .../library-tests/threat-models/default/ActiveKinds.ql | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 python/ql/test/library-tests/threat-models/default/ActiveKinds.expected create mode 100644 python/ql/test/library-tests/threat-models/default/ActiveKinds.ql diff --git a/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected b/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected new file mode 100644 index 000000000000..c471a7cc9129 --- /dev/null +++ b/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected @@ -0,0 +1,4 @@ +| default | +| remote | +| request | +| response | diff --git a/python/ql/test/library-tests/threat-models/default/ActiveKinds.ql b/python/ql/test/library-tests/threat-models/default/ActiveKinds.ql new file mode 100644 index 000000000000..93a1354b7af8 --- /dev/null +++ b/python/ql/test/library-tests/threat-models/default/ActiveKinds.ql @@ -0,0 +1,7 @@ +private import codeql.threatmodels.ThreatModels + +from string kind +where + knownThreatModel(kind) and + currentThreatModel(kind) +select kind From 8f7dec07b8c61b0cd493511688a3d0c6eddcc600 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 11:29:16 +0200 Subject: [PATCH 004/162] Python: Remove 'response' from default threat-models I didn't want to put the configuration file in `semmle/python/frameworks/**/*.model.yml`, so created `ext/` as in other languages --- python/ql/lib/ext/default-threat-models-fixup.model.yml | 8 ++++++++ python/ql/lib/qlpack.yml | 1 + .../threat-models/default/ActiveKinds.expected | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 python/ql/lib/ext/default-threat-models-fixup.model.yml diff --git a/python/ql/lib/ext/default-threat-models-fixup.model.yml b/python/ql/lib/ext/default-threat-models-fixup.model.yml new file mode 100644 index 000000000000..cc1cb20517ec --- /dev/null +++ b/python/ql/lib/ext/default-threat-models-fixup.model.yml @@ -0,0 +1,8 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + # Since responses are enabled by default in the shared threat-models configuration, + # we need to disable it here to keep existing behavior for the python analysis. + - ["response", false, -2147483647] diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index 2abc452ef503..36b1f7242be0 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -16,4 +16,5 @@ dependencies: codeql/yaml: ${workspace} dataExtensions: - semmle/python/frameworks/**/*.model.yml + - ext/*.model.yml warnOnImplicitThis: true diff --git a/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected b/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected index c471a7cc9129..892f0fa5f6c3 100644 --- a/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected +++ b/python/ql/test/library-tests/threat-models/default/ActiveKinds.expected @@ -1,4 +1,3 @@ | default | | remote | | request | -| response | From 8bf8893307da1314158fdfbf3c24100cbeb5902f Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Mon, 26 Aug 2024 21:30:48 -0700 Subject: [PATCH 005/162] Add support for vulnerable CORS middlewares --- python/ql/lib/semmle/python/Concepts.qll | 50 ++++++++++++ .../lib/semmle/python/frameworks/FastApi.qll | 26 ++++++ .../semmle/python/frameworks/Starlette.qll | 81 +++++++++++++++++++ .../CorsMisconfigurationMiddleware.qhelp | 64 +++++++++++++++ .../CWE-942/CorsMisconfigurationMiddleware.ql | 36 +++++++++ .../CorsMisconfigurationMiddlewareBad.py | 21 +++++ .../CorsMisconfigurationMiddlewareGood.py | 24 ++++++ .../CorsMisconfigurationMiddleware.expected | 2 + .../CorsMisconfigurationMiddleware.qlref | 1 + .../fastapi.py | 21 +++++ .../starlette.py | 11 +++ 11 files changed, 337 insertions(+) create mode 100644 python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp create mode 100644 python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql create mode 100644 python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareBad.py create mode 100644 python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareGood.py create mode 100644 python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected create mode 100644 python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.qlref create mode 100644 python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/fastapi.py create mode 100644 python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/starlette.py diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 75b884a9dd4d..920fbca35534 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -1411,6 +1411,56 @@ module Http { override DataFlow::Node getValueArg() { none() } } + /** + * A data-flow node that enables or disables CORS + * in a global manner. + * + * Extend this class to refine existing API models. If you want to model new APIs, + * extend `CorsMiddleware::Range` instead. + */ + class CorsMiddleware extends DataFlow::Node instanceof CorsMiddleware::Range { + /** + * Gets the string corresponding to the middleware + */ + string middleware_name() { result = super.middleware_name() } + + /** + * Gets the boolean value corresponding to if CORS credentials is enabled + * (`true`) or disabled (`false`) by this node. + */ + DataFlow::Node allowed_origins() { result = super.allowed_origins() } + + DataFlow::Node allowed_credentials() { result = super.allowed_credentials() } + } + + /** Provides a class for modeling new CORS middleware APIs. */ + module CorsMiddleware { + /** + * A data-flow node that enables or disables Cross-site request forgery protection + * in a global manner. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `CorsMiddleware` instead. + */ + abstract class Range extends DataFlow::Node { + /** + * Gets the string corresponding to the middleware + */ + abstract string middleware_name(); + + /** + * Gets the boolean value corresponding to if CORS credentials is enabled + * (`true`) or disabled (`false`) by this node. + */ + abstract DataFlow::Node allowed_credentials(); + + /** + * Gets the strings corresponding to the origins allowed by the cors policy + */ + abstract DataFlow::Node allowed_origins(); + } + } + /** * A data-flow node that enables or disables Cross-site request forgery protection * in a global manner. diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index 3a15ca6fbcc3..7927dac5a24c 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -30,6 +30,32 @@ module FastApi { API::Node instance() { result = cls().getReturn() } } + /** + * A call to `app.add_middleware` adding a generic middleware. + */ + private class AddMiddlewareCall extends DataFlow::CallCfgNode { + AddMiddlewareCall() { this = App::instance().getMember("add_middleware").getACall() } + + string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + } + + /** + * A call to `app.add_middleware` adding CORSMiddleware. + */ + class AddCorsMiddlewareCall extends Http::Server::CorsMiddleware::Range, AddMiddlewareCall { + override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + + override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } + + override DataFlow::Node allowed_credentials() { + result = this.getArgByName("allow_credentials") + } + + DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } + + DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } + } + /** * Provides models for the `fastapi.APIRouter` class * diff --git a/python/ql/lib/semmle/python/frameworks/Starlette.qll b/python/ql/lib/semmle/python/frameworks/Starlette.qll index ec62888ecb0c..d54fc267b41d 100644 --- a/python/ql/lib/semmle/python/frameworks/Starlette.qll +++ b/python/ql/lib/semmle/python/frameworks/Starlette.qll @@ -25,6 +25,87 @@ private import semmle.python.frameworks.data.ModelsAsData * - https://www.starlette.io/ */ module Starlette { + /** + * Provides models for the `starlette.app` class + * + * See https://www.starlette.io/websockets/. + */ + module App { + API::Node cls() { result = API::moduleImport("starlette").getMember("app") } + + /** Gets a reference to a FastAPI application (an instance of `fastapi.FastAPI`). */ + API::Node instance() { result = cls().getReturn() } + } + + /** + * A call to any of the execute methods on a `app.add_middleware`. + */ + class AddMiddlewareCall extends DataFlow::CallCfgNode { + AddMiddlewareCall() { + this = [App::instance().getMember("add_middleware").getACall(), Middleware::instance()] + } + + string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + } + + /** + * A call to any of the execute methods on a `app.add_middleware` with CORSMiddleware. + */ + class AddCorsMiddlewareCall extends AddMiddlewareCall, Http::Server::CorsMiddleware::Range { + override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + + override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } + + override DataFlow::Node allowed_credentials() { + result = this.getArgByName("allow_credentials") + } + + DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } + + DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } + } + + /** + * Provides models for the `starlette.middleware.Middleware` class + * + * See https://www.starlette.io/. + */ + module Middleware { + /** Gets a reference to the `starlette.middleware.Middleware` class. */ + API::Node classRef() { + result = API::moduleImport("starlette").getMember("middleware").getMember("Middleware") + or + result = ModelOutput::getATypeNode("starlette.middleware.Middleware~Subclass").getASubclass*() + } + + /** + * A source of instances of `starlette.middleware.Middleware`, extend this class to model new instances. + * + * This can include instantiations of the class, return values from function + * calls, or a special parameter that will be set when functions are called by an external + * library. + * + * Use the predicate `Middleware::instance()` to get references to instances of `starlette.middleware.middleware`. + */ + abstract class InstanceSource extends DataFlow::LocalSourceNode { } + + /** A direct instantiation of `starlette.middleware.Middleware`. */ + class ClassInstantiation extends InstanceSource, DataFlow::CallCfgNode { + ClassInstantiation() { this = classRef().getACall() } + } + + /** Gets a reference to an instance of `starlette.middleware.Middleware`. */ + private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { + t.start() and + result instanceof InstanceSource + or + exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) + } + + /** Gets a reference to an instance of `starlette.middleware.Middleware`. */ + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + } + /** * Provides models for the `starlette.websockets.WebSocket` class * diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp new file mode 100644 index 000000000000..43f800f03a59 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp @@ -0,0 +1,64 @@ + + + +

+ Web browsers, by default, disallow cross-origin resource sharing via direct HTTP requests (i.e. using a JavaScript HTTP client). + Still, to satisfy some needs that arose with the growth of the web, an expedient was created to make exceptions possible. + CORS (Cross-origin resource sharing) is a mechanism that allows resources of a web endpoint (let's call it "Peer A") + to be accessed from another web page belonging to a different domain ("Peer B"). +

+

+ For that to happen, Peer A needs to make available its CORS configuration via special headers on the desired endpoint + via the OPTIONS method. +

+

+ This configuration can also allow the inclusion of cookies on the cross-origin request, + (i.e. when the Access-Control-Allow-Credentials header is set to true) + meaning that Peer B can send a request to Peer A that will include the cookies as if the request was executed by the user. +

+

+ That can have dangerous effects if Peer B origin is not restricted correctly. + An example of a dangerous scenario is when Access-Control-Allow-Origin header is set to a value gotten from the Peer B's request + (and not correctly validated), or is set to special values such as * or null. + The above values can allow any Peer B to send requests to the misconfigured Peer A on behalf of the user. +

+

+ Example scenario: + User is client of a bank that has its API misconfigured to accept CORS requests from any domain. + When the user loads an evil page, the evil page sends a request to the bank's API to transfer all funds + to evil party's account. + Given that the user was already logged in to the bank website, and had its session cookies set, + the evil party's request succeeds. +

+
+ +

+ When configuring CORS that allow credentials passing, + it's best not to use user-provided values for the allowed origins response header, + especially if the cookies grant session permissions on the user's account. +

+

+ It also can be very dangerous to set the allowed origins to null (which can be bypassed). +

+
+ +

+ The first example shows a few possible CORS misconfiguration cases: +

+ +

+ The second example show better configurations: +

+ +
+ +
  • + Reference 1: PortSwigger Web Security Academy on CORS. +
  • +
  • + Reference 2: AppSec EU 2017 Exploiting CORS Misconfigurations For Bitcoins And Bounties by James Kettle. +
  • +
    +
    \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql new file mode 100644 index 000000000000..ddbd0766207f --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql @@ -0,0 +1,36 @@ +/** + * @name SOP protection weak with credentials + * @description Disabling or weakening SOP protection may make the application + * vulnerable to a CORS attack. + * @kind problem + * @problem.severity warning + * @security-severity 8.8 + * @precision high + * @id py/insecure-cors-setting + * @tags security + * external/cwe/cwe-352 + */ + + import python + import semmle.python.Concepts + private import semmle.python.dataflow.new.DataFlow + predicate containsStar(DataFlow::Node array){ + (array.asExpr() instanceof List and + array.asExpr().getASubExpression().(StringLiteral).getText().matches("*")) or + (array.asExpr().(StringLiteral).getText().matches(["*", "null"])) + + } + + predicate isCorsMiddleware(Http::Server::CorsMiddleware middleware){ + middleware.middleware_name().matches("CORSMiddleware") + } + + predicate credentialsAllowed(Http::Server::CorsMiddleware middleware){ + middleware.allowed_credentials().asExpr() instanceof True + } + + from Http::Server::CorsMiddleware a + where credentialsAllowed(a) and + containsStar(a.allowed_origins().getALocalSource()) and + isCorsMiddleware(a) + select a, "This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites" \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareBad.py b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareBad.py new file mode 100644 index 000000000000..2b1c3c58a7e0 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareBad.py @@ -0,0 +1,21 @@ +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +app = FastAPI() + +origins = [ + "*" +] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +@app.get("/") +async def main(): + return {"message": "Hello World"} \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareGood.py b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareGood.py new file mode 100644 index 000000000000..bfcb559feb2c --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddlewareGood.py @@ -0,0 +1,24 @@ +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +app = FastAPI() + +origins = [ + "http://localhost.tiangolo.com", + "https://localhost.tiangolo.com", + "http://localhost", + "http://localhost:8080", +] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +@app.get("/") +async def main(): + return {"message": "Hello World"} \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected new file mode 100644 index 000000000000..cc27e83a6446 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected @@ -0,0 +1,2 @@ +| fastapi.py:10:1:16:1 | ControlFlowNode for Attribute() | This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites | +| starlette.py:8:5:8:75 | ControlFlowNode for Middleware() | This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites | diff --git a/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.qlref b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.qlref new file mode 100644 index 000000000000..f7017ada0d83 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.qlref @@ -0,0 +1 @@ +experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/fastapi.py b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/fastapi.py new file mode 100644 index 000000000000..2b1c3c58a7e0 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/fastapi.py @@ -0,0 +1,21 @@ +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +app = FastAPI() + +origins = [ + "*" +] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +@app.get("/") +async def main(): + return {"message": "Hello World"} \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/starlette.py b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/starlette.py new file mode 100644 index 000000000000..1d6e7705369c --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/starlette.py @@ -0,0 +1,11 @@ +from starlette.applications import Starlette +from starlette.middleware import Middleware +from starlette.middleware.cors import CORSMiddleware + +routes = ... + +middleware = [ + Middleware(CORSMiddleware, allow_origins=['*'], allow_credentials=True) +] + +app = Starlette(routes=routes, middleware=middleware) \ No newline at end of file From 1db7865d49b904c3a01667c31c3f774dd92ddd2f Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Mon, 26 Aug 2024 22:06:12 -0700 Subject: [PATCH 006/162] Corrections --- python/ql/lib/semmle/python/Concepts.qll | 7 ++- .../lib/semmle/python/frameworks/FastApi.qll | 18 ++++++- .../semmle/python/frameworks/Starlette.qll | 16 +++++-- .../CorsMisconfigurationMiddleware.qhelp | 2 +- .../CWE-942/CorsMisconfigurationMiddleware.ql | 47 ++++++++++--------- 5 files changed, 60 insertions(+), 30 deletions(-) diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 920fbca35534..5d9ac3d9e126 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -1425,11 +1425,14 @@ module Http { string middleware_name() { result = super.middleware_name() } /** - * Gets the boolean value corresponding to if CORS credentials is enabled - * (`true`) or disabled (`false`) by this node. + * Gets the dataflow node corresponding to the allowed CORS origins */ DataFlow::Node allowed_origins() { result = super.allowed_origins() } + /** + * Gets the boolean value corresponding to if CORS credentials is enabled + * (`true`) or disabled (`false`) by this node. + */ DataFlow::Node allowed_credentials() { result = super.allowed_credentials() } } diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index 7927dac5a24c..c3bf25d43e96 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -43,16 +43,30 @@ module FastApi { * A call to `app.add_middleware` adding CORSMiddleware. */ class AddCorsMiddlewareCall extends Http::Server::CorsMiddleware::Range, AddMiddlewareCall { + /** + * Gets the string corresponding to the middleware + */ override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + /** + * Gets the dataflow node corresponding to the allowed CORS origins + */ override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } - + /** + * Gets the boolean value corresponding to if CORS credentials is enabled + * (`true`) or disabled (`false`) by this node. + */ override DataFlow::Node allowed_credentials() { result = this.getArgByName("allow_credentials") } - + /** + * Gets the dataflow node corresponding to the allowed CORS methods + */ DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } + /** + * Gets the dataflow node corresponding to the allowed CORS headers + */ DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } } diff --git a/python/ql/lib/semmle/python/frameworks/Starlette.qll b/python/ql/lib/semmle/python/frameworks/Starlette.qll index d54fc267b41d..404084c3e369 100644 --- a/python/ql/lib/semmle/python/frameworks/Starlette.qll +++ b/python/ql/lib/semmle/python/frameworks/Starlette.qll @@ -28,12 +28,13 @@ module Starlette { /** * Provides models for the `starlette.app` class * - * See https://www.starlette.io/websockets/. + * */ module App { + /** Gets import of `starlette.app`. */ API::Node cls() { result = API::moduleImport("starlette").getMember("app") } - /** Gets a reference to a FastAPI application (an instance of `fastapi.FastAPI`). */ + /** Gets a reference to a Starlette application (an instance of `starlette.app`). */ API::Node instance() { result = cls().getReturn() } } @@ -52,6 +53,10 @@ module Starlette { * A call to any of the execute methods on a `app.add_middleware` with CORSMiddleware. */ class AddCorsMiddlewareCall extends AddMiddlewareCall, Http::Server::CorsMiddleware::Range { + + /** + * Gets the string corresponding to the middleware + */ override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } @@ -59,9 +64,14 @@ module Starlette { override DataFlow::Node allowed_credentials() { result = this.getArgByName("allow_credentials") } - + /** + * Gets the dataflow node corresponding to the allowed CORS methods + */ DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } + /** + * Gets the dataflow node corresponding to the allowed CORS headers + */ DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } } diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp index 43f800f03a59..9c4524a726c4 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp @@ -4,7 +4,7 @@

    - Web browsers, by default, disallow cross-origin resource sharing via direct HTTP requests (i.e. using a JavaScript HTTP client). + Web browsers, by default, disallow cross-origin resource sharing via direct HTTP requests. Still, to satisfy some needs that arose with the growth of the web, an expedient was created to make exceptions possible. CORS (Cross-origin resource sharing) is a mechanism that allows resources of a web endpoint (let's call it "Peer A") to be accessed from another web page belonging to a different domain ("Peer B"). diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql index ddbd0766207f..1016836cf21b 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql @@ -11,26 +11,29 @@ * external/cwe/cwe-352 */ - import python - import semmle.python.Concepts - private import semmle.python.dataflow.new.DataFlow - predicate containsStar(DataFlow::Node array){ - (array.asExpr() instanceof List and - array.asExpr().getASubExpression().(StringLiteral).getText().matches("*")) or - (array.asExpr().(StringLiteral).getText().matches(["*", "null"])) +import python +import semmle.python.Concepts +private import semmle.python.dataflow.new.DataFlow - } - - predicate isCorsMiddleware(Http::Server::CorsMiddleware middleware){ - middleware.middleware_name().matches("CORSMiddleware") - } - - predicate credentialsAllowed(Http::Server::CorsMiddleware middleware){ - middleware.allowed_credentials().asExpr() instanceof True - } - - from Http::Server::CorsMiddleware a - where credentialsAllowed(a) and - containsStar(a.allowed_origins().getALocalSource()) and - isCorsMiddleware(a) - select a, "This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites" \ No newline at end of file +predicate containsStar(DataFlow::Node array) { + array.asExpr() instanceof List and + array.asExpr().getASubExpression().(StringLiteral).getText() = ["*", "null"] + or + array.asExpr().(StringLiteral).getText() = ["*", "null"] +} + +predicate isCorsMiddleware(Http::Server::CorsMiddleware middleware) { + middleware.middleware_name().matches("CORSMiddleware") +} + +predicate credentialsAllowed(Http::Server::CorsMiddleware middleware) { + middleware.allowed_credentials().asExpr() instanceof True +} + +from Http::Server::CorsMiddleware a +where + credentialsAllowed(a) and + containsStar(a.allowed_origins().getALocalSource()) and + isCorsMiddleware(a) +select a, + "This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites" From 0420d25c13ebe80bf267ed9b7cd8d698c68ff4d9 Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Mon, 26 Aug 2024 22:09:24 -0700 Subject: [PATCH 007/162] refactor --- python/ql/lib/semmle/python/Concepts.qll | 2 +- .../lib/semmle/python/frameworks/FastApi.qll | 32 ++++++++++--------- .../semmle/python/frameworks/Starlette.qll | 22 ++++++------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 5d9ac3d9e126..d981f82c1bcd 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -1425,7 +1425,7 @@ module Http { string middleware_name() { result = super.middleware_name() } /** - * Gets the dataflow node corresponding to the allowed CORS origins + * Gets the dataflow node corresponding to the allowed CORS origins */ DataFlow::Node allowed_origins() { result = super.allowed_origins() } diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index c3bf25d43e96..24a25b867519 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -43,30 +43,32 @@ module FastApi { * A call to `app.add_middleware` adding CORSMiddleware. */ class AddCorsMiddlewareCall extends Http::Server::CorsMiddleware::Range, AddMiddlewareCall { - /** - * Gets the string corresponding to the middleware - */ + /** + * Gets the string corresponding to the middleware + */ override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } /** - * Gets the dataflow node corresponding to the allowed CORS origins - */ + * Gets the dataflow node corresponding to the allowed CORS origins + */ override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } - /** - * Gets the boolean value corresponding to if CORS credentials is enabled - * (`true`) or disabled (`false`) by this node. - */ + + /** + * Gets the boolean value corresponding to if CORS credentials is enabled + * (`true`) or disabled (`false`) by this node. + */ override DataFlow::Node allowed_credentials() { result = this.getArgByName("allow_credentials") } - /** - * Gets the dataflow node corresponding to the allowed CORS methods - */ + + /** + * Gets the dataflow node corresponding to the allowed CORS methods + */ DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } - /** - * Gets the dataflow node corresponding to the allowed CORS headers - */ + /** + * Gets the dataflow node corresponding to the allowed CORS headers + */ DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } } diff --git a/python/ql/lib/semmle/python/frameworks/Starlette.qll b/python/ql/lib/semmle/python/frameworks/Starlette.qll index 404084c3e369..bd963fa7fe29 100644 --- a/python/ql/lib/semmle/python/frameworks/Starlette.qll +++ b/python/ql/lib/semmle/python/frameworks/Starlette.qll @@ -27,8 +27,6 @@ private import semmle.python.frameworks.data.ModelsAsData module Starlette { /** * Provides models for the `starlette.app` class - * - * */ module App { /** Gets import of `starlette.app`. */ @@ -53,10 +51,9 @@ module Starlette { * A call to any of the execute methods on a `app.add_middleware` with CORSMiddleware. */ class AddCorsMiddlewareCall extends AddMiddlewareCall, Http::Server::CorsMiddleware::Range { - - /** - * Gets the string corresponding to the middleware - */ + /** + * Gets the string corresponding to the middleware + */ override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } @@ -64,14 +61,15 @@ module Starlette { override DataFlow::Node allowed_credentials() { result = this.getArgByName("allow_credentials") } - /** - * Gets the dataflow node corresponding to the allowed CORS methods - */ + + /** + * Gets the dataflow node corresponding to the allowed CORS methods + */ DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } - /** - * Gets the dataflow node corresponding to the allowed CORS headers - */ + /** + * Gets the dataflow node corresponding to the allowed CORS headers + */ DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } } From 812abea0dedd181012ab35f3bfe007f532687438 Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Mon, 26 Aug 2024 22:25:00 -0700 Subject: [PATCH 008/162] change-notes --- python/ql/lib/semmle/python/frameworks/FastApi.qll | 3 +++ python/ql/lib/semmle/python/frameworks/Starlette.qll | 3 +++ .../2024-08-26-Cors-misconfiguration-middleware.md | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index 24a25b867519..e29bf06ec7a7 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -36,6 +36,9 @@ module FastApi { private class AddMiddlewareCall extends DataFlow::CallCfgNode { AddMiddlewareCall() { this = App::instance().getMember("add_middleware").getACall() } + /** + * Gets the string corresponding to the middleware + */ string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } } diff --git a/python/ql/lib/semmle/python/frameworks/Starlette.qll b/python/ql/lib/semmle/python/frameworks/Starlette.qll index bd963fa7fe29..337324f2c667 100644 --- a/python/ql/lib/semmle/python/frameworks/Starlette.qll +++ b/python/ql/lib/semmle/python/frameworks/Starlette.qll @@ -44,6 +44,9 @@ module Starlette { this = [App::instance().getMember("add_middleware").getACall(), Middleware::instance()] } + /** + * Gets the string corresponding to the middleware + */ string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } } diff --git a/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md b/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md new file mode 100644 index 000000000000..2576b2e89dc3 --- /dev/null +++ b/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md @@ -0,0 +1,4 @@ +--- +category: newQuery +--- +* The `py/insecure-cors-setting` query, which finds insecure CORS middleware configurations. \ No newline at end of file From c60f4595302a5969d2a5f455eed664e7bce4810c Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Mon, 26 Aug 2024 23:57:19 -0700 Subject: [PATCH 009/162] Grammar --- .../Security/CWE-942/CorsMisconfigurationMiddleware.qhelp | 4 ++-- .../Security/CWE-942/CorsMisconfigurationMiddleware.ql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp index 9c4524a726c4..76bcecf6012f 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp @@ -45,11 +45,11 @@

    - The first example shows a few possible CORS misconfiguration cases: + The first example shows a possible CORS misconfiguration case:

    - The second example show better configurations: + The second example shows a better configuration:

    diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql index 1016836cf21b..3ec8ea509fdc 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql @@ -8,7 +8,7 @@ * @precision high * @id py/insecure-cors-setting * @tags security - * external/cwe/cwe-352 + * external/cwe/cwe-942 */ import python From 528f08fb8345e74a8f4f93a7f5e1d8866c9fba7d Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 11:52:54 +0200 Subject: [PATCH 010/162] Python: Make queries use ActiveThreatModelSource --- .../security/dataflow/CodeInjectionCustomizations.qll | 9 +++++++-- .../dataflow/CommandInjectionCustomizations.qll | 9 +++++++-- .../dataflow/CookieInjectionCustomizations.qll | 9 +++++++-- .../dataflow/HttpHeaderInjectionCustomizations.qll | 9 +++++++-- .../security/dataflow/LdapInjectionCustomizations.qll | 9 +++++++-- .../security/dataflow/LogInjectionCustomizations.qll | 9 +++++++-- .../dataflow/PamAuthorizationCustomizations.qll | 10 ++++++++-- .../security/dataflow/PathInjectionCustomizations.qll | 9 +++++++-- .../dataflow/PolynomialReDoSCustomizations.qll | 9 +++++++-- .../security/dataflow/ReflectedXSSCustomizations.qll | 9 +++++++-- .../security/dataflow/RegexInjectionCustomizations.qll | 9 +++++++-- .../ServerSideRequestForgeryCustomizations.qll | 9 +++++++-- .../security/dataflow/SqlInjectionCustomizations.qll | 9 +++++++-- .../dataflow/UnsafeDeserializationCustomizations.qll | 9 +++++++-- .../security/dataflow/UrlRedirectCustomizations.qll | 9 +++++++-- .../security/dataflow/XpathInjectionCustomizations.qll | 9 +++++++-- .../CWE-074/TemplateInjectionCustomizations.qll | 9 +++++++-- .../Security/CWE-091/XsltInjectionCustomizations.qll | 9 +++++++-- python/ql/src/experimental/Security/CWE-094/Js2Py.ql | 2 +- 19 files changed, 128 insertions(+), 37 deletions(-) diff --git a/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll index 294b3c63fdad..354d098186f6 100644 --- a/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll @@ -33,9 +33,14 @@ module CodeInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A code execution, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll index a8d17026e40c..f3786700967b 100644 --- a/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll @@ -33,9 +33,14 @@ module CommandInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A command execution, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/CookieInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/CookieInjectionCustomizations.qll index dd3792182de8..cee2b7b98e73 100644 --- a/python/ql/lib/semmle/python/security/dataflow/CookieInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/CookieInjectionCustomizations.qll @@ -31,9 +31,14 @@ module CookieInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A write to a cookie, considered as a sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll index e529d3f29e0f..92cd46a3408a 100644 --- a/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll @@ -32,9 +32,14 @@ module HttpHeaderInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A HTTP header write, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll index 6c2b664bd965..f0229bc0c824 100644 --- a/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll @@ -42,9 +42,14 @@ module LdapInjection { abstract class FilterSanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A logging operation, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll index f92b87c73faf..71648b2c6281 100644 --- a/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll @@ -33,9 +33,14 @@ module LogInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A logging operation, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll index afba208e0e45..eb858be8f95d 100644 --- a/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll @@ -7,6 +7,7 @@ import python import semmle.python.ApiGraphs import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources +import semmle.python.Concepts /** * Provides default sources, sinks and sanitizers for detecting @@ -39,9 +40,14 @@ module PamAuthorizationCustomizations { abstract class Sink extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A vulnerable `pam_authenticate` call considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll index cda71df2f905..eff7d715c268 100644 --- a/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll @@ -43,9 +43,14 @@ module PathInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A file system access, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll index 23cd45312300..2cd8b0a64bd7 100644 --- a/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll @@ -47,9 +47,14 @@ module PolynomialReDoS { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A regex execution, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll index ee2dec407d14..3a7177eb4c74 100644 --- a/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll @@ -33,9 +33,14 @@ module ReflectedXss { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A data flow sink for "reflected cross-site scripting" vulnerabilities. diff --git a/python/ql/lib/semmle/python/security/dataflow/RegexInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/RegexInjectionCustomizations.qll index 72dc66430b6d..559b1f66e7e6 100644 --- a/python/ql/lib/semmle/python/security/dataflow/RegexInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/RegexInjectionCustomizations.qll @@ -40,9 +40,14 @@ module RegexInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A regex escaping, considered as a sanitizer. diff --git a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll index a4e3ecc9ee18..552d022c98ec 100644 --- a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll @@ -45,9 +45,14 @@ module ServerSideRequestForgery { abstract class FullUrlControlSanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** The URL of an HTTP request, considered as a sink. */ class HttpRequestUrlAsSink extends Sink { diff --git a/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll index 7e0969d854f0..e2a5b4d624a2 100644 --- a/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll @@ -32,9 +32,14 @@ module SqlInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A SQL statement of a SQL construction, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll index 27b6a44580d0..ca909e5de1a0 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll @@ -33,9 +33,14 @@ module UnsafeDeserialization { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * An insecure decoding, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll index fa913b28fbdf..0c05a36eaebb 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll @@ -77,9 +77,14 @@ module UrlRedirect { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A HTTP redirect response, considered as a flow sink. diff --git a/python/ql/lib/semmle/python/security/dataflow/XpathInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/XpathInjectionCustomizations.qll index ef30b3f81ce0..10b47f174390 100644 --- a/python/ql/lib/semmle/python/security/dataflow/XpathInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/XpathInjectionCustomizations.qll @@ -30,9 +30,14 @@ module XpathInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A construction of an XPath expression, considered as a sink. diff --git a/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll b/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll index dcd6c1848616..e5c5013f3ba6 100644 --- a/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll +++ b/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll @@ -33,9 +33,14 @@ module TemplateInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * A SQL statement of a SQL construction, considered as a flow sink. diff --git a/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll b/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll index bda2fe646c95..4cacf1f85dee 100644 --- a/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll +++ b/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll @@ -33,9 +33,14 @@ module XsltInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * A source of remote user input, considered as a flow source. + * DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead! */ - class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource; + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } /** * An XSLT construction, considered as a flow sink. diff --git a/python/ql/src/experimental/Security/CWE-094/Js2Py.ql b/python/ql/src/experimental/Security/CWE-094/Js2Py.ql index 5dc160077873..f5d6e3a6c10e 100644 --- a/python/ql/src/experimental/Security/CWE-094/Js2Py.ql +++ b/python/ql/src/experimental/Security/CWE-094/Js2Py.ql @@ -18,7 +18,7 @@ import semmle.python.dataflow.new.RemoteFlowSources import semmle.python.Concepts module Js2PyFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node node) { node instanceof RemoteFlowSource } + predicate isSource(DataFlow::Node node) { node instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node node) { API::moduleImport("js2py").getMember(["eval_js", "eval_js6", "EvalJs"]).getACall().getArg(_) = From b9239d7101d05ba98531c3b52e21e7ca9476d845 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 15:04:53 +0200 Subject: [PATCH 011/162] Python: Add basic support for environment/commandargs threat-models --- .../semmle/python/frameworks/Stdlib.model.yml | 16 ++++++ .../test/experimental/meta/ConceptsTest.qll | 19 ++++++- .../frameworks/stdlib/threat_models.py | 49 +++++++++++++++++++ .../stdlib/wsgiref_simple_server_test.py | 2 +- 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 python/ql/lib/semmle/python/frameworks/Stdlib.model.yml create mode 100644 python/ql/test/library-tests/frameworks/stdlib/threat_models.py diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml new file mode 100644 index 000000000000..757aedf60ed1 --- /dev/null +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/python-all + extensible: sourceModel + data: + - ['os', 'Member[getenv].ReturnValue', 'environment'] + - ['os', 'Member[getenvb].ReturnValue', 'environment'] + - ['os', 'Member[environ].DictionaryElementAny', 'environment'] + - ['os', 'Member[environb].DictionaryElementAny', 'environment'] + - ['posix', 'Member[environ].DictionaryElementAny', 'environment'] + + - ['sys', 'Member[argv].DictionaryElementAny', 'commandargs'] + - ['sys', 'Member[orig_argv].DictionaryElementAny', 'commandargs'] + + # TODO: argparse + # TODO: input / read from stdin diff --git a/python/ql/test/experimental/meta/ConceptsTest.qll b/python/ql/test/experimental/meta/ConceptsTest.qll index a53171de88ac..87addb8a1fc3 100644 --- a/python/ql/test/experimental/meta/ConceptsTest.qll +++ b/python/ql/test/experimental/meta/ConceptsTest.qll @@ -3,6 +3,7 @@ import semmle.python.dataflow.new.DataFlow import semmle.python.Concepts import TestUtilities.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode +private import codeql.threatmodels.ThreatModels module SystemCommandExecutionTest implements TestSig { string getARelevantTag() { result = "getCommand" } @@ -632,6 +633,22 @@ module XmlParsingTest implements TestSig { } } +module ThreatModelSourceTest implements TestSig { + string getARelevantTag() { + exists(string kind | knownThreatModel(kind) | result = "threatModelSource" + "[" + kind + "]") + } + + predicate hasActualResult(Location location, string element, string tag, string value) { + exists(location.getFile().getRelativePath()) and + exists(ThreatModelSource src | not src.getThreatModel() = "remote" | + location = src.getLocation() and + element = src.toString() and + value = prettyNodeForInlineTest(src) and + tag = "threatModelSource[" + src.getThreatModel() + "]" + ) + } +} + import MakeTest, MergeTests5, MergeTests5>> + CsrfLocalProtectionSettingTest, MergeTests>>> diff --git a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py new file mode 100644 index 000000000000..41249967eb99 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py @@ -0,0 +1,49 @@ +import os +import sys +import posix + +os.getenv("foo") # $ threatModelSource[environment]=os.getenv(..) +os.getenvb("bar") # $ threatModelSource[environment]=os.getenvb(..) + +os.environ["foo"] # $ threatModelSource[environment]=os.environ["foo"] +os.environ.get("foo") # $ MISSING: threatModelSource[environment]=os.environ.get(..) + +os.environb["bar"] # $ threatModelSource[environment]=os.environb["bar"] +posix.environ[b"foo"] # $ threatModelSource[environment]=posix.environ[b"foo"] + + +sys.argv[1] # $ threatModelSource[commandargs]=sys.argv[1] +sys.orig_argv[1] # $ threatModelSource[commandargs]=sys.orig_argv[1] + +######################################## +# argparse +######################################## + +import argparse +parser = argparse.ArgumentParser() +parser.add_argument("foo") + +args = parser.parse_args() +args.foo # $ MISSING: threatModelSource[commandargs]=args.foo + +explicit_argv_parsing = parser.parse_args(sys.argv) +explicit_argv_parsing.foo # $ MISSING: threatModelSource[commandargs]=explicit_argv_parsing.foo + +fake_args = parser.parse_args([""]) +fake_args.foo + +######################################## +# reading input from stdin +######################################## + +sys.stdin.readline() # $ MISSING: threatModelSource +input() # $ MISSING: threatModelSource + +######################################## +# socket +######################################## + +import socket +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.connect(("example.com", 1234)) +s.recv(1024) # $ MISSING: threatModelSource[socket] diff --git a/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py b/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py index 7327385c0647..161968799a55 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py +++ b/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py @@ -45,7 +45,7 @@ def func2(environ, start_response): # $ requestHandler start_response(status, headers) # $ headerWriteBulk=headers headerWriteBulkUnsanitized=name,value return [b"Hello"] # $ HttpResponse responseBody=List -case = sys.argv[1] +case = sys.argv[1] # $ threatModelSource[commandargs]=sys.argv[1] if case == "1": server = wsgiref.simple_server.WSGIServer(ADDRESS, wsgiref.simple_server.WSGIRequestHandler) server.set_app(func) From 56c85ffe549209ea83274418bf7ab2442103840b Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 15:19:42 +0200 Subject: [PATCH 012/162] Python: Fixup threat-models for `os.environ.get()` Since using `.DictionaryElementAny` doesn't actually do a store on the source, (so we can later follow any dict read-steps). I added the ensure_tainted steps to highlight that the result of the WHOLE expression ends up "tainted", and that we don't just mark `os.environ` as the source without further flow. --- .../semmle/python/frameworks/Stdlib.model.yml | 10 ++--- .../experimental/meta/InlineTaintTest.qll | 3 +- .../frameworks/stdlib/threat_models.py | 41 +++++++++++-------- .../stdlib/wsgiref_simple_server_test.py | 2 +- 4 files changed, 33 insertions(+), 23 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml index 757aedf60ed1..f3bfd5ac8890 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -5,12 +5,12 @@ extensions: data: - ['os', 'Member[getenv].ReturnValue', 'environment'] - ['os', 'Member[getenvb].ReturnValue', 'environment'] - - ['os', 'Member[environ].DictionaryElementAny', 'environment'] - - ['os', 'Member[environb].DictionaryElementAny', 'environment'] - - ['posix', 'Member[environ].DictionaryElementAny', 'environment'] + - ['os', 'Member[environ]', 'environment'] + - ['os', 'Member[environb]', 'environment'] + - ['posix', 'Member[environ]', 'environment'] - - ['sys', 'Member[argv].DictionaryElementAny', 'commandargs'] - - ['sys', 'Member[orig_argv].DictionaryElementAny', 'commandargs'] + - ['sys', 'Member[argv]', 'commandargs'] + - ['sys', 'Member[orig_argv]', 'commandargs'] # TODO: argparse # TODO: input / read from stdin diff --git a/python/ql/test/experimental/meta/InlineTaintTest.qll b/python/ql/test/experimental/meta/InlineTaintTest.qll index 24f67bcf2a45..a09cc9aabc19 100644 --- a/python/ql/test/experimental/meta/InlineTaintTest.qll +++ b/python/ql/test/experimental/meta/InlineTaintTest.qll @@ -15,6 +15,7 @@ import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources import TestUtilities.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode +private import semmle.python.Concepts DataFlow::Node shouldBeTainted() { exists(DataFlow::CallCfgNode call | @@ -45,7 +46,7 @@ module Conf { source.(DataFlow::CfgNode).getNode() = call.getAnArg() ) or - source instanceof RemoteFlowSource + source instanceof ThreatModelSource } predicate isSink(DataFlow::Node sink) { diff --git a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py index 41249967eb99..cac276eacad0 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py +++ b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py @@ -2,18 +2,25 @@ import sys import posix -os.getenv("foo") # $ threatModelSource[environment]=os.getenv(..) -os.getenvb("bar") # $ threatModelSource[environment]=os.getenvb(..) +ensure_tainted( + os.getenv("foo"), # $ tainted threatModelSource[environment]=os.getenv(..) + os.getenvb("bar"), # $ tainted threatModelSource[environment]=os.getenvb(..) -os.environ["foo"] # $ threatModelSource[environment]=os.environ["foo"] -os.environ.get("foo") # $ MISSING: threatModelSource[environment]=os.environ.get(..) + os.environ["foo"], # $ tainted threatModelSource[environment]=os.environ + os.environ.get("foo"), # $ tainted threatModelSource[environment]=os.environ -os.environb["bar"] # $ threatModelSource[environment]=os.environb["bar"] -posix.environ[b"foo"] # $ threatModelSource[environment]=posix.environ[b"foo"] + os.environb["bar"], # $ tainted threatModelSource[environment]=os.environb + posix.environ[b"foo"], # $ tainted threatModelSource[environment]=posix.environ -sys.argv[1] # $ threatModelSource[commandargs]=sys.argv[1] -sys.orig_argv[1] # $ threatModelSource[commandargs]=sys.orig_argv[1] + sys.argv[1], # $ tainted threatModelSource[commandargs]=sys.argv + sys.orig_argv[1], # $ tainted threatModelSource[commandargs]=sys.orig_argv +) + +for k,v in os.environ.items(): # $ threatModelSource[environment]=os.environ + ensure_tainted(k) # $ tainted + ensure_tainted(v) # $ tainted + ######################################## # argparse @@ -23,21 +30,23 @@ parser = argparse.ArgumentParser() parser.add_argument("foo") -args = parser.parse_args() -args.foo # $ MISSING: threatModelSource[commandargs]=args.foo +args = parser.parse_args() # $ MISSING: threatModelSource[commandargs]=parser.parse_args() +ensure_tainted(args.foo) # $ MISSING: tainted -explicit_argv_parsing = parser.parse_args(sys.argv) -explicit_argv_parsing.foo # $ MISSING: threatModelSource[commandargs]=explicit_argv_parsing.foo +explicit_argv_parsing = parser.parse_args(sys.argv) # $ threatModelSource[commandargs]=sys.argv +ensure_tainted(explicit_argv_parsing.foo) # $ MISSING: tainted fake_args = parser.parse_args([""]) -fake_args.foo +ensure_not_tainted(fake_args.foo) ######################################## # reading input from stdin ######################################## -sys.stdin.readline() # $ MISSING: threatModelSource -input() # $ MISSING: threatModelSource +ensure_tainted( + sys.stdin.readline(), # $ MISSING: tainted threatModelSource + input(), # $ MISSING: tainted threatModelSource +) ######################################## # socket @@ -46,4 +55,4 @@ import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("example.com", 1234)) -s.recv(1024) # $ MISSING: threatModelSource[socket] +ensure_tainted(s.recv(1024)) # $ MISSING: tainted threatModelSource[socket] diff --git a/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py b/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py index 161968799a55..fd852337aba3 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py +++ b/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py @@ -45,7 +45,7 @@ def func2(environ, start_response): # $ requestHandler start_response(status, headers) # $ headerWriteBulk=headers headerWriteBulkUnsanitized=name,value return [b"Hello"] # $ HttpResponse responseBody=List -case = sys.argv[1] # $ threatModelSource[commandargs]=sys.argv[1] +case = sys.argv[1] # $ threatModelSource[commandargs]=sys.argv if case == "1": server = wsgiref.simple_server.WSGIServer(ADDRESS, wsgiref.simple_server.WSGIRequestHandler) server.set_app(func) From e1801f3a297aaec8b3eaa585f128a279cdcbb419 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 16:20:41 +0200 Subject: [PATCH 013/162] Python: Proper threat-model handling for argparse --- .../semmle/python/frameworks/Stdlib.model.yml | 10 +++++++++- .../lib/semmle/python/frameworks/Stdlib.qll | 20 +++++++++++++++++++ .../frameworks/stdlib/threat_models.py | 8 ++++---- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml index f3bfd5ac8890..ea5d810d8db8 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -12,5 +12,13 @@ extensions: - ['sys', 'Member[argv]', 'commandargs'] - ['sys', 'Member[orig_argv]', 'commandargs'] - # TODO: argparse + # if no argument is given, the default is to use sys.argv[1:] + - ['argparse.ArgumentParser', 'Member[parse_args,parse_known_args].WithArity[0].ReturnValue', 'commandargs'] + - addsTo: + pack: codeql/python-all + extensible: summaryModel + data: + - ['argparse.ArgumentParser', 'Member[parse_args,parse_known_args]', 'Argument[0,args:]', 'ReturnValue', 'taint'] + # note: taint of attribute lookups is handled in QL + # TODO: input / read from stdin diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index 3c23b3929911..db20a25567c8 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -4989,6 +4989,26 @@ module StdlibPrivate { override string getKind() { result = Escaping::getHtmlKind() } } + + // --------------------------------------------------------------------------- + // argparse + // --------------------------------------------------------------------------- + /** + * if result of `parse_args` is tainted (because it uses command-line arguments), + * then the parsed values accesssed on any attribute lookup is also tainted. + */ + private class ArgumentParserAnyAttributeStep extends TaintTracking::AdditionalTaintStep { + override predicate step(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { + nodeFrom = + API::moduleImport("argparse") + .getMember("ArgumentParser") + .getReturn() + .getMember("parse_args") + .getReturn() + .getAValueReachableFromSource() and + nodeTo.(DataFlow::AttrRead).getObject() = nodeFrom + } + } } // --------------------------------------------------------------------------- diff --git a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py index cac276eacad0..ecaf981849f3 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py +++ b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py @@ -30,14 +30,14 @@ parser = argparse.ArgumentParser() parser.add_argument("foo") -args = parser.parse_args() # $ MISSING: threatModelSource[commandargs]=parser.parse_args() -ensure_tainted(args.foo) # $ MISSING: tainted +args = parser.parse_args() # $ threatModelSource[commandargs]=parser.parse_args() +ensure_tainted(args.foo) # $ tainted explicit_argv_parsing = parser.parse_args(sys.argv) # $ threatModelSource[commandargs]=sys.argv -ensure_tainted(explicit_argv_parsing.foo) # $ MISSING: tainted +ensure_tainted(explicit_argv_parsing.foo) # $ tainted fake_args = parser.parse_args([""]) -ensure_not_tainted(fake_args.foo) +ensure_not_tainted(fake_args.foo) # $ SPURIOUS: tainted ######################################## # reading input from stdin From 66f389a4b630e5de8f97c3f06537fb5c6d60a99f Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 9 Aug 2024 16:36:19 +0200 Subject: [PATCH 014/162] Python: Model stdin thread-model --- .../lib/semmle/python/frameworks/Stdlib.model.yml | 5 +++-- python/ql/lib/semmle/python/frameworks/Stdlib.qll | 13 +++++++++++++ .../frameworks/stdlib/threat_models.py | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml index ea5d810d8db8..b934be067757 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -12,6 +12,9 @@ extensions: - ['sys', 'Member[argv]', 'commandargs'] - ['sys', 'Member[orig_argv]', 'commandargs'] + - ['sys', 'Member[stdin]', 'stdin'] + - ['builtins', 'Member[input].ReturnValue', 'stdin'] + # if no argument is given, the default is to use sys.argv[1:] - ['argparse.ArgumentParser', 'Member[parse_args,parse_known_args].WithArity[0].ReturnValue', 'commandargs'] - addsTo: @@ -20,5 +23,3 @@ extensions: data: - ['argparse.ArgumentParser', 'Member[parse_args,parse_known_args]', 'Argument[0,args:]', 'ReturnValue', 'taint'] # note: taint of attribute lookups is handled in QL - - # TODO: input / read from stdin diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index db20a25567c8..44e050df272b 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -5009,6 +5009,19 @@ module StdlibPrivate { nodeTo.(DataFlow::AttrRead).getObject() = nodeFrom } } + + // --------------------------------------------------------------------------- + // sys + // --------------------------------------------------------------------------- + /** + * An access of `sys.stdin`/`sys.stdout`/`sys.stderr`, to get additional FileLike + * modeling. + */ + private class SysStandardStreams extends Stdlib::FileLikeObject::InstanceSource, DataFlow::Node { + SysStandardStreams() { + this = API::moduleImport("sys").getMember(["stdin", "stdout", "stderr"]).asSource() + } + } } // --------------------------------------------------------------------------- diff --git a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py index ecaf981849f3..919fded1169c 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py +++ b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py @@ -44,8 +44,8 @@ ######################################## ensure_tainted( - sys.stdin.readline(), # $ MISSING: tainted threatModelSource - input(), # $ MISSING: tainted threatModelSource + sys.stdin.readline(), # $ tainted threatModelSource[stdin]=sys.stdin + input(), # $ tainted threatModelSource[stdin]=input() ) ######################################## From d245db54a1e0c63a06f71c06488bbd0d2549968a Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 12 Aug 2024 15:18:18 +0200 Subject: [PATCH 015/162] Python: Model `file` threat-model --- .../semmle/python/frameworks/Stdlib.model.yml | 2 ++ .../lib/semmle/python/frameworks/Stdlib.qll | 6 ++++- .../frameworks/stdlib/FileSystemAccess.py | 22 +++++++++---------- .../frameworks/stdlib/threat_models.py | 13 +++++++++++ 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml index b934be067757..34b9dceb8b28 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -17,6 +17,8 @@ extensions: # if no argument is given, the default is to use sys.argv[1:] - ['argparse.ArgumentParser', 'Member[parse_args,parse_known_args].WithArity[0].ReturnValue', 'commandargs'] + + - ['os', 'Member[read].ReturnValue', 'file'] - addsTo: pack: codeql/python-all extensible: summaryModel diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index 44e050df272b..1e1575c18ded 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -1499,13 +1499,17 @@ module StdlibPrivate { * See https://docs.python.org/3/library/functions.html#open */ private class OpenCall extends FileSystemAccess::Range, Stdlib::FileLikeObject::InstanceSource, - DataFlow::CallCfgNode + ThreatModelSource::Range, DataFlow::CallCfgNode { OpenCall() { this = getOpenFunctionRef().getACall() } override DataFlow::Node getAPathArgument() { result in [this.getArg(0), this.getArgByName("file")] } + + override string getThreatModel() { result = "file" } + + override string getSourceType() { result = "open()" } } /** diff --git a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py index 197ccd8eb919..75b84d9fd51c 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py +++ b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py @@ -5,25 +5,25 @@ import tempfile import shutil -open("file") # $ getAPathArgument="file" -open(file="file") # $ getAPathArgument="file" +open("file") # $ getAPathArgument="file" threatModelSource[file]=open(..) +open(file="file") # $ getAPathArgument="file" threatModelSource[file]=open(..) o = open -o("file") # $ getAPathArgument="file" -o(file="file") # $ getAPathArgument="file" +o("file") # $ getAPathArgument="file" threatModelSource[file]=o(..) +o(file="file") # $ getAPathArgument="file" threatModelSource[file]=o(..) -builtins.open("file") # $ getAPathArgument="file" -builtins.open(file="file") # $ getAPathArgument="file" +builtins.open("file") # $ getAPathArgument="file" threatModelSource[file]=builtins.open(..) +builtins.open(file="file") # $ getAPathArgument="file" threatModelSource[file]=builtins.open(..) -io.open("file") # $ getAPathArgument="file" -io.open(file="file") # $ getAPathArgument="file" +io.open("file") # $ getAPathArgument="file" threatModelSource[file]=io.open(..) +io.open(file="file") # $ getAPathArgument="file" threatModelSource[file]=io.open(..) io.open_code("file") # $ getAPathArgument="file" io.FileIO("file") # $ getAPathArgument="file" -f = open("path") # $ getAPathArgument="path" +f = open("path") # $ getAPathArgument="path" threatModelSource[file]=open(..) f.write("foo") # $ getAPathArgument="path" fileWriteData="foo" lines = ["foo"] f.writelines(lines) # $ getAPathArgument="path" fileWriteData=lines @@ -87,8 +87,8 @@ def test_fspath(): os.fspath(path=TAINTED_STRING), # $ tainted ) -os.open("path", os.O_RDONLY) # $ getAPathArgument="path" -os.open(path="path", flags=os.O_RDONLY) # $ getAPathArgument="path" +os.open("path", os.O_RDONLY) # $ getAPathArgument="path" SPURIOUS: threatModelSource[file]=os.open(..) +os.open(path="path", flags=os.O_RDONLY) # $ getAPathArgument="path" SPURIOUS: threatModelSource[file]=os.open(..) os.access("path", os.R_OK) # $ getAPathArgument="path" os.access(path="path", mode=os.R_OK) # $ getAPathArgument="path" diff --git a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py index 919fded1169c..8ff50b0f211e 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py +++ b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py @@ -48,6 +48,19 @@ input(), # $ tainted threatModelSource[stdin]=input() ) +######################################## +# reading data from files +######################################## + +ensure_tainted( + open("foo"), # $ tainted threatModelSource[file]=open(..) getAPathArgument="foo" + open("foo").read(), # $ tainted threatModelSource[file]=open(..) getAPathArgument="foo" + open("foo").readline(), # $ tainted threatModelSource[file]=open(..) getAPathArgument="foo" + open("foo").readlines(), # $ tainted threatModelSource[file]=open(..) getAPathArgument="foo" + + os.read(os.open("foo"), 1024), # $ tainted threatModelSource[file]=os.read(..) SPURIOUS: threatModelSource[file]=os.open(..) getAPathArgument="foo" +) + ######################################## # socket ######################################## From 7483075b7eeb577c5bedb43a9ce3b6a37e427dc2 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 13 Aug 2024 14:57:24 +0200 Subject: [PATCH 016/162] Python: Fixup modeling of `os.open` --- python/ql/lib/semmle/python/frameworks/Stdlib.qll | 11 ++++++++--- .../frameworks/stdlib/FileSystemAccess.py | 4 ++-- .../library-tests/frameworks/stdlib/threat_models.py | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index 1e1575c18ded..876691648e7d 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -338,7 +338,7 @@ module StdlibPrivate { * Modeling of path related functions in the `os` module. * Wrapped in QL module to make it easy to fold/unfold. */ - private module OsFileSystemAccessModeling { + module OsFileSystemAccessModeling { /** * A call to the `os.fsencode` function. * @@ -395,7 +395,7 @@ module StdlibPrivate { * * See https://docs.python.org/3/library/os.html#os.open */ - private class OsOpenCall extends FileSystemAccess::Range, DataFlow::CallCfgNode { + class OsOpenCall extends FileSystemAccess::Range, DataFlow::CallCfgNode { OsOpenCall() { this = os().getMember("open").getACall() } override DataFlow::Node getAPathArgument() { @@ -1501,7 +1501,12 @@ module StdlibPrivate { private class OpenCall extends FileSystemAccess::Range, Stdlib::FileLikeObject::InstanceSource, ThreatModelSource::Range, DataFlow::CallCfgNode { - OpenCall() { this = getOpenFunctionRef().getACall() } + OpenCall() { + this = getOpenFunctionRef().getACall() and + // when analyzing stdlib code for os.py we wrongly assume that `os.open` is an + // alias of the builtins `open` function + not this instanceof OsFileSystemAccessModeling::OsOpenCall + } override DataFlow::Node getAPathArgument() { result in [this.getArg(0), this.getArgByName("file")] diff --git a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py index 75b84d9fd51c..7d52f53858cf 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py +++ b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py @@ -87,8 +87,8 @@ def test_fspath(): os.fspath(path=TAINTED_STRING), # $ tainted ) -os.open("path", os.O_RDONLY) # $ getAPathArgument="path" SPURIOUS: threatModelSource[file]=os.open(..) -os.open(path="path", flags=os.O_RDONLY) # $ getAPathArgument="path" SPURIOUS: threatModelSource[file]=os.open(..) +os.open("path", os.O_RDONLY) # $ getAPathArgument="path" +os.open(path="path", flags=os.O_RDONLY) # $ getAPathArgument="path" os.access("path", os.R_OK) # $ getAPathArgument="path" os.access(path="path", mode=os.R_OK) # $ getAPathArgument="path" diff --git a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py index 8ff50b0f211e..23b800ce576e 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/threat_models.py +++ b/python/ql/test/library-tests/frameworks/stdlib/threat_models.py @@ -58,7 +58,7 @@ open("foo").readline(), # $ tainted threatModelSource[file]=open(..) getAPathArgument="foo" open("foo").readlines(), # $ tainted threatModelSource[file]=open(..) getAPathArgument="foo" - os.read(os.open("foo"), 1024), # $ tainted threatModelSource[file]=os.read(..) SPURIOUS: threatModelSource[file]=os.open(..) getAPathArgument="foo" + os.read(os.open("foo"), 1024), # $ tainted threatModelSource[file]=os.read(..) getAPathArgument="foo" ) ######################################## From 8d8cd05b94bed31a24542155f2796de926dd6b84 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 16 Aug 2024 10:49:49 +0200 Subject: [PATCH 017/162] Python: Add basic support for `database` threat-model --- .../lib/semmle/python/frameworks/PEP249.qll | 18 ++++++++++++++++ .../frameworks/psycopg/pep249.py | 21 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/python/ql/lib/semmle/python/frameworks/PEP249.qll b/python/ql/lib/semmle/python/frameworks/PEP249.qll index 2425f4514f84..1eecc12b3d1e 100644 --- a/python/ql/lib/semmle/python/frameworks/PEP249.qll +++ b/python/ql/lib/semmle/python/frameworks/PEP249.qll @@ -81,6 +81,24 @@ module PEP249 { } } + /** A call to a method that fetches rows from a previous execution. */ + private class FetchMethodCall extends ThreatModelSource::Range, API::CallNode { + FetchMethodCall() { + exists(API::Node start | + start instanceof DatabaseCursor or start instanceof DatabaseConnection + | + // note: since we can't currently provide accesspaths for sources, these are all + // lumped together, although clearly the fetchmany/fetchall returns a + // list/iterable with rows. + this = start.getMember(["fetchone", "fetchmany", "fetchall"]).getACall() + ) + } + + override string getThreatModel() { result = "database" } + + override string getSourceType() { result = "cursor.fetch*()" } + } + // --------------------------------------------------------------------------- // asyncio implementations // --------------------------------------------------------------------------- diff --git a/python/ql/test/library-tests/frameworks/psycopg/pep249.py b/python/ql/test/library-tests/frameworks/psycopg/pep249.py index 0336facb079e..e61700d16ed6 100644 --- a/python/ql/test/library-tests/frameworks/psycopg/pep249.py +++ b/python/ql/test/library-tests/frameworks/psycopg/pep249.py @@ -12,3 +12,24 @@ with conn.cursor() as cursor: cursor.execute("some sql", (42,)) # $ getSql="some sql" cursor.executemany("some sql", [(42,)]) # $ getSql="some sql" + + + ### test of threat-model sources + row = cursor.fetchone() # $ threatModelSource[database]=cursor.fetchone() + rows_many = cursor.fetchmany(10) # $ threatModelSource[database]=cursor.fetchmany(..) + rows_all = cursor.fetchall() # $ threatModelSource[database]=cursor.fetchall() + + ensure_tainted( + row[0], # $ tainted + rows_many[0][0], # $ tainted + rows_all[0][0], # $ tainted + + # pretending we created cursor to return dictionary results + row["column"], # $ tainted + rows_many[0]["column"], # $ tainted + rows_all[0]["column"], # $ tainted + ) + for row in rows_many: + ensure_tainted(row[0], row["column"]) # $ tainted + for row in rows_all: + ensure_tainted(row[0], row["column"]) # tainted From a0b24d6194b86cbc9f79145acab2f52ebf430a09 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 16 Aug 2024 11:07:37 +0200 Subject: [PATCH 018/162] Python: Add e2e threat-model test --- .../SqlInjection.expected | 8 ++++++++ .../SqlInjection.ext.yml | 6 ++++++ .../SqlInjection.qlref | 1 + .../CWE-089-SqlInjection-local-threat-model/test.py | 6 ++++++ 4 files changed, 21 insertions(+) create mode 100644 python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.expected create mode 100644 python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.ext.yml create mode 100644 python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.qlref create mode 100644 python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/test.py diff --git a/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.expected b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.expected new file mode 100644 index 000000000000..1e4ba8b95305 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.expected @@ -0,0 +1,8 @@ +edges +| test.py:6:14:6:21 | ControlFlowNode for Attribute | test.py:6:14:6:24 | ControlFlowNode for Subscript | provenance | Src:MaD:17 | +nodes +| test.py:6:14:6:21 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| test.py:6:14:6:24 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +subpaths +#select +| test.py:6:14:6:24 | ControlFlowNode for Subscript | test.py:6:14:6:21 | ControlFlowNode for Attribute | test.py:6:14:6:24 | ControlFlowNode for Subscript | This SQL query depends on a $@. | test.py:6:14:6:21 | ControlFlowNode for Attribute | user-provided value | diff --git a/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.ext.yml b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.ext.yml new file mode 100644 index 000000000000..63507f477386 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.qlref b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.qlref new file mode 100644 index 000000000000..d1d02cbe8d37 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/SqlInjection.qlref @@ -0,0 +1 @@ +Security/CWE-089/SqlInjection.ql diff --git a/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/test.py b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/test.py new file mode 100644 index 000000000000..97bfa393cedf --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-089-SqlInjection-local-threat-model/test.py @@ -0,0 +1,6 @@ +# test that enabling local threat-model works end-to-end +import sys +import psycopg + +conn = psycopg.connect(...) +conn.execute(sys.argv[1]) From 0ccb5b198a426c792428745de4ae3879f6fa99d0 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 16 Aug 2024 11:11:11 +0200 Subject: [PATCH 019/162] Python: Add change-note --- python/ql/lib/change-notes/2024-08-16-threat-models.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 python/ql/lib/change-notes/2024-08-16-threat-models.md diff --git a/python/ql/lib/change-notes/2024-08-16-threat-models.md b/python/ql/lib/change-notes/2024-08-16-threat-models.md new file mode 100644 index 000000000000..ba01e6f6fbda --- /dev/null +++ b/python/ql/lib/change-notes/2024-08-16-threat-models.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added support for custom threat-models, which can be used in most of our taint-tracking queries, see our [documentation](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models) for more details. From 7d3793e7181917bfaad10c71dcc284f18ee79a3a Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 19 Aug 2024 10:57:21 +0200 Subject: [PATCH 020/162] Docs: Update threat-model list to include Python --- docs/codeql/reusables/beta-note-threat-models.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/reusables/beta-note-threat-models.rst b/docs/codeql/reusables/beta-note-threat-models.rst index 80c97d93376c..9fcca40975a1 100644 --- a/docs/codeql/reusables/beta-note-threat-models.rst +++ b/docs/codeql/reusables/beta-note-threat-models.rst @@ -2,4 +2,4 @@ Note - Threat models are currently in beta and subject to change. During the beta, threat models are supported only by Java and C# analysis. + Threat models are currently in beta and subject to change. During the beta, threat models are supported only by Java, C# and Python analysis. From 333367c07d10e69cc2df68dfa52bc094c583662c Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 16 Aug 2024 11:15:51 +0200 Subject: [PATCH 021/162] Python: Add threat-modeling of `raw_input` --- python/ql/lib/semmle/python/frameworks/Stdlib.model.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml index 34b9dceb8b28..53d918d07ac3 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -14,6 +14,8 @@ extensions: - ['sys', 'Member[stdin]', 'stdin'] - ['builtins', 'Member[input].ReturnValue', 'stdin'] + - ['builtins', 'Member[raw_input].ReturnValue', 'stdin'] # python 2 only + # if no argument is given, the default is to use sys.argv[1:] - ['argparse.ArgumentParser', 'Member[parse_args,parse_known_args].WithArity[0].ReturnValue', 'commandargs'] From cbebf7b3922dbf39eca2d3538dcf75d8f1c78065 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 16 Aug 2024 11:51:07 +0200 Subject: [PATCH 022/162] Python: Additional threatModelSource annotations --- .../ql/test/library-tests/frameworks/django-v2-v3/manage.py | 4 ++-- .../library-tests/frameworks/django-v2-v3/testproj/asgi.py | 2 +- .../library-tests/frameworks/django-v2-v3/testproj/wsgi.py | 2 +- .../ql/test/library-tests/frameworks/rest_framework/manage.py | 4 ++-- .../library-tests/frameworks/stdlib-py3/FileSystemAccess.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/ql/test/library-tests/frameworks/django-v2-v3/manage.py b/python/ql/test/library-tests/frameworks/django-v2-v3/manage.py index 0e1a0b64a6e6..9fa5846c9551 100755 --- a/python/ql/test/library-tests/frameworks/django-v2-v3/manage.py +++ b/python/ql/test/library-tests/frameworks/django-v2-v3/manage.py @@ -6,7 +6,7 @@ def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') # $ threatModelSource[environment]=os.environ try: from django.core.management import execute_from_command_line except ImportError as exc: @@ -15,7 +15,7 @@ def main(): "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc - execute_from_command_line(sys.argv) + execute_from_command_line(sys.argv) # $ threatModelSource[commandargs]=sys.argv if __name__ == '__main__': diff --git a/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/asgi.py b/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/asgi.py index 33b113ce911d..4906268e4161 100644 --- a/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/asgi.py +++ b/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/asgi.py @@ -11,6 +11,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') # $ threatModelSource[environment]=os.environ application = get_asgi_application() diff --git a/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py b/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py index b466637895b7..a3f803658abc 100644 --- a/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py +++ b/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py @@ -11,6 +11,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') # $ threatModelSource[environment]=os.environ application = get_wsgi_application() diff --git a/python/ql/test/library-tests/frameworks/rest_framework/manage.py b/python/ql/test/library-tests/frameworks/rest_framework/manage.py index 0e1a0b64a6e6..9fa5846c9551 100755 --- a/python/ql/test/library-tests/frameworks/rest_framework/manage.py +++ b/python/ql/test/library-tests/frameworks/rest_framework/manage.py @@ -6,7 +6,7 @@ def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproj.settings') # $ threatModelSource[environment]=os.environ try: from django.core.management import execute_from_command_line except ImportError as exc: @@ -15,7 +15,7 @@ def main(): "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc - execute_from_command_line(sys.argv) + execute_from_command_line(sys.argv) # $ threatModelSource[commandargs]=sys.argv if __name__ == '__main__': diff --git a/python/ql/test/library-tests/frameworks/stdlib-py3/FileSystemAccess.py b/python/ql/test/library-tests/frameworks/stdlib-py3/FileSystemAccess.py index 4de7f3a3c329..45eff39d82cb 100644 --- a/python/ql/test/library-tests/frameworks/stdlib-py3/FileSystemAccess.py +++ b/python/ql/test/library-tests/frameworks/stdlib-py3/FileSystemAccess.py @@ -17,7 +17,7 @@ name = windows.parent.name o = open -o(name) # $ getAPathArgument=name +o(name) # $ getAPathArgument=name threatModelSource[file]=o(..) wb = p.write_bytes wb(b"hello") # $ getAPathArgument=p fileWriteData=b"hello" From 5ff7b6557f523392c66db52f867a23e705c65839 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 30 Aug 2024 11:56:44 +0200 Subject: [PATCH 023/162] Python: Add links to threat-model docs --- python/ql/lib/semmle/python/Concepts.qll | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 4703249ab93d..a5a7b8f5b9ac 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -21,6 +21,10 @@ private import codeql.threatmodels.ThreatModels class ThreatModelSource extends DataFlow::Node instanceof ThreatModelSource::Range { /** * Gets a string that represents the source kind with respect to threat modeling. + * + * See + * - https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst + * - https://github.com/github/codeql/blob/main/shared/threat-models/ext/threat-model-grouping.model.yml */ string getThreatModel() { result = super.getThreatModel() } @@ -39,6 +43,10 @@ module ThreatModelSource { abstract class Range extends DataFlow::Node { /** * Gets a string that represents the source kind with respect to threat modeling. + * + * See + * - https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst + * - https://github.com/github/codeql/blob/main/shared/threat-models/ext/threat-model-grouping.model.yml */ abstract string getThreatModel(); From 038bc832a7cf21e02aa3ccbd4ec478688f68b3f2 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 10 Sep 2024 14:46:15 +0200 Subject: [PATCH 024/162] Go/Java/C#: Rename to `ActiveThreatModelSource` As part of adding support for threat-models to Python/JS (see https://github.com/github/codeql/pull/17203), we ran into some trouble with name clashes. Naming in existing languages supporting threat-models: - `SourceNode` (for QL only modeling) - `ThreatModelFlowSource` (for active sources from QL or data-extensions) However, since we use `LocalSourceNode` in Python, and `SourceNode` in JS (for local source nodes), it seems a bit confusing to follow the same naming convention as other languages, and we had to come up with new names. Initially I used `ThreatModelSource` for the "QL only modeling", but that meant that we needed a new name to represent the active sources coming from either QL or data-extensions... for this I came up with `ActiveThreatModelSource`, and I really liked it. To me, it's much clearer that this class only contains the currently active threat model sources. So to align languages, I got approval from @michaelnebel to rename the existing classes. --- .../security/dataflow/flowsources/FlowSources.qll | 11 +++++++++-- go/ql/lib/semmle/go/security/FlowSources.qll | 11 +++++++++-- java/ql/lib/semmle/code/java/dataflow/FlowSources.qll | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll index c610b3de4c74..526e337e9dac 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll @@ -20,11 +20,18 @@ abstract class SourceNode extends DataFlow::Node { } /** + * DEPRECATED: Use `ActiveThreatModelSource` instead. + * * A class of data flow sources that respects the * current threat model configuration. */ -class ThreatModelFlowSource extends DataFlow::Node { - ThreatModelFlowSource() { +deprecated class ThreatModelFlowSource = ActiveThreatModelSource; + +/** + * A data flow source that is enabled in the current threat model configuration. + */ +class ActiveThreatModelSource extends DataFlow::Node { + ActiveThreatModelSource() { exists(string kind | // Specific threat model. currentThreatModel(kind) and diff --git a/go/ql/lib/semmle/go/security/FlowSources.qll b/go/ql/lib/semmle/go/security/FlowSources.qll index f982419f7c8a..258f924b6fb2 100644 --- a/go/ql/lib/semmle/go/security/FlowSources.qll +++ b/go/ql/lib/semmle/go/security/FlowSources.qll @@ -55,11 +55,18 @@ abstract class SourceNode extends DataFlow::Node { } /** + * DEPRECATED: Use `ActiveThreatModelSource` instead. + * * A class of data flow sources that respects the * current threat model configuration. */ -class ThreatModelFlowSource extends DataFlow::Node { - ThreatModelFlowSource() { +deprecated class ThreatModelFlowSource = ActiveThreatModelSource; + +/** + * A data flow source that is enabled in the current threat model configuration. + */ +class ActiveThreatModelSource extends DataFlow::Node { + ActiveThreatModelSource() { exists(string kind | // Specific threat model. currentThreatModel(kind) and diff --git a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll index d18d8e4c8a49..bd3ae459a97a 100644 --- a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll +++ b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll @@ -42,11 +42,18 @@ abstract class SourceNode extends DataFlow::Node { } /** + * DEPRECATED: Use `ActiveThreatModelSource` instead. + * * A class of data flow sources that respects the * current threat model configuration. */ -class ThreatModelFlowSource extends DataFlow::Node { - ThreatModelFlowSource() { +deprecated class ThreatModelFlowSource = ActiveThreatModelSource; + +/** + * A data flow source that is enabled in the current threat model configuration. + */ +class ActiveThreatModelSource extends DataFlow::Node { + ActiveThreatModelSource() { exists(string kind | // Specific threat model. currentThreatModel(kind) and From e35c2b243a5cb101f3d97d89aca34cef222a79c3 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 10 Sep 2024 16:44:03 +0200 Subject: [PATCH 025/162] Docs: Include 'Threat models' for Python --- .../customizing-library-models-for-python.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst b/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst index a244bd00f547..cba9226ccb0f 100644 --- a/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst +++ b/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst @@ -427,7 +427,7 @@ Kinds Source kinds ~~~~~~~~~~~~ -- **remote**: A generic source of remote flow. Most taint-tracking queries will use such a source. Currently this is the only supported source kind. +See documentation below for :ref:`Threat models `. Sink kinds ~~~~~~~~~~ @@ -449,3 +449,8 @@ Summary kinds - **taint**: A summary that propagates taint. This means the output is not necessarily equal to the input, but it was derived from the input in an unrestrictive way. An attacker who controls the input will have significant control over the output as well. - **value**: A summary that preserves the value of the input or creates a copy of the input such that all of its object properties are preserved. + +Threat models +------------- + +.. include:: ../reusables/threat-model-description.rst From e11bfc27bd20271c1b1c69f7b5ff0e23040b86a4 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 10 Sep 2024 16:53:52 +0200 Subject: [PATCH 026/162] Docs: Fix link --- .../customizing-library-models-for-python.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst b/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst index cba9226ccb0f..30888f7b6092 100644 --- a/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst +++ b/docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst @@ -427,7 +427,7 @@ Kinds Source kinds ~~~~~~~~~~~~ -See documentation below for :ref:`Threat models `. +See documentation below for :ref:`Threat models `. Sink kinds ~~~~~~~~~~ @@ -450,6 +450,8 @@ Summary kinds - **taint**: A summary that propagates taint. This means the output is not necessarily equal to the input, but it was derived from the input in an unrestrictive way. An attacker who controls the input will have significant control over the output as well. - **value**: A summary that preserves the value of the input or creates a copy of the input such that all of its object properties are preserved. +.. _threat-models-python: + Threat models ------------- From ff78bebf19d05a072fe554567f8dd384363b4e3f Mon Sep 17 00:00:00 2001 From: Chuan-kai Lin Date: Wed, 11 Sep 2024 13:18:26 -0700 Subject: [PATCH 027/162] Shared support for alert filtering --- .../cpp/dataflow/internal/DataFlowImpl1.qll | 8 + .../cpp/dataflow/internal/DataFlowImpl2.qll | 8 + .../cpp/dataflow/internal/DataFlowImpl3.qll | 8 + .../cpp/dataflow/internal/DataFlowImpl4.qll | 8 + .../dataflow/internal/DataFlowImplLocal.qll | 8 + .../ir/dataflow/internal/DataFlowImpl1.qll | 8 + .../ir/dataflow/internal/DataFlowImpl2.qll | 8 + .../ir/dataflow/internal/DataFlowImpl3.qll | 8 + .../ir/dataflow/internal/DataFlowImpl4.qll | 8 + .../dataflow/internal/DataFlowImpl1.qll | 8 + .../dataflow/internal/DataFlowImpl2.qll | 8 + .../dataflow/internal/DataFlowImpl3.qll | 8 + .../dataflow/internal/DataFlowImpl4.qll | 8 + .../dataflow/internal/DataFlowImpl5.qll | 8 + .../go/dataflow/internal/DataFlowImpl1.qll | 8 + .../go/dataflow/internal/DataFlowImpl2.qll | 8 + .../java/dataflow/internal/DataFlowImpl1.qll | 8 + .../java/dataflow/internal/DataFlowImpl2.qll | 8 + .../java/dataflow/internal/DataFlowImpl3.qll | 8 + .../java/dataflow/internal/DataFlowImpl4.qll | 8 + .../java/dataflow/internal/DataFlowImpl5.qll | 8 + .../java/dataflow/internal/DataFlowImpl6.qll | 8 + .../dataflow/new/internal/DataFlowImpl1.qll | 8 + .../dataflow/new/internal/DataFlowImpl2.qll | 8 + .../dataflow/new/internal/DataFlowImpl3.qll | 8 + .../dataflow/new/internal/DataFlowImpl4.qll | 8 + .../ruby/dataflow/internal/DataFlowImpl1.qll | 8 + .../ruby/dataflow/internal/DataFlowImpl2.qll | 8 + shared/dataflow/codeql/dataflow/DataFlow.qll | 14 ++ .../codeql/dataflow/TaintTracking.qll | 6 +- .../codeql/dataflow/internal/DataFlowImpl.qll | 176 +++++++++++++++--- shared/util/codeql/util/AlertFiltering.qll | 40 ++++ shared/util/ext/default-alert-filter.yml | 7 + shared/util/qlpack.yml | 2 + .../swift/dataflow/internal/DataFlowImpl1.qll | 8 + 35 files changed, 452 insertions(+), 25 deletions(-) create mode 100644 shared/util/codeql/util/AlertFiltering.qll create mode 100644 shared/util/ext/default-alert-filter.yml diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 359fa71744b4..1db3402b7469 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 359fa71744b4..1db3402b7469 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 359fa71744b4..1db3402b7469 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 359fa71744b4..1db3402b7469 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 359fa71744b4..1db3402b7469 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 359fa71744b4..1db3402b7469 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 359fa71744b4..1db3402b7469 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 359fa71744b4..1db3402b7469 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 359fa71744b4..1db3402b7469 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 359fa71744b4..1db3402b7469 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll index 359fa71744b4..1db3402b7469 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I diff --git a/shared/dataflow/codeql/dataflow/DataFlow.qll b/shared/dataflow/codeql/dataflow/DataFlow.qll index 6e4921521b1a..a9ff849d3cc3 100644 --- a/shared/dataflow/codeql/dataflow/DataFlow.qll +++ b/shared/dataflow/codeql/dataflow/DataFlow.qll @@ -431,6 +431,12 @@ module Configs Lang> { * is not visualized (as it is in a `path-problem` query). */ default predicate includeHiddenNodes() { none() } + + /** + * Holds to filter out data flows whose source and sink are both not in the + * `AlertFiltering` location range. + */ + default predicate filterForSourceOrSinkAlerts() { none() } } /** An input configuration for data flow using flow state. */ @@ -547,6 +553,12 @@ module Configs Lang> { * is not visualized (as it is in a `path-problem` query). */ default predicate includeHiddenNodes() { none() } + + /** + * Holds to filter out data flows whose source and sink are both not in the + * `AlertFiltering` location range. + */ + default predicate filterForSourceOrSinkAlerts() { none() } } } @@ -625,6 +637,7 @@ module DataFlowMake Lang> { module Global implements GlobalFlowSig { private module C implements FullStateConfigSig { import DefaultState + import FilteredSourceSink import Config predicate accessPathLimit = Config::accessPathLimit/0; @@ -647,6 +660,7 @@ module DataFlowMake Lang> { */ module GlobalWithState implements GlobalFlowSig { private module C implements FullStateConfigSig { + import FilteredStateSourceSink import Config predicate accessPathLimit = Config::accessPathLimit/0; diff --git a/shared/dataflow/codeql/dataflow/TaintTracking.qll b/shared/dataflow/codeql/dataflow/TaintTracking.qll index 343f8be041f5..3e4de6c6218c 100644 --- a/shared/dataflow/codeql/dataflow/TaintTracking.qll +++ b/shared/dataflow/codeql/dataflow/TaintTracking.qll @@ -60,8 +60,8 @@ module TaintFlowMake< Config::allowImplicitRead(node, c) or ( - Config::isSink(node) or - Config::isSink(node, _) or + Config::isFilteredSink(node) or + Config::isFilteredSink(node, _) or Config::isAdditionalFlowStep(node, _, _) or Config::isAdditionalFlowStep(node, _, _, _) ) and @@ -75,6 +75,7 @@ module TaintFlowMake< module Global implements DataFlow::GlobalFlowSig { private module Config0 implements DataFlowInternal::FullStateConfigSig { import DataFlowInternal::DefaultState + import DataFlowInternal::FilteredSourceSink import Config predicate isAdditionalFlowStep( @@ -101,6 +102,7 @@ module TaintFlowMake< */ module GlobalWithState implements DataFlow::GlobalFlowSig { private module Config0 implements DataFlowInternal::FullStateConfigSig { + import DataFlowInternal::FilteredStateSourceSink import Config predicate isAdditionalFlowStep( diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index c8b56db0b343..c4da42ebf973 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -124,6 +124,30 @@ module MakeImpl Lang> { * is not visualized (as it is in a `path-problem` query). */ predicate includeHiddenNodes(); + + /** + * Holds to filter out data flows whose source and sink are both not in the + * `AlertFiltering` location range. + */ + predicate filterForSourceOrSinkAlerts(); + + /** + * Holds if `source` is a relevant data flow source with the given initial + * `state` and passes filtering per `filterForSourceOrSinkAlerts`. + */ + predicate isFilteredSource(Node source, FlowState state); + + /** + * Holds if `sink` is a relevant data flow sink accepting `state` and passes + * filtering per `filterForSourceOrSinkAlerts`. + */ + predicate isFilteredSink(Node sink, FlowState state); + + /** + * Holds if `sink` is a relevant data flow sink for any state and passes + * filtering per `filterForSourceOrSinkAlerts`. + */ + predicate isFilteredSink(Node sink); } /** @@ -147,6 +171,112 @@ module MakeImpl Lang> { } } + /** + * Provide `isFilteredSource` and `isFilteredSink` implementations given a `ConfigSig`. + */ + module FilteredSourceSink { + private import codeql.util.AlertFiltering + + private module AlertFiltering = AlertFilteringImpl; + + private class FlowState = Unit; + + pragma[noinline] + private predicate hasFilteredSource() { + exists(Node n | Config::isSource(n) | AlertFiltering::filterByLocation(n.getLocation())) + } + + pragma[noinline] + private predicate hasFilteredSink() { + exists(Node n | Config::isSink(n) | AlertFiltering::filterByLocation(n.getLocation())) + } + + predicate isFilteredSource(Node source, FlowState state) { + Config::isSource(source) and + exists(state) and + ( + not Config::filterForSourceOrSinkAlerts() or + // If there are filtered sinks, we need to pass through all sources to preserve all alerts + // with filtered sinks. Otherwise the only alerts of interest are those with filtered + // sources, so we can perform the source filtering right here. + hasFilteredSink() or + AlertFiltering::filterByLocation(source.getLocation()) + ) + } + + predicate isFilteredSink(Node sink, FlowState state) { isFilteredSink(sink) and exists(state) } + + predicate isFilteredSink(Node sink) { + Config::isSink(sink) and + ( + // If there are filtered sources, we need to pass through all sinks to preserve all alerts + // with filtered sources. Otherwise the only alerts of interest are those with filtered + // sinks, so we can perform the sink filtering right here. + hasFilteredSource() or + AlertFiltering::filterByLocation(sink.getLocation()) + ) + } + } + + /** + * Provide `isFilteredSource` and `isFilteredSink` implementations given a `StateConfigSig`. + */ + module FilteredStateSourceSink { + private import codeql.util.AlertFiltering + + private module AlertFiltering = AlertFilteringImpl; + + private class FlowState = Config::FlowState; + + pragma[noinline] + private predicate hasFilteredSource() { + exists(Node n | Config::isSource(n, _) | AlertFiltering::filterByLocation(n.getLocation())) + } + + pragma[noinline] + private predicate hasFilteredSink() { + exists(Node n | + Config::isSink(n, _) or + Config::isSink(n) + | + AlertFiltering::filterByLocation(n.getLocation()) + ) + } + + predicate isFilteredSource(Node source, FlowState state) { + Config::isSource(source, state) and + ( + // If there are filtered sinks, we need to pass through all sources to preserve all alerts + // with filtered sinks. Otherwise the only alerts of interest are those with filtered + // sources, so we can perform the source filtering right here. + hasFilteredSink() or + AlertFiltering::filterByLocation(source.getLocation()) + ) + } + + predicate isFilteredSink(Node sink, FlowState state) { + Config::isSink(sink, state) and + ( + // If there are filtered sources, we need to pass through all sinks to preserve all alerts + // with filtered sources. Otherwise the only alerts of interest are those with filtered + // sinks, so we can perform the sink filtering right here. + hasFilteredSource() or + AlertFiltering::filterByLocation(sink.getLocation()) + ) + } + + predicate isFilteredSink(Node sink) { + Config::isSink(sink) and + ( + // If there are filtered sources, we need to pass through all sinks to preserve all alerts + // with filtered sources. Otherwise the only alerts of interest are those with filtered + // sinks, so we can perform the sink filtering right here. + hasFilteredSource() or + AlertFiltering::filterByLocation(sink.getLocation()) + ) + } + } + /** * Constructs a data flow computation given a full input configuration. */ @@ -250,7 +380,7 @@ module MakeImpl Lang> { exists(Node n | node.asNode() = n and Config::isBarrierIn(n) and - Config::isSource(n, _) + Config::isFilteredSource(n, _) ) } @@ -259,7 +389,7 @@ module MakeImpl Lang> { exists(Node n | node.asNode() = n and Config::isBarrierIn(n, state) and - Config::isSource(n, state) + Config::isFilteredSource(n, state) ) } @@ -268,9 +398,9 @@ module MakeImpl Lang> { node.asNodeOrImplicitRead() = n and Config::isBarrierOut(n) | - Config::isSink(n, _) + Config::isFilteredSink(n, _) or - Config::isSink(n) + Config::isFilteredSink(n) ) } @@ -280,9 +410,9 @@ module MakeImpl Lang> { node.asNodeOrImplicitRead() = n and Config::isBarrierOut(n, state) | - Config::isSink(n, state) + Config::isFilteredSink(n, state) or - Config::isSink(n) + Config::isFilteredSink(n) ) } @@ -292,11 +422,11 @@ module MakeImpl Lang> { Config::isBarrier(n) or Config::isBarrierIn(n) and - not Config::isSource(n, _) + not Config::isFilteredSource(n, _) or Config::isBarrierOut(n) and - not Config::isSink(n, _) and - not Config::isSink(n) + not Config::isFilteredSink(n, _) and + not Config::isFilteredSink(n) ) } @@ -306,24 +436,24 @@ module MakeImpl Lang> { Config::isBarrier(n, state) or Config::isBarrierIn(n, state) and - not Config::isSource(n, state) + not Config::isFilteredSource(n, state) or Config::isBarrierOut(n, state) and - not Config::isSink(n, state) and - not Config::isSink(n) + not Config::isFilteredSink(n, state) and + not Config::isFilteredSink(n) ) } pragma[nomagic] private predicate sourceNode(NodeEx node, FlowState state) { - Config::isSource(node.asNode(), state) and + Config::isFilteredSource(node.asNode(), state) and not fullBarrier(node) and not stateBarrier(node, state) } pragma[nomagic] private predicate sinkNodeWithState(NodeEx node, FlowState state) { - Config::isSink(node.asNodeOrImplicitRead(), state) and + Config::isFilteredSink(node.asNodeOrImplicitRead(), state) and not fullBarrier(node) and not stateBarrier(node, state) } @@ -729,7 +859,7 @@ module MakeImpl Lang> { additional predicate sinkNode(NodeEx node, FlowState state) { fwdFlow(node) and fwdFlowState(state) and - Config::isSink(node.asNodeOrImplicitRead()) + Config::isFilteredSink(node.asNodeOrImplicitRead()) or fwdFlow(node) and fwdFlowState(state) and @@ -2946,7 +3076,7 @@ module MakeImpl Lang> { NodeEx toNormalSinkNodeEx() { exists(Node n | pragma[only_bind_out](node.asNodeOrImplicitRead()) = n and - (Config::isSink(n) or Config::isSink(n, _)) and + (Config::isFilteredSink(n) or Config::isFilteredSink(n, _)) and result.asNode() = n ) } @@ -4792,15 +4922,15 @@ module MakeImpl Lang> { } private predicate interestingCallableSrc(DataFlowCallable c) { - exists(Node n | Config::isSource(n, _) and c = getNodeEnclosingCallable(n)) + exists(Node n | Config::isFilteredSource(n, _) and c = getNodeEnclosingCallable(n)) or exists(DataFlowCallable mid | interestingCallableSrc(mid) and callableStep(mid, c)) } private predicate interestingCallableSink(DataFlowCallable c) { exists(Node n | c = getNodeEnclosingCallable(n) | - Config::isSink(n, _) or - Config::isSink(n) + Config::isFilteredSink(n, _) or + Config::isFilteredSink(n) ) or exists(DataFlowCallable mid | interestingCallableSink(mid) and callableStep(c, mid)) @@ -4827,7 +4957,7 @@ module MakeImpl Lang> { or exists(Node n | ce1 = TCallableSrc() and - Config::isSource(n, _) and + Config::isFilteredSource(n, _) and ce2 = TCallable(getNodeEnclosingCallable(n)) ) or @@ -4835,8 +4965,8 @@ module MakeImpl Lang> { ce2 = TCallableSink() and ce1 = TCallable(getNodeEnclosingCallable(n)) | - Config::isSink(n, _) or - Config::isSink(n) + Config::isFilteredSink(n, _) or + Config::isFilteredSink(n) ) } @@ -4900,7 +5030,7 @@ module MakeImpl Lang> { private predicate revSinkNode(NodeEx node, FlowState state) { sinkNodeWithState(node, state) or - Config::isSink(node.asNodeOrImplicitRead()) and + Config::isFilteredSink(node.asNodeOrImplicitRead()) and relevantState(state) and not fullBarrier(node) and not stateBarrier(node, state) diff --git a/shared/util/codeql/util/AlertFiltering.qll b/shared/util/codeql/util/AlertFiltering.qll new file mode 100644 index 000000000000..d1778304b733 --- /dev/null +++ b/shared/util/codeql/util/AlertFiltering.qll @@ -0,0 +1,40 @@ +/** + * Provides the `restrictAlertsTo` extensible predicate to restrict alerts to specific source + * locations, and the `AlertFilteringImpl` parameterized module to apply the filtering. + */ + +private import codeql.util.Location + +/** + * Restricts alerts to a specific location in specific files. + * + * If this predicate is empty, accept all alerts. Otherwise, accept alerts only at the specified + * locations. Note that alert restrictions apply only to the start line of an alert (even if the + * alert location spans multiple lines) because alerts are displayed on their start lines. + * + * - filePath: Absolute path of the file to restrict alerts to. + * - startLine: Start line number (starting with 1, inclusive) to restrict alerts to. + * - endLine: End line number (starting with 1, inclusive) to restrict alerts to. + * + * If startLine and endLine are both 0, accept alerts anywhere in the file. + */ +extensible predicate restrictAlertsTo(string filePath, int startLine, int endLine); + +/** Module for applying alert location filtering. */ +module AlertFilteringImpl { + /** Applies alert filtering to the given location. */ + bindingset[location] + predicate filterByLocation(Location location) { + not restrictAlertsTo(_, _, _) + or + exists(string filePath, int startLine, int endLine | + restrictAlertsTo(filePath, startLine, endLine) + | + startLine = 0 and + endLine = 0 and + location.hasLocationInfo(filePath, _, _, _, _) + or + location.hasLocationInfo(filePath, [startLine .. endLine], _, _, _) + ) + } +} diff --git a/shared/util/ext/default-alert-filter.yml b/shared/util/ext/default-alert-filter.yml new file mode 100644 index 000000000000..0ae5a2f4eb5b --- /dev/null +++ b/shared/util/ext/default-alert-filter.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/util + extensible: restrictAlertsTo + # Empty predicate means no restrictions on alert locations + data: [] diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 5914dae35752..adb3ab85951e 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -3,4 +3,6 @@ version: 1.0.7-dev groups: shared library: true dependencies: null +dataExtensions: + - ext/*.yml warnOnImplicitThis: true diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll index 359fa71744b4..1db3402b7469 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll @@ -283,6 +283,14 @@ deprecated private module Config implements FullStateConfigSig { FlowFeature getAFeature() { result = any(Configuration config).getAFeature() } predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } + + predicate filterForSourceOrSinkAlerts() { none() } + + predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } + + predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } + + predicate isFilteredSink(Node sink) { isSink(sink) } } deprecated private import Impl as I From 8c10155eb7f3090e95131bc9beb046ed9def4a08 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 10 Sep 2024 14:55:07 +0200 Subject: [PATCH 028/162] mass rename to ActiveThreatModelSource --- .../auth/InsecureDirectObjectReferenceQuery.qll | 2 +- .../security/dataflow/CodeInjectionQuery.qll | 2 +- .../security/dataflow/CommandInjectionQuery.qll | 2 +- .../security/dataflow/ConditionalBypassQuery.qll | 2 +- .../security/dataflow/ExternalAPIsQuery.qll | 6 +++--- .../security/dataflow/LDAPInjectionQuery.qll | 2 +- .../csharp/security/dataflow/LogForgingQuery.qll | 2 +- .../dataflow/MissingXMLValidationQuery.qll | 4 ++-- .../code/csharp/security/dataflow/ReDoSQuery.qll | 2 +- .../security/dataflow/RegexInjectionQuery.qll | 2 +- .../security/dataflow/ResourceInjectionQuery.qll | 2 +- .../security/dataflow/SqlInjectionQuery.qll | 2 +- .../security/dataflow/TaintedPathQuery.qll | 2 +- .../dataflow/UnsafeDeserializationQuery.qll | 2 +- .../security/dataflow/UrlRedirectQuery.qll | 2 +- .../dataflow/XMLEntityInjectionQuery.qll | 2 +- .../security/dataflow/XPathInjectionQuery.qll | 2 +- .../code/csharp/security/dataflow/XSSQuery.qll | 2 +- .../Security Features/CWE-091/XMLInjection.ql | 2 +- .../CWE-114/AssemblyPathInjection.ql | 2 +- .../CWE-134/UncontrolledFormatString.ql | 2 +- .../experimental/CWE-099/TaintedWebClientLib.qll | 2 +- .../src/experimental/CWE-918/RequestForgery.qll | 2 +- .../flowsources/local/commandargs/CommandArgs.ql | 2 +- .../local/commandargs/CommandLineFlow.ql | 2 +- .../flowsources/local/registry/Registry.ql | 2 +- .../stored/database/dapper/DatabaseSources.ql | 2 +- .../dataflow/flowsources/stored/file/Files.ql | 2 +- .../dataflow/threat-models/Test.qll | 2 +- .../security/CommandInjectionCustomizations.qll | 4 ++-- go/ql/lib/semmle/go/security/ExternalAPIs.qll | 8 ++++---- .../go/security/LogInjectionCustomizations.qll | 4 ++-- .../MissingJwtSignatureCheckCustomizations.qll | 2 +- .../security/OpenUrlRedirectCustomizations.qll | 4 ++-- .../go/security/ReflectedXssCustomizations.qll | 4 ++-- .../go/security/RequestForgeryCustomizations.qll | 4 ++-- .../go/security/SqlInjectionCustomizations.qll | 4 ++-- .../go/security/TaintedPathCustomizations.qll | 4 ++-- .../UncontrolledAllocationSizeCustomizations.qll | 2 +- .../go/security/XPathInjectionCustomizations.qll | 4 ++-- .../CWE-640/EmailInjectionCustomizations.qll | 4 ++-- go/ql/src/experimental/CWE-090/LDAPInjection.qll | 10 ++++++---- go/ql/src/experimental/CWE-203/Timing.ql | 2 +- .../CWE-287/ImproperLdapAuthCustomizations.qll | 2 +- go/ql/src/experimental/CWE-369/DivideByZero.ql | 2 +- go/ql/src/experimental/CWE-74/DsnInjection.ql | 2 +- .../CWE-79/HTMLTemplateEscapingPassthrough.ql | 8 ++++---- .../CWE-807/SensitiveConditionBypass.qll | 4 ++-- .../experimental/CWE-840/ConditionalBypass.ql | 2 +- go/ql/src/experimental/CWE-918/SSRF.qll | 4 ++-- .../experimental/CWE-942/CorsMisconfiguration.ql | 16 ++++++++-------- .../frameworks/DecompressionBombs.qll | 2 +- .../semmle/go/dataflow/ThreatModels/Test.qll | 2 +- .../flowsources/local/environment/test.ql | 2 +- .../go/dataflow/flowsources/local/file/test.ql | 2 +- .../semmle/code/java/dataflow/FlowSources.qll | 4 ++-- .../java/dataflow/internal/TaintTrackingUtil.qll | 2 +- .../security/AndroidIntentRedirectionQuery.qll | 6 +++--- .../java/security/ArbitraryApkInstallation.qll | 2 +- .../java/security/ArithmeticTaintedQuery.qll | 4 ++-- .../code/java/security/CommandLineQuery.qll | 2 +- .../java/security/ConditionalBypassQuery.qll | 2 +- .../semmle/code/java/security/ExternalAPIs.qll | 4 ++-- .../ExternallyControlledFormatStringQuery.qll | 2 +- .../java/security/FragmentInjectionQuery.qll | 2 +- .../code/java/security/GroovyInjectionQuery.qll | 2 +- ...mproperValidationOfArrayConstructionQuery.qll | 2 +- .../ImproperValidationOfArrayIndexQuery.qll | 2 +- .../security/InsecureBeanValidationQuery.qll | 2 +- .../IntentUriPermissionManipulationQuery.qll | 2 +- .../code/java/security/JexlInjectionQuery.qll | 2 +- .../code/java/security/JndiInjectionQuery.qll | 2 +- .../code/java/security/LdapInjectionQuery.qll | 2 +- .../code/java/security/LogInjectionQuery.qll | 2 +- .../code/java/security/MvelInjectionQuery.qll | 2 +- .../java/security/NumericCastTaintedQuery.qll | 2 +- .../code/java/security/OgnlInjectionQuery.qll | 2 +- .../java/security/PartialPathTraversalQuery.qll | 2 +- .../code/java/security/RequestForgeryConfig.qll | 2 +- .../java/security/ResponseSplittingQuery.qll | 2 +- .../security/SensitiveResultReceiverQuery.qll | 2 +- .../code/java/security/SpelInjectionQuery.qll | 2 +- .../code/java/security/SqlInjectionQuery.qll | 2 +- .../security/TaintedEnvironmentVariableQuery.qll | 2 +- .../code/java/security/TaintedPathQuery.qll | 2 +- .../security/TaintedPermissionsCheckQuery.qll | 2 +- .../code/java/security/TemplateInjection.qll | 2 +- .../security/TrustBoundaryViolationQuery.qll | 2 +- .../java/security/UnsafeAndroidAccessQuery.qll | 2 +- .../security/UnsafeContentUriResolutionQuery.qll | 2 +- .../java/security/UnsafeDeserializationQuery.qll | 4 ++-- .../code/java/security/UrlForwardQuery.qll | 2 +- .../code/java/security/UrlRedirectQuery.qll | 2 +- .../code/java/security/XPathInjectionQuery.qll | 2 +- .../code/java/security/XsltInjectionQuery.qll | 2 +- .../lib/semmle/code/java/security/XssQuery.qll | 2 +- .../semmle/code/java/security/XxeRemoteQuery.qll | 2 +- .../security/regexp/PolynomialReDoSQuery.qll | 2 +- .../java/security/regexp/RegexInjectionQuery.qll | 2 +- .../Security/CWE/CWE-020/Log4jJndiInjection.ql | 2 +- .../Security/CWE/CWE-036/OpenStream.ql | 2 +- .../Security/CWE/CWE-073/FilePathInjection.ql | 2 +- .../CWE/CWE-078/CommandInjectionRuntimeExec.ql | 2 +- .../CWE/CWE-089/MyBatisAnnotationSqlInjection.ql | 2 +- .../CWE/CWE-089/MyBatisMapperXmlSqlInjection.ql | 2 +- .../Security/CWE/CWE-094/BeanShellInjection.ql | 2 +- .../Security/CWE/CWE-094/JShellInjection.ql | 2 +- .../CWE-094/JakartaExpressionInjectionLib.qll | 2 +- .../Security/CWE/CWE-094/JythonInjection.ql | 6 +++--- .../Security/CWE/CWE-094/ScriptInjection.ql | 4 ++-- .../CWE/CWE-094/SpringViewManipulationLib.qll | 2 +- .../CWE/CWE-200/InsecureWebResourceResponse.ql | 2 +- .../NonConstantTimeCheckOnSignatureQuery.qll | 4 ++-- .../Security/CWE/CWE-346/UnvalidatedCors.ql | 2 +- .../Security/CWE/CWE-352/JsonpInjection.ql | 2 +- .../Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- .../Security/CWE/CWE-400/ThreadResourceAbuse.ql | 2 +- .../Security/CWE/CWE-470/UnsafeReflection.ql | 2 +- .../CWE/CWE-600/UncaughtServletException.ql | 4 ++-- .../Security/CWE/CWE-601/SpringUrlRedirect.ql | 2 +- .../Security/CWE/CWE-652/XQueryInjection.ql | 2 +- .../Security/CWE/CWE-755/NFEAndroidDoS.ql | 2 +- .../entrypoint-types/EntryPointTypesTest.ql | 2 +- .../dataflow/threat-models/Test.qll | 2 +- .../library-tests/frameworks/JaxWs/JaxRsFlow.ql | 2 +- .../frameworks/android/content-provider/test.ql | 2 +- .../frameworks/android/external-storage/test.ql | 2 +- .../frameworks/android/slice/test.ql | 2 +- .../sources/OnActivityResultSourceTest.ql | 2 +- .../library-tests/frameworks/apache-http/flow.ql | 2 +- .../test/library-tests/frameworks/guice/flow.ql | 2 +- .../library-tests/frameworks/jms/FlowTest.ql | 2 +- .../frameworks/netty/manual/test.ql | 2 +- .../frameworks/rabbitmq/FlowTest.ql | 2 +- .../library-tests/frameworks/ratpack/flow.ql | 2 +- .../frameworks/spring/controller/test.ql | 2 +- 136 files changed, 179 insertions(+), 177 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll index 858adcc22687..2ea422855ad8 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll @@ -18,7 +18,7 @@ private predicate needsChecks(ActionMethod m) { m.isEdit() and not m.isAdmin() } * that may indicate that it's used as the ID for some resource */ private predicate hasIdParameter(ActionMethod m) { - exists(ThreatModelFlowSource src | src.getEnclosingCallable() = m | + exists(ActiveThreatModelSource src | src.getEnclosingCallable() = m | src.asParameter().getName().toLowerCase().matches(["%id", "%idx"]) or // handle cases like `Request.QueryString["Id"]` diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll index 2b55697ebda9..8ec9122864fb 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll @@ -55,7 +55,7 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } private class SimpleTypeSanitizer extends Sanitizer, SimpleTypeSanitizedExpr { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll index 24c80c07f894..84352389c419 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll @@ -57,7 +57,7 @@ module CommandInjection = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** Command Injection sinks defined through Models as Data. */ private class ExternalCommandInjectionExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll index 2bc10dead22b..f92bb0d2f44a 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll @@ -54,7 +54,7 @@ module ConditionalBypass = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** The result of a reverse dns may be user-controlled. */ class ReverseDnsSource extends Source { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll index 69a1823a4554..f1a64f6810b8 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll @@ -73,14 +73,14 @@ class ExternalApiDataNode extends DataFlow::Node { } } -/** A configuration for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ +/** A configuration for tracking flow from `ActiveThreatModelSource`s to `ExternalApiDataNode`s. */ private module RemoteSourceToExternalApiConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } } -/** A module for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ +/** A module for tracking flow from `ActiveThreatModelSource`s to `ExternalApiDataNode`s. */ module RemoteSourceToExternalApi = TaintTracking::Global; /** A node representing untrusted data being passed to an external API. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll index bdba76bfb5cb..e2e96034c41e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll @@ -60,7 +60,7 @@ module LdapInjection = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** LDAP sinks defined through Models as Data. */ private class ExternalLdapExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll index 7c4429bcbf84..8181c9bcb74a 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll @@ -43,7 +43,7 @@ private module LogForgingConfig implements DataFlow::ConfigSig { module LogForging = TaintTracking::Global; /** A source of remote user input. */ -private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +private class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } private class HtmlSanitizer extends Sanitizer { HtmlSanitizer() { this.asExpr() instanceof HtmlSanitizedExpr } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll index 4e14bed2c33e..3401dab7ea24 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll @@ -48,7 +48,7 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig { module MissingXmlValidation = TaintTracking::Global; /** - * DEPRECATED: Use `ThreatModelFlowSource` instead. + * DEPRECATED: Use `ActiveThreatModelSource` instead. * * A source of remote user input. */ @@ -57,7 +57,7 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource /** * A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * The input argument to a call to `XmlReader.Create` where the input will not be validated against diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll index f6225ce36bd0..5addc03bd88b 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll @@ -49,7 +49,7 @@ module ReDoS = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * An expression that represents a regular expression with potential exponential behavior. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll index 8affdb1e9dd6..620c07a9ea21 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll @@ -48,7 +48,7 @@ module RegexInjection = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * A `pattern` argument to a construction of a `Regex`. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll index dd1c088042da..40814729e559 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll @@ -54,7 +54,7 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** An argument to the `ConnectionString` property on a data connection class. */ class SqlConnectionStringSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll index 5a900461af70..cc7b61c31f21 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll @@ -65,7 +65,7 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** An SQL expression passed to an API call that executes SQL. */ class SqlInjectionExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll index 21c3cbdf9421..bdc7245aeb2d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll @@ -50,7 +50,7 @@ module TaintedPath = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * A path argument to a `File` method call. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll index 51aef35272f4..009e1ab73c1d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll @@ -49,7 +49,7 @@ abstract private class ConstructorOrStaticMethodSink extends Sink { } */ abstract class Sanitizer extends DataFlow::Node { } -private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +private class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * User input to object method call deserialization flow tracking configuration. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll index 09f6130985f4..0838fe7be4b6 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll @@ -52,7 +52,7 @@ module UrlRedirect = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** URL Redirection sinks defined through Models as Data. */ private class ExternalUrlRedirectExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll index 4efeadb3c7e6..38801410d857 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll @@ -15,7 +15,7 @@ private import semmle.code.csharp.security.Sanitizers */ abstract class Source extends DataFlow::Node { } -private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +private class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * A data flow sink for untrusted user input used in XML processing. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll index 0e8e41c9773b..140870c70fae 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll @@ -58,7 +58,7 @@ module XpathInjection = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** The `xpath` argument to an `XPathExpression.Compile(..)` call. */ class XPathExpressionCompileSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll index 4ea9e562bb5f..81029cc6572e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll @@ -165,7 +165,7 @@ module XssTrackingConfig implements DataFlow::ConfigSig { module XssTracking = TaintTracking::Global; /** A source supported by the current threat model. */ -private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +private class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } private class SimpleTypeSanitizer extends Sanitizer, SimpleTypeSanitizedExpr { } diff --git a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql index 042e2aa9f171..16eca675e6a1 100644 --- a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql +++ b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql @@ -20,7 +20,7 @@ import XmlInjection::PathGraph * A taint-tracking configuration for untrusted user input used in XML. */ module XmlInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc | diff --git a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql index 9d30366af8f2..118591f3f9ef 100644 --- a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql +++ b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql @@ -21,7 +21,7 @@ import AssemblyPathInjection::PathGraph * A taint-tracking configuration for untrusted user input used to load a DLL. */ module AssemblyPathInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc, string name, int arg | diff --git a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql index 7eec0bb90c6b..a027170dc372 100644 --- a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql +++ b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql @@ -17,7 +17,7 @@ import semmle.code.csharp.frameworks.Format import FormatString::PathGraph module FormatStringConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(FormatCall call | call.hasInsertions()).getFormatExpr() diff --git a/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll b/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll index eea18ae3b6e8..716702ca008c 100644 --- a/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll +++ b/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll @@ -61,7 +61,7 @@ module TaintedWebClient = TaintTracking::Global; deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } /** A source supported by the current threat model. */ -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * A path argument to a `WebClient` method call that has an address argument. diff --git a/csharp/ql/src/experimental/CWE-918/RequestForgery.qll b/csharp/ql/src/experimental/CWE-918/RequestForgery.qll index dac68adfcc15..6d06ca5fa445 100644 --- a/csharp/ql/src/experimental/CWE-918/RequestForgery.qll +++ b/csharp/ql/src/experimental/CWE-918/RequestForgery.qll @@ -60,7 +60,7 @@ module RequestForgery { /** * A dataflow source for Server Side Request Forgery(SSRF) Vulnerabilities. */ - private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } /** * An url argument to a `HttpRequestMessage` constructor call diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql index aa89a4c34553..017c4370dfd4 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql @@ -2,5 +2,5 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.FlowSources from DataFlow::Node source -where source instanceof ThreatModelFlowSource +where source instanceof ActiveThreatModelSource select source diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql index 731043cf4706..579514c496f1 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql @@ -2,7 +2,7 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.FlowSources module CommandLineFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc | mc.getTarget().hasName("Sink") | sink.asExpr() = mc.getArgument(0)) diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/registry/Registry.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/registry/Registry.ql index 9e2934e9e19a..8462205d61a1 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/local/registry/Registry.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/registry/Registry.ql @@ -2,5 +2,5 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.FlowSources from DataFlow::Node source -where source instanceof ThreatModelFlowSource +where source instanceof ActiveThreatModelSource select source, source.(SourceNode).getThreatModel() diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql b/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql index aa9372d73d29..aff922884ff5 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql @@ -4,7 +4,7 @@ import TestUtilities.InlineFlowTest import TaintFlowTest module DatabaseConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc | mc.getTarget().hasName("Sink") | sink.asExpr() = mc.getArgument(0)) diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql b/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql index 1060ea756a26..ad8a40fa0741 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql @@ -4,7 +4,7 @@ import TestUtilities.InlineFlowTest import TaintFlowTest module FilesConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc | mc.getTarget().hasName("Sink") | sink.asExpr() = mc.getArgument(0)) diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/Test.qll b/csharp/ql/test/library-tests/dataflow/threat-models/Test.qll index c2e200fd3046..3f702d4b0198 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/Test.qll +++ b/csharp/ql/test/library-tests/dataflow/threat-models/Test.qll @@ -4,7 +4,7 @@ private import semmle.code.csharp.dataflow.internal.ExternalFlow private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private module ThreatModelConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sinkNode(sink, _) } } diff --git a/go/ql/lib/semmle/go/security/CommandInjectionCustomizations.qll b/go/ql/lib/semmle/go/security/CommandInjectionCustomizations.qll index 6fec1b5d98c1..c2874d7cdac4 100644 --- a/go/ql/lib/semmle/go/security/CommandInjectionCustomizations.qll +++ b/go/ql/lib/semmle/go/security/CommandInjectionCustomizations.qll @@ -31,12 +31,12 @@ module CommandInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** A source of untrusted data, considered as a taint source for command injection. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** A command name, considered as a taint sink for command injection. */ class CommandNameAsSink extends Sink { diff --git a/go/ql/lib/semmle/go/security/ExternalAPIs.qll b/go/ql/lib/semmle/go/security/ExternalAPIs.qll index 5eb41dd2579a..6799099b999f 100644 --- a/go/ql/lib/semmle/go/security/ExternalAPIs.qll +++ b/go/ql/lib/semmle/go/security/ExternalAPIs.qll @@ -183,24 +183,24 @@ class UnknownExternalApiDataNode extends ExternalApiDataNode { } private module UntrustedDataConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } } /** - * Tracks data flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. + * Tracks data flow from `ActiveThreatModelSource`s to `ExternalApiDataNode`s. */ module UntrustedDataToExternalApiFlow = DataFlow::Global; private module UntrustedDataToUnknownExternalApiConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UnknownExternalApiDataNode } } /** - * Tracks data flow from `ThreatModelFlowSource`s to `UnknownExternalApiDataNode`s. + * Tracks data flow from `ActiveThreatModelSource`s to `UnknownExternalApiDataNode`s. */ module UntrustedDataToUnknownExternalApiFlow = DataFlow::Global; diff --git a/go/ql/lib/semmle/go/security/LogInjectionCustomizations.qll b/go/ql/lib/semmle/go/security/LogInjectionCustomizations.qll index 6d93dfa2e5ad..188256f9643b 100644 --- a/go/ql/lib/semmle/go/security/LogInjectionCustomizations.qll +++ b/go/ql/lib/semmle/go/security/LogInjectionCustomizations.qll @@ -26,12 +26,12 @@ module LogInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** A source of untrusted data, considered as a taint source for log injection. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** An argument to a logging mechanism. */ class LoggerSink extends Sink { diff --git a/go/ql/lib/semmle/go/security/MissingJwtSignatureCheckCustomizations.qll b/go/ql/lib/semmle/go/security/MissingJwtSignatureCheckCustomizations.qll index e86b20d67e89..e1b153da24a9 100644 --- a/go/ql/lib/semmle/go/security/MissingJwtSignatureCheckCustomizations.qll +++ b/go/ql/lib/semmle/go/security/MissingJwtSignatureCheckCustomizations.qll @@ -49,7 +49,7 @@ module MissingJwtSignatureCheck { } } - private class DefaultSource extends Source instanceof ThreatModelFlowSource { } + private class DefaultSource extends Source instanceof ActiveThreatModelSource { } private class DefaultSink extends Sink { DefaultSink() { sinkNode(this, "jwt") } diff --git a/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll b/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll index 8e72b53087aa..304bc004e038 100644 --- a/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll +++ b/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll @@ -43,14 +43,14 @@ module OpenUrlRedirect { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** * A source of third-party user input, considered as a flow source for URL redirects. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { ThreatModelFlowAsSource() { // exclude some fields and methods of URLs that are generally not attacker-controllable for // open redirect exploits diff --git a/go/ql/lib/semmle/go/security/ReflectedXssCustomizations.qll b/go/ql/lib/semmle/go/security/ReflectedXssCustomizations.qll index 0d376b9f7dad..47e823708304 100644 --- a/go/ql/lib/semmle/go/security/ReflectedXssCustomizations.qll +++ b/go/ql/lib/semmle/go/security/ReflectedXssCustomizations.qll @@ -35,14 +35,14 @@ module ReflectedXss { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** * A third-party controllable input, considered as a flow source for reflected XSS. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** An arbitrary XSS sink, considered as a flow sink for stored XSS. */ private class AnySink extends Sink instanceof SharedXss::Sink { } diff --git a/go/ql/lib/semmle/go/security/RequestForgeryCustomizations.qll b/go/ql/lib/semmle/go/security/RequestForgeryCustomizations.qll index b56395cceedd..2449ffe488ca 100644 --- a/go/ql/lib/semmle/go/security/RequestForgeryCustomizations.qll +++ b/go/ql/lib/semmle/go/security/RequestForgeryCustomizations.qll @@ -34,14 +34,14 @@ module RequestForgery { abstract class SanitizerEdge extends DataFlow::Node { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** * A third-party controllable input, considered as a flow source for request forgery. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } private class DefaultRequestForgerySink extends Sink { string kind; diff --git a/go/ql/lib/semmle/go/security/SqlInjectionCustomizations.qll b/go/ql/lib/semmle/go/security/SqlInjectionCustomizations.qll index 9d813469ee70..0b2f96a92838 100644 --- a/go/ql/lib/semmle/go/security/SqlInjectionCustomizations.qll +++ b/go/ql/lib/semmle/go/security/SqlInjectionCustomizations.qll @@ -26,12 +26,12 @@ module SqlInjection { abstract class Sanitizer extends DataFlow::Node { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** A source of untrusted data, considered as a taint source for SQL injection. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** An SQL string, considered as a taint sink for SQL injection. */ class SqlQueryAsSink extends Sink instanceof SQL::QueryString { } diff --git a/go/ql/lib/semmle/go/security/TaintedPathCustomizations.qll b/go/ql/lib/semmle/go/security/TaintedPathCustomizations.qll index 31f8b3ad391e..953d9810d532 100644 --- a/go/ql/lib/semmle/go/security/TaintedPathCustomizations.qll +++ b/go/ql/lib/semmle/go/security/TaintedPathCustomizations.qll @@ -45,12 +45,12 @@ module TaintedPath { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** A source of untrusted data, considered as a taint source for path traversal. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** A path expression, considered as a taint sink for path traversal. */ class PathAsSink extends Sink { diff --git a/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll b/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll index 7ee4edb0c726..460c95fe3cd5 100644 --- a/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll +++ b/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll @@ -21,7 +21,7 @@ module UncontrolledAllocationSize { abstract class Sanitizer extends DataFlow::Node { } /** A source of untrusted data, considered as a taint source for uncontrolled size allocation vulnerabilities. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** The size argument of a memory allocation function. */ private class AllocationSizeAsSink extends Sink instanceof AllocationSizeOverflow::AllocationSize { diff --git a/go/ql/lib/semmle/go/security/XPathInjectionCustomizations.qll b/go/ql/lib/semmle/go/security/XPathInjectionCustomizations.qll index 6e99fbf00f54..472ed041ea1c 100644 --- a/go/ql/lib/semmle/go/security/XPathInjectionCustomizations.qll +++ b/go/ql/lib/semmle/go/security/XPathInjectionCustomizations.qll @@ -25,12 +25,12 @@ module XPathInjection { abstract class Sanitizer extends DataFlow::ExprNode { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** A source of untrusted data, used in an XPath expression. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** An XPath expression string, considered as a taint sink for XPath injection. */ class XPathExpressionStringAsSink extends Sink instanceof XPath::XPathExpressionString { } diff --git a/go/ql/src/Security/CWE-640/EmailInjectionCustomizations.qll b/go/ql/src/Security/CWE-640/EmailInjectionCustomizations.qll index ca3609bf2a3d..92ae2bc92095 100644 --- a/go/ql/src/Security/CWE-640/EmailInjectionCustomizations.qll +++ b/go/ql/src/Security/CWE-640/EmailInjectionCustomizations.qll @@ -17,12 +17,12 @@ module EmailInjection { abstract class Sink extends DataFlow::Node { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowSourceAsSource = ThreatModelFlowAsSource; /** A source of untrusted data, considered as a taint source for email injection. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** * A data-flow node that becomes part of an email considered as a taint sink for email injection. diff --git a/go/ql/src/experimental/CWE-090/LDAPInjection.qll b/go/ql/src/experimental/CWE-090/LDAPInjection.qll index a63d7b2e783c..e416b72ed97a 100644 --- a/go/ql/src/experimental/CWE-090/LDAPInjection.qll +++ b/go/ql/src/experimental/CWE-090/LDAPInjection.qll @@ -98,13 +98,15 @@ private class LdapClientDNSink extends LdapSink { /** * DEPRECATED: Use `LdapInjectionFlow` instead. * - * A taint-tracking configuration for reasoning about when a `ThreatModelFlowSource` + * A taint-tracking configuration for reasoning about when a `ActiveThreatModelSource` * flows into an argument or field that is vulnerable to LDAP injection. */ deprecated class LdapInjectionConfiguration extends TaintTracking::Configuration { LdapInjectionConfiguration() { this = "Ldap injection" } - override predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + override predicate isSource(DataFlow::Node source) { + source instanceof ActiveThreatModelSource + } override predicate isSink(DataFlow::Node sink) { sink instanceof LdapSink } @@ -112,7 +114,7 @@ deprecated class LdapInjectionConfiguration extends TaintTracking::Configuration } private module LdapInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof LdapSink } @@ -120,7 +122,7 @@ private module LdapInjectionConfig implements DataFlow::ConfigSig { } /** - * Tracks taint flow for reasoning about when a `ThreatModelFlowSource` flows + * Tracks taint flow for reasoning about when a `ActiveThreatModelSource` flows * into an argument or field that is vulnerable to LDAP injection. */ module LdapInjectionFlow = TaintTracking::Global; diff --git a/go/ql/src/experimental/CWE-203/Timing.ql b/go/ql/src/experimental/CWE-203/Timing.ql index 12f75b74e449..ab0b50a657a9 100644 --- a/go/ql/src/experimental/CWE-203/Timing.ql +++ b/go/ql/src/experimental/CWE-203/Timing.ql @@ -98,7 +98,7 @@ private class SensitiveStringSink extends Sink { module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource and not isBadResult(source) + source instanceof ActiveThreatModelSource and not isBadResult(source) } predicate isSink(DataFlow::Node sink) { sink instanceof Sink and not isBadResult(sink) } diff --git a/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll b/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll index a3016f65372f..7a62041a774a 100644 --- a/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll +++ b/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll @@ -68,7 +68,7 @@ module ImproperLdapAuth { private module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource or source instanceof EmptyString + source instanceof ActiveThreatModelSource or source instanceof EmptyString } predicate isSink(DataFlow::Node sink) { sink instanceof LdapAuthSink } diff --git a/go/ql/src/experimental/CWE-369/DivideByZero.ql b/go/ql/src/experimental/CWE-369/DivideByZero.ql index 956a2d55300f..b6709b97d712 100644 --- a/go/ql/src/experimental/CWE-369/DivideByZero.ql +++ b/go/ql/src/experimental/CWE-369/DivideByZero.ql @@ -28,7 +28,7 @@ predicate divideByZeroSanitizerGuard(DataFlow::Node g, Expr e, boolean branch) { } module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { exists(Function f, DataFlow::CallNode cn | cn = f.getACall() | diff --git a/go/ql/src/experimental/CWE-74/DsnInjection.ql b/go/ql/src/experimental/CWE-74/DsnInjection.ql index 76ce22344b47..2b2ee0a62e4c 100644 --- a/go/ql/src/experimental/CWE-74/DsnInjection.ql +++ b/go/ql/src/experimental/CWE-74/DsnInjection.ql @@ -14,7 +14,7 @@ import DsnInjectionCustomizations import DsnInjectionFlow::PathGraph /** A remote flow source taken as a source for the `DsnInjection` taint-flow configuration. */ -private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } +private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } from DsnInjectionFlow::PathNode source, DsnInjectionFlow::PathNode sink where DsnInjectionFlow::flowPath(source, sink) diff --git a/go/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql b/go/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql index 7918b9694ea5..0aff713f26bc 100644 --- a/go/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql +++ b/go/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql @@ -36,7 +36,7 @@ class PassthroughTypeName extends string { } module UntrustedToPassthroughTypeConversionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } additional predicate isSinkToPassthroughType(DataFlow::TypeCastNode sink, PassthroughTypeName name) { exists(Type typ | @@ -53,7 +53,7 @@ module UntrustedToPassthroughTypeConversionConfig implements DataFlow::ConfigSig } /** - * Tracks taint flow for reasoning about when a `ThreatModelFlowSource` is + * Tracks taint flow for reasoning about when a `ActiveThreatModelSource` is * converted into a special "passthrough" type which will not be escaped by the * template generator; this allows the injection of arbitrary content (html, * css, js) into the generated output of the templates. @@ -109,13 +109,13 @@ predicate isSinkToTemplateExec(DataFlow::Node sink, DataFlow::CallNode call) { } module FromUntrustedToTemplateExecutionCallConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { isSinkToTemplateExec(sink, _) } } /** - * Tracks taint flow from a `ThreatModelFlowSource` into a template executor + * Tracks taint flow from a `ActiveThreatModelSource` into a template executor * call. */ module FromUntrustedToTemplateExecutionCallFlow = diff --git a/go/ql/src/experimental/CWE-807/SensitiveConditionBypass.qll b/go/ql/src/experimental/CWE-807/SensitiveConditionBypass.qll index b0dde22c22c5..0d4bdfb1dd0c 100644 --- a/go/ql/src/experimental/CWE-807/SensitiveConditionBypass.qll +++ b/go/ql/src/experimental/CWE-807/SensitiveConditionBypass.qll @@ -52,7 +52,7 @@ deprecated class Configuration extends TaintTracking::Configuration { Configuration() { this = "Condtional Expression Check Bypass" } override predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource + source instanceof ActiveThreatModelSource or exists(DataFlow::FieldReadNode f | f.getField().hasQualifiedName("net/http", "Request", "Host") @@ -71,7 +71,7 @@ deprecated class Configuration extends TaintTracking::Configuration { private module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource + source instanceof ActiveThreatModelSource or exists(DataFlow::FieldReadNode f | f.getField().hasQualifiedName("net/http", "Request", "Host") diff --git a/go/ql/src/experimental/CWE-840/ConditionalBypass.ql b/go/ql/src/experimental/CWE-840/ConditionalBypass.ql index 3ecb323d04b2..b70be1ff42db 100644 --- a/go/ql/src/experimental/CWE-840/ConditionalBypass.ql +++ b/go/ql/src/experimental/CWE-840/ConditionalBypass.ql @@ -14,7 +14,7 @@ import go module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource + source instanceof ActiveThreatModelSource or source = any(Field f | f.hasQualifiedName("net/http", "Request", "Host")).getARead() } diff --git a/go/ql/src/experimental/CWE-918/SSRF.qll b/go/ql/src/experimental/CWE-918/SSRF.qll index dd5eebc8b10b..42b017ac487d 100644 --- a/go/ql/src/experimental/CWE-918/SSRF.qll +++ b/go/ql/src/experimental/CWE-918/SSRF.qll @@ -87,14 +87,14 @@ module ServerSideRequestForgery { abstract class SanitizerEdge extends DataFlow::Node { } /** - * DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead. + * DEPRECATED: Use `ActiveThreatModelSource` or `Source` instead. */ deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource; /** * An user controlled input, considered as a flow source for request forgery. */ - private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { } + private class ThreatModelFlowAsSource extends Source instanceof ActiveThreatModelSource { } /** * The URL of an HTTP request, viewed as a sink for request forgery. diff --git a/go/ql/src/experimental/CWE-942/CorsMisconfiguration.ql b/go/ql/src/experimental/CWE-942/CorsMisconfiguration.ql index 11dae56fde9d..7a1ff256be1a 100644 --- a/go/ql/src/experimental/CWE-942/CorsMisconfiguration.ql +++ b/go/ql/src/experimental/CWE-942/CorsMisconfiguration.ql @@ -52,7 +52,7 @@ class AllowCredentialsHeaderWrite extends Http::HeaderWrite { } module UntrustedToAllowOriginHeaderConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } additional predicate isSinkHW(DataFlow::Node sink, AllowOriginHeaderWrite hw) { sink = hw.getValue() @@ -70,7 +70,7 @@ module UntrustedToAllowOriginHeaderConfig implements DataFlow::ConfigSig { } module UntrustedToAllowOriginConfigConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } additional predicate isSinkWrite(DataFlow::Node sink, GinCors::AllowOriginsWrite w) { sink = w } @@ -78,13 +78,13 @@ module UntrustedToAllowOriginConfigConfig implements DataFlow::ConfigSig { } /** - * Tracks taint flowfor reasoning about when a `ThreatModelFlowSource` flows to + * Tracks taint flowfor reasoning about when a `ActiveThreatModelSource` flows to * a `HeaderWrite` that writes an `Access-Control-Allow-Origin` header's value. */ module UntrustedToAllowOriginHeaderFlow = TaintTracking::Global; /** - * Tracks taint flowfor reasoning about when a `ThreatModelFlowSource` flows to + * Tracks taint flowfor reasoning about when a `ActiveThreatModelSource` flows to * a `AllowOriginsWrite` that writes an `Access-Control-Allow-Origin` header's value. */ module UntrustedToAllowOriginConfigFlow = TaintTracking::Global; @@ -121,7 +121,7 @@ predicate allowCredentialsIsSetToTrue(DataFlow::ExprNode allowOriginHW) { /** * Holds if the provided `allowOriginHW` HeaderWrite's value is set using an - * ThreatModelFlowSource. + * ActiveThreatModelSource. * The `message` parameter is populated with the warning message to be returned by the query. */ predicate flowsFromUntrustedToAllowOrigin(DataFlow::ExprNode allowOriginHW, string message) { @@ -169,7 +169,7 @@ class MapRead extends DataFlow::ElementReadNode { } module FromUntrustedConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { isSinkCgn(sink, _) } @@ -208,13 +208,13 @@ module FromUntrustedConfig implements DataFlow::ConfigSig { } /** - * Tracks taint flow for reasoning about when a `ThreatModelFlowSource` flows + * Tracks taint flow for reasoning about when a `ActiveThreatModelSource` flows * somewhere. */ module FromUntrustedFlow = TaintTracking::Global; /** - * Holds if the provided `allowOriginHW` is also destination of a `ThreatModelFlowSource`. + * Holds if the provided `allowOriginHW` is also destination of a `ActiveThreatModelSource`. */ predicate flowsToGuardedByCheckOnUntrusted(DataFlow::ExprNode allowOriginHW) { exists(DataFlow::Node sink, ControlFlow::ConditionGuardNode cgn | diff --git a/go/ql/src/experimental/frameworks/DecompressionBombs.qll b/go/ql/src/experimental/frameworks/DecompressionBombs.qll index 90df91245bf0..5828cd60e523 100644 --- a/go/ql/src/experimental/frameworks/DecompressionBombs.qll +++ b/go/ql/src/experimental/frameworks/DecompressionBombs.qll @@ -29,7 +29,7 @@ module DecompressionBomb { class FlowState = DecompressionBombs::FlowState; predicate isSource(DataFlow::Node source, FlowState state) { - source instanceof ThreatModelFlowSource and + source instanceof ActiveThreatModelSource and state = "" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/Test.qll b/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/Test.qll index 856c748af7fe..794793a6a0a3 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/Test.qll +++ b/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/Test.qll @@ -4,7 +4,7 @@ private import semmle.go.dataflow.ExternalFlow private import semmle.go.dataflow.DataFlow private module ThreatModelConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink = any(DataFlow::CallNode c | c.getTarget().getName() = "sink").getAnArgument() diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql index db6bbb1a2d16..eb7ba46508e7 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql @@ -6,7 +6,7 @@ module SourceTest implements TestSig { string getARelevantTag() { result = "source" } predicate hasActualResult(Location location, string element, string tag, string value) { - exists(ThreatModelFlowSource s | + exists(ActiveThreatModelSource s | s.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and element = s.toString() and diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql index db6bbb1a2d16..eb7ba46508e7 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql @@ -6,7 +6,7 @@ module SourceTest implements TestSig { string getARelevantTag() { result = "source" } predicate hasActualResult(Location location, string element, string tag, string value) { - exists(ThreatModelFlowSource s | + exists(ActiveThreatModelSource s | s.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and element = s.toString() and diff --git a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll index bd3ae459a97a..77af39967c69 100644 --- a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll +++ b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll @@ -202,7 +202,7 @@ abstract class LocalUserInput extends UserInput { /** * DEPRECATED: Use the threat models feature. - * That is, use `ThreatModelFlowSource` as the class of nodes for sources + * That is, use `ActiveThreatModelSource` as the class of nodes for sources * and set up the threat model configuration to filter source nodes. * Alternatively, use `getThreatModel` to filter nodes to create the * class of nodes you need. @@ -273,7 +273,7 @@ private class FileInput extends LocalUserInput { /** * DEPRECATED: Use the threat models feature. - * That is, use `ThreatModelFlowSource` as the class of nodes for sources + * That is, use `ActiveThreatModelSource` as the class of nodes for sources * and set up the threat model configuration to filter source nodes. * Alternatively, use `getThreatModel` to filter nodes to create the * class of nodes you need. diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll b/java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll index 47db4f825c47..4984b8b050fd 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll @@ -640,7 +640,7 @@ private MethodCall callReturningSameType(Expr ref) { } private SrcRefType entrypointType() { - exists(ThreatModelFlowSource s, RefType t | + exists(ActiveThreatModelSource s, RefType t | s instanceof DataFlow::ExplicitParameterNode and t = pragma[only_bind_out](s).getType() and not t instanceof TypeObject and diff --git a/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll b/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll index b179a4f92e07..5e9a38f4fb0e 100644 --- a/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll @@ -9,7 +9,7 @@ import semmle.code.java.security.AndroidIntentRedirection /** A taint tracking configuration for tainted Intents being used to start Android components. */ module IntentRedirectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof IntentRedirectionSink } @@ -36,7 +36,7 @@ private class OriginalIntentSanitizer extends IntentRedirectionSanitizer { * flowing directly to sinks that start Android components. */ private module SameIntentBeingRelaunchedConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof IntentRedirectionSink } @@ -72,7 +72,7 @@ private class IntentWithTaintedComponent extends DataFlow::Node { * A taint tracking configuration for tainted data flowing to an `Intent`'s component. */ private module TaintedIntentComponentConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { any(IntentSetComponent setComponent).getSink() = sink.asExpr() diff --git a/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallation.qll b/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallation.qll index d7c5fe94f28a..0402aca69872 100644 --- a/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallation.qll +++ b/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallation.qll @@ -75,7 +75,7 @@ class ExternalApkSource extends ApiSourceNode { sourceNode(this, "android-external-storage-dir") or this.asExpr().(MethodCall).getMethod() instanceof UriConstructorMethod or this.asExpr().(StringLiteral).getValue().matches("file://%") or - this instanceof ThreatModelFlowSource + this instanceof ActiveThreatModelSource } } diff --git a/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll b/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll index 7d58de46a67f..51d6c284e1ca 100644 --- a/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll @@ -6,7 +6,7 @@ private import semmle.code.java.security.ArithmeticCommon /** A taint-tracking configuration to reason about overflow from unvalidated input. */ module ArithmeticOverflowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { overflowSink(_, sink.asExpr()) } @@ -22,7 +22,7 @@ deprecated module RemoteUserInputOverflowConfig = ArithmeticOverflowConfig; /** A taint-tracking configuration to reason about underflow from unvalidated input. */ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { underflowSink(_, sink.asExpr()) } diff --git a/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll b/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll index 692bdfc1a708..af5476f8b3df 100644 --- a/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll +++ b/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll @@ -49,7 +49,7 @@ private class DefaultCommandInjectionSanitizer extends CommandInjectionSanitizer * A taint-tracking configuration for unvalidated user input that is used to run an external process. */ module InputToArgumentToExecFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll b/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll index 96d3c5a528c3..03ba8d461979 100644 --- a/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll @@ -40,7 +40,7 @@ private predicate endsWithStep(DataFlow::Node node1, DataFlow::Node node2) { * A taint tracking configuration for untrusted data flowing to sensitive conditions. */ module ConditionalBypassFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { conditionControlsMethod(_, sink.asExpr()) } diff --git a/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll b/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll index 6838555179a6..360493e26356 100644 --- a/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll +++ b/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll @@ -93,10 +93,10 @@ class ExternalApiDataNode extends DataFlow::Node { } /** - * Taint tracking configuration for flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. + * Taint tracking configuration for flow from `ActiveThreatModelSource`s to `ExternalApiDataNode`s. */ module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } } diff --git a/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll b/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll index 606e31a07cb7..e9e6299cc05c 100644 --- a/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll @@ -16,7 +16,7 @@ private class StringFormatSink extends ApiSinkNode { * A taint-tracking configuration for externally controlled format string vulnerabilities. */ module ExternallyControlledFormatStringConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof StringFormatSink } diff --git a/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll index f625807470df..7b4b87a5eb2e 100644 --- a/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll @@ -10,7 +10,7 @@ import semmle.code.java.security.FragmentInjection * that is used to create Android fragments dynamically. */ module FragmentInjectionTaintConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof FragmentInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll index 3af836cac97a..b169542d01e8 100644 --- a/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll @@ -10,7 +10,7 @@ import semmle.code.java.security.GroovyInjection * that is used to evaluate a Groovy expression. */ module GroovyInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof GroovyInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionQuery.qll b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionQuery.qll index 8bef1ec36501..2af9396a119e 100644 --- a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionQuery.qll @@ -9,7 +9,7 @@ private import semmle.code.java.dataflow.FlowSources * user-provided size used for array construction. */ module ImproperValidationOfArrayConstructionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { any(CheckableArrayAccess caa).canThrowOutOfBoundsDueToEmptyArray(sink.asExpr(), _) diff --git a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexQuery.qll b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexQuery.qll index 440600b8a7ca..6d11962f2f45 100644 --- a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexQuery.qll @@ -9,7 +9,7 @@ private import semmle.code.java.dataflow.FlowSources * of user-provided array index. */ module ImproperValidationOfArrayIndexConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { any(CheckableArrayAccess caa).canThrowOutOfBounds(sink.asExpr()) diff --git a/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll index 1ad0677ca615..e601de7b9b59 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll @@ -46,7 +46,7 @@ class SetMessageInterpolatorCall extends MethodCall { * to the argument of a method that builds constraint error messages. */ module BeanValidationConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof BeanValidationSink } } diff --git a/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll b/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll index 740ce24bf62b..6426be2fecd8 100644 --- a/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll @@ -12,7 +12,7 @@ private import IntentUriPermissionManipulation * A taint tracking configuration for user-provided Intents being returned to third party apps. */ module IntentUriPermissionManipulationConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof IntentUriPermissionManipulationSink } diff --git a/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll index de49560e7792..82b8233b674e 100644 --- a/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll @@ -44,7 +44,7 @@ private class DefaultJexlInjectionAdditionalTaintStep extends JexlInjectionAddit * It supports both JEXL 2 and 3. */ module JexlInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof JexlEvaluationSink } diff --git a/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll index 3c1f4b8e68eb..01fc9b9908a3 100644 --- a/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll @@ -11,7 +11,7 @@ private import semmle.code.java.security.Sanitizers * A taint-tracking configuration for unvalidated user input that is used in JNDI lookup. */ module JndiInjectionFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof JndiInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll index 5c055c005167..2e2e6976fd33 100644 --- a/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll @@ -8,7 +8,7 @@ import semmle.code.java.security.LdapInjection * A taint-tracking configuration for unvalidated user input that is used to construct LDAP queries. */ module LdapInjectionFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof LdapInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll index cebc807cc472..64d59993b3da 100644 --- a/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll @@ -8,7 +8,7 @@ import semmle.code.java.security.LogInjection * A taint-tracking configuration for tracking untrusted user input used in log entries. */ module LogInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof LogInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll index 4bf81804f827..b2447d73548e 100644 --- a/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll @@ -10,7 +10,7 @@ import semmle.code.java.security.MvelInjection * that is used to construct and evaluate a MVEL expression. */ module MvelInjectionFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof MvelEvaluationSink } diff --git a/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll b/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll index b6bd505c38b8..c6ee02b55b5b 100644 --- a/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll +++ b/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll @@ -85,7 +85,7 @@ private predicate smallExpr(Expr e) { * numeric cast. */ module NumericCastFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(NumericNarrowingCastExpr cast).getExpr() and diff --git a/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll index 3acf18c453ce..5f3a56cf2749 100644 --- a/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll @@ -9,7 +9,7 @@ private import semmle.code.java.security.Sanitizers * A taint-tracking configuration for unvalidated user input that is used in OGNL EL evaluation. */ module OgnlInjectionFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof OgnlInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll b/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll index c4c3e6b093cb..8f7a27461c24 100644 --- a/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll @@ -12,7 +12,7 @@ import semmle.code.java.dataflow.FlowSources * and remains vulnerable to Partial Path Traversal. */ module PartialPathTraversalFromRemoteConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node node) { node instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node node) { node instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node node) { any(PartialPathTraversalMethodCall ma).getQualifier() = node.asExpr() diff --git a/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll b/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll index e8415cc19786..79cf15eaa822 100644 --- a/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll +++ b/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll @@ -12,7 +12,7 @@ import semmle.code.java.security.RequestForgery */ module RequestForgeryConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource and + source instanceof ActiveThreatModelSource and // Exclude results of remote HTTP requests: fetching something else based on that result // is no worse than following a redirect returned by the remote server, and typically // we're requesting a resource via https which we trust to only send us to safe URLs. diff --git a/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll b/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll index 40e1ec1b4dbb..36d8e83d66cf 100644 --- a/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll @@ -10,7 +10,7 @@ import semmle.code.java.security.ResponseSplitting */ module ResponseSplittingConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource and + source instanceof ActiveThreatModelSource and not source instanceof SafeHeaderSplittingSource } diff --git a/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll b/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll index e22dcef12113..f3a07480cf06 100644 --- a/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll @@ -19,7 +19,7 @@ private class ResultReceiverSendCall extends MethodCall { } private module UntrustedResultReceiverConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node node) { node instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node node) { node instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node node) { node.asExpr() = any(ResultReceiverSendCall c).getReceiver() diff --git a/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll index 848aae8da30a..3d33e3044100 100644 --- a/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll @@ -11,7 +11,7 @@ private import semmle.code.java.security.SpelInjection * that is used to construct and evaluate a SpEL expression. */ module SpelInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof SpelExpressionEvaluationSink } diff --git a/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll index c4638538a635..0aaf46cf2dd5 100644 --- a/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll @@ -15,7 +15,7 @@ import semmle.code.java.security.QueryInjection * A taint-tracking configuration for unvalidated user input that is used in SQL queries. */ module QueryInjectionFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof QueryInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/TaintedEnvironmentVariableQuery.qll b/java/ql/lib/semmle/code/java/security/TaintedEnvironmentVariableQuery.qll index beb0921fc47e..597c05b04541 100644 --- a/java/ql/lib/semmle/code/java/security/TaintedEnvironmentVariableQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TaintedEnvironmentVariableQuery.qll @@ -26,7 +26,7 @@ abstract class ExecTaintedEnvironmentSanitizer extends DataFlow::Node { } * A taint-tracking configuration that tracks flow from unvalidated data to an environment variable for a subprocess. */ module ExecTaintedEnvironmentConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isBarrier(DataFlow::Node barrier) { barrier instanceof ExecTaintedEnvironmentSanitizer } diff --git a/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll b/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll index c396b48a7b88..919d8a72d425 100644 --- a/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll @@ -60,7 +60,7 @@ private class TaintPreservingUriCtorParam extends Parameter { * A taint-tracking configuration for tracking flow from remote sources to the creation of a path. */ module TaintedPathConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof TaintedPathSink } diff --git a/java/ql/lib/semmle/code/java/security/TaintedPermissionsCheckQuery.qll b/java/ql/lib/semmle/code/java/security/TaintedPermissionsCheckQuery.qll index 132e8a3fadf2..eb5b589a98ba 100644 --- a/java/ql/lib/semmle/code/java/security/TaintedPermissionsCheckQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TaintedPermissionsCheckQuery.qll @@ -54,7 +54,7 @@ private class WildCardPermissionConstruction extends ClassInstanceExpr, Permissi * A configuration for tracking flow from user input to a permissions check. */ module TaintedPermissionsCheckFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(PermissionsConstruction p).getInput() diff --git a/java/ql/lib/semmle/code/java/security/TemplateInjection.qll b/java/ql/lib/semmle/code/java/security/TemplateInjection.qll index f2cc980a0d81..a74f4db8030a 100644 --- a/java/ql/lib/semmle/code/java/security/TemplateInjection.qll +++ b/java/ql/lib/semmle/code/java/security/TemplateInjection.qll @@ -83,7 +83,7 @@ abstract deprecated class TemplateInjectionSanitizerWithState extends DataFlow:: abstract deprecated predicate hasState(DataFlow::FlowState state); } -private class DefaultTemplateInjectionSource extends TemplateInjectionSource instanceof ThreatModelFlowSource +private class DefaultTemplateInjectionSource extends TemplateInjectionSource instanceof ActiveThreatModelSource { } private class DefaultTemplateInjectionSink extends TemplateInjectionSink { diff --git a/java/ql/lib/semmle/code/java/security/TrustBoundaryViolationQuery.qll b/java/ql/lib/semmle/code/java/security/TrustBoundaryViolationQuery.qll index b93b3f0ca1a9..f70542486dee 100644 --- a/java/ql/lib/semmle/code/java/security/TrustBoundaryViolationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TrustBoundaryViolationQuery.qll @@ -13,7 +13,7 @@ private import semmle.code.java.security.Sanitizers */ abstract class TrustBoundaryViolationSource extends DataFlow::Node { } -private class ThreatModelSource extends TrustBoundaryViolationSource instanceof ThreatModelFlowSource +private class ThreatModelSource extends TrustBoundaryViolationSource instanceof ActiveThreatModelSource { } /** diff --git a/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll index 3239b387d8e0..1c9d2809eba7 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll @@ -10,7 +10,7 @@ import semmle.code.java.security.UnsafeAndroidAccess * A taint configuration tracking flow from untrusted inputs to a resource fetching call. */ module FetchUntrustedResourceConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UrlResourceSink } diff --git a/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll index db629143d5ce..be47bbd0e82f 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll @@ -9,7 +9,7 @@ import semmle.code.java.security.UnsafeContentUriResolution * A taint-tracking configuration to find paths from remote sources to content URI resolutions. */ module UnsafeContentResolutionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof ContentUriResolutionSink } diff --git a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll index 739b2713780b..725724500b37 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll @@ -316,7 +316,7 @@ private predicate isUnsafeDeserializationTaintStep(DataFlow::Node pred, DataFlow /** Tracks flows from remote user input to a deserialization sink. */ private module UnsafeDeserializationConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UnsafeDeserializationSink } @@ -416,7 +416,7 @@ private predicate isUnsafeTypeAdditionalTaintStep(DataFlow::Node fromNode, DataF * If this is user-controlled, arbitrary code could be executed while instantiating the user-specified type. */ module UnsafeTypeConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UnsafeTypeSink } diff --git a/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll b/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll index 2ca38d695512..00cc229f9cf7 100644 --- a/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll @@ -178,7 +178,7 @@ private class FullyDecodesUrlBarrier extends DataFlow::Node { */ module UrlForwardFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource and + source instanceof ActiveThreatModelSource and // excluded due to FPs not exists(MethodCall mc, Method m | m instanceof HttpServletRequestGetRequestUriMethod or diff --git a/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll b/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll index 675937985c48..abf96ea9ab2d 100644 --- a/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll @@ -8,7 +8,7 @@ private import semmle.code.java.security.UrlRedirect * A taint-tracking configuration for reasoning about URL redirections. */ module UrlRedirectConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UrlRedirectSink } diff --git a/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll index 38dc1ff993c4..639ff9fca09b 100644 --- a/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll @@ -9,7 +9,7 @@ private import semmle.code.java.security.XPath * A taint-tracking configuration for reasoning about XPath injection vulnerabilities. */ module XPathInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof XPathInjectionSink } } diff --git a/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll index d437ca860d5f..59f92072e253 100644 --- a/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll @@ -11,7 +11,7 @@ private import semmle.code.java.security.Sanitizers * A taint-tracking configuration for unvalidated user input that is used in XSLT transformation. */ module XsltInjectionFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof XsltInjectionSink } diff --git a/java/ql/lib/semmle/code/java/security/XssQuery.qll b/java/ql/lib/semmle/code/java/security/XssQuery.qll index 6fec86a78dd6..b609c7faa08b 100644 --- a/java/ql/lib/semmle/code/java/security/XssQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XssQuery.qll @@ -9,7 +9,7 @@ import semmle.code.java.security.XSS * A taint-tracking configuration for cross site scripting vulnerabilities. */ module XssConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof XssSink } diff --git a/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll b/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll index 58b1e5bfed1a..9522ba3692a7 100644 --- a/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll @@ -9,7 +9,7 @@ private import semmle.code.java.security.XxeQuery * A taint-tracking configuration for unvalidated remote user input that is used in XML external entity expansion. */ module XxeConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof XxeSink } diff --git a/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll b/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll index 55c1a043230a..ba65e13dd611 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll @@ -35,7 +35,7 @@ private class LengthRestrictedMethod extends Method { /** A configuration for Polynomial ReDoS queries. */ module PolynomialRedosConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(SuperlinearBackTracking::PolynomialBackTrackingTerm regexp | diff --git a/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll index 887100618196..a41ee0161f73 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll @@ -9,7 +9,7 @@ import semmle.code.java.security.regexp.RegexInjection * A taint-tracking configuration for untrusted user input used to construct regular expressions. */ module RegexInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof RegexInjectionSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-020/Log4jJndiInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-020/Log4jJndiInjection.ql index 442c45f4328b..b729aceffeec 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-020/Log4jJndiInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-020/Log4jJndiInjection.ql @@ -40,7 +40,7 @@ class Log4jInjectionSanitizer extends DataFlow::Node instanceof SimpleTypeSaniti * A taint-tracking configuration for tracking untrusted user input used in log entries. */ module Log4jInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof Log4jInjectionSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql b/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql index 4b71c297c230..19ce02635605 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql @@ -33,7 +33,7 @@ class UrlConstructor extends ClassInstanceExpr { } module RemoteUrlToOpenStreamFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall m | diff --git a/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.ql index 6fab554ac672..1c50f8304fc9 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.ql @@ -50,7 +50,7 @@ class NormalizedPathNode extends DataFlow::Node { } module InjectFilePathConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof TaintedPathSink and diff --git a/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.ql b/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.ql index 88733773de12..60a28d2b252a 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.ql @@ -14,7 +14,7 @@ import CommandInjectionRuntimeExec import ExecUserFlow::PathGraph -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } from ExecUserFlow::PathNode source, ExecUserFlow::PathNode sink, DataFlow::Node sourceCmd, diff --git a/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisAnnotationSqlInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisAnnotationSqlInjection.ql index e57795431257..a67d0e06f161 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisAnnotationSqlInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisAnnotationSqlInjection.ql @@ -21,7 +21,7 @@ private import semmle.code.java.security.Sanitizers import MyBatisAnnotationSqlInjectionFlow::PathGraph private module MyBatisAnnotationSqlInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof MyBatisAnnotatedMethodCallArgument } diff --git a/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisMapperXmlSqlInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisMapperXmlSqlInjection.ql index 32cd2904dcee..7597f0f67a57 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisMapperXmlSqlInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-089/MyBatisMapperXmlSqlInjection.ql @@ -21,7 +21,7 @@ private import semmle.code.java.security.Sanitizers import MyBatisMapperXmlSqlInjectionFlow::PathGraph private module MyBatisMapperXmlSqlInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof MyBatisMapperMethodCallAnArgument } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql index d1d5ee936915..75ef4e6fec27 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql @@ -18,7 +18,7 @@ import semmle.code.java.dataflow.TaintTracking import BeanShellInjectionFlow::PathGraph module BeanShellInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof BeanShellInjectionSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql index 88eebc1ab7fe..500c6dabca9c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql @@ -18,7 +18,7 @@ import semmle.code.java.dataflow.TaintTracking import JShellInjectionFlow::PathGraph module JShellInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof JShellInjectionSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index cd5d50338b9c..85a1dd11dad0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -8,7 +8,7 @@ import semmle.code.java.dataflow.TaintTracking * that is used to construct and evaluate an expression. */ module JakartaExpressionInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof ExpressionEvaluationSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JythonInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JythonInjection.ql index 1dfadce60916..cc919385ba4c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JythonInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JythonInjection.ql @@ -99,17 +99,17 @@ class CodeInjectionSink extends DataFlow::ExprNode { } /** - * A taint configuration for tracking flow from `ThreatModelFlowSource` to a Jython method call + * A taint configuration for tracking flow from `ActiveThreatModelSource` to a Jython method call * `CodeInjectionSink` that executes injected code. */ module CodeInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof CodeInjectionSink } } /** - * Taint tracking flow from `ThreatModelFlowSource` to a Jython method call + * Taint tracking flow from `ActiveThreatModelSource` to a Jython method call * `CodeInjectionSink` that executes injected code. */ module CodeInjectionFlow = TaintTracking::Global; diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/ScriptInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/ScriptInjection.ql index 0792d8e498ae..6f8f7ec1cb37 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/ScriptInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/ScriptInjection.ql @@ -131,11 +131,11 @@ class ScriptInjectionSink extends DataFlow::ExprNode { } /** - * A taint tracking configuration that tracks flow from `ThreatModelFlowSource` to an argument + * A taint tracking configuration that tracks flow from `ActiveThreatModelSource` to an argument * of a method call that executes injected script. */ module ScriptInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof ScriptInjectionSink } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/SpringViewManipulationLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/SpringViewManipulationLib.qll index 310aafb30f5e..256947a2dc79 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/SpringViewManipulationLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/SpringViewManipulationLib.qll @@ -42,7 +42,7 @@ class PortletRenderRequestMethod extends Method { */ module SpringViewManipulationConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource or + source instanceof ActiveThreatModelSource or source instanceof WebRequestSource or source.asExpr().(MethodCall).getMethod() instanceof PortletRenderRequestMethod } diff --git a/java/ql/src/experimental/Security/CWE/CWE-200/InsecureWebResourceResponse.ql b/java/ql/src/experimental/Security/CWE/CWE-200/InsecureWebResourceResponse.ql index f32c1682c291..1a5a97a8691a 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-200/InsecureWebResourceResponse.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-200/InsecureWebResourceResponse.ql @@ -19,7 +19,7 @@ import AndroidWebResourceResponse import InsecureWebResourceResponseFlow::PathGraph module InsecureWebResourceResponseConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof WebResourceResponseSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-208/NonConstantTimeCheckOnSignatureQuery.qll b/java/ql/src/experimental/Security/CWE/CWE-208/NonConstantTimeCheckOnSignatureQuery.qll index e865e18ecaa6..8e545a5e8f04 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-208/NonConstantTimeCheckOnSignatureQuery.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-208/NonConstantTimeCheckOnSignatureQuery.qll @@ -148,7 +148,7 @@ private predicate updateMessageDigestStep(DataFlow2::Node fromNode, DataFlow2::N * such as cipher, MAC or signature. */ private module UserInputInCryptoOperationConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(ProduceCryptoCall call | call.getQualifier() = sink.asExpr()) @@ -214,7 +214,7 @@ private class NonConstantTimeComparisonCall extends StaticMethodCall { * that compare inputs using a non-constant-time algorithm. */ private module UserInputInComparisonConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(NonConstantTimeEqualsCall call | diff --git a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql index 9d47e177a271..3c450d4e04c1 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql @@ -63,7 +63,7 @@ module CorsSourceReachesCheckConfig implements DataFlow::ConfigSig { module CorsSourceReachesCheckFlow = TaintTracking::Global; private module CorsOriginConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall corsHeader, MethodCall allowCredentialsHeader | diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index 647175797be7..ce5ba05b6196 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -22,7 +22,7 @@ import RequestResponseFlow::PathGraph /** Taint-tracking configuration tracing flow from get method request sources to output jsonp data. */ module RequestResponseFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof ThreatModelFlowSource and + source instanceof ActiveThreatModelSource and any(RequestGetMethod m).polyCalls*(source.getEnclosingCallable()) } diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 65a75392ef45..b0d2897ea54e 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -79,7 +79,7 @@ class JsonpBuilderExpr extends AddExpr { /** A data flow configuration tracing flow from threat model sources to jsonp function name. */ module ThreatModelFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(JsonpBuilderExpr jhe | jhe.getFunctionName() = sink.asExpr()) diff --git a/java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.ql b/java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.ql index 7cfd1f2ef9cd..44af710990cf 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.ql @@ -17,7 +17,7 @@ import ThreadResourceAbuseFlow::PathGraph /** Taint configuration of uncontrolled thread resource consumption. */ module ThreadResourceAbuseConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof PauseThreadSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.ql b/java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.ql index a525e2c80672..f18355b1d976 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.ql @@ -32,7 +32,7 @@ private predicate equalsSanitizer(Guard g, Expr e, boolean branch) { } module UnsafeReflectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UnsafeReflectionSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-600/UncaughtServletException.ql b/java/ql/src/experimental/Security/CWE/CWE-600/UncaughtServletException.ql index ea162cf6d287..c318bd300f5b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-600/UncaughtServletException.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-600/UncaughtServletException.ql @@ -65,9 +65,9 @@ class UncaughtServletExceptionSink extends DataFlow::ExprNode { } } -/** Taint configuration of uncaught exceptions caused by user provided data from `ThreatModelFlowSource` */ +/** Taint configuration of uncaught exceptions caused by user provided data from `ActiveThreatModelSource` */ module UncaughtServletExceptionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UncaughtServletExceptionSink } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-601/SpringUrlRedirect.ql b/java/ql/src/experimental/Security/CWE/CWE-601/SpringUrlRedirect.ql index 9ab24bdb659c..8b300a082884 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-601/SpringUrlRedirect.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-601/SpringUrlRedirect.ql @@ -26,7 +26,7 @@ private predicate startsWithSanitizer(Guard g, Expr e, boolean branch) { } module SpringUrlRedirectFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof SpringUrlRedirectSink } diff --git a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql index f7a8c335f1a9..a758b86279d6 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql @@ -20,7 +20,7 @@ import XQueryInjectionFlow::PathGraph * A taint-tracking configuration tracing flow from remote sources, through an XQuery parser, to its eventual execution. */ module XQueryInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(XQueryPreparedExecuteCall xpec).getPreparedExpression() or diff --git a/java/ql/src/experimental/Security/CWE/CWE-755/NFEAndroidDoS.ql b/java/ql/src/experimental/Security/CWE/CWE-755/NFEAndroidDoS.ql index f2c31e566b8c..c6737a11c323 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-755/NFEAndroidDoS.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-755/NFEAndroidDoS.ql @@ -24,7 +24,7 @@ import NfeLocalDoSFlow::PathGraph */ module NfeLocalDoSConfig implements DataFlow::ConfigSig { /** Holds if source is a remote flow source */ - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } /** Holds if NFE is thrown but not caught */ predicate isSink(DataFlow::Node sink) { diff --git a/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql b/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql index 73dc7d8b30a0..9ef1e3867d2d 100644 --- a/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql +++ b/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql @@ -9,7 +9,7 @@ class TestRemoteFlowSource extends RemoteFlowSource { } module TaintFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node n) { n instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node n) { exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) diff --git a/java/ql/test/library-tests/dataflow/threat-models/Test.qll b/java/ql/test/library-tests/dataflow/threat-models/Test.qll index a0d85680270c..742cea3dda6c 100644 --- a/java/ql/test/library-tests/dataflow/threat-models/Test.qll +++ b/java/ql/test/library-tests/dataflow/threat-models/Test.qll @@ -5,7 +5,7 @@ private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.dataflow.TaintTracking private module ThreatModelConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sinkNode(sink, _) } } diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql index d7d94430486f..348956f24982 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql @@ -7,7 +7,7 @@ module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { DefaultFlowConfig::isSource(node) or - node instanceof ThreatModelFlowSource + node instanceof ActiveThreatModelSource } predicate isSink = DefaultFlowConfig::isSink/1; diff --git a/java/ql/test/library-tests/frameworks/android/content-provider/test.ql b/java/ql/test/library-tests/frameworks/android/content-provider/test.ql index 8293f7f4ff4c..b83f43911bd3 100644 --- a/java/ql/test/library-tests/frameworks/android/content-provider/test.ql +++ b/java/ql/test/library-tests/frameworks/android/content-provider/test.ql @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.FlowSources import TestUtilities.InlineFlowTest module ProviderTaintFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node n) { n instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node n) { DefaultFlowConfig::isSink(n) } diff --git a/java/ql/test/library-tests/frameworks/android/external-storage/test.ql b/java/ql/test/library-tests/frameworks/android/external-storage/test.ql index 89a353eedc91..042f7b303900 100644 --- a/java/ql/test/library-tests/frameworks/android/external-storage/test.ql +++ b/java/ql/test/library-tests/frameworks/android/external-storage/test.ql @@ -4,7 +4,7 @@ import semmle.code.java.dataflow.FlowSources import TestUtilities.InlineFlowTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink.asExpr().(Argument).getCall().getCallee().hasName("sink") diff --git a/java/ql/test/library-tests/frameworks/android/slice/test.ql b/java/ql/test/library-tests/frameworks/android/slice/test.ql index 8540c0604a88..a8b467d1ba0b 100644 --- a/java/ql/test/library-tests/frameworks/android/slice/test.ql +++ b/java/ql/test/library-tests/frameworks/android/slice/test.ql @@ -5,7 +5,7 @@ import semmle.code.java.dataflow.FlowSources module SliceValueFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - DefaultFlowConfig::isSource(source) or source instanceof ThreatModelFlowSource + DefaultFlowConfig::isSource(source) or source instanceof ActiveThreatModelSource } predicate isSink = DefaultFlowConfig::isSink/1; diff --git a/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql b/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql index 9b067cd00dde..96d9523b2a5c 100644 --- a/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql +++ b/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.FlowSources import TestUtilities.InlineFlowTest module SourceValueFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { DefaultFlowConfig::isSink(sink) } diff --git a/java/ql/test/library-tests/frameworks/apache-http/flow.ql b/java/ql/test/library-tests/frameworks/apache-http/flow.ql index 2ca4eeafdb3d..b2f5b2d023b2 100644 --- a/java/ql/test/library-tests/frameworks/apache-http/flow.ql +++ b/java/ql/test/library-tests/frameworks/apache-http/flow.ql @@ -9,7 +9,7 @@ module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") or - n instanceof ThreatModelFlowSource + n instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node n) { diff --git a/java/ql/test/library-tests/frameworks/guice/flow.ql b/java/ql/test/library-tests/frameworks/guice/flow.ql index 37a478bc3a72..629341a03838 100644 --- a/java/ql/test/library-tests/frameworks/guice/flow.ql +++ b/java/ql/test/library-tests/frameworks/guice/flow.ql @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall ma | diff --git a/java/ql/test/library-tests/frameworks/jms/FlowTest.ql b/java/ql/test/library-tests/frameworks/jms/FlowTest.ql index b203bc936821..b63aedbf9845 100644 --- a/java/ql/test/library-tests/frameworks/jms/FlowTest.ql +++ b/java/ql/test/library-tests/frameworks/jms/FlowTest.ql @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.FlowSources import TestUtilities.InlineExpectationsTest module TestConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall call | diff --git a/java/ql/test/library-tests/frameworks/netty/manual/test.ql b/java/ql/test/library-tests/frameworks/netty/manual/test.ql index 70da9eb5f0f4..a4142390e85a 100644 --- a/java/ql/test/library-tests/frameworks/netty/manual/test.ql +++ b/java/ql/test/library-tests/frameworks/netty/manual/test.ql @@ -7,7 +7,7 @@ module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { DefaultFlowConfig::isSource(node) or - node instanceof ThreatModelFlowSource + node instanceof ActiveThreatModelSource } predicate isSink = DefaultFlowConfig::isSink/1; diff --git a/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql b/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql index 2f3cf27cf7a2..0fdb21094387 100644 --- a/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql +++ b/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql @@ -4,7 +4,7 @@ import semmle.code.java.dataflow.FlowSources import TestUtilities.InlineFlowTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node node) { node instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node node) { node instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node node) { exists(MethodCall ma | ma.getMethod().hasName("sink") | node.asExpr() = ma.getAnArgument()) diff --git a/java/ql/test/library-tests/frameworks/ratpack/flow.ql b/java/ql/test/library-tests/frameworks/ratpack/flow.ql index ed8d3d23937a..2d5b5b2e4716 100644 --- a/java/ql/test/library-tests/frameworks/ratpack/flow.ql +++ b/java/ql/test/library-tests/frameworks/ratpack/flow.ql @@ -7,7 +7,7 @@ module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") or - n instanceof ThreatModelFlowSource + n instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node n) { diff --git a/java/ql/test/library-tests/frameworks/spring/controller/test.ql b/java/ql/test/library-tests/frameworks/spring/controller/test.ql index d8f6b13e8702..e85137dcd57a 100644 --- a/java/ql/test/library-tests/frameworks/spring/controller/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/controller/test.ql @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.FlowSources import TestUtilities.InlineFlowTest module ValueFlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink.asExpr().(Argument).getCall().getCallee().hasName("sink") From 66b61ee25a465f736fe404f165f6e3a60e0fdbd7 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 10 Sep 2024 14:58:54 +0200 Subject: [PATCH 029/162] Go/Java/C#: Add change-note --- .../ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md | 4 ++++ go/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md | 4 ++++ .../ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 csharp/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md create mode 100644 go/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md create mode 100644 java/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md diff --git a/csharp/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md b/csharp/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md new file mode 100644 index 000000000000..a51e3e1deaf0 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md @@ -0,0 +1,4 @@ +--- +category: deprecated +--- +* The class `ThreatModelFlowSource` has been renamed to `ActiveThreatModelSource` to more clearly reflect it only contains the currently active threat model sources. `ThreatModelFlowSource` has been marked as deprecated. diff --git a/go/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md b/go/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md new file mode 100644 index 000000000000..a51e3e1deaf0 --- /dev/null +++ b/go/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md @@ -0,0 +1,4 @@ +--- +category: deprecated +--- +* The class `ThreatModelFlowSource` has been renamed to `ActiveThreatModelSource` to more clearly reflect it only contains the currently active threat model sources. `ThreatModelFlowSource` has been marked as deprecated. diff --git a/java/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md b/java/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md new file mode 100644 index 000000000000..a51e3e1deaf0 --- /dev/null +++ b/java/ql/lib/change-notes/2024-09-10-ActiveThreatModelSource.md @@ -0,0 +1,4 @@ +--- +category: deprecated +--- +* The class `ThreatModelFlowSource` has been renamed to `ActiveThreatModelSource` to more clearly reflect it only contains the currently active threat model sources. `ThreatModelFlowSource` has been marked as deprecated. From 831d522025fbe32c11ec59e6c4ede4e11edb8ce6 Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Thu, 12 Sep 2024 20:49:10 -0700 Subject: [PATCH 030/162] First round feedback --- python/ql/lib/semmle/python/Concepts.qll | 14 ++++---- .../lib/semmle/python/frameworks/FastApi.qll | 8 ++--- .../semmle/python/frameworks/Starlette.qll | 36 ++++--------------- .../CorsMisconfigurationMiddleware.qhelp | 4 +-- .../CWE-942/CorsMisconfigurationMiddleware.ql | 14 ++++---- 5 files changed, 26 insertions(+), 50 deletions(-) diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index d981f82c1bcd..cd8f888eb546 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -1422,18 +1422,18 @@ module Http { /** * Gets the string corresponding to the middleware */ - string middleware_name() { result = super.middleware_name() } + string getMiddlewareName() { result = super.getMiddlewareName() } /** * Gets the dataflow node corresponding to the allowed CORS origins */ - DataFlow::Node allowed_origins() { result = super.allowed_origins() } + DataFlow::Node getOrigins() { result = super.getOrigins() } /** * Gets the boolean value corresponding to if CORS credentials is enabled * (`true`) or disabled (`false`) by this node. */ - DataFlow::Node allowed_credentials() { result = super.allowed_credentials() } + DataFlow::Node getCredentialsAllowed() { result = super.getCredentialsAllowed() } } /** Provides a class for modeling new CORS middleware APIs. */ @@ -1447,20 +1447,20 @@ module Http { */ abstract class Range extends DataFlow::Node { /** - * Gets the string corresponding to the middleware + * Gets the name corresponding to the middleware */ - abstract string middleware_name(); + abstract string getMiddlewareName(); /** * Gets the boolean value corresponding to if CORS credentials is enabled * (`true`) or disabled (`false`) by this node. */ - abstract DataFlow::Node allowed_credentials(); + abstract DataFlow::Node getCredentialsAllowed(); /** * Gets the strings corresponding to the origins allowed by the cors policy */ - abstract DataFlow::Node allowed_origins(); + abstract DataFlow::Node getOrigins(); } } diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index e29bf06ec7a7..e0f994491aeb 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -39,7 +39,7 @@ module FastApi { /** * Gets the string corresponding to the middleware */ - string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + string getMiddlewareName() { result = this.getArg(0).asExpr().(Name).getId() } } /** @@ -49,18 +49,18 @@ module FastApi { /** * Gets the string corresponding to the middleware */ - override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + override string getMiddlewareName() { result = this.getArg(0).asExpr().(Name).getId() } /** * Gets the dataflow node corresponding to the allowed CORS origins */ - override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } + override DataFlow::Node getOrigins() { result = this.getArgByName("allow_origins") } /** * Gets the boolean value corresponding to if CORS credentials is enabled * (`true`) or disabled (`false`) by this node. */ - override DataFlow::Node allowed_credentials() { + override DataFlow::Node getCredentialsAllowed() { result = this.getArgByName("allow_credentials") } diff --git a/python/ql/lib/semmle/python/frameworks/Starlette.qll b/python/ql/lib/semmle/python/frameworks/Starlette.qll index 337324f2c667..0dc1260af197 100644 --- a/python/ql/lib/semmle/python/frameworks/Starlette.qll +++ b/python/ql/lib/semmle/python/frameworks/Starlette.qll @@ -33,7 +33,7 @@ module Starlette { API::Node cls() { result = API::moduleImport("starlette").getMember("app") } /** Gets a reference to a Starlette application (an instance of `starlette.app`). */ - API::Node instance() { result = cls().getReturn() } + API::Node instance() { result = cls().getAnInstance() } } /** @@ -47,7 +47,7 @@ module Starlette { /** * Gets the string corresponding to the middleware */ - string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + string getMiddlewareName() { result = this.getArg(0).asExpr().(Name).getId() } } /** @@ -57,11 +57,11 @@ module Starlette { /** * Gets the string corresponding to the middleware */ - override string middleware_name() { result = this.getArg(0).asExpr().(Name).toString() } + override string getMiddlewareName() { result = this.getArg(0).asExpr().(Name).getId() } - override DataFlow::Node allowed_origins() { result = this.getArgByName("allow_origins") } + override DataFlow::Node getOrigins() { result = this.getArgByName("allow_origins") } - override DataFlow::Node allowed_credentials() { + override DataFlow::Node getCredentialsAllowed() { result = this.getArgByName("allow_credentials") } @@ -89,32 +89,8 @@ module Starlette { result = ModelOutput::getATypeNode("starlette.middleware.Middleware~Subclass").getASubclass*() } - /** - * A source of instances of `starlette.middleware.Middleware`, extend this class to model new instances. - * - * This can include instantiations of the class, return values from function - * calls, or a special parameter that will be set when functions are called by an external - * library. - * - * Use the predicate `Middleware::instance()` to get references to instances of `starlette.middleware.middleware`. - */ - abstract class InstanceSource extends DataFlow::LocalSourceNode { } - - /** A direct instantiation of `starlette.middleware.Middleware`. */ - class ClassInstantiation extends InstanceSource, DataFlow::CallCfgNode { - ClassInstantiation() { this = classRef().getACall() } - } - - /** Gets a reference to an instance of `starlette.middleware.Middleware`. */ - private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { - t.start() and - result instanceof InstanceSource - or - exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) - } - /** Gets a reference to an instance of `starlette.middleware.Middleware`. */ - DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + DataFlow::Node instance() { result = classRef().getACall() } } /** diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp index 76bcecf6012f..21a670019c33 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.qhelp @@ -19,8 +19,8 @@ meaning that Peer B can send a request to Peer A that will include the cookies as if the request was executed by the user.

    - That can have dangerous effects if Peer B origin is not restricted correctly. - An example of a dangerous scenario is when Access-Control-Allow-Origin header is set to a value gotten from the Peer B's request + That can have dangerous effects if the origin of Peer B is not restricted correctly. + An example of a dangerous scenario is when Access-Control-Allow-Origin header is set to a value obtained from the request made by Peer B (and not correctly validated), or is set to special values such as * or null. The above values can allow any Peer B to send requests to the misconfigured Peer A on behalf of the user.

    diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql index 3ec8ea509fdc..465bc2a3af9f 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql @@ -6,7 +6,7 @@ * @problem.severity warning * @security-severity 8.8 * @precision high - * @id py/insecure-cors-setting + * @id py/cors-misconfiguration-with-credentials * @tags security * external/cwe/cwe-942 */ @@ -17,23 +17,23 @@ private import semmle.python.dataflow.new.DataFlow predicate containsStar(DataFlow::Node array) { array.asExpr() instanceof List and - array.asExpr().getASubExpression().(StringLiteral).getText() = ["*", "null"] + array.asExpr().getASubExpression().(StringLiteral).getText() in ["*", "null"] or - array.asExpr().(StringLiteral).getText() = ["*", "null"] + array.asExpr().(StringLiteral).getText() in ["*", "null"] } predicate isCorsMiddleware(Http::Server::CorsMiddleware middleware) { - middleware.middleware_name().matches("CORSMiddleware") + middleware.getMiddlewareName() = "CORSMiddleware" } predicate credentialsAllowed(Http::Server::CorsMiddleware middleware) { - middleware.allowed_credentials().asExpr() instanceof True + middleware.getCredentialsAllowed().asExpr() instanceof True } from Http::Server::CorsMiddleware a where credentialsAllowed(a) and - containsStar(a.allowed_origins().getALocalSource()) and + containsStar(a.getOrigins().getALocalSource()) and isCorsMiddleware(a) select a, - "This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites" + "This CORS middleware uses a vulnerable configuration that allows arbitrary websites to make authenticated cross-site requests" From 7657b3e115dc314628d8e89fe0c3954b6cce5937 Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Thu, 12 Sep 2024 21:30:32 -0700 Subject: [PATCH 031/162] Fix tests --- .../CorsMisconfigurationMiddleware.expected | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected index cc27e83a6446..520cf9ab0d2e 100644 --- a/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected +++ b/python/ql/test/query-tests/Security/CWE-942-CorsMisconfigurationMiddleware/CorsMisconfigurationMiddleware.expected @@ -1,2 +1,2 @@ -| fastapi.py:10:1:16:1 | ControlFlowNode for Attribute() | This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites | -| starlette.py:8:5:8:75 | ControlFlowNode for Middleware() | This CORS middleware uses a vulnerable configuration that leaves it open to attacks from arbitrary websites | +| fastapi.py:10:1:16:1 | ControlFlowNode for Attribute() | This CORS middleware uses a vulnerable configuration that allows arbitrary websites to make authenticated cross-site requests | +| starlette.py:8:5:8:75 | ControlFlowNode for Middleware() | This CORS middleware uses a vulnerable configuration that allows arbitrary websites to make authenticated cross-site requests | From 03f375e43610ac1d471f0a4d67cfcad3b890dd8b Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Fri, 13 Sep 2024 00:21:33 -0700 Subject: [PATCH 032/162] missed some --- python/ql/lib/semmle/python/frameworks/FastApi.qll | 4 ++-- python/ql/lib/semmle/python/frameworks/Starlette.qll | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index e0f994491aeb..ed28f18a85a9 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -67,12 +67,12 @@ module FastApi { /** * Gets the dataflow node corresponding to the allowed CORS methods */ - DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } + DataFlow::Node getMethods() { result = this.getArgByName("allow_methods") } /** * Gets the dataflow node corresponding to the allowed CORS headers */ - DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } + DataFlow::Node getHeaders() { result = this.getArgByName("allow_headers") } } /** diff --git a/python/ql/lib/semmle/python/frameworks/Starlette.qll b/python/ql/lib/semmle/python/frameworks/Starlette.qll index 0dc1260af197..7ced137fcfca 100644 --- a/python/ql/lib/semmle/python/frameworks/Starlette.qll +++ b/python/ql/lib/semmle/python/frameworks/Starlette.qll @@ -68,12 +68,12 @@ module Starlette { /** * Gets the dataflow node corresponding to the allowed CORS methods */ - DataFlow::Node allowed_methods() { result = this.getArgByName("allow_methods") } + DataFlow::Node getMethods() { result = this.getArgByName("allow_methods") } /** * Gets the dataflow node corresponding to the allowed CORS headers */ - DataFlow::Node allowed_headers() { result = this.getArgByName("allow_headers") } + DataFlow::Node getHeaders() { result = this.getArgByName("allow_headers") } } /** From c30332818f4263fd4af1f43eae5be2163120d0ee Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Fri, 13 Sep 2024 00:41:55 -0700 Subject: [PATCH 033/162] Reorder and rename --- python/ql/lib/semmle/python/Concepts.qll | 10 +++++----- .../2024-08-26-Cors-misconfiguration-middleware.md | 2 +- .../Security/CWE-942/CorsMisconfigurationMiddleware.ql | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index cd8f888eb546..b6f540373a51 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -1452,15 +1452,15 @@ module Http { abstract string getMiddlewareName(); /** - * Gets the boolean value corresponding to if CORS credentials is enabled - * (`true`) or disabled (`false`) by this node. + * Gets the strings corresponding to the origins allowed by the cors policy */ - abstract DataFlow::Node getCredentialsAllowed(); + abstract DataFlow::Node getOrigins(); /** - * Gets the strings corresponding to the origins allowed by the cors policy + * Gets the boolean value corresponding to if CORS credentials is enabled + * (`true`) or disabled (`false`) by this node. */ - abstract DataFlow::Node getOrigins(); + abstract DataFlow::Node getCredentialsAllowed(); } } diff --git a/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md b/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md index 2576b2e89dc3..aa8bc7198b31 100644 --- a/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md +++ b/python/ql/src/change-notes/2024-08-26-Cors-misconfiguration-middleware.md @@ -1,4 +1,4 @@ --- category: newQuery --- -* The `py/insecure-cors-setting` query, which finds insecure CORS middleware configurations. \ No newline at end of file +* The `py/cors-misconfiguration-with-credentials` query, which finds insecure CORS middleware configurations. \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql index 465bc2a3af9f..9d2b461b9865 100644 --- a/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql +++ b/python/ql/src/experimental/Security/CWE-942/CorsMisconfigurationMiddleware.ql @@ -1,5 +1,5 @@ /** - * @name SOP protection weak with credentials + * @name Cors misconfiguration with credentials * @description Disabling or weakening SOP protection may make the application * vulnerable to a CORS attack. * @kind problem From 13a4df9b684dc65133e9b907c67b78ef0625ae38 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 13 Sep 2024 16:07:27 +0200 Subject: [PATCH 034/162] Go: autoformat --- go/ql/src/experimental/CWE-090/LDAPInjection.qll | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go/ql/src/experimental/CWE-090/LDAPInjection.qll b/go/ql/src/experimental/CWE-090/LDAPInjection.qll index e416b72ed97a..4e0a6e290dab 100644 --- a/go/ql/src/experimental/CWE-090/LDAPInjection.qll +++ b/go/ql/src/experimental/CWE-090/LDAPInjection.qll @@ -104,9 +104,7 @@ private class LdapClientDNSink extends LdapSink { deprecated class LdapInjectionConfiguration extends TaintTracking::Configuration { LdapInjectionConfiguration() { this = "Ldap injection" } - override predicate isSource(DataFlow::Node source) { - source instanceof ActiveThreatModelSource - } + override predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } override predicate isSink(DataFlow::Node sink) { sink instanceof LdapSink } From 3b9f3c2c29c050291e96d23cc3ff3095d2505988 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 18 Sep 2024 11:55:42 +0200 Subject: [PATCH 035/162] Shared: Add a model generator parameterised module. --- .../mad/modelgenerator/ModelGeneratorImpl.qll | 909 ++++++++++++++++++ shared/mad/qlpack.yml | 1 + 2 files changed, 910 insertions(+) create mode 100644 shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll diff --git a/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll b/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll new file mode 100644 index 000000000000..5c600b9dc266 --- /dev/null +++ b/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll @@ -0,0 +1,909 @@ +/** + * INTERNAL: Do not use. + * + * Provides classes and predicates related to capturing summary, source, + * and sink models of the Standard or a 3rd party library. + */ + +private import codeql.dataflow.DataFlow +private import codeql.dataflow.TaintTracking as Tt +private import codeql.dataflow.internal.ContentDataFlowImpl +private import codeql.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon +private import codeql.util.Location +private import ModelPrinting + +/** + * Provides language-specific model generator parameters. + */ +signature module ModelGeneratorInputSig Lang> { + /** + * A Type. + */ + class Type; + + /** + * A Parameter. + */ + class Parameter; + + /** + * A Callable. + */ + class Callable { + /** + * Gets the number of parameters of this callable. + */ + int getNumberOfParameters(); + + /** + * Gets a string representation of this callable. + */ + string toString(); + } + + /** + * A node. + */ + class NodeExtended extends Lang::Node { + /** + * Gets the type of this node. + */ + Type getType(); + + /** + * Gets the enclosing callable of this node. + */ + Callable getEnclosingCallable(); + + /** + * Gets the enclosing callable of this node, when considered as an expression. + */ + Callable getAsExprEnclosingCallable(); + + /** + * Gets the parameter corresponding to this node, if any. + */ + Parameter asParameter(); + } + + /** + * A class of callables that are potentially relevant for generating summary or + * neutral models. + * + * In the Standard library and 3rd party libraries it is the callables (or callables that have a + * super implementation) that can be called from outside the library itself. + */ + class SummaryTargetApi extends Callable { + /** + * Gets the callable that a model will be lifted to. + * + * The lifted callable is relevant in terms of model + * generation (this is ensured by `liftedImpl`). + */ + Callable lift(); + + /** + * Holds if `this` is relevant in terms of model generation. + */ + predicate isRelevant(); + } + + /** + * A class of callables that are potentially relevant for generating source or + * sink models. + */ + class SourceOrSinkTargetApi extends Callable; + + /** + * A class of callables that are potentially relevant for generating source models. + */ + class SourceTargetApi extends SourceOrSinkTargetApi; + + /** + * A class of callables that are potentially relevant for generating sink models. + */ + class SinkTargetApi extends SourceOrSinkTargetApi; + + /** + * An instance parameter node. + */ + class InstanceParameterNode extends Lang::Node; + + /** + * Holds for type `t` for fields that are relevant as an intermediate + * read or write step in the data flow analysis. + * That is, flow through any data-flow node that does not have a relevant type + * will be excluded. + */ + predicate isRelevantType(Type t); + + /** + * Gets the underlying type of the content `c`. + */ + Type getUnderlyingContentType(Lang::ContentSet c); + + /** + * Gets the MaD string representation of the qualifier. + */ + string qualifierString(); + + /** + * Gets the MaD string representation of the parameter `p`. + */ + string parameterAccess(Parameter p); + + /** + * Gets the MaD string representation of the parameter `p` + * when used in content flow. + */ + string parameterContentAccess(Parameter p); + + /** + * Gets the MaD string representation of return through parameter at position + * `pos` of callable `c`. + */ + bindingset[c] + string paramReturnNodeAsOutput(Callable c, Lang::ParameterPosition p); + + /** + * Gets the MaD string representation of return through parameter at position + * `pos` of callable `c` when used in content flow. + */ + bindingset[c] + string paramReturnNodeAsContentOutput(Callable c, Lang::ParameterPosition pos); + + /** + * Gets the enclosing callable of `ret`. + */ + Callable returnNodeEnclosingCallable(Lang::Node node); + + /** + * Holds if `node` is an own instance access. + */ + predicate isOwnInstanceAccessNode(Lang::ReturnNode node); + + /** + * Holds if `node` is a sanitizer for sink model construction. + */ + predicate sinkModelSanitizer(Lang::Node node); + + /** + * Holds if `source` is an api entrypoint relevant for creating sink models. + */ + predicate apiSource(Lang::Node source); + + /** + * Gets the MaD input string representation of `source`. + */ + string getInputArgument(Lang::Node source); + + /** + * Holds if it is not relevant to generate a source model for `api`, even + * if flow is detected from a node within `source` to a sink within `api`. + */ + bindingset[sourceEnclosing, api] + predicate irrelevantSourceSinkApi(Callable sourceEnclosing, SourceTargetApi api); + + /** + * Holds if `kind` is a relevant sink kind for creating sink models. + */ + bindingset[kind] + predicate isRelevantSinkKind(string kind); + + /** + * Holds if `kind` is a relevant source kind for creating source models. + */ + bindingset[kind] + predicate isRelevantSourceKind(string kind); + + /** + * Holds if the the content `c` is a container. + */ + predicate containerContent(Lang::ContentSet c); + + /** + * Holds if there is a taint step from `node1` to `node2` in content flow. + */ + predicate isAdditionalContentFlowStep(Lang::Node nodeFrom, Lang::Node nodeTo); + + /** + * Holds if the content set `c` is field like. + */ + predicate isField(Lang::ContentSet c); + + /** + * Gets the MaD synthetic name string representation for the content set `c`, if any. + */ + string getSyntheticName(Lang::ContentSet c); + + /** + * Gets the MaD string representation of the content set `c`. + */ + string printContent(Lang::ContentSet c); + + /** + * Holds if it is irrelevant to generate models for `api` based on data flow analysis. + * + * This serves as an extra filter for the `relevant` predicate. + */ + predicate isUninterestingForDataFlowModels(Callable api); + + /** + * Holds if `namespace`, `type`, `extensible`, `name` and `parameters` are string representations + * for the corresponding MaD columns for `api`. + */ + predicate partialModel( + Callable api, string namespace, string type, string extensible, string name, string parameters + ); + + /** + * Holds if `node` is specified as a source with the given kind in a MaD flow + * model. + */ + predicate sourceNode(Lang::Node node, string kind); + + /** + * Holds if `node` is specified as a sink with the given kind in a MaD flow + * model. + */ + predicate sinkNode(Lang::Node node, string kind); +} + +module MakeModelGenerator< + LocationSig Location, InputSig Lang, Tt::InputSig TaintLang, + ModelGeneratorInputSig ModelGeneratorInput> +{ + private module DataFlow { + import Lang + import DataFlowMake + import DataFlowImplCommon::MakeImplCommon + } + + private import ModelGeneratorInput + private import MakeImplContentDataFlow as ContentDataFlow + private import Tt::TaintFlowMake as TaintTracking + + private module ModelPrintingLang implements ModelPrintingLangSig { + class Callable = ModelGeneratorInput::Callable; + + predicate partialModel = ModelGeneratorInput::partialModel/6; + } + + private import ModelPrintingImpl as Printing + + final private class NodeExtendedFinal = NodeExtended; + + /** + * A node from which flow can return to the caller. This is either a regular + * `ReturnNode` or a `PostUpdateNode` corresponding to the value of a parameter. + */ + private class ReturnNodeExt extends NodeExtendedFinal { + private DataFlow::ReturnKindExt kind; + + ReturnNodeExt() { + kind = DataFlow::getValueReturnPosition(this).getKind() or + kind = DataFlow::getParamReturnPosition(this, _).getKind() + } + + /** + * Gets the kind of the return node. + */ + DataFlow::ReturnKindExt getKind() { result = kind } + } + + bindingset[c] + private signature string printCallableParamSig(Callable c, DataFlow::ParameterPosition p); + + private module PrintReturnNodeExt { + string getOutput(ReturnNodeExt node) { + node.getKind() instanceof DataFlow::ValueReturnKind and + result = "ReturnValue" + or + exists(DataFlow::ParameterPosition pos | + pos = node.getKind().(DataFlow::ParamUpdateReturnKind).getPosition() and + result = printCallableParam(returnNodeEnclosingCallable(node), pos) + ) + } + } + + string getOutput(ReturnNodeExt node) { + result = PrintReturnNodeExt::getOutput(node) + } + + string getContentOutput(ReturnNodeExt node) { + result = PrintReturnNodeExt::getOutput(node) + } + + final private class SummaryTargetApiFinal = SummaryTargetApi; + + class DataFlowSummaryTargetApi extends SummaryTargetApiFinal { + DataFlowSummaryTargetApi() { not isUninterestingForDataFlowModels(this) } + } + + class DataFlowSourceTargetApi = SourceTargetApi; + + class DataFlowSinkTargetApi = SinkTargetApi; + + private module ModelPrintingInput implements Printing::ModelPrintingSig { + class SummaryApi = DataFlowSummaryTargetApi; + + class SourceOrSinkApi = SourceOrSinkTargetApi; + + string getProvenance() { result = "df-generated" } + } + + module ModelPrinting = Printing::ModelPrinting; + + /** + * Holds if `c` is a relevant content kind, where the underlying type is relevant. + */ + private predicate isRelevantTypeInContent(DataFlow::ContentSet c) { + isRelevantType(getUnderlyingContentType(c)) + } + + /** + * Holds if data can flow from `node1` to `node2` either via a read or a write of an intermediate field `f`. + */ + private predicate isRelevantTaintStep(DataFlow::Node node1, DataFlow::Node node2) { + exists(DataFlow::ContentSet f | + DataFlow::readStep(node1, f, node2) and + // Partially restrict the content types used for intermediate steps. + (not exists(getUnderlyingContentType(f)) or isRelevantTypeInContent(f)) + ) + or + exists(DataFlow::ContentSet f | DataFlow::storeStep(node1, f, node2) | containerContent(f)) + } + + /** + * Holds if content `c` is either a field, a synthetic field or language specific + * content of a relevant type or a container like content. + */ + pragma[nomagic] + private predicate isRelevantContent0(DataFlow::ContentSet c) { + isRelevantTypeInContent(c) or + containerContent(c) + } + + /** + * Gets the MaD string representation of the parameter node `p`. + */ + string parameterNodeAsInput(DataFlow::ParameterNode p) { + result = parameterAccess(p.(NodeExtended).asParameter()) + or + result = qualifierString() and p instanceof InstanceParameterNode + } + + /** + * Gets the MaD string representation of the parameter `p` + * when used in content flow. + */ + string parameterNodeAsContentInput(DataFlow::ParameterNode p) { + result = parameterContentAccess(p.(NodeExtended).asParameter()) + or + result = qualifierString() and p instanceof InstanceParameterNode + } + + /** + * Gets the MaD input string representation of `source`. + */ + string asInputArgument(NodeExtended source) { result = getInputArgument(source) } + + /** + * Gets the summary model of `api`, if it follows the `fluent` programming pattern (returns `this`). + */ + string captureQualifierFlow(DataFlowSummaryTargetApi api) { + exists(ReturnNodeExt ret | + api = returnNodeEnclosingCallable(ret) and + isOwnInstanceAccessNode(ret) + ) and + result = ModelPrinting::asLiftedValueModel(api, qualifierString(), "ReturnValue") + } + + private int accessPathLimit0() { result = 2 } + + private newtype TTaintState = + TTaintRead(int n) { n in [0 .. accessPathLimit0()] } or + TTaintStore(int n) { n in [1 .. accessPathLimit0()] } + + abstract private class TaintState extends TTaintState { + abstract string toString(); + } + + /** + * A FlowState representing a tainted read. + */ + private class TaintRead extends TaintState, TTaintRead { + private int step; + + TaintRead() { this = TTaintRead(step) } + + /** + * Gets the flow state step number. + */ + int getStep() { result = step } + + override string toString() { result = "TaintRead(" + step + ")" } + } + + /** + * A FlowState representing a tainted write. + */ + private class TaintStore extends TaintState, TTaintStore { + private int step; + + TaintStore() { this = TTaintStore(step) } + + /** + * Gets the flow state step number. + */ + int getStep() { result = step } + + override string toString() { result = "TaintStore(" + step + ")" } + } + + /** + * A data-flow configuration for tracking flow through APIs. + * The sources are the parameters of an API and the sinks are the return values (excluding `this`) and parameters. + * + * This can be used to generate Flow summaries for APIs from parameter to return. + */ + module PropagateFlowConfig implements DataFlow::StateConfigSig { + class FlowState = TaintState; + + predicate isSource(DataFlow::Node source, FlowState state) { + source instanceof DataFlow::ParameterNode and + source.(NodeExtended).getEnclosingCallable() instanceof DataFlowSummaryTargetApi and + state.(TaintRead).getStep() = 0 + } + + predicate isSink(DataFlow::Node sink, FlowState state) { + sink instanceof ReturnNodeExt and + not isOwnInstanceAccessNode(sink) and + not exists(captureQualifierFlow(sink.(NodeExtended).getAsExprEnclosingCallable())) and + (state instanceof TaintRead or state instanceof TaintStore) + } + + predicate isAdditionalFlowStep( + DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2 + ) { + exists(DataFlow::ContentSet c | + DataFlow::store(node1, c.getAStoreContent(), node2, _, _) and + isRelevantContent0(c) and + ( + state1 instanceof TaintRead and state2.(TaintStore).getStep() = 1 + or + state1.(TaintStore).getStep() + 1 = state2.(TaintStore).getStep() + ) + ) + or + exists(DataFlow::ContentSet c | + DataFlow::readStep(node1, c, node2) and + isRelevantContent0(c) and + state1.(TaintRead).getStep() + 1 = state2.(TaintRead).getStep() + ) + } + + predicate isBarrier(DataFlow::Node n) { + exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) + } + + DataFlow::FlowFeature getAFeature() { + result instanceof DataFlow::FeatureEqualSourceSinkCallContext + } + } + + module PropagateFlow = TaintTracking::GlobalWithState; + + /** + * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. + */ + string captureThroughFlow0( + DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt + ) { + exists(string input, string output | + p.(NodeExtended).getEnclosingCallable() = api and + returnNodeExt.getEnclosingCallable() = api and + input = parameterNodeAsInput(p) and + output = getOutput(returnNodeExt) and + input != output and + result = ModelPrinting::asLiftedTaintModel(api, input, output) + ) + } + + /** + * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. + */ + string captureThroughFlow(DataFlowSummaryTargetApi api) { + exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | + PropagateFlow::flow(p, returnNodeExt) and + result = captureThroughFlow0(api, p, returnNodeExt) + ) + } + + private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + source instanceof DataFlow::ParameterNode and + source.(NodeExtended).getEnclosingCallable() instanceof DataFlowSummaryTargetApi + } + + predicate isSink(DataFlow::Node sink) { + sink.(ReturnNodeExt).getEnclosingCallable() instanceof DataFlowSummaryTargetApi + } + + predicate isAdditionalFlowStep = isAdditionalContentFlowStep/2; + + predicate isBarrier(DataFlow::Node n) { + exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) + } + + int accessPathLimit() { result = 2 } + + predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } + + DataFlow::FlowFeature getAFeature() { + result instanceof DataFlow::FeatureEqualSourceSinkCallContext + } + } + + private module PropagateContentFlow = ContentDataFlow::Global; + + private string getContent(PropagateContentFlow::AccessPath ap, int i) { + exists(DataFlow::ContentSet head, PropagateContentFlow::AccessPath tail | + head = ap.getHead() and + tail = ap.getTail() + | + i = 0 and + result = "." + printContent(head) + or + i > 0 and result = getContent(tail, i - 1) + ) + } + + /** + * Gets the MaD string representation of a store step access path. + */ + private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) { + result = concat(int i | | getContent(ap, i), "" order by i) + } + + /** + * Gets the MaD string representation of a read step access path. + */ + private string printReadAccessPath(PropagateContentFlow::AccessPath ap) { + result = concat(int i | | getContent(ap, i), "" order by i desc) + } + + /** + * Holds if the access path `ap` contains a field or synthetic field access. + */ + private predicate mentionsField(PropagateContentFlow::AccessPath ap) { + exists(DataFlow::ContentSet head, PropagateContentFlow::AccessPath tail | + head = ap.getHead() and + tail = ap.getTail() + | + mentionsField(tail) or isField(head) + ) + } + + private predicate apiFlow( + DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, + ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores, boolean preservesValue + ) { + PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and + returnNodeExt.getEnclosingCallable() = api and + p.(NodeExtended).getEnclosingCallable() = api + } + + /** + * A class of APIs relevant for modeling using content flow. + * The following heuristic is applied: + * Content flow is only relevant for an API, if + * #content flow <= 2 * #parameters + 3 + * If an API produces more content flow, it is likely that + * 1. Types are not sufficiently constrained leading to a combinatorial + * explosion in dispatch and thus in the generated summaries. + * 2. It is a reasonable approximation to use the non-content based flow + * detection instead, as reads and stores would use a significant + * part of an objects internal state. + */ + private class ContentDataFlowSummaryTargetApi extends DataFlowSummaryTargetApi { + ContentDataFlowSummaryTargetApi() { + count(string input, string output | + exists( + DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, + ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores + | + apiFlow(this, p, reads, returnNodeExt, stores, _) and + input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and + output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) + ) + ) <= 2 * this.getNumberOfParameters() + 3 + } + } + + pragma[nomagic] + private predicate apiContentFlow( + ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, + PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath stores, boolean preservesValue + ) { + PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and + returnNodeExt.getEnclosingCallable() = api and + p.(NodeExtended).getEnclosingCallable() = api + } + + /** + * Holds if any of the content sets in `path` translates into a synthetic field. + */ + private predicate hasSyntheticContent(PropagateContentFlow::AccessPath path) { + exists(PropagateContentFlow::AccessPath tail, DataFlow::ContentSet head | + head = path.getHead() and + tail = path.getTail() + | + exists(getSyntheticName(head)) or + hasSyntheticContent(tail) + ) + } + + /** + * A module containing predicates for validating access paths containing content sets + * that translates into synthetic fields, when used for generated summary models. + */ + private module AccessPathSyntheticValidation { + /** + * Holds if there exists an API that has content flow from `read` (on type `t1`) + * to `store` (on type `t2`). + */ + private predicate step( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | + p.(NodeExtended).getType() = t1 and + returnNodeExt.getType() = t2 and + apiContentFlow(_, p, read, returnNodeExt, store, _) + ) + } + + /** + * Holds if there exists an API that has content flow from `read` (on type `t1`) + * to `store` (on type `t2`), where `read` does not have synthetic content and `store` does. + * + * Step A -> Synth. + */ + private predicate synthPathEntry( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + not hasSyntheticContent(read) and + hasSyntheticContent(store) and + step(t1, read, t2, store) + } + + /** + * Holds if there exists an API that has content flow from `read` (on type `t1`) + * to `store` (on type `t2`), where `read` has synthetic content + * and `store` does not. + * + * Step Synth -> A. + */ + private predicate synthPathExit( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + hasSyntheticContent(read) and + not hasSyntheticContent(store) and + step(t1, read, t2, store) + } + + /** + * Holds if there exists a path of steps from `read` to an exit. + * + * read ->* Synth -> A + */ + private predicate reachesSynthExit(Type t, PropagateContentFlow::AccessPath read) { + synthPathExit(t, read, _, _) + or + hasSyntheticContent(read) and + exists(PropagateContentFlow::AccessPath mid, Type midType | + hasSyntheticContent(mid) and + step(t, read, midType, mid) and + reachesSynthExit(midType, mid.reverse()) + ) + } + + /** + * Holds if there exists a path of steps from an entry to `store`. + * + * A -> Synth ->* store + */ + private predicate synthEntryReaches(Type t, PropagateContentFlow::AccessPath store) { + synthPathEntry(_, _, t, store) + or + hasSyntheticContent(store) and + exists(PropagateContentFlow::AccessPath mid, Type midType | + hasSyntheticContent(mid) and + step(midType, mid, t, store) and + synthEntryReaches(midType, mid.reverse()) + ) + } + + /** + * Holds if at least one of the access paths `read` (on type `t1`) and `store` (on type `t2`) + * contain content that will be translated into a synthetic field, when being used in + * a MaD summary model, and if there is a range of APIs, such that + * when chaining their flow access paths, there exists access paths `A` and `B` where + * A ->* read -> store ->* B and where `A` and `B` do not contain content that will + * be translated into a synthetic field. + * + * This is needed because we don't want to include summaries that reads from or + * stores into a "dead" synthetic field. + * + * Example: + * Assume we have a type `t` (in this case `t1` = `t2`) with methods `getX` and + * `setX`, which gets and sets a private field `X` on `t`. + * This would lead to the following content flows + * getX : Argument[this].SyntheticField[t.X] -> ReturnValue. + * setX : Argument[0] -> Argument[this].SyntheticField[t.X] + * As the reads and stores are on synthetic fields we should only make summaries + * if both of these methods exist. + */ + pragma[nomagic] + predicate acceptReadStore( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + synthPathEntry(t1, read, t2, store) and reachesSynthExit(t2, store.reverse()) + or + exists(PropagateContentFlow::AccessPath store0 | store0.reverse() = read | + synthEntryReaches(t1, store0) and synthPathExit(t1, read, t2, store) + or + synthEntryReaches(t1, store0) and + step(t1, read, t2, store) and + reachesSynthExit(t2, store.reverse()) + ) + } + } + + /** + * Holds, if the API `api` has relevant flow from `read` on `p` to `store` on `returnNodeExt`. + * Flow is considered relevant, + * 1. If `read` or `store` do not contain a content set that translates into a synthetic field. + * 2. If `read` or `store` contain a content set that translates into a synthetic field, and if + * the synthetic content is "live" on the relevant declaring type. + */ + private predicate apiRelevantContentFlow( + ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, + PropagateContentFlow::AccessPath read, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath store, boolean preservesValue + ) { + apiContentFlow(api, p, read, returnNodeExt, store, preservesValue) and + ( + not hasSyntheticContent(read) and not hasSyntheticContent(store) + or + AccessPathSyntheticValidation::acceptReadStore(p.(NodeExtended).getType(), read, + returnNodeExt.getType(), store) + ) + } + + pragma[nomagic] + private predicate captureContentFlow0( + ContentDataFlowSummaryTargetApi api, string input, string output, boolean preservesValue, + boolean lift + ) { + exists( + DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath reads, PropagateContentFlow::AccessPath stores + | + apiRelevantContentFlow(api, p, reads, returnNodeExt, stores, preservesValue) and + input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and + output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) and + input != output and + (if mentionsField(reads) or mentionsField(stores) then lift = false else lift = true) + ) + } + + /** + * Gets the content based summary model(s) of the API `api` (if there is flow from a parameter to + * the return value or a parameter). + * + * Models are lifted to the best type in case the read and store access paths do not + * contain a field or synthetic field access. + */ + string captureContentFlow(ContentDataFlowSummaryTargetApi api) { + exists(string input, string output, boolean lift, boolean preservesValue | + captureContentFlow0(api, input, output, _, lift) and + preservesValue = max(boolean p | captureContentFlow0(api, input, output, p, lift)) and + result = ModelPrinting::asModel(api, input, output, preservesValue, lift) + ) + } + + /** + * A dataflow configuration used for finding new sources. + * The sources are the already known existing sources and the sinks are the API return nodes. + * + * This can be used to generate Source summaries for an API, if the API expose an already known source + * via its return (then the API itself becomes a source). + */ + module PropagateFromSourceConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + exists(string kind | + isRelevantSourceKind(kind) and + sourceNode(source, kind) + ) + } + + predicate isSink(DataFlow::Node sink) { + sink.(ReturnNodeExt).getEnclosingCallable() instanceof DataFlowSourceTargetApi + } + + DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSinkCallContext } + + predicate isBarrier(DataFlow::Node n) { + exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) + } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + isRelevantTaintStep(node1, node2) + } + } + + private module PropagateFromSource = TaintTracking::Global; + + /** + * Gets the source model(s) of `api`, if there is flow from an existing known source to the return of `api`. + */ + string captureSource(DataFlowSourceTargetApi api) { + exists(NodeExtended source, ReturnNodeExt sink, string kind | + PropagateFromSource::flow(source, sink) and + sourceNode(source, kind) and + api = sink.getEnclosingCallable() and + not irrelevantSourceSinkApi(source.getEnclosingCallable(), api) and + result = ModelPrinting::asSourceModel(api, getOutput(sink), kind) + ) + } + + /** + * A dataflow configuration used for finding new sinks. + * The sources are the parameters of the API and the fields of the enclosing type. + * + * This can be used to generate Sink summaries for APIs, if the API propagates a parameter (or enclosing type field) + * into an existing known sink (then the API itself becomes a sink). + */ + module PropagateToSinkConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + apiSource(source) and + source.(NodeExtended).getEnclosingCallable() instanceof DataFlowSinkTargetApi + } + + predicate isSink(DataFlow::Node sink) { + exists(string kind | isRelevantSinkKind(kind) and sinkNode(sink, kind)) + } + + predicate isBarrier(DataFlow::Node node) { + exists(Type t | t = node.(NodeExtended).getType() and not isRelevantType(t)) + or + sinkModelSanitizer(node) + } + + DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + isRelevantTaintStep(node1, node2) + } + } + + private module PropagateToSink = TaintTracking::Global; + + /** + * Gets the sink model(s) of `api`, if there is flow from a parameter to an existing known sink. + */ + string captureSink(DataFlowSinkTargetApi api) { + exists(NodeExtended src, NodeExtended sink, string kind | + PropagateToSink::flow(src, sink) and + sinkNode(sink, kind) and + api = src.getEnclosingCallable() and + result = ModelPrinting::asSinkModel(api, asInputArgument(src), kind) + ) + } +} diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index 9933a7eef31b..e1bb442e4aee 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -4,4 +4,5 @@ groups: shared library: true dependencies: codeql/util: ${workspace} + codeql/dataflow: ${workspace} warnOnImplicitThis: true From 1f3b28a555268bc61aba8131ffbe8c9bb986d778 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 18 Sep 2024 13:00:28 +0200 Subject: [PATCH 036/162] C#: Use the shared model generator implementation. --- .../modelgenerator/internal/CaptureModels.qll | 816 ++++++------------ .../internal/CaptureModelsSpecific.qll | 436 ---------- .../internal/CaptureSummaryFlowQuery.qll | 2 +- .../CaptureTypeBasedSummaryModels.qll | 10 +- 4 files changed, 271 insertions(+), 993 deletions(-) delete mode 100644 csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll index ab5de0d01979..d431b1293785 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -1,635 +1,351 @@ -/** - * Provides classes and predicates related to capturing summary, source, - * and sink models of the Standard or a 3rd party library. - */ - -private import CaptureModelsSpecific -private import CaptureModelsPrinting - -/** - * A node from which flow can return to the caller. This is either a regular - * `ReturnNode` or a `PostUpdateNode` corresponding to the value of a parameter. - */ -private class ReturnNodeExt extends DataFlow::Node { - private DataFlowImplCommon::ReturnKindExt kind; - - ReturnNodeExt() { - kind = DataFlowImplCommon::getValueReturnPosition(this).getKind() or - kind = DataFlowImplCommon::getParamReturnPosition(this, _).getKind() +private import csharp as CS +private import semmle.code.csharp.commons.Util as Util +private import semmle.code.csharp.commons.Collections as Collections +private import semmle.code.csharp.commons.QualifiedName as QualifiedName +private import semmle.code.csharp.dataflow.internal.DataFlowDispatch +private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +private import semmle.code.csharp.dataflow.internal.TaintTrackingPrivate as TaintTrackingPrivate +private import semmle.code.csharp.dataflow.internal.ExternalFlow as ExternalFlow +private import semmle.code.csharp.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon +private import semmle.code.csharp.dataflow.internal.DataFlowImplSpecific +private import semmle.code.csharp.dataflow.internal.DataFlowPrivate as DataFlowPrivate +private import semmle.code.csharp.dataflow.internal.TaintTrackingImplSpecific +private import semmle.code.csharp.frameworks.system.linq.Expressions +private import semmle.code.csharp.frameworks.System +private import semmle.code.csharp.Location +private import codeql.mad.modelgenerator.ModelGeneratorImpl + +module ModelGeneratorInput implements ModelGeneratorInputSig { + class Type = CS::Type; + + class Parameter = CS::Parameter; + + class Callable = CS::Callable; + + class NodeExtended extends CS::DataFlow::Node { + Callable getAsExprEnclosingCallable() { result = this.asExpr().getEnclosingCallable() } } /** - * Gets the kind of the return node. + * Holds if any of the parameters of `api` are `System.Func<>`. */ - DataFlowImplCommon::ReturnKindExt getKind() { result = kind } -} + private predicate isHigherOrder(Callable api) { + exists(Type t | t = api.getAParameter().getType().getUnboundDeclaration() | + t instanceof SystemLinqExpressions::DelegateExtType + ) + } -bindingset[c] -private signature string printCallableParamSig(Callable c, ParameterPosition p); + private predicate irrelevantAccessor(CS::Accessor a) { + a.getDeclaration().(CS::Property).isReadWrite() + } -private module PrintReturnNodeExt { - string getOutput(ReturnNodeExt node) { - node.getKind() instanceof DataFlowImplCommon::ValueReturnKind and - result = "ReturnValue" + private predicate isUninterestingForModels(Callable api) { + api.getDeclaringType().getNamespace().getFullName() = "" + or + api instanceof CS::ConversionOperator + or + api instanceof Util::MainMethod or - exists(ParameterPosition pos | - pos = node.getKind().(DataFlowImplCommon::ParamUpdateReturnKind).getPosition() and - result = printCallableParam(returnNodeEnclosingCallable(node), pos) + api instanceof CS::Destructor + or + api instanceof CS::AnonymousFunctionExpr + or + api.(CS::Constructor).isParameterless() + or + exists(Type decl | decl = api.getDeclaringType() | + decl instanceof SystemObjectClass or + decl instanceof SystemValueTypeClass ) + or + // Disregard properties that have both a get and a set accessor, + // which implicitly means auto implemented properties. + irrelevantAccessor(api) } -} - -string getOutput(ReturnNodeExt node) { - result = PrintReturnNodeExt::getOutput(node) -} -string getContentOutput(ReturnNodeExt node) { - result = PrintReturnNodeExt::getOutput(node) -} - -class DataFlowSummaryTargetApi extends SummaryTargetApi { - DataFlowSummaryTargetApi() { not isUninterestingForDataFlowModels(this) } -} - -class DataFlowSourceTargetApi = SourceTargetApi; - -class DataFlowSinkTargetApi = SinkTargetApi; - -private module ModelPrintingInput implements ModelPrintingSig { - class SummaryApi = DataFlowSummaryTargetApi; - - class SourceOrSinkApi = SourceOrSinkTargetApi; + private predicate relevant(Callable api) { + [api.(CS::Modifiable), api.(CS::Accessor).getDeclaration()].isEffectivelyPublic() and + api.fromSource() and + api.isUnboundDeclaration() and + not isUninterestingForModels(api) + } - string getProvenance() { result = "df-generated" } -} + private Callable getARelevantOverrideeOrImplementee(Overridable m) { + m.overridesOrImplements(result) and relevant(result) + } -module Printing = ModelPrinting; + /** + * Gets the super implementation of `api` if it is relevant. + * If such a super implementation does not exist, returns `api` if it is relevant. + */ + private Callable liftedImpl(Callable api) { + ( + result = getARelevantOverrideeOrImplementee(api) + or + result = api and relevant(api) + ) and + not exists(getARelevantOverrideeOrImplementee(result)) + } -/** - * Holds if `c` is a relevant content kind, where the underlying type is relevant. - */ -private predicate isRelevantTypeInContent(DataFlow::ContentSet c) { - isRelevantType(getUnderlyingContentType(c)) -} + private predicate hasManualSummaryModel(Callable api) { + api = any(FlowSummaryImpl::Public::SummarizedCallable sc | sc.applyManualModel()) or + api = any(FlowSummaryImpl::Public::NeutralSummaryCallable sc | sc.hasManualModel()) + } -/** - * Holds if data can flow from `node1` to `node2` either via a read or a write of an intermediate field `f`. - */ -private predicate isRelevantTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - exists(DataFlow::ContentSet f | - DataFlowPrivate::readStep(node1, f, node2) and - // Partially restrict the content types used for intermediate steps. - (not exists(getUnderlyingContentType(f)) or isRelevantTypeInContent(f)) - ) - or - exists(DataFlow::ContentSet f | DataFlowPrivate::storeStep(node1, f, node2) | containerContent(f)) -} + private predicate hasManualSourceModel(Callable api) { + api = any(ExternalFlow::SourceCallable sc | sc.hasManualModel()) or + api = any(FlowSummaryImpl::Public::NeutralSourceCallable sc | sc.hasManualModel()) + } -/** - * Holds if content `c` is either a field, a synthetic field or language specific - * content of a relevant type or a container like content. - */ -pragma[nomagic] -private predicate isRelevantContent0(DataFlow::ContentSet c) { - isRelevantTypeInContent(c) or - containerContent(c) -} + private predicate hasManualSinkModel(Callable api) { + api = any(ExternalFlow::SinkCallable sc | sc.hasManualModel()) or + api = any(FlowSummaryImpl::Public::NeutralSinkCallable sc | sc.hasManualModel()) + } -/** - * Gets the MaD string representation of the parameter node `p`. - */ -string parameterNodeAsInput(DataFlow::ParameterNode p) { - result = parameterAccess(p.asParameter()) - or - result = qualifierString() and p instanceof InstanceParameterNode -} + predicate isUninterestingForDataFlowModels(Callable api) { isHigherOrder(api) } -/** - * Gets the MaD string representation of the parameter `p` - * when used in content flow. - */ -string parameterNodeAsContentInput(DataFlow::ParameterNode p) { - result = parameterContentAccess(p.asParameter()) - or - result = qualifierString() and p instanceof InstanceParameterNode -} + class SourceOrSinkTargetApi extends Callable { + SourceOrSinkTargetApi() { relevant(this) } + } -/** - * Gets the MaD input string representation of `source`. - */ -string asInputArgument(DataFlow::Node source) { result = asInputArgumentSpecific(source) } - -/** - * Gets the summary model of `api`, if it follows the `fluent` programming pattern (returns `this`). - */ -string captureQualifierFlow(DataFlowSummaryTargetApi api) { - exists(ReturnNodeExt ret | - api = returnNodeEnclosingCallable(ret) and - isOwnInstanceAccessNode(ret) - ) and - result = Printing::asLiftedValueModel(api, qualifierString(), "ReturnValue") -} + class SinkTargetApi extends SourceOrSinkTargetApi { + SinkTargetApi() { not hasManualSinkModel(this) } + } -private int accessPathLimit0() { result = 2 } + class SourceTargetApi extends SourceOrSinkTargetApi { + SourceTargetApi() { + not hasManualSourceModel(this) and + // Do not generate source models for overridable callables + // as virtual dispatch implies that too many methods + // will be considered sources. + not this.(Overridable).overridesOrImplements(_) + } + } -private newtype TTaintState = - TTaintRead(int n) { n in [0 .. accessPathLimit0()] } or - TTaintStore(int n) { n in [1 .. accessPathLimit0()] } + class SummaryTargetApi extends Callable { + private Callable lift; -abstract private class TaintState extends TTaintState { - abstract string toString(); -} + SummaryTargetApi() { + lift = liftedImpl(this) and + not hasManualSummaryModel(lift) + } -/** - * A FlowState representing a tainted read. - */ -private class TaintRead extends TaintState, TTaintRead { - private int step; + Callable lift() { result = lift } - TaintRead() { this = TTaintRead(step) } + predicate isRelevant() { relevant(this) } + } /** - * Gets the flow state step number. + * Holds if `t` is a type that is generally used for bulk data in collection types. + * Eg. char[] is roughly equivalent to string and thus a highly + * relevant type for model generation. */ - int getStep() { result = step } - - override string toString() { result = "TaintRead(" + step + ")" } -} + private predicate isPrimitiveTypeUsedForBulkData(CS::Type t) { + t instanceof CS::ByteType or + t instanceof CS::CharType + } -/** - * A FlowState representing a tainted write. - */ -private class TaintStore extends TaintState, TTaintStore { - private int step; + /** + * Holds if the collection type `ct` is irrelevant for model generation. + * Collection types where the type of the elements are + * (1) unknown - are considered relevant. + * (2) known - at least one the child types should be relevant (a non-simple type + * or a type used for bulk data) + */ + private predicate irrelevantCollectionType(CS::Type ct) { + Collections::isCollectionType(ct) and + forex(CS::Type child | child = ct.getAChild() | + child instanceof CS::SimpleType and + not isPrimitiveTypeUsedForBulkData(child) + ) + } - TaintStore() { this = TTaintStore(step) } + predicate isRelevantType(CS::Type t) { + not t instanceof CS::SimpleType and + not t instanceof CS::Enum and + not t instanceof SystemDateTimeStruct and + not t instanceof SystemTypeClass and + not irrelevantCollectionType(t) + } /** - * Gets the flow state step number. + * Gets the underlying type of the content `c`. */ - int getStep() { result = step } - - override string toString() { result = "TaintStore(" + step + ")" } -} + private CS::Type getUnderlyingContType(DataFlow::Content c) { + result = c.(DataFlow::FieldContent).getField().getType() or + result = c.(DataFlow::SyntheticFieldContent).getField().getType() + } -/** - * A data-flow configuration for tracking flow through APIs. - * The sources are the parameters of an API and the sinks are the return values (excluding `this`) and parameters. - * - * This can be used to generate Flow summaries for APIs from parameter to return. - */ -module PropagateFlowConfig implements DataFlow::StateConfigSig { - class FlowState = TaintState; - - predicate isSource(DataFlow::Node source, FlowState state) { - source instanceof DataFlow::ParameterNode and - source.getEnclosingCallable() instanceof DataFlowSummaryTargetApi and - state.(TaintRead).getStep() = 0 - } - - predicate isSink(DataFlow::Node sink, FlowState state) { - sink instanceof ReturnNodeExt and - not isOwnInstanceAccessNode(sink) and - not exists(captureQualifierFlow(sink.asExpr().getEnclosingCallable())) and - (state instanceof TaintRead or state instanceof TaintStore) - } - - predicate isAdditionalFlowStep( - DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2 - ) { - exists(DataFlow::ContentSet c | - DataFlowImplCommon::store(node1, c.getAStoreContent(), node2, _, _) and - isRelevantContent0(c) and - ( - state1 instanceof TaintRead and state2.(TaintStore).getStep() = 1 - or - state1.(TaintStore).getStep() + 1 = state2.(TaintStore).getStep() - ) + Type getUnderlyingContentType(DataFlow::ContentSet c) { + exists(DataFlow::Content cont | + c.isSingleton(cont) and + result = getUnderlyingContType(cont) ) or - exists(DataFlow::ContentSet c | - DataFlowPrivate::readStep(node1, c, node2) and - isRelevantContent0(c) and - state1.(TaintRead).getStep() + 1 = state2.(TaintRead).getStep() + exists(CS::Property p | + c.isProperty(p) and + result = p.getType() ) } - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.getType() and not isRelevantType(t)) - } + string qualifierString() { result = "Argument[this]" } - DataFlow::FlowFeature getAFeature() { - result instanceof DataFlow::FeatureEqualSourceSinkCallContext + string parameterAccess(CS::Parameter p) { + if Collections::isCollectionType(p.getType()) + then result = "Argument[" + p.getPosition() + "].Element" + else result = "Argument[" + p.getPosition() + "]" } -} -module PropagateFlow = TaintTracking::GlobalWithState; - -/** - * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. - */ -string captureThroughFlow0( - DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt -) { - exists(string input, string output | - p.getEnclosingCallable() = api and - returnNodeExt.(DataFlow::Node).getEnclosingCallable() = api and - input = parameterNodeAsInput(p) and - output = getOutput(returnNodeExt) and - input != output and - result = Printing::asLiftedTaintModel(api, input, output) - ) -} + string parameterContentAccess(CS::Parameter p) { result = "Argument[" + p.getPosition() + "]" } -/** - * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. - */ -string captureThroughFlow(DataFlowSummaryTargetApi api) { - exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | - PropagateFlow::flow(p, returnNodeExt) and - result = captureThroughFlow0(api, p, returnNodeExt) - ) -} + class InstanceParameterNode = DataFlowPrivate::InstanceParameterNode; -private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source instanceof DataFlow::ParameterNode and - source.getEnclosingCallable() instanceof DataFlowSummaryTargetApi - } + private signature string parameterAccessSig(Parameter p); - predicate isSink(DataFlow::Node sink) { - sink instanceof ReturnNodeExt and - sink.getEnclosingCallable() instanceof DataFlowSummaryTargetApi + private module ParamReturnNodeAsOutput { + bindingset[c] + string paramReturnNodeAsOutput(CS::Callable c, ParameterPosition pos) { + result = getParamAccess(c.getParameter(pos.getPosition())) + or + pos.isThisParameter() and + result = qualifierString() + } } - predicate isAdditionalFlowStep = isAdditionalContentFlowStep/2; - - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.getType() and not isRelevantType(t)) + bindingset[c] + string paramReturnNodeAsOutput(CS::Callable c, ParameterPosition pos) { + result = ParamReturnNodeAsOutput::paramReturnNodeAsOutput(c, pos) } - int accessPathLimit() { result = 2 } - - predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } - - DataFlow::FlowFeature getAFeature() { - result instanceof DataFlow::FeatureEqualSourceSinkCallContext + bindingset[c] + string paramReturnNodeAsContentOutput(Callable c, ParameterPosition pos) { + result = ParamReturnNodeAsOutput::paramReturnNodeAsOutput(c, pos) } -} - -private module PropagateContentFlow = ContentDataFlow::Global; -private string getContent(PropagateContentFlow::AccessPath ap, int i) { - exists(ContentSet head, PropagateContentFlow::AccessPath tail | - head = ap.getHead() and - tail = ap.getTail() - | - i = 0 and - result = "." + printContent(head) - or - i > 0 and result = getContent(tail, i - 1) - ) -} - -/** - * Gets the MaD string representation of a store step access path. - */ -private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) { - result = concat(int i | | getContent(ap, i), "" order by i) -} - -/** - * Gets the MaD string representation of a read step access path. - */ -private string printReadAccessPath(PropagateContentFlow::AccessPath ap) { - result = concat(int i | | getContent(ap, i), "" order by i desc) -} - -/** - * Holds if the access path `ap` contains a field or synthetic field access. - */ -private predicate mentionsField(PropagateContentFlow::AccessPath ap) { - exists(ContentSet head, PropagateContentFlow::AccessPath tail | - head = ap.getHead() and - tail = ap.getTail() - | - mentionsField(tail) or isField(head) - ) -} - -private predicate apiFlow( - DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, - ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores, boolean preservesValue -) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - returnNodeExt.getEnclosingCallable() = api and - p.getEnclosingCallable() = api -} - -/** - * A class of APIs relevant for modeling using content flow. - * The following heuristic is applied: - * Content flow is only relevant for an API, if - * #content flow <= 2 * #parameters + 3 - * If an API produces more content flow, it is likely that - * 1. Types are not sufficiently constrained leading to a combinatorial - * explosion in dispatch and thus in the generated summaries. - * 2. It is a reasonable approximation to use the non-content based flow - * detection instead, as reads and stores would use a significant - * part of an objects internal state. - */ -private class ContentDataFlowSummaryTargetApi extends DataFlowSummaryTargetApi { - ContentDataFlowSummaryTargetApi() { - count(string input, string output | - exists( - DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, - ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores - | - apiFlow(this, p, reads, returnNodeExt, stores, _) and - input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and - output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) - ) - ) <= 2 * this.getNumberOfParameters() + 3 + Callable returnNodeEnclosingCallable(DataFlow::Node ret) { + result = DataFlowImplCommon::getNodeEnclosingCallable(ret).asCallable(_) } -} -pragma[nomagic] -private predicate apiContentFlow( - ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, - PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath stores, boolean preservesValue -) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - returnNodeExt.getEnclosingCallable() = api and - p.getEnclosingCallable() = api -} - -/** - * Holds if any of the content sets in `path` translates into a synthetic field. - */ -private predicate hasSyntheticContent(PropagateContentFlow::AccessPath path) { - exists(PropagateContentFlow::AccessPath tail, ContentSet head | - head = path.getHead() and - tail = path.getTail() - | - exists(getSyntheticName(head)) or - hasSyntheticContent(tail) - ) -} + predicate isOwnInstanceAccessNode(DataFlowPrivate::ReturnNode node) { + node.asExpr() instanceof CS::ThisAccess + } -/** - * A module containing predicates for validating access paths containing content sets - * that translates into synthetic fields, when used for generated summary models. - */ -private module AccessPathSyntheticValidation { - /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`). - */ - private predicate step( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | - p.getType() = t1 and - returnNodeExt.getType() = t2 and - apiContentFlow(_, p, read, returnNodeExt, store, _) + private predicate isRelevantMemberAccess(DataFlow::Node node) { + exists(CS::MemberAccess access | access = node.asExpr() | + access.hasThisQualifier() and + access.getTarget().isEffectivelyPublic() and + ( + access instanceof CS::FieldAccess + or + access.getTarget().(CS::Property).getSetter().isPublic() + ) ) } - /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`), where `read` does not have synthetic content and `store` does. - * - * Step A -> Synth. - */ - private predicate synthPathEntry( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - not hasSyntheticContent(read) and - hasSyntheticContent(store) and - step(t1, read, t2, store) - } + predicate sinkModelSanitizer(DataFlow::Node node) { none() } - /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`), where `read` has synthetic content - * and `store` does not. - * - * Step Synth -> A. - */ - private predicate synthPathExit( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - hasSyntheticContent(read) and - not hasSyntheticContent(store) and - step(t1, read, t2, store) + predicate apiSource(DataFlow::Node source) { + isRelevantMemberAccess(source) or source instanceof DataFlow::ParameterNode } - /** - * Holds if there exists a path of steps from `read` to an exit. - * - * read ->* Synth -> A - */ - private predicate reachesSynthExit(Type t, PropagateContentFlow::AccessPath read) { - synthPathExit(t, read, _, _) - or - hasSyntheticContent(read) and - exists(PropagateContentFlow::AccessPath mid, Type midType | - hasSyntheticContent(mid) and - step(t, read, midType, mid) and - reachesSynthExit(midType, mid.reverse()) + private predicate uniquelyCalls(DataFlowCallable dc1, DataFlowCallable dc2) { + exists(DataFlowCall call | + dc1 = call.getEnclosingCallable() and + dc2 = unique(DataFlowCallable dc0 | dc0 = viableCallable(call) | dc0) ) } - /** - * Holds if there exists a path of steps from an entry to `store`. - * - * A -> Synth ->* store - */ - private predicate synthEntryReaches(Type t, PropagateContentFlow::AccessPath store) { - synthPathEntry(_, _, t, store) - or - hasSyntheticContent(store) and - exists(PropagateContentFlow::AccessPath mid, Type midType | - hasSyntheticContent(mid) and - step(midType, mid, t, store) and - synthEntryReaches(midType, mid.reverse()) + bindingset[dc1, dc2] + private predicate uniquelyCallsPlus(DataFlowCallable dc1, DataFlowCallable dc2) = + fastTC(uniquelyCalls/2)(dc1, dc2) + + bindingset[sourceEnclosing, api] + predicate irrelevantSourceSinkApi(Callable sourceEnclosing, SourceTargetApi api) { + not exists(DataFlowCallable dc1, DataFlowCallable dc2 | + uniquelyCallsPlus(dc1, dc2) or dc1 = dc2 + | + dc1.getUnderlyingCallable() = api and + dc2.getUnderlyingCallable() = sourceEnclosing ) } - /** - * Holds if at least one of the access paths `read` (on type `t1`) and `store` (on type `t2`) - * contain content that will be translated into a synthetic field, when being used in - * a MaD summary model, and if there is a range of APIs, such that - * when chaining their flow access paths, there exists access paths `A` and `B` where - * A ->* read -> store ->* B and where `A` and `B` do not contain content that will - * be translated into a synthetic field. - * - * This is needed because we don't want to include summaries that reads from or - * stores into a "dead" synthetic field. - * - * Example: - * Assume we have a type `t` (in this case `t1` = `t2`) with methods `getX` and - * `setX`, which gets and sets a private field `X` on `t`. - * This would lead to the following content flows - * getX : Argument[this].SyntheticField[t.X] -> ReturnValue. - * setX : Argument[0] -> Argument[this].SyntheticField[t.X] - * As the reads and stores are on synthetic fields we should only make summaries - * if both of these methods exist. - */ - pragma[nomagic] - predicate acceptReadStore( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - synthPathEntry(t1, read, t2, store) and reachesSynthExit(t2, store.reverse()) - or - exists(PropagateContentFlow::AccessPath store0 | store0.reverse() = read | - synthEntryReaches(t1, store0) and synthPathExit(t1, read, t2, store) - or - synthEntryReaches(t1, store0) and - step(t1, read, t2, store) and - reachesSynthExit(t2, store.reverse()) + string getInputArgument(DataFlow::Node source) { + exists(int pos | + pos = source.(DataFlow::ParameterNode).getParameter().getPosition() and + result = "Argument[" + pos + "]" ) + or + source.asExpr() instanceof DataFlowPrivate::FieldOrPropertyAccess and + result = qualifierString() } -} -/** - * Holds, if the API `api` has relevant flow from `read` on `p` to `store` on `returnNodeExt`. - * Flow is considered relevant, - * 1. If `read` or `store` do not contain a content set that translates into a synthetic field. - * 2. If `read` or `store` contain a content set that translates into a synthetic field, and if - * the synthetic content is "live" on the relevant declaring type. - */ -private predicate apiRelevantContentFlow( - ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, - PropagateContentFlow::AccessPath read, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath store, boolean preservesValue -) { - apiContentFlow(api, p, read, returnNodeExt, store, preservesValue) and - ( - not hasSyntheticContent(read) and not hasSyntheticContent(store) - or - AccessPathSyntheticValidation::acceptReadStore(p.getType(), read, returnNodeExt.getType(), store) - ) -} + bindingset[kind] + predicate isRelevantSinkKind(string kind) { any() } -pragma[nomagic] -private predicate captureContentFlow0( - ContentDataFlowSummaryTargetApi api, string input, string output, boolean preservesValue, - boolean lift -) { - exists( - DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath reads, - PropagateContentFlow::AccessPath stores - | - apiRelevantContentFlow(api, p, reads, returnNodeExt, stores, preservesValue) and - input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and - output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) and - input != output and - (if mentionsField(reads) or mentionsField(stores) then lift = false else lift = true) - ) -} + bindingset[kind] + predicate isRelevantSourceKind(string kind) { any() } -/** - * Gets the content based summary model(s) of the API `api` (if there is flow from a parameter to - * the return value or a parameter). - * - * Models are lifted to the best type in case the read and store access paths do not - * contain a field or synthetic field access. - */ -string captureContentFlow(ContentDataFlowSummaryTargetApi api) { - exists(string input, string output, boolean lift, boolean preservesValue | - captureContentFlow0(api, input, output, _, lift) and - preservesValue = max(boolean p | captureContentFlow0(api, input, output, p, lift)) and - result = Printing::asModel(api, input, output, preservesValue, lift) - ) -} + predicate containerContent(DataFlow::ContentSet c) { c.isElement() } -/** - * A dataflow configuration used for finding new sources. - * The sources are the already known existing sources and the sinks are the API return nodes. - * - * This can be used to generate Source summaries for an API, if the API expose an already known source - * via its return (then the API itself becomes a source). - */ -module PropagateFromSourceConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - exists(string kind | - isRelevantSourceKind(kind) and - ExternalFlow::sourceNode(source, kind) + predicate isAdditionalContentFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { + TaintTrackingPrivate::defaultAdditionalTaintStep(nodeFrom, nodeTo, _) and + not nodeTo.asExpr() instanceof CS::ElementAccess and + not exists(DataFlow::ContentSet c | + DataFlowPrivate::readStep(nodeFrom, c, nodeTo) and containerContent(c) ) } - predicate isSink(DataFlow::Node sink) { - sink instanceof ReturnNodeExt and - sink.getEnclosingCallable() instanceof DataFlowSourceTargetApi - } - - DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSinkCallContext } - - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.getType() and not isRelevantType(t)) - } - - predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - isRelevantTaintStep(node1, node2) + bindingset[d] + private string getFullyQualifiedName(Declaration d) { + exists(string qualifier, string name | + d.hasFullyQualifiedName(qualifier, name) and + result = QualifiedName::getQualifiedName(qualifier, name) + ) } -} - -private module PropagateFromSource = TaintTracking::Global; - -/** - * Gets the source model(s) of `api`, if there is flow from an existing known source to the return of `api`. - */ -string captureSource(DataFlowSourceTargetApi api) { - exists(DataFlow::Node source, ReturnNodeExt sink, string kind | - PropagateFromSource::flow(source, sink) and - ExternalFlow::sourceNode(source, kind) and - api = sink.getEnclosingCallable() and - not irrelevantSourceSinkApi(source.getEnclosingCallable(), api) and - result = Printing::asSourceModel(api, getOutput(sink), kind) - ) -} -/** - * A dataflow configuration used for finding new sinks. - * The sources are the parameters of the API and the fields of the enclosing type. - * - * This can be used to generate Sink summaries for APIs, if the API propagates a parameter (or enclosing type field) - * into an existing known sink (then the API itself becomes a sink). - */ -module PropagateToSinkConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - apiSource(source) and source.getEnclosingCallable() instanceof DataFlowSinkTargetApi + predicate isField(DataFlow::ContentSet c) { + c.isField(_) or c.isSyntheticField(_) or c.isProperty(_) } - predicate isSink(DataFlow::Node sink) { - exists(string kind | isRelevantSinkKind(kind) and ExternalFlow::sinkNode(sink, kind)) + string getSyntheticName(DataFlow::ContentSet c) { + exists(CS::Field f | + not f.isEffectivelyPublic() and + c.isField(f) and + result = getFullyQualifiedName(f) + ) + or + exists(CS::Property p | + not p.isEffectivelyPublic() and + c.isProperty(p) and + result = getFullyQualifiedName(p) + ) + or + c.isSyntheticField(result) } - predicate isBarrier(DataFlow::Node node) { - exists(Type t | t = node.getType() and not isRelevantType(t)) + string printContent(DataFlow::ContentSet c) { + exists(CS::Field f, string name | name = getFullyQualifiedName(f) | + c.isField(f) and + f.isEffectivelyPublic() and + result = "Field[" + name + "]" + ) + or + exists(CS::Property p, string name | name = getFullyQualifiedName(p) | + c.isProperty(p) and + p.isEffectivelyPublic() and + result = "Property[" + name + "]" + ) or - sinkModelSanitizer(node) + result = "SyntheticField[" + getSyntheticName(c) + "]" + or + c.isElement() and + result = "Element" } - DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } + predicate partialModel = ExternalFlow::partialModel/6; - predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - isRelevantTaintStep(node1, node2) - } -} + predicate sourceNode = ExternalFlow::sourceNode/2; -private module PropagateToSink = TaintTracking::Global; - -/** - * Gets the sink model(s) of `api`, if there is flow from a parameter to an existing known sink. - */ -string captureSink(DataFlowSinkTargetApi api) { - exists(DataFlow::Node src, DataFlow::Node sink, string kind | - PropagateToSink::flow(src, sink) and - ExternalFlow::sinkNode(sink, kind) and - api = src.getEnclosingCallable() and - result = Printing::asSinkModel(api, asInputArgument(src), kind) - ) + predicate sinkNode = ExternalFlow::sinkNode/2; } + +import MakeModelGenerator diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll deleted file mode 100644 index 8ac07342d559..000000000000 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll +++ /dev/null @@ -1,436 +0,0 @@ -/** - * Provides predicates related to capturing summary models of the Standard or a 3rd party library. - */ - -private import csharp as CS -private import semmle.code.csharp.commons.Util as Util -private import semmle.code.csharp.commons.Collections as Collections -private import semmle.code.csharp.commons.QualifiedName as QualifiedName -private import semmle.code.csharp.dataflow.internal.DataFlowDispatch -private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl -private import semmle.code.csharp.frameworks.system.linq.Expressions -private import semmle.code.csharp.frameworks.System -private import semmle.code.csharp.dataflow.internal.TaintTrackingPrivate as TaintTrackingPrivate -import semmle.code.csharp.dataflow.internal.ExternalFlow as ExternalFlow -import semmle.code.csharp.dataflow.internal.ContentDataFlow as ContentDataFlow -import semmle.code.csharp.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon -import semmle.code.csharp.dataflow.internal.DataFlowPrivate as DataFlowPrivate -import semmle.code.csharp.dataflow.internal.DataFlowDispatch as DataFlowDispatch - -module DataFlow = CS::DataFlow; - -module TaintTracking = CS::TaintTracking; - -class Type = CS::Type; - -class Callable = CS::Callable; - -class ContentSet = DataFlow::ContentSet; - -/** - * Holds if any of the parameters of `api` are `System.Func<>`. - */ -private predicate isHigherOrder(Callable api) { - exists(Type t | t = api.getAParameter().getType().getUnboundDeclaration() | - t instanceof SystemLinqExpressions::DelegateExtType - ) -} - -private predicate irrelevantAccessor(CS::Accessor a) { - a.getDeclaration().(CS::Property).isReadWrite() -} - -private predicate isUninterestingForModels(Callable api) { - api.getDeclaringType().getNamespace().getFullName() = "" - or - api instanceof CS::ConversionOperator - or - api instanceof Util::MainMethod - or - api instanceof CS::Destructor - or - api instanceof CS::AnonymousFunctionExpr - or - api.(CS::Constructor).isParameterless() - or - exists(Type decl | decl = api.getDeclaringType() | - decl instanceof SystemObjectClass or - decl instanceof SystemValueTypeClass - ) - or - // Disregard properties that have both a get and a set accessor, - // which implicitly means auto implemented properties. - irrelevantAccessor(api) -} - -private predicate relevant(Callable api) { - [api.(CS::Modifiable), api.(CS::Accessor).getDeclaration()].isEffectivelyPublic() and - api.fromSource() and - api.isUnboundDeclaration() and - not isUninterestingForModels(api) -} - -private Callable getARelevantOverrideeOrImplementee(Overridable m) { - m.overridesOrImplements(result) and relevant(result) -} - -/** - * Gets the super implementation of `api` if it is relevant. - * If such a super implementation does not exist, returns `api` if it is relevant. - */ -private Callable liftedImpl(Callable api) { - ( - result = getARelevantOverrideeOrImplementee(api) - or - result = api and relevant(api) - ) and - not exists(getARelevantOverrideeOrImplementee(result)) -} - -private predicate hasManualSummaryModel(Callable api) { - api = any(FlowSummaryImpl::Public::SummarizedCallable sc | sc.applyManualModel()) or - api = any(FlowSummaryImpl::Public::NeutralSummaryCallable sc | sc.hasManualModel()) -} - -private predicate hasManualSourceModel(Callable api) { - api = any(ExternalFlow::SourceCallable sc | sc.hasManualModel()) or - api = any(FlowSummaryImpl::Public::NeutralSourceCallable sc | sc.hasManualModel()) -} - -private predicate hasManualSinkModel(Callable api) { - api = any(ExternalFlow::SinkCallable sc | sc.hasManualModel()) or - api = any(FlowSummaryImpl::Public::NeutralSinkCallable sc | sc.hasManualModel()) -} - -/** - * Holds if it is irrelevant to generate models for `api` based on data flow analysis. - * - * This serves as an extra filter for the `relevant` predicate. - */ -predicate isUninterestingForDataFlowModels(CS::Callable api) { isHigherOrder(api) } - -/** - * Holds if it is irrelevant to generate models for `api` based on type-based analysis. - * - * This serves as an extra filter for the `relevant` predicate. - */ -predicate isUninterestingForTypeBasedFlowModels(CS::Callable api) { none() } - -/** - * A class of callables that are potentially relevant for generating source or - * sink models. - */ -class SourceOrSinkTargetApi extends Callable { - SourceOrSinkTargetApi() { relevant(this) } -} - -/** - * A class of callables that are potentially relevant for generating sink models. - */ -class SinkTargetApi extends SourceOrSinkTargetApi { - SinkTargetApi() { not hasManualSinkModel(this) } -} - -/** - * A class of callables that are potentially relevant for generating source models. - */ -class SourceTargetApi extends SourceOrSinkTargetApi { - SourceTargetApi() { - not hasManualSourceModel(this) and - // Do not generate source models for overridable callables - // as virtual dispatch implies that too many methods - // will be considered sources. - not this.(Overridable).overridesOrImplements(_) - } -} - -/** - * A class of callables that are potentially relevant for generating summary or - * neutral models. - * - * In the Standard library and 3rd party libraries it is the callables (or callables that have a - * super implementation) that can be called from outside the library itself. - */ -class SummaryTargetApi extends Callable { - private Callable lift; - - SummaryTargetApi() { - lift = liftedImpl(this) and - not hasManualSummaryModel(lift) - } - - /** - * Gets the callable that a model will be lifted to. - * - * The lifted callable is relevant in terms of model - * generation (this is ensured by `liftedImpl`). - */ - Callable lift() { result = lift } - - /** - * Holds if `this` is relevant in terms of model generation. - */ - predicate isRelevant() { relevant(this) } -} - -/** - * Holds if `t` is a type that is generally used for bulk data in collection types. - * Eg. char[] is roughly equivalent to string and thus a highly - * relevant type for model generation. - */ -private predicate isPrimitiveTypeUsedForBulkData(CS::Type t) { - t instanceof CS::ByteType or - t instanceof CS::CharType -} - -/** - * Holds if the collection type `ct` is irrelevant for model generation. - * Collection types where the type of the elements are - * (1) unknown - are considered relevant. - * (2) known - at least one the child types should be relevant (a non-simple type - * or a type used for bulk data) - */ -private predicate irrelevantCollectionType(CS::Type ct) { - Collections::isCollectionType(ct) and - forex(CS::Type child | child = ct.getAChild() | - child instanceof CS::SimpleType and - not isPrimitiveTypeUsedForBulkData(child) - ) -} - -/** - * Holds for type `t` for fields that are relevant as an intermediate - * read or write step in the data flow analysis. - * That is, flow through any data-flow node that does not have a relevant type - * will be excluded. - */ -predicate isRelevantType(CS::Type t) { - not t instanceof CS::SimpleType and - not t instanceof CS::Enum and - not t instanceof SystemDateTimeStruct and - not t instanceof SystemTypeClass and - not irrelevantCollectionType(t) -} - -/** - * Gets the underlying type of the content `c`. - */ -private CS::Type getUnderlyingContType(DataFlow::Content c) { - result = c.(DataFlow::FieldContent).getField().getType() or - result = c.(DataFlow::SyntheticFieldContent).getField().getType() -} - -/** - * Gets the underlying type of the content `c`. - */ -CS::Type getUnderlyingContentType(DataFlow::ContentSet c) { - exists(DataFlow::Content cont | - c.isSingleton(cont) and - result = getUnderlyingContType(cont) - ) - or - exists(CS::Property p | - c.isProperty(p) and - result = p.getType() - ) -} - -/** - * Gets the MaD string representation of the qualifier. - */ -string qualifierString() { result = "Argument[this]" } - -string parameterAccess(CS::Parameter p) { - if Collections::isCollectionType(p.getType()) - then result = "Argument[" + p.getPosition() + "].Element" - else result = "Argument[" + p.getPosition() + "]" -} - -/** - * Gets the MaD string representation of the parameter `p` - * when used in content flow. - */ -string parameterContentAccess(CS::Parameter p) { result = "Argument[" + p.getPosition() + "]" } - -class InstanceParameterNode = DataFlowPrivate::InstanceParameterNode; - -class ParameterPosition = DataFlowDispatch::ParameterPosition; - -private signature string parameterAccessSig(Parameter p); - -module ParamReturnNodeAsOutput { - bindingset[c] - string paramReturnNodeAsOutput(CS::Callable c, ParameterPosition pos) { - result = getParamAccess(c.getParameter(pos.getPosition())) - or - pos.isThisParameter() and - result = qualifierString() - } -} - -/** - * Gets the MaD string representation of return through parameter at position - * `pos` of callable `c`. - */ -bindingset[c] -string paramReturnNodeAsOutput(CS::Callable c, ParameterPosition pos) { - result = ParamReturnNodeAsOutput::paramReturnNodeAsOutput(c, pos) -} - -bindingset[c] -string paramReturnNodeAsContentOutput(Callable c, ParameterPosition pos) { - result = ParamReturnNodeAsOutput::paramReturnNodeAsOutput(c, pos) -} - -/** - * Gets the enclosing callable of `ret`. - */ -Callable returnNodeEnclosingCallable(DataFlow::Node ret) { - result = DataFlowImplCommon::getNodeEnclosingCallable(ret).asCallable(_) -} - -/** - * Holds if `node` is an own instance access. - */ -predicate isOwnInstanceAccessNode(DataFlowPrivate::ReturnNode node) { - node.asExpr() instanceof CS::ThisAccess -} - -private predicate isRelevantMemberAccess(DataFlow::Node node) { - exists(CS::MemberAccess access | access = node.asExpr() | - access.hasThisQualifier() and - access.getTarget().isEffectivelyPublic() and - ( - access instanceof CS::FieldAccess - or - access.getTarget().(CS::Property).getSetter().isPublic() - ) - ) -} - -predicate sinkModelSanitizer(DataFlow::Node node) { none() } - -/** - * Holds if `source` is an api entrypoint relevant for creating sink models. - */ -predicate apiSource(DataFlow::Node source) { - isRelevantMemberAccess(source) or source instanceof DataFlow::ParameterNode -} - -private predicate uniquelyCalls(DataFlowCallable dc1, DataFlowCallable dc2) { - exists(DataFlowCall call | - dc1 = call.getEnclosingCallable() and - dc2 = unique(DataFlowCallable dc0 | dc0 = viableCallable(call) | dc0) - ) -} - -bindingset[dc1, dc2] -private predicate uniquelyCallsPlus(DataFlowCallable dc1, DataFlowCallable dc2) = - fastTC(uniquelyCalls/2)(dc1, dc2) - -/** - * Holds if it is not relevant to generate a source model for `api`, even - * if flow is detected from a node within `source` to a sink within `api`. - */ -bindingset[sourceEnclosing, api] -predicate irrelevantSourceSinkApi(Callable sourceEnclosing, SourceTargetApi api) { - not exists(DataFlowCallable dc1, DataFlowCallable dc2 | uniquelyCallsPlus(dc1, dc2) or dc1 = dc2 | - dc1.getUnderlyingCallable() = api and - dc2.getUnderlyingCallable() = sourceEnclosing - ) -} - -/** - * Gets the MaD input string representation of `source`. - */ -string asInputArgumentSpecific(DataFlow::Node source) { - exists(int pos | - pos = source.(DataFlow::ParameterNode).getParameter().getPosition() and - result = "Argument[" + pos + "]" - ) - or - source.asExpr() instanceof DataFlowPrivate::FieldOrPropertyAccess and - result = qualifierString() -} - -/** - * Holds if `kind` is a relevant sink kind for creating sink models. - */ -bindingset[kind] -predicate isRelevantSinkKind(string kind) { any() } - -/** - * Holds if `kind` is a relevant source kind for creating source models. - */ -bindingset[kind] -predicate isRelevantSourceKind(string kind) { any() } - -/** - * Holds if the the content `c` is a container. - */ -predicate containerContent(DataFlow::ContentSet c) { c.isElement() } - -/** - * Holds if there is a taint step from `node1` to `node2` in content flow. - */ -predicate isAdditionalContentFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { - TaintTrackingPrivate::defaultAdditionalTaintStep(nodeFrom, nodeTo, _) and - not nodeTo.asExpr() instanceof CS::ElementAccess and - not exists(DataFlow::ContentSet c | - DataFlowPrivate::readStep(nodeFrom, c, nodeTo) and containerContent(c) - ) -} - -bindingset[d] -private string getFullyQualifiedName(Declaration d) { - exists(string qualifier, string name | - d.hasFullyQualifiedName(qualifier, name) and - result = QualifiedName::getQualifiedName(qualifier, name) - ) -} - -/** - * Holds if the content set `c` is a field, property or synthetic field. - */ -predicate isField(ContentSet c) { c.isField(_) or c.isSyntheticField(_) or c.isProperty(_) } - -/** - * Gets the MaD synthetic name string representation for the content set `c`, if any. - */ -string getSyntheticName(DataFlow::ContentSet c) { - exists(CS::Field f | - not f.isEffectivelyPublic() and - c.isField(f) and - result = getFullyQualifiedName(f) - ) - or - exists(CS::Property p | - not p.isEffectivelyPublic() and - c.isProperty(p) and - result = getFullyQualifiedName(p) - ) - or - c.isSyntheticField(result) -} - -/** - * Gets the MaD string representation of the content set `c`. - */ -string printContent(DataFlow::ContentSet c) { - exists(CS::Field f, string name | name = getFullyQualifiedName(f) | - c.isField(f) and - f.isEffectivelyPublic() and - result = "Field[" + name + "]" - ) - or - exists(CS::Property p, string name | name = getFullyQualifiedName(p) | - c.isProperty(p) and - p.isEffectivelyPublic() and - result = "Property[" + name + "]" - ) - or - result = "SyntheticField[" + getSyntheticName(c) + "]" - or - c.isElement() and - result = "Element" -} diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll index 8bb706bc484c..092c80664964 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll @@ -89,5 +89,5 @@ string captureFlow(DataFlowSummaryTargetApi api) { string captureNoFlow(DataFlowSummaryTargetApi api) { not exists(DataFlowSummaryTargetApi api0 | exists(captureFlow(api0)) and api0.lift() = api.lift()) and api.isRelevant() and - result = Printing::asNeutralSummaryModel(api) + result = ModelPrinting::asNeutralSummaryModel(api) } diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll index 1a0a3d2ca420..f7b0633ddd39 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll @@ -2,7 +2,7 @@ private import csharp private import semmle.code.csharp.frameworks.system.collections.Generic as GenericCollections private import semmle.code.csharp.dataflow.internal.DataFlowPrivate private import semmle.code.csharp.frameworks.system.linq.Expressions -private import CaptureModelsSpecific as Specific +private import CaptureModels::ModelGeneratorInput as ModelGeneratorInput private import CaptureModelsPrinting /** @@ -38,7 +38,7 @@ private predicate localTypeParameter(Callable callable, TypeParameter tp) { */ private predicate parameter(Callable callable, string input, TypeParameter tp) { exists(Parameter p | - input = Specific::parameterAccess(p) and + input = ModelGeneratorInput::parameterAccess(p) and p = callable.getAParameter() and ( // Parameter of type tp @@ -69,7 +69,7 @@ private string implicit(Callable callable, TypeParameter tp) { then access = ".Element" else access = getSyntheticField(tp) | - result = Specific::qualifierString() + access + result = ModelGeneratorInput::qualifierString() + access ) } @@ -191,9 +191,7 @@ private module Printing = ModelPrinting; * A class of callables that are relevant generating summaries for based * on the Theorems for Free approach. */ -class TypeBasedFlowTargetApi extends Specific::SummaryTargetApi { - TypeBasedFlowTargetApi() { not Specific::isUninterestingForTypeBasedFlowModels(this) } - +class TypeBasedFlowTargetApi extends ModelGeneratorInput::SummaryTargetApi { /** * Gets the string representation of all type based summaries for `this` * inspired by the Theorems for Free approach. From 2033818e39ff17a4bfa8f9afff6495726b8bb5db Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 18 Sep 2024 13:57:46 +0200 Subject: [PATCH 037/162] Java: Use the shared model generator implementation. --- .../dataflow/internal/DataFlowPrivate.qll | 2 +- .../modelgenerator/internal/CaptureModels.qll | 763 +++++------------- .../internal/CaptureModelsPrinting.qll | 4 +- .../internal/CaptureModelsSpecific.qll | 380 --------- .../internal/CaptureSummaryFlowQuery.qll | 2 +- .../CaptureTypeBasedSummaryModels.qll | 13 +- 6 files changed, 220 insertions(+), 944 deletions(-) delete mode 100644 java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll index 784d248d8dce..589d75c3635d 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll @@ -760,7 +760,7 @@ ContentApprox getContentApprox(Content c) { /** * Holds if the the content `c` is a container. */ -predicate containerContent(Content c) { +predicate containerContent(ContentSet c) { c instanceof ArrayContent or c instanceof CollectionContent or c instanceof MapKeyContent or diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll index ab5de0d01979..9cc3bd17d25b 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -1,635 +1,292 @@ /** - * Provides classes and predicates related to capturing summary, source, - * and sink models of the Standard or a 3rd party library. + * Provides predicates related to capturing summary models of the Standard or a 3rd party library. */ -private import CaptureModelsSpecific -private import CaptureModelsPrinting +private import java as J +private import semmle.code.java.dataflow.DataFlow +private import semmle.code.java.dataflow.ExternalFlow as ExternalFlow +private import semmle.code.java.dataflow.internal.ContainerFlow as ContainerFlow +private import semmle.code.java.dataflow.internal.DataFlowDispatch +private import semmle.code.java.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon +private import semmle.code.java.dataflow.internal.DataFlowImplSpecific +private import semmle.code.java.dataflow.internal.DataFlowPrivate as DataFlowPrivate +private import semmle.code.java.dataflow.internal.DataFlowUtil as DataFlowUtil +private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +private import semmle.code.java.dataflow.internal.ModelExclusions +private import semmle.code.java.dataflow.internal.TaintTrackingImplSpecific +private import semmle.code.java.dataflow.SSA as Ssa +private import semmle.code.java.dataflow.TaintTracking +private import codeql.mad.modelgenerator.ModelGeneratorImpl /** - * A node from which flow can return to the caller. This is either a regular - * `ReturnNode` or a `PostUpdateNode` corresponding to the value of a parameter. + * Holds if the type `t` is a primitive type used for bulk data. */ -private class ReturnNodeExt extends DataFlow::Node { - private DataFlowImplCommon::ReturnKindExt kind; - - ReturnNodeExt() { - kind = DataFlowImplCommon::getValueReturnPosition(this).getKind() or - kind = DataFlowImplCommon::getParamReturnPosition(this, _).getKind() - } - - /** - * Gets the kind of the return node. - */ - DataFlowImplCommon::ReturnKindExt getKind() { result = kind } +predicate isPrimitiveTypeUsedForBulkData(J::Type t) { + t.hasName(["byte", "char", "Byte", "Character"]) } -bindingset[c] -private signature string printCallableParamSig(Callable c, ParameterPosition p); - -private module PrintReturnNodeExt { - string getOutput(ReturnNodeExt node) { - node.getKind() instanceof DataFlowImplCommon::ValueReturnKind and - result = "ReturnValue" - or - exists(ParameterPosition pos | - pos = node.getKind().(DataFlowImplCommon::ParamUpdateReturnKind).getPosition() and - result = printCallableParam(returnNodeEnclosingCallable(node), pos) - ) - } -} +module ModelGeneratorInput implements ModelGeneratorInputSig { + class Type = J::Type; -string getOutput(ReturnNodeExt node) { - result = PrintReturnNodeExt::getOutput(node) -} + class Parameter = J::Parameter; -string getContentOutput(ReturnNodeExt node) { - result = PrintReturnNodeExt::getOutput(node) -} + class Callable = J::Callable; -class DataFlowSummaryTargetApi extends SummaryTargetApi { - DataFlowSummaryTargetApi() { not isUninterestingForDataFlowModels(this) } -} - -class DataFlowSourceTargetApi = SourceTargetApi; - -class DataFlowSinkTargetApi = SinkTargetApi; - -private module ModelPrintingInput implements ModelPrintingSig { - class SummaryApi = DataFlowSummaryTargetApi; - - class SourceOrSinkApi = SourceOrSinkTargetApi; - - string getProvenance() { result = "df-generated" } -} - -module Printing = ModelPrinting; - -/** - * Holds if `c` is a relevant content kind, where the underlying type is relevant. - */ -private predicate isRelevantTypeInContent(DataFlow::ContentSet c) { - isRelevantType(getUnderlyingContentType(c)) -} - -/** - * Holds if data can flow from `node1` to `node2` either via a read or a write of an intermediate field `f`. - */ -private predicate isRelevantTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - exists(DataFlow::ContentSet f | - DataFlowPrivate::readStep(node1, f, node2) and - // Partially restrict the content types used for intermediate steps. - (not exists(getUnderlyingContentType(f)) or isRelevantTypeInContent(f)) - ) - or - exists(DataFlow::ContentSet f | DataFlowPrivate::storeStep(node1, f, node2) | containerContent(f)) -} - -/** - * Holds if content `c` is either a field, a synthetic field or language specific - * content of a relevant type or a container like content. - */ -pragma[nomagic] -private predicate isRelevantContent0(DataFlow::ContentSet c) { - isRelevantTypeInContent(c) or - containerContent(c) -} - -/** - * Gets the MaD string representation of the parameter node `p`. - */ -string parameterNodeAsInput(DataFlow::ParameterNode p) { - result = parameterAccess(p.asParameter()) - or - result = qualifierString() and p instanceof InstanceParameterNode -} - -/** - * Gets the MaD string representation of the parameter `p` - * when used in content flow. - */ -string parameterNodeAsContentInput(DataFlow::ParameterNode p) { - result = parameterContentAccess(p.asParameter()) - or - result = qualifierString() and p instanceof InstanceParameterNode -} - -/** - * Gets the MaD input string representation of `source`. - */ -string asInputArgument(DataFlow::Node source) { result = asInputArgumentSpecific(source) } - -/** - * Gets the summary model of `api`, if it follows the `fluent` programming pattern (returns `this`). - */ -string captureQualifierFlow(DataFlowSummaryTargetApi api) { - exists(ReturnNodeExt ret | - api = returnNodeEnclosingCallable(ret) and - isOwnInstanceAccessNode(ret) - ) and - result = Printing::asLiftedValueModel(api, qualifierString(), "ReturnValue") -} - -private int accessPathLimit0() { result = 2 } - -private newtype TTaintState = - TTaintRead(int n) { n in [0 .. accessPathLimit0()] } or - TTaintStore(int n) { n in [1 .. accessPathLimit0()] } - -abstract private class TaintState extends TTaintState { - abstract string toString(); -} - -/** - * A FlowState representing a tainted read. - */ -private class TaintRead extends TaintState, TTaintRead { - private int step; - - TaintRead() { this = TTaintRead(step) } - - /** - * Gets the flow state step number. - */ - int getStep() { result = step } + class NodeExtended extends DataFlow::Node { + Callable getAsExprEnclosingCallable() { result = this.asExpr().getEnclosingCallable() } + } - override string toString() { result = "TaintRead(" + step + ")" } -} + private predicate isInfrequentlyUsed(J::CompilationUnit cu) { + cu.getPackage().getName().matches("javax.swing%") or + cu.getPackage().getName().matches("java.awt%") + } -/** - * A FlowState representing a tainted write. - */ -private class TaintStore extends TaintState, TTaintStore { - private int step; + private predicate relevant(Callable api) { + api.isPublic() and + api.getDeclaringType().isPublic() and + api.fromSource() and + not isUninterestingForModels(api) and + not isInfrequentlyUsed(api.getCompilationUnit()) + } - TaintStore() { this = TTaintStore(step) } + private J::Method getARelevantOverride(J::Method m) { + result = m.getAnOverride() and + relevant(result) and + // Other exclusions for overrides. + not m instanceof J::ToStringMethod + } /** - * Gets the flow state step number. + * Gets the super implementation of `m` if it is relevant. + * If such a super implementations does not exist, returns `m` if it is relevant. */ - int getStep() { result = step } - - override string toString() { result = "TaintStore(" + step + ")" } -} - -/** - * A data-flow configuration for tracking flow through APIs. - * The sources are the parameters of an API and the sinks are the return values (excluding `this`) and parameters. - * - * This can be used to generate Flow summaries for APIs from parameter to return. - */ -module PropagateFlowConfig implements DataFlow::StateConfigSig { - class FlowState = TaintState; - - predicate isSource(DataFlow::Node source, FlowState state) { - source instanceof DataFlow::ParameterNode and - source.getEnclosingCallable() instanceof DataFlowSummaryTargetApi and - state.(TaintRead).getStep() = 0 + private J::Callable liftedImpl(J::Callable m) { + ( + result = getARelevantOverride(m) + or + result = m and relevant(m) + ) and + not exists(getARelevantOverride(result)) } - predicate isSink(DataFlow::Node sink, FlowState state) { - sink instanceof ReturnNodeExt and - not isOwnInstanceAccessNode(sink) and - not exists(captureQualifierFlow(sink.asExpr().getEnclosingCallable())) and - (state instanceof TaintRead or state instanceof TaintStore) + private predicate hasManualSummaryModel(Callable api) { + api = any(FlowSummaryImpl::Public::SummarizedCallable sc | sc.applyManualModel()).asCallable() or + api = any(FlowSummaryImpl::Public::NeutralSummaryCallable sc | sc.hasManualModel()).asCallable() } - predicate isAdditionalFlowStep( - DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2 - ) { - exists(DataFlow::ContentSet c | - DataFlowImplCommon::store(node1, c.getAStoreContent(), node2, _, _) and - isRelevantContent0(c) and - ( - state1 instanceof TaintRead and state2.(TaintStore).getStep() = 1 - or - state1.(TaintStore).getStep() + 1 = state2.(TaintStore).getStep() - ) - ) - or - exists(DataFlow::ContentSet c | - DataFlowPrivate::readStep(node1, c, node2) and - isRelevantContent0(c) and - state1.(TaintRead).getStep() + 1 = state2.(TaintRead).getStep() - ) + private predicate hasManualSourceModel(Callable api) { + api = any(ExternalFlow::SourceCallable sc | sc.hasManualModel()) or + api = any(FlowSummaryImpl::Public::NeutralSourceCallable sc | sc.hasManualModel()).asCallable() } - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.getType() and not isRelevantType(t)) + private predicate hasManualSinkModel(Callable api) { + api = any(ExternalFlow::SinkCallable sc | sc.hasManualModel()) or + api = any(FlowSummaryImpl::Public::NeutralSinkCallable sc | sc.hasManualModel()).asCallable() } - DataFlow::FlowFeature getAFeature() { - result instanceof DataFlow::FeatureEqualSourceSinkCallContext + predicate isUninterestingForDataFlowModels(Callable api) { + api.getDeclaringType() instanceof J::Interface and not exists(api.getBody()) } -} - -module PropagateFlow = TaintTracking::GlobalWithState; -/** - * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. - */ -string captureThroughFlow0( - DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt -) { - exists(string input, string output | - p.getEnclosingCallable() = api and - returnNodeExt.(DataFlow::Node).getEnclosingCallable() = api and - input = parameterNodeAsInput(p) and - output = getOutput(returnNodeExt) and - input != output and - result = Printing::asLiftedTaintModel(api, input, output) - ) -} - -/** - * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. - */ -string captureThroughFlow(DataFlowSummaryTargetApi api) { - exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | - PropagateFlow::flow(p, returnNodeExt) and - result = captureThroughFlow0(api, p, returnNodeExt) - ) -} - -private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source instanceof DataFlow::ParameterNode and - source.getEnclosingCallable() instanceof DataFlowSummaryTargetApi + class SourceOrSinkTargetApi extends Callable { + SourceOrSinkTargetApi() { relevant(this) } } - predicate isSink(DataFlow::Node sink) { - sink instanceof ReturnNodeExt and - sink.getEnclosingCallable() instanceof DataFlowSummaryTargetApi + class SinkTargetApi extends SourceOrSinkTargetApi { + SinkTargetApi() { not hasManualSinkModel(this) } } - predicate isAdditionalFlowStep = isAdditionalContentFlowStep/2; - - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.getType() and not isRelevantType(t)) + class SourceTargetApi extends SourceOrSinkTargetApi { + SourceTargetApi() { not hasManualSourceModel(this) } } - int accessPathLimit() { result = 2 } + class SummaryTargetApi extends Callable { + private Callable lift; - predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } + SummaryTargetApi() { + lift = liftedImpl(this) and + not hasManualSummaryModel(lift) + } - DataFlow::FlowFeature getAFeature() { - result instanceof DataFlow::FeatureEqualSourceSinkCallContext - } -} + Callable lift() { result = lift } -private module PropagateContentFlow = ContentDataFlow::Global; - -private string getContent(PropagateContentFlow::AccessPath ap, int i) { - exists(ContentSet head, PropagateContentFlow::AccessPath tail | - head = ap.getHead() and - tail = ap.getTail() - | - i = 0 and - result = "." + printContent(head) - or - i > 0 and result = getContent(tail, i - 1) - ) -} - -/** - * Gets the MaD string representation of a store step access path. - */ -private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) { - result = concat(int i | | getContent(ap, i), "" order by i) -} - -/** - * Gets the MaD string representation of a read step access path. - */ -private string printReadAccessPath(PropagateContentFlow::AccessPath ap) { - result = concat(int i | | getContent(ap, i), "" order by i desc) -} - -/** - * Holds if the access path `ap` contains a field or synthetic field access. - */ -private predicate mentionsField(PropagateContentFlow::AccessPath ap) { - exists(ContentSet head, PropagateContentFlow::AccessPath tail | - head = ap.getHead() and - tail = ap.getTail() - | - mentionsField(tail) or isField(head) - ) -} - -private predicate apiFlow( - DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, - ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores, boolean preservesValue -) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - returnNodeExt.getEnclosingCallable() = api and - p.getEnclosingCallable() = api -} - -/** - * A class of APIs relevant for modeling using content flow. - * The following heuristic is applied: - * Content flow is only relevant for an API, if - * #content flow <= 2 * #parameters + 3 - * If an API produces more content flow, it is likely that - * 1. Types are not sufficiently constrained leading to a combinatorial - * explosion in dispatch and thus in the generated summaries. - * 2. It is a reasonable approximation to use the non-content based flow - * detection instead, as reads and stores would use a significant - * part of an objects internal state. - */ -private class ContentDataFlowSummaryTargetApi extends DataFlowSummaryTargetApi { - ContentDataFlowSummaryTargetApi() { - count(string input, string output | - exists( - DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, - ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores - | - apiFlow(this, p, reads, returnNodeExt, stores, _) and - input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and - output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) - ) - ) <= 2 * this.getNumberOfParameters() + 3 + predicate isRelevant() { relevant(this) } } -} - -pragma[nomagic] -private predicate apiContentFlow( - ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, - PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath stores, boolean preservesValue -) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - returnNodeExt.getEnclosingCallable() = api and - p.getEnclosingCallable() = api -} -/** - * Holds if any of the content sets in `path` translates into a synthetic field. - */ -private predicate hasSyntheticContent(PropagateContentFlow::AccessPath path) { - exists(PropagateContentFlow::AccessPath tail, ContentSet head | - head = path.getHead() and - tail = path.getTail() - | - exists(getSyntheticName(head)) or - hasSyntheticContent(tail) - ) -} + private string isExtensible(Callable c) { + if c.getDeclaringType().isFinal() then result = "false" else result = "true" + } -/** - * A module containing predicates for validating access paths containing content sets - * that translates into synthetic fields, when used for generated summary models. - */ -private module AccessPathSyntheticValidation { /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`). + * Holds if the callable `c` is in package `package` + * and is a member of `type`. */ - private predicate step( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | - p.getType() = t1 and - returnNodeExt.getType() = t2 and - apiContentFlow(_, p, read, returnNodeExt, store, _) + private predicate qualifiedName(Callable c, string package, string type) { + exists(RefType t | t = c.getDeclaringType() | + package = t.getCompilationUnit().getPackage().getName() and + type = t.getErasure().(J::RefType).getNestedName() ) } - /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`), where `read` does not have synthetic content and `store` does. - * - * Step A -> Synth. - */ - private predicate synthPathEntry( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - not hasSyntheticContent(read) and - hasSyntheticContent(store) and - step(t1, read, t2, store) + predicate isRelevantType(Type t) { + not t instanceof J::TypeClass and + not t instanceof J::EnumType and + not t instanceof J::PrimitiveType and + not t instanceof J::BoxedType and + not t.(J::RefType).getAnAncestor().hasQualifiedName("java.lang", "Number") and + not t.(J::RefType).getAnAncestor().hasQualifiedName("java.nio.charset", "Charset") and + ( + not t.(J::Array).getElementType() instanceof J::PrimitiveType or + isPrimitiveTypeUsedForBulkData(t.(J::Array).getElementType()) + ) and + ( + not t.(J::Array).getElementType() instanceof J::BoxedType or + isPrimitiveTypeUsedForBulkData(t.(J::Array).getElementType()) + ) and + ( + not t.(ContainerFlow::CollectionType).getElementType() instanceof J::BoxedType or + isPrimitiveTypeUsedForBulkData(t.(ContainerFlow::CollectionType).getElementType()) + ) } - /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`), where `read` has synthetic content - * and `store` does not. - * - * Step Synth -> A. - */ - private predicate synthPathExit( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - hasSyntheticContent(read) and - not hasSyntheticContent(store) and - step(t1, read, t2, store) + Type getUnderlyingContentType(DataFlow::ContentSet c) { + result = c.(DataFlow::FieldContent).getField().getType() or + result = c.(DataFlow::SyntheticFieldContent).getField().getType() } - /** - * Holds if there exists a path of steps from `read` to an exit. - * - * read ->* Synth -> A - */ - private predicate reachesSynthExit(Type t, PropagateContentFlow::AccessPath read) { - synthPathExit(t, read, _, _) - or - hasSyntheticContent(read) and - exists(PropagateContentFlow::AccessPath mid, Type midType | - hasSyntheticContent(mid) and - step(t, read, midType, mid) and - reachesSynthExit(midType, mid.reverse()) - ) + string qualifierString() { result = "Argument[this]" } + + string parameterAccess(J::Parameter p) { + if + p.getType() instanceof J::Array and + not isPrimitiveTypeUsedForBulkData(p.getType().(J::Array).getElementType()) + then result = "Argument[" + p.getPosition() + "].ArrayElement" + else + if p.getType() instanceof ContainerFlow::ContainerType + then result = "Argument[" + p.getPosition() + "].Element" + else result = "Argument[" + p.getPosition() + "]" } - /** - * Holds if there exists a path of steps from an entry to `store`. - * - * A -> Synth ->* store - */ - private predicate synthEntryReaches(Type t, PropagateContentFlow::AccessPath store) { - synthPathEntry(_, _, t, store) - or - hasSyntheticContent(store) and - exists(PropagateContentFlow::AccessPath mid, Type midType | - hasSyntheticContent(mid) and - step(midType, mid, t, store) and - synthEntryReaches(midType, mid.reverse()) - ) - } + string parameterContentAccess(J::Parameter p) { result = "Argument[" + p.getPosition() + "]" } - /** - * Holds if at least one of the access paths `read` (on type `t1`) and `store` (on type `t2`) - * contain content that will be translated into a synthetic field, when being used in - * a MaD summary model, and if there is a range of APIs, such that - * when chaining their flow access paths, there exists access paths `A` and `B` where - * A ->* read -> store ->* B and where `A` and `B` do not contain content that will - * be translated into a synthetic field. - * - * This is needed because we don't want to include summaries that reads from or - * stores into a "dead" synthetic field. - * - * Example: - * Assume we have a type `t` (in this case `t1` = `t2`) with methods `getX` and - * `setX`, which gets and sets a private field `X` on `t`. - * This would lead to the following content flows - * getX : Argument[this].SyntheticField[t.X] -> ReturnValue. - * setX : Argument[0] -> Argument[this].SyntheticField[t.X] - * As the reads and stores are on synthetic fields we should only make summaries - * if both of these methods exist. - */ - pragma[nomagic] - predicate acceptReadStore( - Type t1, PropagateContentFlow::AccessPath read, Type t2, PropagateContentFlow::AccessPath store - ) { - synthPathEntry(t1, read, t2, store) and reachesSynthExit(t2, store.reverse()) + class InstanceParameterNode = DataFlow::InstanceParameterNode; + + bindingset[c] + string paramReturnNodeAsOutput(Callable c, ParameterPosition pos) { + result = parameterAccess(c.getParameter(pos)) or - exists(PropagateContentFlow::AccessPath store0 | store0.reverse() = read | - synthEntryReaches(t1, store0) and synthPathExit(t1, read, t2, store) - or - synthEntryReaches(t1, store0) and - step(t1, read, t2, store) and - reachesSynthExit(t2, store.reverse()) - ) + result = qualifierString() and pos = -1 } -} -/** - * Holds, if the API `api` has relevant flow from `read` on `p` to `store` on `returnNodeExt`. - * Flow is considered relevant, - * 1. If `read` or `store` do not contain a content set that translates into a synthetic field. - * 2. If `read` or `store` contain a content set that translates into a synthetic field, and if - * the synthetic content is "live" on the relevant declaring type. - */ -private predicate apiRelevantContentFlow( - ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, - PropagateContentFlow::AccessPath read, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath store, boolean preservesValue -) { - apiContentFlow(api, p, read, returnNodeExt, store, preservesValue) and - ( - not hasSyntheticContent(read) and not hasSyntheticContent(store) + bindingset[c] + string paramReturnNodeAsContentOutput(Callable c, ParameterPosition pos) { + result = parameterContentAccess(c.getParameter(pos)) or - AccessPathSyntheticValidation::acceptReadStore(p.getType(), read, returnNodeExt.getType(), store) - ) -} + result = qualifierString() and pos = -1 + } -pragma[nomagic] -private predicate captureContentFlow0( - ContentDataFlowSummaryTargetApi api, string input, string output, boolean preservesValue, - boolean lift -) { - exists( - DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath reads, - PropagateContentFlow::AccessPath stores - | - apiRelevantContentFlow(api, p, reads, returnNodeExt, stores, preservesValue) and - input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and - output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) and - input != output and - (if mentionsField(reads) or mentionsField(stores) then lift = false else lift = true) - ) -} + Callable returnNodeEnclosingCallable(DataFlow::Node ret) { + result = DataFlowImplCommon::getNodeEnclosingCallable(ret).asCallable() + } -/** - * Gets the content based summary model(s) of the API `api` (if there is flow from a parameter to - * the return value or a parameter). - * - * Models are lifted to the best type in case the read and store access paths do not - * contain a field or synthetic field access. - */ -string captureContentFlow(ContentDataFlowSummaryTargetApi api) { - exists(string input, string output, boolean lift, boolean preservesValue | - captureContentFlow0(api, input, output, _, lift) and - preservesValue = max(boolean p | captureContentFlow0(api, input, output, p, lift)) and - result = Printing::asModel(api, input, output, preservesValue, lift) - ) -} + predicate isOwnInstanceAccessNode(DataFlowPrivate::ReturnNode node) { + node.asExpr().(J::ThisAccess).isOwnInstanceAccess() + } -/** - * A dataflow configuration used for finding new sources. - * The sources are the already known existing sources and the sinks are the API return nodes. - * - * This can be used to generate Source summaries for an API, if the API expose an already known source - * via its return (then the API itself becomes a source). - */ -module PropagateFromSourceConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - exists(string kind | - isRelevantSourceKind(kind) and - ExternalFlow::sourceNode(source, kind) + predicate sinkModelSanitizer(DataFlow::Node node) { + // exclude variable capture jump steps + exists(Ssa::SsaImplicitInit closure | + closure.captures(_) and + node.asExpr() = closure.getAFirstUse() ) } - predicate isSink(DataFlow::Node sink) { - sink instanceof ReturnNodeExt and - sink.getEnclosingCallable() instanceof DataFlowSourceTargetApi + predicate apiSource(DataFlow::Node source) { + ( + source.asExpr().(J::FieldAccess).isOwnFieldAccess() or + source instanceof DataFlow::ParameterNode + ) and + exists(J::RefType t | + t = source.getEnclosingCallable().getDeclaringType().getAnAncestor() and + not t instanceof J::TypeObject and + t.isPublic() + ) } - DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSinkCallContext } + predicate irrelevantSourceSinkApi(Callable source, SourceTargetApi api) { none() } - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.getType() and not isRelevantType(t)) + string getInputArgument(DataFlow::Node source) { + exists(int pos | + source.(DataFlow::ParameterNode).isParameterOf(_, pos) and + if pos >= 0 then result = "Argument[" + pos + "]" else result = qualifierString() + ) + or + source.asExpr() instanceof J::FieldAccess and + result = qualifierString() } - predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - isRelevantTaintStep(node1, node2) + bindingset[kind] + predicate isRelevantSinkKind(string kind) { + not kind = "log-injection" and + not kind.matches("regex-use%") and + not kind = "file-content-store" } -} -private module PropagateFromSource = TaintTracking::Global; + bindingset[kind] + predicate isRelevantSourceKind(string kind) { any() } -/** - * Gets the source model(s) of `api`, if there is flow from an existing known source to the return of `api`. - */ -string captureSource(DataFlowSourceTargetApi api) { - exists(DataFlow::Node source, ReturnNodeExt sink, string kind | - PropagateFromSource::flow(source, sink) and - ExternalFlow::sourceNode(source, kind) and - api = sink.getEnclosingCallable() and - not irrelevantSourceSinkApi(source.getEnclosingCallable(), api) and - result = Printing::asSourceModel(api, getOutput(sink), kind) - ) -} + predicate containerContent = DataFlowPrivate::containerContent/1; -/** - * A dataflow configuration used for finding new sinks. - * The sources are the parameters of the API and the fields of the enclosing type. - * - * This can be used to generate Sink summaries for APIs, if the API propagates a parameter (or enclosing type field) - * into an existing known sink (then the API itself becomes a sink). - */ -module PropagateToSinkConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - apiSource(source) and source.getEnclosingCallable() instanceof DataFlowSinkTargetApi + predicate isAdditionalContentFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + TaintTracking::defaultAdditionalTaintStep(node1, node2, _) and + not exists(DataFlow::Content f | + DataFlowPrivate::readStep(node1, f, node2) and containerContent(f) + ) } - predicate isSink(DataFlow::Node sink) { - exists(string kind | isRelevantSinkKind(kind) and ExternalFlow::sinkNode(sink, kind)) + predicate isField(DataFlow::ContentSet c) { + c instanceof DataFlowUtil::FieldContent or + c instanceof DataFlowUtil::SyntheticFieldContent } - predicate isBarrier(DataFlow::Node node) { - exists(Type t | t = node.getType() and not isRelevantType(t)) + string getSyntheticName(DataFlow::ContentSet c) { + exists(Field f | + not f.isPublic() and + f = c.(DataFlowUtil::FieldContent).getField() and + result = f.getQualifiedName() + ) or - sinkModelSanitizer(node) + result = c.(DataFlowUtil::SyntheticFieldContent).getField() } - DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } + string printContent(DataFlow::ContentSet c) { + exists(Field f | f = c.(DataFlowUtil::FieldContent).getField() and f.isPublic() | + result = "Field[" + f.getQualifiedName() + "]" + ) + or + result = "SyntheticField[" + getSyntheticName(c) + "]" + or + c instanceof DataFlowUtil::CollectionContent and result = "Element" + or + c instanceof DataFlowUtil::ArrayContent and result = "ArrayElement" + or + c instanceof DataFlowUtil::MapValueContent and result = "MapValue" + or + c instanceof DataFlowUtil::MapKeyContent and result = "MapKey" + } - predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - isRelevantTaintStep(node1, node2) + predicate partialModel( + Callable api, string package, string type, string extensible, string name, string parameters + ) { + qualifiedName(api, package, type) and + extensible = isExtensible(api) and + name = api.getName() and + parameters = ExternalFlow::paramsString(api) } -} -private module PropagateToSink = TaintTracking::Global; + predicate sourceNode = ExternalFlow::sourceNode/2; -/** - * Gets the sink model(s) of `api`, if there is flow from a parameter to an existing known sink. - */ -string captureSink(DataFlowSinkTargetApi api) { - exists(DataFlow::Node src, DataFlow::Node sink, string kind | - PropagateToSink::flow(src, sink) and - ExternalFlow::sinkNode(sink, kind) and - api = src.getEnclosingCallable() and - result = Printing::asSinkModel(api, asInputArgument(src), kind) - ) + predicate sinkNode = ExternalFlow::sinkNode/2; } + +import MakeModelGenerator diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll index 33d176c3d893..57dc74ccca55 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll @@ -1,11 +1,11 @@ private import java as J private import codeql.mad.modelgenerator.ModelPrinting -private import CaptureModelsSpecific as Specific +private import CaptureModels::ModelGeneratorInput as ModelGeneratorInput private module ModelPrintingLang implements ModelPrintingLangSig { class Callable = J::Callable; - predicate partialModel = Specific::partialModel/6; + predicate partialModel = ModelGeneratorInput::partialModel/6; } import ModelPrintingImpl diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll deleted file mode 100644 index f359d59973ca..000000000000 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll +++ /dev/null @@ -1,380 +0,0 @@ -/** - * Provides predicates related to capturing summary models of the Standard or a 3rd party library. - */ - -private import java as J -private import semmle.code.java.dataflow.internal.DataFlowPrivate -private import semmle.code.java.dataflow.internal.DataFlowUtil as DataFlowUtil -private import semmle.code.java.dataflow.internal.ContainerFlow as ContainerFlow -private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl -private import semmle.code.java.dataflow.internal.ModelExclusions -private import semmle.code.java.dataflow.DataFlow as Df -private import semmle.code.java.dataflow.internal.ContentDataFlow as Cdf -private import semmle.code.java.dataflow.SSA as Ssa -private import semmle.code.java.dataflow.TaintTracking as Tt -import semmle.code.java.dataflow.ExternalFlow as ExternalFlow -import semmle.code.java.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon -import semmle.code.java.dataflow.internal.DataFlowPrivate as DataFlowPrivate -import semmle.code.java.dataflow.internal.DataFlowDispatch as DataFlowDispatch - -module DataFlow = Df::DataFlow; - -module ContentDataFlow = Cdf::ContentDataFlow; - -module TaintTracking = Tt::TaintTracking; - -class Type = J::Type; - -class Unit = J::Unit; - -class Callable = J::Callable; - -class ContentSet = DataFlowUtil::ContentSet; - -private predicate isInfrequentlyUsed(J::CompilationUnit cu) { - cu.getPackage().getName().matches("javax.swing%") or - cu.getPackage().getName().matches("java.awt%") -} - -private predicate relevant(Callable api) { - api.isPublic() and - api.getDeclaringType().isPublic() and - api.fromSource() and - not isUninterestingForModels(api) and - not isInfrequentlyUsed(api.getCompilationUnit()) -} - -private J::Method getARelevantOverride(J::Method m) { - result = m.getAnOverride() and - relevant(result) and - // Other exclusions for overrides. - not m instanceof J::ToStringMethod -} - -/** - * Gets the super implementation of `m` if it is relevant. - * If such a super implementations does not exist, returns `m` if it is relevant. - */ -private J::Callable liftedImpl(J::Callable m) { - ( - result = getARelevantOverride(m) - or - result = m and relevant(m) - ) and - not exists(getARelevantOverride(result)) -} - -private predicate hasManualSummaryModel(Callable api) { - api = any(FlowSummaryImpl::Public::SummarizedCallable sc | sc.applyManualModel()).asCallable() or - api = any(FlowSummaryImpl::Public::NeutralSummaryCallable sc | sc.hasManualModel()).asCallable() -} - -private predicate hasManualSourceModel(Callable api) { - api = any(ExternalFlow::SourceCallable sc | sc.hasManualModel()) or - api = any(FlowSummaryImpl::Public::NeutralSourceCallable sc | sc.hasManualModel()).asCallable() -} - -private predicate hasManualSinkModel(Callable api) { - api = any(ExternalFlow::SinkCallable sc | sc.hasManualModel()) or - api = any(FlowSummaryImpl::Public::NeutralSinkCallable sc | sc.hasManualModel()).asCallable() -} - -/** - * Holds if it is irrelevant to generate models for `api` based on data flow analysis. - * - * This serves as an extra filter for the `relevant` predicate. - */ -predicate isUninterestingForDataFlowModels(Callable api) { - api.getDeclaringType() instanceof J::Interface and not exists(api.getBody()) -} - -/** - * A class of callables that are potentially relevant for generating source or - * sink models. - */ -class SourceOrSinkTargetApi extends Callable { - SourceOrSinkTargetApi() { relevant(this) } -} - -/** - * A class of callables that are potentially relevant for generating sink models. - */ -class SinkTargetApi extends SourceOrSinkTargetApi { - SinkTargetApi() { not hasManualSinkModel(this) } -} - -/** - * A class of callables that are potentially relevant for generating source models. - */ -class SourceTargetApi extends SourceOrSinkTargetApi { - SourceTargetApi() { not hasManualSourceModel(this) } -} - -/** - * Holds if it is irrelevant to generate models for `api` based on type-based analysis. - * - * This serves as an extra filter for the `relevant` predicate. - */ -predicate isUninterestingForTypeBasedFlowModels(Callable api) { none() } - -/** - * A class of callables that are potentially relevant for generating summary or - * neutral models. - * - * In the Standard library and 3rd party libraries it is the callables (or callables that have a - * super implementation) that can be called from outside the library itself. - */ -class SummaryTargetApi extends Callable { - private Callable lift; - - SummaryTargetApi() { - lift = liftedImpl(this) and - not hasManualSummaryModel(lift) - } - - /** - * Gets the callable that a model will be lifted to. - */ - Callable lift() { result = lift } - - /** - * Holds if this callable is relevant in terms of generating models. - */ - predicate isRelevant() { relevant(this) } -} - -private string isExtensible(Callable c) { - if c.getDeclaringType().isFinal() then result = "false" else result = "true" -} - -/** - * Holds if the callable `c` is in package `package` - * and is a member of `type`. - */ -private predicate qualifiedName(Callable c, string package, string type) { - exists(RefType t | t = c.getDeclaringType() | - package = t.getCompilationUnit().getPackage().getName() and - type = t.getErasure().(J::RefType).getNestedName() - ) -} - -predicate partialModel( - Callable api, string package, string type, string extensible, string name, string parameters -) { - qualifiedName(api, package, type) and - extensible = isExtensible(api) and - name = api.getName() and - parameters = ExternalFlow::paramsString(api) -} - -predicate isPrimitiveTypeUsedForBulkData(J::Type t) { - t.hasName(["byte", "char", "Byte", "Character"]) -} - -/** - * Holds for type `t` for fields that are relevant as an intermediate - * read or write step in the data flow analysis. - */ -predicate isRelevantType(J::Type t) { - not t instanceof J::TypeClass and - not t instanceof J::EnumType and - not t instanceof J::PrimitiveType and - not t instanceof J::BoxedType and - not t.(J::RefType).getAnAncestor().hasQualifiedName("java.lang", "Number") and - not t.(J::RefType).getAnAncestor().hasQualifiedName("java.nio.charset", "Charset") and - ( - not t.(J::Array).getElementType() instanceof J::PrimitiveType or - isPrimitiveTypeUsedForBulkData(t.(J::Array).getElementType()) - ) and - ( - not t.(J::Array).getElementType() instanceof J::BoxedType or - isPrimitiveTypeUsedForBulkData(t.(J::Array).getElementType()) - ) and - ( - not t.(ContainerFlow::CollectionType).getElementType() instanceof J::BoxedType or - isPrimitiveTypeUsedForBulkData(t.(ContainerFlow::CollectionType).getElementType()) - ) -} - -/** - * Gets the underlying type of the content `c`. - */ -J::Type getUnderlyingContentType(DataFlow::Content c) { - result = c.(DataFlow::FieldContent).getField().getType() or - result = c.(DataFlow::SyntheticFieldContent).getField().getType() -} - -/** - * Gets the MaD string representation of the qualifier. - */ -string qualifierString() { result = "Argument[this]" } - -/** - * Gets the MaD string representation of the parameter `p`. - */ -string parameterAccess(J::Parameter p) { - if - p.getType() instanceof J::Array and - not isPrimitiveTypeUsedForBulkData(p.getType().(J::Array).getElementType()) - then result = "Argument[" + p.getPosition() + "].ArrayElement" - else - if p.getType() instanceof ContainerFlow::ContainerType - then result = "Argument[" + p.getPosition() + "].Element" - else result = "Argument[" + p.getPosition() + "]" -} - -/** - * Gets the MaD string representation of the parameter `p` - * when used in content flow. - */ -string parameterContentAccess(J::Parameter p) { result = "Argument[" + p.getPosition() + "]" } - -class InstanceParameterNode = DataFlow::InstanceParameterNode; - -class ParameterPosition = DataFlowDispatch::ParameterPosition; - -/** - * Gets the MaD string representation of return through parameter at position - * `pos` of callable `c`. - */ -bindingset[c] -string paramReturnNodeAsOutput(Callable c, ParameterPosition pos) { - result = parameterAccess(c.getParameter(pos)) - or - result = qualifierString() and pos = -1 -} - -/** - * Gets the MaD string representation of return through parameter at position - * `pos` of callable `c` for content flow. - */ -bindingset[c] -string paramReturnNodeAsContentOutput(Callable c, ParameterPosition pos) { - result = parameterContentAccess(c.getParameter(pos)) - or - result = qualifierString() and pos = -1 -} - -/** - * Gets the enclosing callable of `ret`. - */ -Callable returnNodeEnclosingCallable(DataFlow::Node ret) { - result = DataFlowImplCommon::getNodeEnclosingCallable(ret).asCallable() -} - -/** - * Holds if `node` is an own instance access. - */ -predicate isOwnInstanceAccessNode(ReturnNode node) { - node.asExpr().(J::ThisAccess).isOwnInstanceAccess() -} - -predicate sinkModelSanitizer(DataFlow::Node node) { - // exclude variable capture jump steps - exists(Ssa::SsaImplicitInit closure | - closure.captures(_) and - node.asExpr() = closure.getAFirstUse() - ) -} - -/** - * Holds if `source` is an api entrypoint relevant for creating sink models. - */ -predicate apiSource(DataFlow::Node source) { - ( - source.asExpr().(J::FieldAccess).isOwnFieldAccess() or - source instanceof DataFlow::ParameterNode - ) and - exists(J::RefType t | - t = source.getEnclosingCallable().getDeclaringType().getAnAncestor() and - not t instanceof J::TypeObject and - t.isPublic() - ) -} - -/** - * Holds if it is not relevant to generate a source model for `api`, even - * if flow is detected from a node within `source` to a sink within `api`. - */ -predicate irrelevantSourceSinkApi(Callable source, SourceTargetApi api) { none() } - -/** - * Gets the MaD input string representation of `source`. - */ -string asInputArgumentSpecific(DataFlow::Node source) { - exists(int pos | - source.(DataFlow::ParameterNode).isParameterOf(_, pos) and - if pos >= 0 then result = "Argument[" + pos + "]" else result = qualifierString() - ) - or - source.asExpr() instanceof J::FieldAccess and - result = qualifierString() -} - -/** - * Holds if `kind` is a relevant sink kind for creating sink models. - */ -bindingset[kind] -predicate isRelevantSinkKind(string kind) { - not kind = "log-injection" and - not kind.matches("regex-use%") and - not kind = "file-content-store" -} - -/** - * Holds if `kind` is a relevant source kind for creating source models. - */ -bindingset[kind] -predicate isRelevantSourceKind(string kind) { any() } - -predicate containerContent = DataFlowPrivate::containerContent/1; - -/** - * Holds if there is a taint step from `node1` to `node2` in content flow. - */ -predicate isAdditionalContentFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - TaintTracking::defaultAdditionalTaintStep(node1, node2, _) and - not exists(DataFlow::Content f | - DataFlowPrivate::readStep(node1, f, node2) and containerContent(f) - ) -} - -/** - * Holds if the content set `c` is a field or a synthetic field. - */ -predicate isField(ContentSet c) { - c instanceof DataFlowUtil::FieldContent or - c instanceof DataFlowUtil::SyntheticFieldContent -} - -/** - * Gets the MaD synthetic name string representation for the content set `c`, if any. - */ -string getSyntheticName(DataFlow::ContentSet c) { - exists(Field f | - not f.isPublic() and - f = c.(DataFlowUtil::FieldContent).getField() and - result = f.getQualifiedName() - ) - or - result = c.(DataFlowUtil::SyntheticFieldContent).getField() -} - -/** - * Gets the MaD string representation of the content set `c`. - */ -string printContent(ContentSet c) { - exists(Field f | f = c.(DataFlowUtil::FieldContent).getField() and f.isPublic() | - result = "Field[" + f.getQualifiedName() + "]" - ) - or - result = "SyntheticField[" + getSyntheticName(c) + "]" - or - c instanceof DataFlowUtil::CollectionContent and result = "Element" - or - c instanceof DataFlowUtil::ArrayContent and result = "ArrayElement" - or - c instanceof DataFlowUtil::MapValueContent and result = "MapValue" - or - c instanceof DataFlowUtil::MapKeyContent and result = "MapKey" -} diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll b/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll index 5b1a6fc031b0..4c98cb05ae2d 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll @@ -80,5 +80,5 @@ string captureFlow(DataFlowSummaryTargetApi api) { string captureNoFlow(DataFlowSummaryTargetApi api) { not exists(DataFlowSummaryTargetApi api0 | exists(captureFlow(api0)) and api0.lift() = api.lift()) and api.isRelevant() and - result = Printing::asNeutralSummaryModel(api) + result = ModelPrinting::asNeutralSummaryModel(api) } diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll index 3d56dff50726..36aec8053196 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll @@ -1,7 +1,8 @@ private import java private import semmle.code.java.Collections private import semmle.code.java.dataflow.internal.ContainerFlow -private import CaptureModelsSpecific as Specific +private import CaptureModels as CaptureModels +private import CaptureModels::ModelGeneratorInput as ModelGeneratorInput private import CaptureModelsPrinting /** @@ -81,7 +82,7 @@ private predicate localTypeParameter(Callable callable, TypeVariable tv) { private string getAccessPath(Type t) { if t instanceof Array and - not Specific::isPrimitiveTypeUsedForBulkData(t.(Array).getElementType()) + not CaptureModels::isPrimitiveTypeUsedForBulkData(t.(Array).getElementType()) then result = ".ArrayElement" else if t instanceof ContainerType or t instanceof IterableClass @@ -134,7 +135,7 @@ private string implicit(Callable callable, TypeVariable tv) { then access = getAccessPath(decl) else access = getSyntheticField(tv) | - result = Specific::qualifierString() + access + result = ModelGeneratorInput::qualifierString() + access ) } @@ -286,7 +287,7 @@ private predicate output(Callable callable, TypeVariable tv, string output) { module ModelPrintingInput implements ModelPrintingSig { class SummaryApi = TypeBasedFlowTargetApi; - class SourceOrSinkApi = Specific::SourceOrSinkTargetApi; + class SourceOrSinkApi = ModelGeneratorInput::SourceOrSinkTargetApi; string getProvenance() { result = "tb-generated" } } @@ -297,9 +298,7 @@ private module Printing = ModelPrinting; * A class of callables that are relevant generating summaries for based * on the Theorems for Free approach. */ -class TypeBasedFlowTargetApi extends Specific::SummaryTargetApi { - TypeBasedFlowTargetApi() { not Specific::isUninterestingForTypeBasedFlowModels(this) } - +class TypeBasedFlowTargetApi extends ModelGeneratorInput::SummaryTargetApi { /** * Gets the string representation of all type based summaries for `this` * inspired by the Theorems for Free approach. From de4a7da286bcf82717de5aa8caee5a986d623f9f Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 18 Sep 2024 14:49:05 +0200 Subject: [PATCH 038/162] Java/C#: No longer sync CaptureModels.qll. --- config/identical-files.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/identical-files.json b/config/identical-files.json index d14052c12d83..c4436872b9ae 100644 --- a/config/identical-files.json +++ b/config/identical-files.json @@ -57,10 +57,6 @@ "java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll", "csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll" ], - "Model as Data Generation Java/C# - CaptureModels": [ - "java/ql/src/utils/modelgenerator/internal/CaptureModels.qll", - "csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll" - ], "Sign Java/C#": [ "java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/Sign.qll", "csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/Sign.qll" From f142af50b759bf4cdcf379a1c3f69eb1da97efc2 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Thu, 19 Sep 2024 10:51:40 +0200 Subject: [PATCH 039/162] Shared: QL doc improvement. --- shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll b/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll index 5c600b9dc266..1ce4edb2fda3 100644 --- a/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll +++ b/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll @@ -737,7 +737,7 @@ module MakeModelGenerator< * be translated into a synthetic field. * * This is needed because we don't want to include summaries that reads from or - * stores into a "dead" synthetic field. + * stores into an "internal" synthetic field. * * Example: * Assume we have a type `t` (in this case `t1` = `t2`) with methods `getX` and From 76e694259427dfa87792b5871da495906bdaa0df Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 13 Aug 2024 19:24:28 +0100 Subject: [PATCH 040/162] Go: support extracting test code This implements support for test extraction by two mechanisms: * In autobuild mode, setting `CODEQL_EXTRACTOR_GO_EXTRACT_TESTS` to `true`. * In manual build mode, tracing a `go test` command (`go test -c` is to be recommended for efficiency). Go deals with test compilation by creating several extra packages on top of those expected from inspection of the source code (see docs of `packages.Load` for more detail): packages whose IDs include a suffix like `mydomain.com/mypackage [mydomain.com/mypackage.test]`, and packages containing generated test driver code like `mydomain.com/mypackage.test`. There are also additional packages like `mydomain.com/mypackage_tests` which are explicitly present in source code, but not compiled by a normal `go build`. So far as I can tell, the purpose of the two variants of the package is to resolve dependency cycles (because the tests variant of the package can have more dependencies than the non-tests variant, and non-test code can compile against non-test package variants). Since the test package variants seems to be a superset of the non-tests variant, I employ the simple heuristic of ignoring the variant of each package with the shortest ID. I haven't seen a case where there are three or more variants of a package, so I expect this to always identify the tests variant as the preferred one. If several variants were extracted, and we were to attempt to match Golang's linkage strategy among the different variants, we would need to extend trap-file name and most top-level symbol trap IDs with the package variant they come from; I hope this won't prove necessary. "Real" `_tests` packages, and wholly synthetic driver code packages, are extracted just like normal. --- go/extractor/cli/go-extractor/go-extractor.go | 19 +++++----- go/extractor/extractor.go | 35 +++++++++++++++++-- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/go/extractor/cli/go-extractor/go-extractor.go b/go/extractor/cli/go-extractor/go-extractor.go index 00d3c8e7de13..2f40d2980cfa 100644 --- a/go/extractor/cli/go-extractor/go-extractor.go +++ b/go/extractor/cli/go-extractor/go-extractor.go @@ -21,7 +21,7 @@ func usage() { fmt.Fprintf(os.Stderr, "--help Print this help.\n") } -func parseFlags(args []string, mimic bool) ([]string, []string) { +func parseFlags(args []string, mimic bool, extractTests bool) ([]string, []string, bool) { i := 0 buildFlags := []string{} for ; i < len(args) && strings.HasPrefix(args[i], "-"); i++ { @@ -44,9 +44,9 @@ func parseFlags(args []string, mimic bool) ([]string, []string) { if i+1 < len(args) { i++ command := args[i] - if command == "build" || command == "install" || command == "run" { - log.Printf("Intercepting build") - return parseFlags(args[i+1:], true) + if command == "build" || command == "install" || command == "run" || command == "test" { + log.Printf("Intercepting build for %s command", command) + return parseFlags(args[i+1:], true, command == "test") } else { log.Printf("Non-build command '%s'; skipping", strings.Join(args[1:], " ")) os.Exit(0) @@ -63,12 +63,12 @@ func parseFlags(args []string, mimic bool) ([]string, []string) { // parse go build flags switch args[i] { - // skip `-o output` and `-i`, if applicable + // skip `-o output`, `-i` and `-c`, if applicable case "-o": if i+1 < len(args) { i++ } - case "-i": + case "-i", "-c": case "-p", "-asmflags", "-buildmode", "-compiler", "-gccgoflags", "-gcflags", "-installsuffix", "-ldflags", "-mod", "-modfile", "-pkgdir", "-tags", "-toolexec", "-overlay": if i+1 < len(args) { @@ -90,11 +90,12 @@ func parseFlags(args []string, mimic bool) ([]string, []string) { cpuprofile = os.Getenv("CODEQL_EXTRACTOR_GO_CPU_PROFILE") memprofile = os.Getenv("CODEQL_EXTRACTOR_GO_MEM_PROFILE") - return buildFlags, args[i:] + return buildFlags, args[i:], extractTests } func main() { - buildFlags, patterns := parseFlags(os.Args[1:], false) + extractTestsDefault := os.Getenv("CODEQL_EXTRACTOR_GO_EXTRACT_TESTS") == "true" + buildFlags, patterns, extractTests := parseFlags(os.Args[1:], false, extractTestsDefault) if cpuprofile != "" { f, err := os.Create(cpuprofile) @@ -114,7 +115,7 @@ func main() { } log.Printf("Build flags: '%s'; patterns: '%s'\n", strings.Join(buildFlags, " "), strings.Join(patterns, " ")) - err := extractor.ExtractWithFlags(buildFlags, patterns) + err := extractor.ExtractWithFlags(buildFlags, patterns, extractTests) if err != nil { errString := err.Error() if strings.Contains(errString, "unexpected directory layout:") { diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index 31fa2ceb4131..d10e0d38d8f5 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -59,11 +59,11 @@ func init() { // Extract extracts the packages specified by the given patterns func Extract(patterns []string) error { - return ExtractWithFlags(nil, patterns) + return ExtractWithFlags(nil, patterns, false) } // ExtractWithFlags extracts the packages specified by the given patterns and build flags -func ExtractWithFlags(buildFlags []string, patterns []string) error { +func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) error { startTime := time.Now() extraction := NewExtraction(buildFlags, patterns) @@ -89,6 +89,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { packages.NeedTypes | packages.NeedTypesSizes | packages.NeedTypesInfo | packages.NeedSyntax, BuildFlags: buildFlags, + Tests: extractTests, } pkgs, err := packages.Load(cfg, patterns...) if err != nil { @@ -132,10 +133,33 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { pkgsNotFound := make([]string, 0, len(pkgs)) + // Build a map from package paths to their longest IDs-- + // in the context of a `go test -c` compilation, we will see the same package more than + // once, with IDs like "abc.com/pkgname [abc.com/pkgname.test]" to distinguish the version + // that contains and is used by test code. + // For our purposes it is simplest to just ignore the non-test version, since the test + // version seems to be a superset of it. + longestPackageIds := make(map[string]string) + packages.Visit(pkgs, nil, func(pkg *packages.Package) { + if shortestID, present := longestPackageIds[pkg.PkgPath]; present { + if len(pkg.ID) > len(shortestID) { + longestPackageIds[pkg.PkgPath] = pkg.ID + } + } else { + longestPackageIds[pkg.PkgPath] = pkg.ID + } + }) + // Do a post-order traversal and extract the package scope of each package packages.Visit(pkgs, nil, func(pkg *packages.Package) { log.Printf("Processing package %s.", pkg.PkgPath) + // If this is a variant of a package that also occurs with a longer ID, skip it. + if pkg.ID != longestPackageIds[pkg.PkgPath] { + log.Printf("Skipping variant of package %s with ID %s.", pkg.PkgPath, pkg.ID) + return + } + if _, ok := pkgInfos[pkg.PkgPath]; !ok { pkgInfos[pkg.PkgPath] = toolchain.GetPkgInfo(pkg.PkgPath, modFlags...) } @@ -210,6 +234,13 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { // extract AST information for all packages packages.Visit(pkgs, nil, func(pkg *packages.Package) { + + // If this is a variant of a package that also occurs with a longer ID, skip it. + if pkg.ID != longestPackageIds[pkg.PkgPath] { + // Don't log here; we already mentioned this above. + return + } + for root := range wantedRoots { pkgInfo := pkgInfos[pkg.PkgPath] relDir, err := filepath.Rel(root, pkgInfo.PkgDir) From c3dffc955bfd97507b2bafe8de90754f19c669f7 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 21 Aug 2024 11:42:07 +0100 Subject: [PATCH 041/162] Apply review comments --- go/extractor/extractor.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index d10e0d38d8f5..68e64d46f905 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -81,7 +81,14 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) } } - log.Println("Running packages.Load.") + testMessage := "" + if extractTests { + testMessage = " (test extraction enabled)" + } + log.Printf("Running packages.Load%s.", testMessage) + + // This includes test packages if either we're tracing a `go test` command, + // or if CODEQL_EXTRACTOR_GO_EXTRACT_TESTS is set to "true". cfg := &packages.Config{ Mode: packages.NeedName | packages.NeedFiles | packages.NeedCompiledGoFiles | @@ -141,8 +148,8 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) // version seems to be a superset of it. longestPackageIds := make(map[string]string) packages.Visit(pkgs, nil, func(pkg *packages.Package) { - if shortestID, present := longestPackageIds[pkg.PkgPath]; present { - if len(pkg.ID) > len(shortestID) { + if longestIDSoFar, present := longestPackageIds[pkg.PkgPath]; present { + if len(pkg.ID) > len(longestIDSoFar) { longestPackageIds[pkg.PkgPath] = pkg.ID } } else { @@ -154,7 +161,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) packages.Visit(pkgs, nil, func(pkg *packages.Package) { log.Printf("Processing package %s.", pkg.PkgPath) - // If this is a variant of a package that also occurs with a longer ID, skip it. + // If this is a variant of a package that also occurs with a shorter ID, skip it. if pkg.ID != longestPackageIds[pkg.PkgPath] { log.Printf("Skipping variant of package %s with ID %s.", pkg.PkgPath, pkg.ID) return From fd592fa18f325111711c590c05bfd8eccf6b939e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 21 Aug 2024 12:27:34 +0100 Subject: [PATCH 042/162] Add tests --- .../go-mod-sample/src/blackbox_test.go | 16 +++++++ .../go-mod-sample/src/test.go | 4 ++ .../go-mod-sample/src/test_test.go | 15 +++++++ .../test-extraction-autobuild/src/Makefile | 2 + .../test-extraction-autobuild/src/go.mod | 3 ++ .../test-extraction-autobuild/src/go.sum | 45 +++++++++++++++++++ .../test-extraction-autobuild/src/testme.go | 5 +++ .../src/testme_blackbox_test.go | 15 +++++++ .../src/testme_test.go | 19 ++++++++ .../test-extraction-autobuild/test.expected | 9 ++++ .../test-extraction-autobuild/test.py | 5 +++ .../test-extraction-autobuild/test.ql | 11 +++++ .../test-extraction-traced/src/Makefile | 2 + .../test-extraction-traced/src/go.mod | 3 ++ .../test-extraction-traced/src/go.sum | 45 +++++++++++++++++++ .../test-extraction-traced/src/testme.go | 5 +++ .../src/testme_blackbox_test.go | 15 +++++++ .../test-extraction-traced/src/testme_test.go | 19 ++++++++ .../test-extraction-traced/test.expected | 9 ++++ .../test-extraction-traced/test.py | 4 ++ .../test-extraction-traced/test.ql | 11 +++++ .../traced-extraction/src/Makefile | 2 + .../traced-extraction/src/go.mod | 3 ++ .../traced-extraction/src/go.sum | 45 +++++++++++++++++++ .../traced-extraction/src/testme.go | 5 +++ .../src/testme_blackbox_test.go | 16 +++++++ .../traced-extraction/src/testme_test.go | 20 +++++++++ .../traced-extraction/test.expected | 4 ++ .../traced-extraction/test.py | 4 ++ .../traced-extraction/test.ql | 11 +++++ 30 files changed, 372 insertions(+) create mode 100644 go/ql/integration-tests/go-mod-sample/src/blackbox_test.go create mode 100644 go/ql/integration-tests/go-mod-sample/src/test_test.go create mode 100644 go/ql/integration-tests/test-extraction-autobuild/src/Makefile create mode 100644 go/ql/integration-tests/test-extraction-autobuild/src/go.mod create mode 100644 go/ql/integration-tests/test-extraction-autobuild/src/go.sum create mode 100644 go/ql/integration-tests/test-extraction-autobuild/src/testme.go create mode 100644 go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go create mode 100644 go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go create mode 100644 go/ql/integration-tests/test-extraction-autobuild/test.expected create mode 100644 go/ql/integration-tests/test-extraction-autobuild/test.py create mode 100644 go/ql/integration-tests/test-extraction-autobuild/test.ql create mode 100644 go/ql/integration-tests/test-extraction-traced/src/Makefile create mode 100644 go/ql/integration-tests/test-extraction-traced/src/go.mod create mode 100644 go/ql/integration-tests/test-extraction-traced/src/go.sum create mode 100644 go/ql/integration-tests/test-extraction-traced/src/testme.go create mode 100644 go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go create mode 100644 go/ql/integration-tests/test-extraction-traced/src/testme_test.go create mode 100644 go/ql/integration-tests/test-extraction-traced/test.expected create mode 100644 go/ql/integration-tests/test-extraction-traced/test.py create mode 100644 go/ql/integration-tests/test-extraction-traced/test.ql create mode 100644 go/ql/integration-tests/traced-extraction/src/Makefile create mode 100644 go/ql/integration-tests/traced-extraction/src/go.mod create mode 100644 go/ql/integration-tests/traced-extraction/src/go.sum create mode 100644 go/ql/integration-tests/traced-extraction/src/testme.go create mode 100644 go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go create mode 100644 go/ql/integration-tests/traced-extraction/src/testme_test.go create mode 100644 go/ql/integration-tests/traced-extraction/test.expected create mode 100644 go/ql/integration-tests/traced-extraction/test.py create mode 100644 go/ql/integration-tests/traced-extraction/test.ql diff --git a/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go b/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go new file mode 100644 index 000000000000..739d60e070ca --- /dev/null +++ b/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go @@ -0,0 +1,16 @@ +package makesample_test + +import ( + "testing" + "makesample" +) + +// Note because this is a test we do NOT expect this to be extracted. +func TestTestMe(t *testing.T) { + + publicResult := makesample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + +} diff --git a/go/ql/integration-tests/go-mod-sample/src/test.go b/go/ql/integration-tests/go-mod-sample/src/test.go index 824c0b04c726..71f2a463011a 100644 --- a/go/ql/integration-tests/go-mod-sample/src/test.go +++ b/go/ql/integration-tests/go-mod-sample/src/test.go @@ -10,3 +10,7 @@ func test() { header.Version = 4 } + +func PublicFunction() int { + return 1 +} diff --git a/go/ql/integration-tests/go-mod-sample/src/test_test.go b/go/ql/integration-tests/go-mod-sample/src/test_test.go new file mode 100644 index 000000000000..0b11ee38283b --- /dev/null +++ b/go/ql/integration-tests/go-mod-sample/src/test_test.go @@ -0,0 +1,15 @@ +package makesample + +import ( + "testing" +) + +func TestTestMe(t *testing.T) { + + // Note because this is a test we do NOT expect this to be extracted. + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + +} diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/Makefile b/go/ql/integration-tests/test-extraction-autobuild/src/Makefile new file mode 100644 index 000000000000..266e02877884 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/src/Makefile @@ -0,0 +1,2 @@ +all: + go get diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/go.mod b/go/ql/integration-tests/test-extraction-autobuild/src/go.mod new file mode 100644 index 000000000000..c4a9f55df6c1 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/src/go.mod @@ -0,0 +1,3 @@ +go 1.14 + +module testsample diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/go.sum b/go/ql/integration-tests/test-extraction-autobuild/src/go.sum new file mode 100644 index 000000000000..a8e1b59ae4b1 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/src/go.sum @@ -0,0 +1,45 @@ +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/testme.go b/go/ql/integration-tests/test-extraction-autobuild/src/testme.go new file mode 100644 index 000000000000..e24138553ce9 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/src/testme.go @@ -0,0 +1,5 @@ +package testsample + +func PublicFunction() int { return 1 } + +func privateFunction() int { return 2 } diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go b/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go new file mode 100644 index 000000000000..84a3c30deb42 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go @@ -0,0 +1,15 @@ +package testsample_test + +import ( + "testing" + "testsample" +) + +func TestTestMe(t *testing.T) { + + publicResult := testsample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + +} diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go b/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go new file mode 100644 index 000000000000..bac05af5f7f1 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go @@ -0,0 +1,19 @@ +package testsample + +import ( + "testing" +) + +func TestTestMe(t *testing.T) { + + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + + privateResult := privateFunction() + if privateResult != 2 { + t.Errorf("Expected 2, got %d", privateResult) + } + +} diff --git a/go/ql/integration-tests/test-extraction-autobuild/test.expected b/go/ql/integration-tests/test-extraction-autobuild/test.expected new file mode 100644 index 000000000000..d39d8143fa6c --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/test.expected @@ -0,0 +1,9 @@ +#select +| src/testme.go:0:0:0:0 | src/testme.go | +| src/testme_blackbox_test.go:0:0:0:0 | src/testme_blackbox_test.go | +| src/testme_test.go:0:0:0:0 | src/testme_test.go | +calls +| src/testme_blackbox_test.go:10:19:10:45 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:9:19:9:34 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:14:20:14:36 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration | +extractionErrors diff --git a/go/ql/integration-tests/test-extraction-autobuild/test.py b/go/ql/integration-tests/test-extraction-autobuild/test.py new file mode 100644 index 000000000000..417b1e8bb04e --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/test.py @@ -0,0 +1,5 @@ +import os + +def test(codeql, go): + os.environ["CODEQL_EXTRACTOR_GO_EXTRACT_TESTS"] = "true" + codeql.database.create(source_root="src") diff --git a/go/ql/integration-tests/test-extraction-autobuild/test.ql b/go/ql/integration-tests/test-extraction-autobuild/test.ql new file mode 100644 index 000000000000..cb06aeadf9c3 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-autobuild/test.ql @@ -0,0 +1,11 @@ +import go +import semmle.go.DiagnosticsReporting + +from GoFile f +select f + +query predicate calls(CallExpr ce, FuncDecl f) { + f = ce.getTarget().getFuncDecl() +} + +query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) } diff --git a/go/ql/integration-tests/test-extraction-traced/src/Makefile b/go/ql/integration-tests/test-extraction-traced/src/Makefile new file mode 100644 index 000000000000..266e02877884 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/src/Makefile @@ -0,0 +1,2 @@ +all: + go get diff --git a/go/ql/integration-tests/test-extraction-traced/src/go.mod b/go/ql/integration-tests/test-extraction-traced/src/go.mod new file mode 100644 index 000000000000..c4a9f55df6c1 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/src/go.mod @@ -0,0 +1,3 @@ +go 1.14 + +module testsample diff --git a/go/ql/integration-tests/test-extraction-traced/src/go.sum b/go/ql/integration-tests/test-extraction-traced/src/go.sum new file mode 100644 index 000000000000..a8e1b59ae4b1 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/src/go.sum @@ -0,0 +1,45 @@ +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go/ql/integration-tests/test-extraction-traced/src/testme.go b/go/ql/integration-tests/test-extraction-traced/src/testme.go new file mode 100644 index 000000000000..e24138553ce9 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/src/testme.go @@ -0,0 +1,5 @@ +package testsample + +func PublicFunction() int { return 1 } + +func privateFunction() int { return 2 } diff --git a/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go b/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go new file mode 100644 index 000000000000..84a3c30deb42 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go @@ -0,0 +1,15 @@ +package testsample_test + +import ( + "testing" + "testsample" +) + +func TestTestMe(t *testing.T) { + + publicResult := testsample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + +} diff --git a/go/ql/integration-tests/test-extraction-traced/src/testme_test.go b/go/ql/integration-tests/test-extraction-traced/src/testme_test.go new file mode 100644 index 000000000000..bac05af5f7f1 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/src/testme_test.go @@ -0,0 +1,19 @@ +package testsample + +import ( + "testing" +) + +func TestTestMe(t *testing.T) { + + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + + privateResult := privateFunction() + if privateResult != 2 { + t.Errorf("Expected 2, got %d", privateResult) + } + +} diff --git a/go/ql/integration-tests/test-extraction-traced/test.expected b/go/ql/integration-tests/test-extraction-traced/test.expected new file mode 100644 index 000000000000..d39d8143fa6c --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/test.expected @@ -0,0 +1,9 @@ +#select +| src/testme.go:0:0:0:0 | src/testme.go | +| src/testme_blackbox_test.go:0:0:0:0 | src/testme_blackbox_test.go | +| src/testme_test.go:0:0:0:0 | src/testme_test.go | +calls +| src/testme_blackbox_test.go:10:19:10:45 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:9:19:9:34 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:14:20:14:36 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration | +extractionErrors diff --git a/go/ql/integration-tests/test-extraction-traced/test.py b/go/ql/integration-tests/test-extraction-traced/test.py new file mode 100644 index 000000000000..2887d3fa0d09 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/test.py @@ -0,0 +1,4 @@ +import os + +def test(codeql, go): + codeql.database.create(source_root="src", command="go test -c") diff --git a/go/ql/integration-tests/test-extraction-traced/test.ql b/go/ql/integration-tests/test-extraction-traced/test.ql new file mode 100644 index 000000000000..cb06aeadf9c3 --- /dev/null +++ b/go/ql/integration-tests/test-extraction-traced/test.ql @@ -0,0 +1,11 @@ +import go +import semmle.go.DiagnosticsReporting + +from GoFile f +select f + +query predicate calls(CallExpr ce, FuncDecl f) { + f = ce.getTarget().getFuncDecl() +} + +query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) } diff --git a/go/ql/integration-tests/traced-extraction/src/Makefile b/go/ql/integration-tests/traced-extraction/src/Makefile new file mode 100644 index 000000000000..266e02877884 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/src/Makefile @@ -0,0 +1,2 @@ +all: + go get diff --git a/go/ql/integration-tests/traced-extraction/src/go.mod b/go/ql/integration-tests/traced-extraction/src/go.mod new file mode 100644 index 000000000000..c4a9f55df6c1 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/src/go.mod @@ -0,0 +1,3 @@ +go 1.14 + +module testsample diff --git a/go/ql/integration-tests/traced-extraction/src/go.sum b/go/ql/integration-tests/traced-extraction/src/go.sum new file mode 100644 index 000000000000..a8e1b59ae4b1 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/src/go.sum @@ -0,0 +1,45 @@ +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go/ql/integration-tests/traced-extraction/src/testme.go b/go/ql/integration-tests/traced-extraction/src/testme.go new file mode 100644 index 000000000000..e24138553ce9 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/src/testme.go @@ -0,0 +1,5 @@ +package testsample + +func PublicFunction() int { return 1 } + +func privateFunction() int { return 2 } diff --git a/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go b/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go new file mode 100644 index 000000000000..497b5e81410a --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go @@ -0,0 +1,16 @@ +package testsample_test + +import ( + "testing" + "testsample" +) + +func TestTestMe(t *testing.T) { + + // Note because this is a test we do NOT expect it to be extracted + publicResult := testsample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + +} diff --git a/go/ql/integration-tests/traced-extraction/src/testme_test.go b/go/ql/integration-tests/traced-extraction/src/testme_test.go new file mode 100644 index 000000000000..c5f28c409de2 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/src/testme_test.go @@ -0,0 +1,20 @@ +package testsample + +import ( + "testing" +) + +func TestTestMe(t *testing.T) { + + // Note because this is a test we do NOT expect it to be extracted + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } + + privateResult := privateFunction() + if privateResult != 2 { + t.Errorf("Expected 2, got %d", privateResult) + } + +} diff --git a/go/ql/integration-tests/traced-extraction/test.expected b/go/ql/integration-tests/traced-extraction/test.expected new file mode 100644 index 000000000000..7b62d6d92983 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/test.expected @@ -0,0 +1,4 @@ +#select +| src/testme.go:0:0:0:0 | src/testme.go | +calls +extractionErrors diff --git a/go/ql/integration-tests/traced-extraction/test.py b/go/ql/integration-tests/traced-extraction/test.py new file mode 100644 index 000000000000..fbb3f6a6d6c5 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/test.py @@ -0,0 +1,4 @@ +import os + +def test(codeql, go): + codeql.database.create(source_root="src", command="go build") diff --git a/go/ql/integration-tests/traced-extraction/test.ql b/go/ql/integration-tests/traced-extraction/test.ql new file mode 100644 index 000000000000..cb06aeadf9c3 --- /dev/null +++ b/go/ql/integration-tests/traced-extraction/test.ql @@ -0,0 +1,11 @@ +import go +import semmle.go.DiagnosticsReporting + +from GoFile f +select f + +query predicate calls(CallExpr ce, FuncDecl f) { + f = ce.getTarget().getFuncDecl() +} + +query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) } From eb6918f88f16590f80dad07f9082498ce95ab4dd Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 21 Aug 2024 12:32:27 +0100 Subject: [PATCH 043/162] Autoformat --- go/ql/integration-tests/test-extraction-autobuild/test.ql | 4 +--- go/ql/integration-tests/test-extraction-traced/test.ql | 4 +--- go/ql/integration-tests/traced-extraction/test.ql | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/go/ql/integration-tests/test-extraction-autobuild/test.ql b/go/ql/integration-tests/test-extraction-autobuild/test.ql index cb06aeadf9c3..15eae8959862 100644 --- a/go/ql/integration-tests/test-extraction-autobuild/test.ql +++ b/go/ql/integration-tests/test-extraction-autobuild/test.ql @@ -4,8 +4,6 @@ import semmle.go.DiagnosticsReporting from GoFile f select f -query predicate calls(CallExpr ce, FuncDecl f) { - f = ce.getTarget().getFuncDecl() -} +query predicate calls(CallExpr ce, FuncDecl f) { f = ce.getTarget().getFuncDecl() } query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) } diff --git a/go/ql/integration-tests/test-extraction-traced/test.ql b/go/ql/integration-tests/test-extraction-traced/test.ql index cb06aeadf9c3..15eae8959862 100644 --- a/go/ql/integration-tests/test-extraction-traced/test.ql +++ b/go/ql/integration-tests/test-extraction-traced/test.ql @@ -4,8 +4,6 @@ import semmle.go.DiagnosticsReporting from GoFile f select f -query predicate calls(CallExpr ce, FuncDecl f) { - f = ce.getTarget().getFuncDecl() -} +query predicate calls(CallExpr ce, FuncDecl f) { f = ce.getTarget().getFuncDecl() } query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) } diff --git a/go/ql/integration-tests/traced-extraction/test.ql b/go/ql/integration-tests/traced-extraction/test.ql index cb06aeadf9c3..15eae8959862 100644 --- a/go/ql/integration-tests/traced-extraction/test.ql +++ b/go/ql/integration-tests/traced-extraction/test.ql @@ -4,8 +4,6 @@ import semmle.go.DiagnosticsReporting from GoFile f select f -query predicate calls(CallExpr ce, FuncDecl f) { - f = ce.getTarget().getFuncDecl() -} +query predicate calls(CallExpr ce, FuncDecl f) { f = ce.getTarget().getFuncDecl() } query predicate extractionErrors(string msg, int sev) { reportableDiagnostics(_, msg, sev) } From 9d79feb4d3882c043ff9a5119b08215780492794 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 21 Aug 2024 12:41:27 +0100 Subject: [PATCH 044/162] Autoformat go --- .../go-mod-sample/src/blackbox_test.go | 12 +++++------ .../go-mod-sample/src/test_test.go | 12 +++++------ .../src/testme_blackbox_test.go | 12 +++++------ .../src/testme_test.go | 18 ++++++++--------- .../src/testme_blackbox_test.go | 12 +++++------ .../test-extraction-traced/src/testme_test.go | 18 ++++++++--------- .../src/testme_blackbox_test.go | 14 ++++++------- .../traced-extraction/src/testme_test.go | 20 +++++++++---------- 8 files changed, 59 insertions(+), 59 deletions(-) diff --git a/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go b/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go index 739d60e070ca..c3f434a7aa12 100644 --- a/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go +++ b/go/ql/integration-tests/go-mod-sample/src/blackbox_test.go @@ -1,16 +1,16 @@ package makesample_test import ( - "testing" - "makesample" + "makesample" + "testing" ) // Note because this is a test we do NOT expect this to be extracted. func TestTestMe(t *testing.T) { - publicResult := makesample.PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + publicResult := makesample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } } diff --git a/go/ql/integration-tests/go-mod-sample/src/test_test.go b/go/ql/integration-tests/go-mod-sample/src/test_test.go index 0b11ee38283b..6693a016350c 100644 --- a/go/ql/integration-tests/go-mod-sample/src/test_test.go +++ b/go/ql/integration-tests/go-mod-sample/src/test_test.go @@ -1,15 +1,15 @@ package makesample import ( - "testing" + "testing" ) func TestTestMe(t *testing.T) { - // Note because this is a test we do NOT expect this to be extracted. - publicResult := PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + // Note because this is a test we do NOT expect this to be extracted. + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } } diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go b/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go index 84a3c30deb42..18a507b5aa38 100644 --- a/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go +++ b/go/ql/integration-tests/test-extraction-autobuild/src/testme_blackbox_test.go @@ -1,15 +1,15 @@ package testsample_test import ( - "testing" - "testsample" + "testing" + "testsample" ) func TestTestMe(t *testing.T) { - publicResult := testsample.PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + publicResult := testsample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } } diff --git a/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go b/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go index bac05af5f7f1..183d7cd3dffe 100644 --- a/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go +++ b/go/ql/integration-tests/test-extraction-autobuild/src/testme_test.go @@ -1,19 +1,19 @@ package testsample import ( - "testing" + "testing" ) func TestTestMe(t *testing.T) { - publicResult := PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } - privateResult := privateFunction() - if privateResult != 2 { - t.Errorf("Expected 2, got %d", privateResult) - } + privateResult := privateFunction() + if privateResult != 2 { + t.Errorf("Expected 2, got %d", privateResult) + } } diff --git a/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go b/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go index 84a3c30deb42..18a507b5aa38 100644 --- a/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go +++ b/go/ql/integration-tests/test-extraction-traced/src/testme_blackbox_test.go @@ -1,15 +1,15 @@ package testsample_test import ( - "testing" - "testsample" + "testing" + "testsample" ) func TestTestMe(t *testing.T) { - publicResult := testsample.PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + publicResult := testsample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } } diff --git a/go/ql/integration-tests/test-extraction-traced/src/testme_test.go b/go/ql/integration-tests/test-extraction-traced/src/testme_test.go index bac05af5f7f1..183d7cd3dffe 100644 --- a/go/ql/integration-tests/test-extraction-traced/src/testme_test.go +++ b/go/ql/integration-tests/test-extraction-traced/src/testme_test.go @@ -1,19 +1,19 @@ package testsample import ( - "testing" + "testing" ) func TestTestMe(t *testing.T) { - publicResult := PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } - privateResult := privateFunction() - if privateResult != 2 { - t.Errorf("Expected 2, got %d", privateResult) - } + privateResult := privateFunction() + if privateResult != 2 { + t.Errorf("Expected 2, got %d", privateResult) + } } diff --git a/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go b/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go index 497b5e81410a..728cc651d7a3 100644 --- a/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go +++ b/go/ql/integration-tests/traced-extraction/src/testme_blackbox_test.go @@ -1,16 +1,16 @@ package testsample_test import ( - "testing" - "testsample" + "testing" + "testsample" ) func TestTestMe(t *testing.T) { - // Note because this is a test we do NOT expect it to be extracted - publicResult := testsample.PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + // Note because this is a test we do NOT expect it to be extracted + publicResult := testsample.PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } } diff --git a/go/ql/integration-tests/traced-extraction/src/testme_test.go b/go/ql/integration-tests/traced-extraction/src/testme_test.go index c5f28c409de2..cc77c9dd37ff 100644 --- a/go/ql/integration-tests/traced-extraction/src/testme_test.go +++ b/go/ql/integration-tests/traced-extraction/src/testme_test.go @@ -1,20 +1,20 @@ package testsample import ( - "testing" + "testing" ) func TestTestMe(t *testing.T) { - // Note because this is a test we do NOT expect it to be extracted - publicResult := PublicFunction() - if publicResult != 1 { - t.Errorf("Expected 1, got %d", publicResult) - } + // Note because this is a test we do NOT expect it to be extracted + publicResult := PublicFunction() + if publicResult != 1 { + t.Errorf("Expected 1, got %d", publicResult) + } - privateResult := privateFunction() - if privateResult != 2 { - t.Errorf("Expected 2, got %d", privateResult) - } + privateResult := privateFunction() + if privateResult != 2 { + t.Errorf("Expected 2, got %d", privateResult) + } } From 94cb99e51de887c8e8d76f9c29c47c4d98cd25d5 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 21 Aug 2024 12:44:04 +0100 Subject: [PATCH 045/162] Adjust test expectations --- .../test-extraction-autobuild/test.expected | 6 +++--- .../integration-tests/test-extraction-traced/test.expected | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go/ql/integration-tests/test-extraction-autobuild/test.expected b/go/ql/integration-tests/test-extraction-autobuild/test.expected index d39d8143fa6c..9e1585fc5ef8 100644 --- a/go/ql/integration-tests/test-extraction-autobuild/test.expected +++ b/go/ql/integration-tests/test-extraction-autobuild/test.expected @@ -3,7 +3,7 @@ | src/testme_blackbox_test.go:0:0:0:0 | src/testme_blackbox_test.go | | src/testme_test.go:0:0:0:0 | src/testme_test.go | calls -| src/testme_blackbox_test.go:10:19:10:45 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | -| src/testme_test.go:9:19:9:34 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | -| src/testme_test.go:14:20:14:36 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration | +| src/testme_blackbox_test.go:10:18:10:44 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:9:18:9:33 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:14:19:14:35 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration | extractionErrors diff --git a/go/ql/integration-tests/test-extraction-traced/test.expected b/go/ql/integration-tests/test-extraction-traced/test.expected index d39d8143fa6c..9e1585fc5ef8 100644 --- a/go/ql/integration-tests/test-extraction-traced/test.expected +++ b/go/ql/integration-tests/test-extraction-traced/test.expected @@ -3,7 +3,7 @@ | src/testme_blackbox_test.go:0:0:0:0 | src/testme_blackbox_test.go | | src/testme_test.go:0:0:0:0 | src/testme_test.go | calls -| src/testme_blackbox_test.go:10:19:10:45 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | -| src/testme_test.go:9:19:9:34 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | -| src/testme_test.go:14:20:14:36 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration | +| src/testme_blackbox_test.go:10:18:10:44 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:9:18:9:33 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration | +| src/testme_test.go:14:19:14:35 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration | extractionErrors From f5ff82268148e0672344298582d5fa544ded11ad Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 21 Aug 2024 16:04:39 +0100 Subject: [PATCH 046/162] Convert extract-tests option to an official extractor option --- go/codeql-extractor.yml | 8 ++++++++ go/extractor/cli/go-extractor/go-extractor.go | 2 +- go/extractor/extractor.go | 2 +- go/ql/integration-tests/test-extraction-autobuild/test.py | 3 +-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/go/codeql-extractor.yml b/go/codeql-extractor.yml index 20cfe987ef32..e3333ec7c06d 100644 --- a/go/codeql-extractor.yml +++ b/go/codeql-extractor.yml @@ -19,3 +19,11 @@ file_types: extensions: - .go legacy_qltest_extraction: true +options: + extract_tests: + title: Whether to include Go test files and functions in the CodeQL database. + description: > + A value indicating whether Go test files and functions should be included in the CodeQL database. + The default is 'false'. + type: string + pattern: "^(false|true)$" diff --git a/go/extractor/cli/go-extractor/go-extractor.go b/go/extractor/cli/go-extractor/go-extractor.go index 2f40d2980cfa..142a950d9f12 100644 --- a/go/extractor/cli/go-extractor/go-extractor.go +++ b/go/extractor/cli/go-extractor/go-extractor.go @@ -94,7 +94,7 @@ func parseFlags(args []string, mimic bool, extractTests bool) ([]string, []strin } func main() { - extractTestsDefault := os.Getenv("CODEQL_EXTRACTOR_GO_EXTRACT_TESTS") == "true" + extractTestsDefault := os.Getenv("CODEQL_EXTRACTOR_GO_OPTION_EXTRACT_TESTS") == "true" buildFlags, patterns, extractTests := parseFlags(os.Args[1:], false, extractTestsDefault) if cpuprofile != "" { diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index 68e64d46f905..448bb83deee5 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -88,7 +88,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) log.Printf("Running packages.Load%s.", testMessage) // This includes test packages if either we're tracing a `go test` command, - // or if CODEQL_EXTRACTOR_GO_EXTRACT_TESTS is set to "true". + // or if CODEQL_EXTRACTOR_GO_OPTION_EXTRACT_TESTS is set to "true". cfg := &packages.Config{ Mode: packages.NeedName | packages.NeedFiles | packages.NeedCompiledGoFiles | diff --git a/go/ql/integration-tests/test-extraction-autobuild/test.py b/go/ql/integration-tests/test-extraction-autobuild/test.py index 417b1e8bb04e..0dc91b5212c5 100644 --- a/go/ql/integration-tests/test-extraction-autobuild/test.py +++ b/go/ql/integration-tests/test-extraction-autobuild/test.py @@ -1,5 +1,4 @@ import os def test(codeql, go): - os.environ["CODEQL_EXTRACTOR_GO_EXTRACT_TESTS"] = "true" - codeql.database.create(source_root="src") + codeql.database.create(source_root="src", extractor_option = ["extract_tests=true"]) From 3e2f8865952e03e7d1dfb36847b9db10040f9806 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 11:46:24 +0200 Subject: [PATCH 047/162] Codegen: allow inheritable pragmas --- misc/codegen/lib/schema.py | 3 ++ misc/codegen/lib/schemadefs.py | 44 ++++++++++++++++------------ misc/codegen/loaders/schemaloader.py | 8 ++++- 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/misc/codegen/lib/schema.py b/misc/codegen/lib/schema.py index bdaaba32c20b..13b5ecee47ed 100644 --- a/misc/codegen/lib/schema.py +++ b/misc/codegen/lib/schema.py @@ -211,3 +211,6 @@ def split_doc(doc): while trimmed and not trimmed[0]: trimmed.pop(0) return trimmed + + +inheritable_pragma_prefix = "_inheritable_pragma_" diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index 151d5ac98435..08fd3367428a 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -5,6 +5,8 @@ from misc.codegen.lib.schema import Property +_set = set + @_dataclass class _ChildModifier(_schema.PropertyModifier): @@ -79,7 +81,7 @@ class _SynthModifier(_schema.PropertyModifier, _Namespace): def modify(self, prop: _schema.Property): prop.synth = self.synth - def negate(self) -> "PropertyModifier": + def negate(self) -> _schema.PropertyModifier: return _SynthModifier(self.name, False) @@ -100,14 +102,18 @@ class _ClassPragma(_PragmaBase): """ A class pragma. For schema classes it acts as a python decorator with `@`. """ + inherited: bool = False value: object = None def __call__(self, cls: type) -> type: """ use this pragma as a decorator on classes """ - # not using hasattr as we don't want to land on inherited pragmas - if "_pragmas" not in cls.__dict__: - cls._pragmas = {} - self._apply(cls._pragmas) + if self.inherited: + setattr(cls, f"{_schema.inheritable_pragma_prefix}{self.pragma}", self.value) + else: + # not using hasattr as we don't want to land on inherited pragmas + if "_pragmas" not in cls.__dict__: + cls._pragmas = {} + self._apply(cls._pragmas) return cls def _apply(self, pragmas: _Dict[str, object]) -> None: @@ -125,7 +131,7 @@ class _Pragma(_ClassPragma, _schema.PropertyModifier): def modify(self, prop: _schema.Property): self._apply(prop.pragmas) - def negate(self) -> "PropertyModifier": + def negate(self) -> _schema.PropertyModifier: return _Pragma(self.pragma, remove=True) def _apply(self, pragmas: _Dict[str, object]) -> None: @@ -142,13 +148,14 @@ class _ParametrizedClassPragma(_PragmaBase): """ _pragma_class: _ClassVar[type] = _ClassPragma - function: _Callable[..., object] = None + inherited: bool = False + factory: _Callable[..., object] = None def __post_init__(self): - self.__signature__ = _inspect.signature(self.function).replace(return_annotation=self._pragma_class) + self.__signature__ = _inspect.signature(self.factory).replace(return_annotation=self._pragma_class) def __call__(self, *args, **kwargs) -> _pragma_class: - return self._pragma_class(self.pragma, value=self.function(*args, **kwargs)) + return self._pragma_class(self.pragma, self.inherited, value=self.factory(*args, **kwargs)) @_dataclass @@ -233,7 +240,7 @@ def f(cls: type) -> type: qltest.add(_ClassPragma("uncollapse_hierarchy")) qltest.test_with = lambda cls: _annotate(test_with=cls) # inheritable -ql.add(_ParametrizedClassPragma("default_doc_name", lambda doc: doc)) +ql.add(_ParametrizedClassPragma("default_doc_name", factory=lambda doc: doc)) ql.hideable = _annotate(hideable=True) # inheritable ql.add(_Pragma("internal")) @@ -241,16 +248,16 @@ def f(cls: type) -> type: rust.add(_Pragma("skip_doc_test")) -rust.add(_ParametrizedClassPragma("doc_test_signature", lambda signature: signature)) +rust.add(_ParametrizedClassPragma("doc_test_signature", factory=lambda signature: signature)) def group(name: str = "") -> _ClassDecorator: return _annotate(group=name) -synth.add(_ParametrizedClassPragma("from_class", lambda ref: _schema.SynthInfo( +synth.add(_ParametrizedClassPragma("from_class", factory=lambda ref: _schema.SynthInfo( from_class=_schema.get_type_name(ref))), key="synth") -synth.add(_ParametrizedClassPragma("on_arguments", lambda **kwargs: +synth.add(_ParametrizedClassPragma("on_arguments", factory=lambda **kwargs: _schema.SynthInfo(on_arguments={k: _schema.get_type_name(t) for k, t in kwargs.items()})), key="synth") @@ -288,12 +295,11 @@ def decorator(cls: type) -> _PropertyAnnotation: raise _schema.Error("Annotation classes must be named _") if cls.__doc__ is not None: annotated_cls.__doc__ = cls.__doc__ - old_pragmas = getattr(annotated_cls, "_pragmas", None) - new_pragmas = getattr(cls, "_pragmas", {}) - if old_pragmas: - old_pragmas.update(new_pragmas) - else: - annotated_cls._pragmas = new_pragmas + for p, v in cls.__dict__.get("_pragmas", {}).items(): + _ClassPragma(p, value=v)(annotated_cls) + for a in dir(cls): + if a.startswith(_schema.inheritable_pragma_prefix): + setattr(annotated_cls, a, getattr(cls, a)) for a, v in cls.__dict__.items(): # transfer annotations if a.startswith("_") and not a.startswith("__") and a != "_pragmas": diff --git a/misc/codegen/loaders/schemaloader.py b/misc/codegen/loaders/schemaloader.py index 822a4d696d16..7e3e7e026dc6 100644 --- a/misc/codegen/loaders/schemaloader.py +++ b/misc/codegen/loaders/schemaloader.py @@ -41,6 +41,12 @@ def _get_class(cls: type) -> schema.Class: raise schema.Error(f"Bases with mixed groups for {cls.__name__}") if any(getattr(b, "_null", False) for b in cls.__bases__): raise schema.Error(f"Null class cannot be derived") + pragmas = { + # dir and getattr inherit from bases + a[len(schema.inheritable_pragma_prefix):]: getattr(cls, a) + for a in dir(cls) if a.startswith(schema.inheritable_pragma_prefix) + } + pragmas |= cls.__dict__.get("_pragmas", {}) return schema.Class(name=cls.__name__, bases=[b.__name__ for b in cls.__bases__ if b is not object], derived={d.__name__ for d in cls.__subclasses__()}, @@ -48,8 +54,8 @@ def _get_class(cls: type) -> schema.Class: group=getattr(cls, "_group", ""), hideable=getattr(cls, "_hideable", False), test_with=_get_name(getattr(cls, "_test_with", None)), + pragmas=pragmas, # in the following we don't use `getattr` to avoid inheriting - pragmas=cls.__dict__.get("_pragmas", {}), properties=[ a | _PropertyNamer(n) for n, a in cls.__dict__.get("__annotations__", {}).items() From 8d291ab938132f8bc2000a6d2d38b7b488b1520e Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 12:15:10 +0200 Subject: [PATCH 048/162] Codegen: move `qltest.test_with` to parametrized pragmas --- misc/codegen/generators/qlgen.py | 5 ++--- misc/codegen/generators/rusttestgen.py | 3 ++- misc/codegen/lib/ql.py | 3 --- misc/codegen/lib/schema.py | 3 +-- misc/codegen/lib/schemadefs.py | 2 +- misc/codegen/loaders/schemaloader.py | 9 +++++---- misc/codegen/test/test_qlgen.py | 2 +- misc/codegen/test/test_schemaloader.py | 8 ++++++-- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/misc/codegen/generators/qlgen.py b/misc/codegen/generators/qlgen.py index 3240f28eecd9..5fb5d5413b12 100755 --- a/misc/codegen/generators/qlgen.py +++ b/misc/codegen/generators/qlgen.py @@ -154,7 +154,6 @@ def get_ql_property(cls: schema.Class, prop: schema.Property, lookup: typing.Dic def get_ql_class(cls: schema.Class, lookup: typing.Dict[str, schema.Class]) -> ql.Class: - pragmas = {k: True for k in cls.pragmas if k.startswith("qltest")} prev_child = "" properties = [] for p in cls.properties: @@ -172,7 +171,6 @@ def get_ql_class(cls: schema.Class, lookup: typing.Dict[str, schema.Class]) -> q doc=cls.doc, hideable=cls.hideable, internal="ql_internal" in cls.pragmas, - **pragmas, ) @@ -448,7 +446,8 @@ def generate(opts, renderer): for c in data.classes.values(): if should_skip_qltest(c, data.classes): continue - test_with = data.classes[c.test_with] if c.test_with else c + test_with_name = c.pragmas.get("qltest_test_with") + test_with = data.classes[test_with_name] if test_with_name else c test_dir = test_out / test_with.group / test_with.name test_dir.mkdir(parents=True, exist_ok=True) if all(f.suffix in (".txt", ".ql", ".actual", ".expected") for f in test_dir.glob("*.*")): diff --git a/misc/codegen/generators/rusttestgen.py b/misc/codegen/generators/rusttestgen.py index a44c5f2b2414..0888bcbf6a14 100644 --- a/misc/codegen/generators/rusttestgen.py +++ b/misc/codegen/generators/rusttestgen.py @@ -60,6 +60,7 @@ def generate(opts, renderer): if fn: indent = 4 * " " code = [indent + l for l in code] - test_with = schema.classes[cls.test_with] if cls.test_with else cls + test_with_name = typing.cast(str, cls.pragmas.get("qltest_test_with")) + test_with = schema.classes[test_with_name] if test_with_name else cls test = opts.ql_test_output / test_with.group / test_with.name / f"gen_{test_name}.rs" renderer.render(TestCode(code="\n".join(code), function=fn), test) diff --git a/misc/codegen/lib/ql.py b/misc/codegen/lib/ql.py index 9c7e3d846374..1920a813e20d 100644 --- a/misc/codegen/lib/ql.py +++ b/misc/codegen/lib/ql.py @@ -107,9 +107,6 @@ class Class: dir: pathlib.Path = pathlib.Path() imports: List[str] = field(default_factory=list) import_prefix: Optional[str] = None - qltest_skip: bool = False - qltest_collapse_hierarchy: bool = False - qltest_uncollapse_hierarchy: bool = False internal: bool = False doc: List[str] = field(default_factory=list) hideable: bool = False diff --git a/misc/codegen/lib/schema.py b/misc/codegen/lib/schema.py index 13b5ecee47ed..719d53f45211 100644 --- a/misc/codegen/lib/schema.py +++ b/misc/codegen/lib/schema.py @@ -95,7 +95,6 @@ class Class: pragmas: List[str] | Dict[str, object] = field(default_factory=dict) doc: List[str] = field(default_factory=list) hideable: bool = False - test_with: Optional[str] = None def __post_init__(self): if not isinstance(self.pragmas, dict): @@ -118,7 +117,7 @@ def check_types(self, known: typing.Iterable[str]): if synth.on_arguments is not None: for t in synth.on_arguments.values(): _check_type(t, known) - _check_type(self.test_with, known) + _check_type(self.pragmas.get("qltest_test_with"), known) @property def synth(self) -> SynthInfo | bool | None: diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index 08fd3367428a..d4e32d308631 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -238,7 +238,7 @@ def f(cls: type) -> type: qltest.add(_Pragma("skip")) qltest.add(_ClassPragma("collapse_hierarchy")) qltest.add(_ClassPragma("uncollapse_hierarchy")) -qltest.test_with = lambda cls: _annotate(test_with=cls) # inheritable +qltest.add(_ParametrizedClassPragma("test_with", inherited=True, factory=_schema.get_type_name)) ql.add(_ParametrizedClassPragma("default_doc_name", factory=lambda doc: doc)) ql.hideable = _annotate(hideable=True) # inheritable diff --git a/misc/codegen/loaders/schemaloader.py b/misc/codegen/loaders/schemaloader.py index 7e3e7e026dc6..45d50aef62ae 100644 --- a/misc/codegen/loaders/schemaloader.py +++ b/misc/codegen/loaders/schemaloader.py @@ -53,7 +53,6 @@ def _get_class(cls: type) -> schema.Class: # getattr to inherit from bases group=getattr(cls, "_group", ""), hideable=getattr(cls, "_hideable", False), - test_with=_get_name(getattr(cls, "_test_with", None)), pragmas=pragmas, # in the following we don't use `getattr` to avoid inheriting properties=[ @@ -123,9 +122,11 @@ def _fill_hideable_information(classes: typing.Dict[str, schema.Class]): def _check_test_with(classes: typing.Dict[str, schema.Class]): for cls in classes.values(): - if cls.test_with is not None and classes[cls.test_with].test_with is not None: - raise schema.Error(f"{cls.name} has test_with {cls.test_with} which in turn " - f"has test_with {classes[cls.test_with].test_with}, use that directly") + test_with = typing.cast(str, cls.pragmas.get("qltest_test_with")) + transitive_test_with = test_with and classes[test_with].pragmas.get("qltest_test_with") + if test_with and transitive_test_with: + raise schema.Error(f"{cls.name} has test_with {test_with} which in turn " + f"has test_with {transitive_test_with}, use that directly") def load(m: types.ModuleType) -> schema.Schema: diff --git a/misc/codegen/test/test_qlgen.py b/misc/codegen/test/test_qlgen.py index 8072a96f2771..4ba5dcc8e27b 100644 --- a/misc/codegen/test/test_qlgen.py +++ b/misc/codegen/test/test_qlgen.py @@ -749,7 +749,7 @@ def test_test_with(opts, generate_tests): write(opts.ql_test_output / "B" / "test.swift") assert generate_tests([ schema.Class("Base", derived={"A", "B"}), - schema.Class("A", bases=["Base"], test_with="B"), + schema.Class("A", bases=["Base"], pragmas={"qltest_test_with": "B"}), schema.Class("B", bases=["Base"]), ]) == { "B/A.ql": a_ql_class_tester(class_name="A"), diff --git a/misc/codegen/test/test_schemaloader.py b/misc/codegen/test/test_schemaloader.py index 1a96e102a14b..97b1e2df830a 100644 --- a/misc/codegen/test/test_schemaloader.py +++ b/misc/codegen/test/test_schemaloader.py @@ -754,12 +754,16 @@ class C(Root): class D(Root): pass + class E(B): + pass + assert data.classes == { "Root": schema.Class("Root", derived=set("ABCD")), "A": schema.Class("A", bases=["Root"]), - "B": schema.Class("B", bases=["Root"], test_with="A"), - "C": schema.Class("C", bases=["Root"], test_with="D"), + "B": schema.Class("B", bases=["Root"], pragmas={"qltest_test_with": "A"}, derived={'E'}), + "C": schema.Class("C", bases=["Root"], pragmas={"qltest_test_with": "D"}), "D": schema.Class("D", bases=["Root"]), + "E": schema.Class("E", bases=["B"], pragmas={"qltest_test_with": "A"}), } From 2533f18a6e5a973dee14d35eccb86d506b3ce965 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 12:24:54 +0200 Subject: [PATCH 049/162] Codegen: move `ql.hideable` to pragmas --- misc/codegen/generators/qlgen.py | 4 ++-- misc/codegen/lib/schema.py | 1 - misc/codegen/lib/schemadefs.py | 2 +- misc/codegen/loaders/schemaloader.py | 7 +++---- misc/codegen/test/test_qlgen.py | 4 ++-- misc/codegen/test/test_schemaloader.py | 12 ++++++------ 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/misc/codegen/generators/qlgen.py b/misc/codegen/generators/qlgen.py index 5fb5d5413b12..c5e7153489b6 100755 --- a/misc/codegen/generators/qlgen.py +++ b/misc/codegen/generators/qlgen.py @@ -115,7 +115,7 @@ def get_ql_property(cls: schema.Class, prop: schema.Property, lookup: typing.Dic is_unordered=prop.is_unordered, description=prop.description, synth=bool(cls.synth) or prop.synth, - type_is_hideable=lookup[prop.type].hideable if prop.type in lookup else False, + type_is_hideable="ql_hideable" in lookup[prop.type].pragmas if prop.type in lookup else False, internal="ql_internal" in prop.pragmas, ) if prop.is_single: @@ -169,7 +169,7 @@ def get_ql_class(cls: schema.Class, lookup: typing.Dict[str, schema.Class]) -> q properties=properties, dir=pathlib.Path(cls.group or ""), doc=cls.doc, - hideable=cls.hideable, + hideable="ql_hideable" in cls.pragmas, internal="ql_internal" in cls.pragmas, ) diff --git a/misc/codegen/lib/schema.py b/misc/codegen/lib/schema.py index 719d53f45211..8a3bf4511fb1 100644 --- a/misc/codegen/lib/schema.py +++ b/misc/codegen/lib/schema.py @@ -94,7 +94,6 @@ class Class: group: str = "" pragmas: List[str] | Dict[str, object] = field(default_factory=dict) doc: List[str] = field(default_factory=list) - hideable: bool = False def __post_init__(self): if not isinstance(self.pragmas, dict): diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index d4e32d308631..241a22031a92 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -241,7 +241,7 @@ def f(cls: type) -> type: qltest.add(_ParametrizedClassPragma("test_with", inherited=True, factory=_schema.get_type_name)) ql.add(_ParametrizedClassPragma("default_doc_name", factory=lambda doc: doc)) -ql.hideable = _annotate(hideable=True) # inheritable +ql.add(_ClassPragma("hideable", inherited=True)) ql.add(_Pragma("internal")) cpp.add(_Pragma("skip")) diff --git a/misc/codegen/loaders/schemaloader.py b/misc/codegen/loaders/schemaloader.py index 45d50aef62ae..12cd903032e1 100644 --- a/misc/codegen/loaders/schemaloader.py +++ b/misc/codegen/loaders/schemaloader.py @@ -52,7 +52,6 @@ def _get_class(cls: type) -> schema.Class: derived={d.__name__ for d in cls.__subclasses__()}, # getattr to inherit from bases group=getattr(cls, "_group", ""), - hideable=getattr(cls, "_hideable", False), pragmas=pragmas, # in the following we don't use `getattr` to avoid inheriting properties=[ @@ -110,13 +109,13 @@ def fill_is_synth(name: str): def _fill_hideable_information(classes: typing.Dict[str, schema.Class]): """ Update the class map propagating the `hideable` attribute upwards in the hierarchy """ - todo = [cls for cls in classes.values() if cls.hideable] + todo = [cls for cls in classes.values() if "ql_hideable" in cls.pragmas] while todo: cls = todo.pop() for base in cls.bases: supercls = classes[base] - if not supercls.hideable: - supercls.hideable = True + if "ql_hideable" not in supercls.pragmas: + supercls.pragmas["ql_hideable"] = None todo.append(supercls) diff --git a/misc/codegen/test/test_qlgen.py b/misc/codegen/test/test_qlgen.py index 4ba5dcc8e27b..d955f51b137d 100644 --- a/misc/codegen/test/test_qlgen.py +++ b/misc/codegen/test/test_qlgen.py @@ -986,7 +986,7 @@ def test_synth_property(generate_classes): def test_hideable_class(generate_classes): assert generate_classes([ - schema.Class("MyObject", hideable=True), + schema.Class("MyObject", pragmas=["ql_hideable"]), ]) == { "MyObject.qll": (a_ql_class_public(name="MyObject"), a_ql_stub(name="MyObject"), a_ql_class(name="MyObject", final=True, hideable=True, imports=[stub_import_prefix + "MyObject"])), } @@ -994,7 +994,7 @@ def test_hideable_class(generate_classes): def test_hideable_property(generate_classes): assert generate_classes([ - schema.Class("MyObject", hideable=True), + schema.Class("MyObject", pragmas=["ql_hideable"]), schema.Class("Other", properties=[ schema.SingleProperty("x", "MyObject"), ]), diff --git a/misc/codegen/test/test_schemaloader.py b/misc/codegen/test/test_schemaloader.py index 97b1e2df830a..994fadacf0b8 100644 --- a/misc/codegen/test/test_schemaloader.py +++ b/misc/codegen/test/test_schemaloader.py @@ -726,11 +726,11 @@ class NonHideable(Root): pass assert data.classes == { - "Root": schema.Class("Root", derived={"A", "IndirectlyHideable", "NonHideable"}, hideable=True), - "A": schema.Class("A", bases=["Root"], derived={"B"}, hideable=True), - "IndirectlyHideable": schema.Class("IndirectlyHideable", bases=["Root"], derived={"B"}, hideable=True), - "B": schema.Class("B", bases=["A", "IndirectlyHideable"], hideable=True), - "NonHideable": schema.Class("NonHideable", bases=["Root"], hideable=False), + "Root": schema.Class("Root", derived={"A", "IndirectlyHideable", "NonHideable"}, pragmas=["ql_hideable"]), + "A": schema.Class("A", bases=["Root"], derived={"B"}, pragmas=["ql_hideable"]), + "IndirectlyHideable": schema.Class("IndirectlyHideable", bases=["Root"], derived={"B"}, pragmas=["ql_hideable"]), + "B": schema.Class("B", bases=["A", "IndirectlyHideable"], pragmas=["ql_hideable"]), + "NonHideable": schema.Class("NonHideable", bases=["Root"]), } @@ -808,7 +808,7 @@ class _: pass assert data.classes == { - "Root": schema.Class("Root", hideable=True, pragmas=["qltest_skip", "cpp_skip", "qltest_collapse_hierarchy"]), + "Root": schema.Class("Root", pragmas=["qltest_skip", "cpp_skip", "ql_hideable", "qltest_collapse_hierarchy"]), } From d2ebe00492bb9f8ad69f79e0cbe05833eecc87cf Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 12:36:56 +0200 Subject: [PATCH 050/162] Codegen: move group to parametrized pragmas --- misc/codegen/lib/schema.py | 5 ++++- misc/codegen/lib/schemadefs.py | 4 +--- misc/codegen/loaders/schemaloader.py | 5 ++--- misc/codegen/test/test_cppgen.py | 8 ++++---- misc/codegen/test/test_dbschemegen.py | 22 +++++++++++----------- misc/codegen/test/test_qlgen.py | 6 +++--- misc/codegen/test/test_schemaloader.py | 6 +++--- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/misc/codegen/lib/schema.py b/misc/codegen/lib/schema.py index 8a3bf4511fb1..21a4cdcfc06c 100644 --- a/misc/codegen/lib/schema.py +++ b/misc/codegen/lib/schema.py @@ -91,7 +91,6 @@ class Class: bases: List[str] = field(default_factory=list) derived: Set[str] = field(default_factory=set) properties: List[Property] = field(default_factory=list) - group: str = "" pragmas: List[str] | Dict[str, object] = field(default_factory=dict) doc: List[str] = field(default_factory=list) @@ -125,6 +124,10 @@ def synth(self) -> SynthInfo | bool | None: def mark_synth(self): self.pragmas.setdefault("synth", True) + @property + def group(self) -> str: + return typing.cast(str, self.pragmas.get("group", "")) + @dataclass class Schema: diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index 241a22031a92..9edb8e759e28 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -250,9 +250,7 @@ def f(cls: type) -> type: rust.add(_ParametrizedClassPragma("doc_test_signature", factory=lambda signature: signature)) - -def group(name: str = "") -> _ClassDecorator: - return _annotate(group=name) +group = _ParametrizedClassPragma("group", inherited=True, factory=lambda group: group) synth.add(_ParametrizedClassPragma("from_class", factory=lambda ref: _schema.SynthInfo( diff --git a/misc/codegen/loaders/schemaloader.py b/misc/codegen/loaders/schemaloader.py index 12cd903032e1..5b2242037833 100644 --- a/misc/codegen/loaders/schemaloader.py +++ b/misc/codegen/loaders/schemaloader.py @@ -37,7 +37,8 @@ def _get_class(cls: type) -> schema.Class: if cls.__name__ != to_underscore_and_back: raise schema.Error(f"Class name must be upper camel-case, without capitalized acronyms, found {cls.__name__} " f"instead of {to_underscore_and_back}") - if len({b._group for b in cls.__bases__ if hasattr(b, "_group")}) > 1: + if len({g for g in (getattr(b, f"{schema.inheritable_pragma_prefix}group", None) + for b in cls.__bases__) if g}) > 1: raise schema.Error(f"Bases with mixed groups for {cls.__name__}") if any(getattr(b, "_null", False) for b in cls.__bases__): raise schema.Error(f"Null class cannot be derived") @@ -50,8 +51,6 @@ def _get_class(cls: type) -> schema.Class: return schema.Class(name=cls.__name__, bases=[b.__name__ for b in cls.__bases__ if b is not object], derived={d.__name__ for d in cls.__subclasses__()}, - # getattr to inherit from bases - group=getattr(cls, "_group", ""), pragmas=pragmas, # in the following we don't use `getattr` to avoid inheriting properties=[ diff --git a/misc/codegen/test/test_cppgen.py b/misc/codegen/test/test_cppgen.py index c8e05fa1d127..fea9be2037f4 100644 --- a/misc/codegen/test/test_cppgen.py +++ b/misc/codegen/test/test_cppgen.py @@ -156,10 +156,10 @@ def test_classes_with_dirs(generate_grouped): cbase = cpp.Class(name="CBase") assert generate_grouped([ schema.Class(name="A"), - schema.Class(name="B", group="foo"), - schema.Class(name="CBase", derived={"C"}, group="bar"), - schema.Class(name="C", bases=["CBase"], group="bar"), - schema.Class(name="D", group="foo/bar/baz"), + schema.Class(name="B", pragmas={"group": "foo"}), + schema.Class(name="CBase", derived={"C"}, pragmas={"group": "bar"}), + schema.Class(name="C", bases=["CBase"], pragmas={"group": "bar"}), + schema.Class(name="D", pragmas={"group": "foo/bar/baz"}), ]) == { ".": [cpp.Class(name="A", trap_name="As", final=True)], "foo": [cpp.Class(name="B", trap_name="Bs", final=True)], diff --git a/misc/codegen/test/test_dbschemegen.py b/misc/codegen/test/test_dbschemegen.py index 50ad70ed2b82..96a6b0d0f7ff 100644 --- a/misc/codegen/test/test_dbschemegen.py +++ b/misc/codegen/test/test_dbschemegen.py @@ -56,7 +56,7 @@ def test_includes(input, opts, generate): def test_empty_final_class(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input), + schema.Class("Object", pragmas={"group": dir_param.input}), ]) == dbscheme.Scheme( src=schema_file.name, includes=[], @@ -74,7 +74,7 @@ def test_empty_final_class(generate, dir_param): def test_final_class_with_single_scalar_field(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ schema.SingleProperty("foo", "bar"), ]), ]) == dbscheme.Scheme( @@ -94,7 +94,7 @@ def test_final_class_with_single_scalar_field(generate, dir_param): def test_final_class_with_single_class_field(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ schema.SingleProperty("foo", "Bar"), ]), ]) == dbscheme.Scheme( @@ -114,7 +114,7 @@ def test_final_class_with_single_class_field(generate, dir_param): def test_final_class_with_optional_field(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ schema.OptionalProperty("foo", "bar"), ]), ]) == dbscheme.Scheme( @@ -142,7 +142,7 @@ def test_final_class_with_optional_field(generate, dir_param): @pytest.mark.parametrize("property_cls", [schema.RepeatedProperty, schema.RepeatedOptionalProperty]) def test_final_class_with_repeated_field(generate, property_cls, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ property_cls("foo", "bar"), ]), ]) == dbscheme.Scheme( @@ -170,7 +170,7 @@ def test_final_class_with_repeated_field(generate, property_cls, dir_param): def test_final_class_with_repeated_unordered_field(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ schema.RepeatedUnorderedProperty("foo", "bar"), ]), ]) == dbscheme.Scheme( @@ -196,7 +196,7 @@ def test_final_class_with_repeated_unordered_field(generate, dir_param): def test_final_class_with_predicate_field(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ schema.PredicateProperty("foo"), ]), ]) == dbscheme.Scheme( @@ -222,7 +222,7 @@ def test_final_class_with_predicate_field(generate, dir_param): def test_final_class_with_more_fields(generate, dir_param): assert generate([ - schema.Class("Object", group=dir_param.input, properties=[ + schema.Class("Object", pragmas={"group": dir_param.input}, properties=[ schema.SingleProperty("one", "x"), schema.SingleProperty("two", "y"), schema.OptionalProperty("three", "z"), @@ -309,7 +309,7 @@ def test_class_with_derived_and_single_property(generate, dir_param): schema.Class( name="Base", derived={"Left", "Right"}, - group=dir_param.input, + pragmas={"group": dir_param.input}, properties=[ schema.SingleProperty("single", "Prop"), ]), @@ -349,7 +349,7 @@ def test_class_with_derived_and_optional_property(generate, dir_param): schema.Class( name="Base", derived={"Left", "Right"}, - group=dir_param.input, + pragmas={"group": dir_param.input}, properties=[ schema.OptionalProperty("opt", "Prop"), ]), @@ -388,7 +388,7 @@ def test_class_with_derived_and_repeated_property(generate, dir_param): assert generate([ schema.Class( name="Base", - group=dir_param.input, + pragmas={"group": dir_param.input}, derived={"Left", "Right"}, properties=[ schema.RepeatedProperty("rep", "Prop"), diff --git a/misc/codegen/test/test_qlgen.py b/misc/codegen/test/test_qlgen.py index d955f51b137d..684d3d6a1a10 100644 --- a/misc/codegen/test/test_qlgen.py +++ b/misc/codegen/test/test_qlgen.py @@ -467,7 +467,7 @@ def test_class_with_doc(generate_classes): def test_class_dir(generate_classes): dir = "another/rel/path" assert generate_classes([ - schema.Class("A", derived={"B"}, group=dir), + schema.Class("A", derived={"B"}, pragmas={"group": dir}), schema.Class("B", bases=["A"]), ]) == { f"{dir}/A.qll": ( @@ -489,7 +489,7 @@ def test_root_element_cannot_have_children(generate_classes): def test_class_dir_imports(generate_import_list): dir = "another/rel/path" assert generate_import_list([ - schema.Class("A", derived={"B"}, group=dir), + schema.Class("A", derived={"B"}, pragmas={"group": dir}), schema.Class("B", bases=["A"]), ]) == ql.ImportList([ stub_import_prefix + "B", @@ -583,7 +583,7 @@ def test_test_source_present(opts, generate_tests): def test_test_source_present_with_dir(opts, generate_tests): write(opts.ql_test_output / "foo" / "A" / "test.swift") assert generate_tests([ - schema.Class("A", group="foo"), + schema.Class("A", pragmas={"group": "foo"}), ]) == { "foo/A/A.ql": a_ql_class_tester(class_name="A"), } diff --git a/misc/codegen/test/test_schemaloader.py b/misc/codegen/test/test_schemaloader.py index 994fadacf0b8..4d1aa06ecd0f 100644 --- a/misc/codegen/test/test_schemaloader.py +++ b/misc/codegen/test/test_schemaloader.py @@ -101,7 +101,7 @@ class A: pass assert data.classes == { - 'A': schema.Class('A', group="xxx"), + 'A': schema.Class('A', pragmas={"group": "xxx"}), } @@ -124,8 +124,8 @@ class D(B, C): assert data.classes == { 'A': schema.Class('A', derived={'B', 'C'}), 'B': schema.Class('B', bases=['A'], derived={'D'}), - 'C': schema.Class('C', bases=['A'], derived={'D'}, group='xxx'), - 'D': schema.Class('D', bases=['B', 'C'], group='xxx'), + 'C': schema.Class('C', bases=['A'], derived={'D'}, pragmas={"group": "xxx"}), + 'D': schema.Class('D', bases=['B', 'C'], pragmas={"group": "xxx"}), } From f7afcd038a19a846cb45916edf454df0f7ef7ccb Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 12:45:08 +0200 Subject: [PATCH 051/162] Codegen: move `use_for_null` to pragmas --- misc/codegen/lib/schemadefs.py | 2 +- misc/codegen/loaders/schemaloader.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index 9edb8e759e28..3ba3cfad2fd9 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -233,7 +233,7 @@ def f(cls: type) -> type: doc = _DocModifier desc = _DescModifier -use_for_null = _annotate(null=True) +use_for_null = _ClassPragma("null") qltest.add(_Pragma("skip")) qltest.add(_ClassPragma("collapse_hierarchy")) diff --git a/misc/codegen/loaders/schemaloader.py b/misc/codegen/loaders/schemaloader.py index 5b2242037833..069e3b654740 100644 --- a/misc/codegen/loaders/schemaloader.py +++ b/misc/codegen/loaders/schemaloader.py @@ -40,17 +40,18 @@ def _get_class(cls: type) -> schema.Class: if len({g for g in (getattr(b, f"{schema.inheritable_pragma_prefix}group", None) for b in cls.__bases__) if g}) > 1: raise schema.Error(f"Bases with mixed groups for {cls.__name__}") - if any(getattr(b, "_null", False) for b in cls.__bases__): - raise schema.Error(f"Null class cannot be derived") pragmas = { # dir and getattr inherit from bases a[len(schema.inheritable_pragma_prefix):]: getattr(cls, a) for a in dir(cls) if a.startswith(schema.inheritable_pragma_prefix) } pragmas |= cls.__dict__.get("_pragmas", {}) + derived = {d.__name__ for d in cls.__subclasses__()} + if "null" in pragmas and derived: + raise schema.Error(f"Null class cannot be derived") return schema.Class(name=cls.__name__, bases=[b.__name__ for b in cls.__bases__ if b is not object], - derived={d.__name__ for d in cls.__subclasses__()}, + derived=derived, pragmas=pragmas, # in the following we don't use `getattr` to avoid inheriting properties=[ @@ -150,11 +151,11 @@ def load(m: types.ModuleType) -> schema.Schema: f"Only one root class allowed, found second root {name}") cls.check_types(known) classes[name] = cls - if getattr(data, "_null", False): + if "null" in cls.pragmas: + del cls.pragmas["null"] if null is not None: raise schema.Error(f"Null class {null} already defined, second null class {name} not allowed") null = name - cls.is_null_class = True _fill_synth_information(classes) _fill_hideable_information(classes) From 4e59fa903538fc86b910f46551a17b45f6b08414 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 12:45:57 +0200 Subject: [PATCH 052/162] Codegen: remove unneeded code --- misc/codegen/lib/schemadefs.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index 3ba3cfad2fd9..37c976bad3db 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -211,15 +211,6 @@ def __getitem__(self, item): _ClassDecorator = _Callable[[type], type] -def _annotate(**kwargs) -> _ClassDecorator: - def f(cls: type) -> type: - for k, v in kwargs.items(): - setattr(cls, f"_{k}", v) - return cls - - return f - - boolean = "boolean" int = "int" string = "string" @@ -298,10 +289,6 @@ def decorator(cls: type) -> _PropertyAnnotation: for a in dir(cls): if a.startswith(_schema.inheritable_pragma_prefix): setattr(annotated_cls, a, getattr(cls, a)) - for a, v in cls.__dict__.items(): - # transfer annotations - if a.startswith("_") and not a.startswith("__") and a != "_pragmas": - setattr(annotated_cls, a, v) for p, a in cls.__annotations__.items(): if p in annotated_cls.__annotations__: annotated_cls.__annotations__[p] |= a From 164cf27e672935f58e01e01a0a72db7ba4604378 Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Fri, 20 Sep 2024 12:46:10 +0100 Subject: [PATCH 053/162] Add additional constant checks to constant barrier gaurd --- .../python/dataflow/new/BarrierGuards.qll | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll b/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll index ad8b668a94ad..fefa30965cec 100644 --- a/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll +++ b/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll @@ -3,34 +3,45 @@ private import python private import semmle.python.dataflow.new.DataFlow -private predicate stringConstCompare(DataFlow::GuardNode g, ControlFlowNode node, boolean branch) { +private predicate constCompare(DataFlow::GuardNode g, ControlFlowNode node, boolean branch) { exists(CompareNode cn | cn = g | - exists(StringLiteral str_const, Cmpop op | + exists(ImmutableLiteral const, Cmpop op | op = any(Eq eq) and branch = true or op = any(NotEq ne) and branch = false | - cn.operands(str_const.getAFlowNode(), op, node) + cn.operands(const.getAFlowNode(), op, node) or - cn.operands(node, op, str_const.getAFlowNode()) + cn.operands(node, op, const.getAFlowNode()) ) or - exists(IterableNode str_const_iterable, Cmpop op | + exists(NameConstant const, Cmpop op | + op = any(Is is_) and branch = true + or + op = any(IsNot isn) and branch = false + | + cn.operands(const.getAFlowNode(), op, node) + or + cn.operands(node, op, const.getAFlowNode()) + ) + or + exists(IterableNode const_iterable, Cmpop op | op = any(In in_) and branch = true or op = any(NotIn ni) and branch = false | - forall(ControlFlowNode elem | elem = str_const_iterable.getAnElement() | - elem.getNode() instanceof StringLiteral + forall(ControlFlowNode elem | elem = const_iterable.getAnElement() | + elem.getNode() instanceof ImmutableLiteral ) and - cn.operands(node, op, str_const_iterable) + cn.operands(node, op, const_iterable) ) ) } -/** A validation of unknown node by comparing with a constant string value. */ -class StringConstCompareBarrier extends DataFlow::Node { - StringConstCompareBarrier() { - this = DataFlow::BarrierGuard::getABarrierNode() - } +/** A validation of unknown node by comparing with a constant value. */ +class ConstCompareBarrier extends DataFlow::Node { + ConstCompareBarrier() { this = DataFlow::BarrierGuard::getABarrierNode() } } + +/** DEPRECATED: Use ConstCompareBarrier instead. */ +deprecated class StringConstCompareBarrier = ConstCompareBarrier; From bcb84a84e1184b08efccd9d9edec39c41d9d4fc6 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 20 Sep 2024 12:48:08 +0100 Subject: [PATCH 054/162] Only skip test packages at the file-extraction phase --- go/extractor/extractor.go | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index 448bb83deee5..a42e56866baa 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -159,13 +159,18 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) // Do a post-order traversal and extract the package scope of each package packages.Visit(pkgs, nil, func(pkg *packages.Package) { - log.Printf("Processing package %s.", pkg.PkgPath) + // Note that if test extraction is enabled, we will encounter a package twice here: + // once as the main package, and once as the test package (with a package ID like + // "abc.com/pkgname [abc.com/pkgname.test]"). + // + // We will extract it both times however, because we need to visit the packages + // in the right order in order to visit used types before their users, and the + // ordering determined by packages.Visit for the main and the test package may differ. + // + // This should only cause some wasted time and not inconsistency because the names for + // objects seen in this process should be the same each time. - // If this is a variant of a package that also occurs with a shorter ID, skip it. - if pkg.ID != longestPackageIds[pkg.PkgPath] { - log.Printf("Skipping variant of package %s with ID %s.", pkg.PkgPath, pkg.ID) - return - } + log.Printf("Processing package %s.", pkg.PkgPath) if _, ok := pkgInfos[pkg.PkgPath]; !ok { pkgInfos[pkg.PkgPath] = toolchain.GetPkgInfo(pkg.PkgPath, modFlags...) @@ -242,9 +247,15 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) // extract AST information for all packages packages.Visit(pkgs, nil, func(pkg *packages.Package) { - // If this is a variant of a package that also occurs with a longer ID, skip it. + // If this is a variant of a package that also occurs with a longer ID, skip it; + // otherwise we would extract the same file more than once including extracting the + // body of methods twice, causing database inconsistencies. + // + // We prefer the version with the longest ID because that is (so far as I know) always + // the version that defines more entities -- the only case I'm aware of being a test + // variant of a package, which includes test-only functions in addition to the complete + // contents of the main variant. if pkg.ID != longestPackageIds[pkg.PkgPath] { - // Don't log here; we already mentioned this above. return } From 2a95068a0afbee8b73568180da682a5a15ba09e6 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 15:12:13 +0200 Subject: [PATCH 055/162] Rust: take test code also from property descriptions --- misc/codegen/generators/rusttestgen.py | 47 +++++++++++++++++--------- misc/codegen/lib/schema.py | 7 ++++ 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/misc/codegen/generators/rusttestgen.py b/misc/codegen/generators/rusttestgen.py index a44c5f2b2414..b47d6b8725a4 100644 --- a/misc/codegen/generators/rusttestgen.py +++ b/misc/codegen/generators/rusttestgen.py @@ -1,5 +1,7 @@ import dataclasses import typing +from collections.abc import Iterable + import inflection from misc.codegen.loaders import schemaloader @@ -27,6 +29,25 @@ class TestCode: function: Function | None = None +def _get_code(doc: list[str]) -> list[str]: + adding_code = False + has_code = False + code = [] + for line in doc: + match line, adding_code: + case ("```", _) | ("```rust", _): + adding_code = not adding_code + has_code = True + case _, False: + code.append(f"// {line}") + case _, True: + code.append(line) + assert not adding_code, "Unterminated code block in docstring:\n " + "\n ".join(doc) + if has_code: + return code + return [] + + def generate(opts, renderer): assert opts.ql_test_output schema = schemaloader.load_file(opts.schema) @@ -36,24 +57,18 @@ def generate(opts, renderer): force=opts.force) as renderer: for cls in schema.classes.values(): if (qlgen.should_skip_qltest(cls, schema.classes) or - "rust_skip_test_from_doc" in cls.pragmas or - not cls.doc): + "rust_skip_doc_test" in cls.pragmas): continue - code = [] - adding_code = False - has_code = False - for line in cls.doc: - match line, adding_code: - case ("```", _) | ("```rust", _): - adding_code = not adding_code - has_code = True - case _, False: - code.append(f"// {line}") - case _, True: - code.append(line) - if not has_code: + code = _get_code(cls.doc) + for p in schema.iter_properties(cls.name): + if "rust_skip_doc_test" in p.pragmas: + continue + property_code = _get_code(p.description) + if property_code: + code.append(f"// # {p.name}") + code += property_code + if not code: continue - assert not adding_code, "Unterminated code block in docstring: " + "\n".join(cls.doc) test_name = inflection.underscore(cls.name) signature = cls.pragmas.get("rust_doc_test_signature", "() -> ()") fn = signature and Function(f"test_{test_name}", signature) diff --git a/misc/codegen/lib/schema.py b/misc/codegen/lib/schema.py index bdaaba32c20b..5ee769ca3f20 100644 --- a/misc/codegen/lib/schema.py +++ b/misc/codegen/lib/schema.py @@ -1,6 +1,7 @@ """ schema format representation """ import abc import typing +from collections.abc import Iterable from dataclasses import dataclass, field from typing import List, Set, Union, Dict, Optional from enum import Enum, auto @@ -143,6 +144,12 @@ def root_class(self): def null_class(self): return self.classes[self.null] if self.null else None + def iter_properties(self, cls: str) -> Iterable[Property]: + cls = self.classes[cls] + for b in cls.bases: + yield from self.iter_properties(b) + yield from cls.properties + predicate_marker = object() From d29059118709012f2fea2f965b083cc49e1d17c5 Mon Sep 17 00:00:00 2001 From: Florin Coada Date: Fri, 20 Sep 2024 14:40:45 +0100 Subject: [PATCH 056/162] Update index.html --- docs/codeql/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/index.html b/docs/codeql/index.html index fff024c8d84e..d1e91bc89e32 100644 --- a/docs/codeql/index.html +++ b/docs/codeql/index.html @@ -102,7 +102,7 @@

    -
    CodeQL cverage of CWEs
    +
    CodeQL coverage of CWEs
    Detailed information on the coverage of Common Weakness Enumerations (CWEs) in the latest release...
    From 3001a570b25afd668c386a93a1ec0c48936d55b5 Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Fri, 20 Sep 2024 14:47:22 +0100 Subject: [PATCH 057/162] Replace uses of StringConstCompare --- .../dataflow/CodeInjectionCustomizations.qll | 7 +++++-- .../dataflow/CommandInjectionCustomizations.qll | 7 +++++-- .../dataflow/LdapInjectionCustomizations.qll | 15 ++++++++++----- .../dataflow/LogInjectionCustomizations.qll | 7 +++++-- .../dataflow/PathInjectionCustomizations.qll | 7 +++++-- .../dataflow/PolynomialReDoSCustomizations.qll | 7 +++++-- .../dataflow/ReflectedXSSCustomizations.qll | 7 +++++-- .../ServerSideRequestForgeryCustomizations.qll | 7 +++++-- .../dataflow/SqlInjectionCustomizations.qll | 7 +++++-- .../UnsafeDeserializationCustomizations.qll | 7 +++++-- .../dataflow/UrlRedirectCustomizations.qll | 2 +- .../CWE-074/TemplateInjectionCustomizations.qll | 7 +++++-- .../CWE-091/XsltInjectionCustomizations.qll | 7 +++++-- .../semmle/python/security/dataflow/EmailXss.qll | 2 +- .../python/security/injection/CsvInjection.qll | 2 +- .../commonSanitizer/InlineTaintTest.ql | 2 +- 16 files changed, 69 insertions(+), 31 deletions(-) diff --git a/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll index 294b3c63fdad..ab65b3b16f8f 100644 --- a/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/CodeInjectionCustomizations.qll @@ -49,7 +49,10 @@ module CodeInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizer extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll index a8d17026e40c..763a2e64c90c 100644 --- a/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/CommandInjectionCustomizations.qll @@ -84,7 +84,10 @@ module CommandInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll index 6c2b664bd965..576c50681dfe 100644 --- a/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/LdapInjectionCustomizations.qll @@ -61,15 +61,20 @@ module LdapInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsDnSanitizerGuard extends DnSanitizer, StringConstCompareBarrier { } + class ConstCompareAsDnSanitizerGuard extends DnSanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsDnSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsDnSanitizerGuard; /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsFilterSanitizerGuard extends FilterSanitizer, StringConstCompareBarrier { - } + class ConstCompareAsFilterSanitizerGuard extends FilterSanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsFilterSanitizerGuard instead. */ + deprecated class StringConstCompareAsFilterSanitizerGuard = ConstCompareAsFilterSanitizerGuard; /** * A call to replace line breaks functions as a sanitizer. diff --git a/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll index f92b87c73faf..aa243d169316 100644 --- a/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll @@ -77,9 +77,12 @@ module LogInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; /** * A call to replace line breaks, considered as a sanitizer. diff --git a/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll index cda71df2f905..0ab73475cd48 100644 --- a/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/PathInjectionCustomizations.qll @@ -87,7 +87,10 @@ module PathInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll index 23cd45312300..26995b530bdb 100644 --- a/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll @@ -70,7 +70,10 @@ module PolynomialReDoS { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll index ee2dec407d14..fefc09cdbaff 100644 --- a/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll @@ -75,7 +75,10 @@ module ReflectedXss { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll index a4e3ecc9ee18..a026c9edc51e 100644 --- a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll @@ -72,9 +72,12 @@ module ServerSideRequestForgery { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; /** * A string construction (concat, format, f-string) where the left side is not diff --git a/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll index 7e0969d854f0..5b3b1baf2d5b 100644 --- a/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll @@ -51,9 +51,12 @@ module SqlInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; private import semmle.python.frameworks.data.ModelsAsData diff --git a/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll index 27b6a44580d0..970dcf3dd593 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UnsafeDeserializationCustomizations.qll @@ -54,7 +54,10 @@ module UnsafeDeserialization { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll index fa913b28fbdf..5a351eb9ab40 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll @@ -142,7 +142,7 @@ module UrlRedirect { /** * A comparison with a constant string, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { + class StringConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { override predicate sanitizes(FlowState state) { // sanitize all flow states any() diff --git a/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll b/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll index dcd6c1848616..31ff1626f247 100644 --- a/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll +++ b/python/ql/src/experimental/Security/CWE-074/TemplateInjectionCustomizations.qll @@ -45,7 +45,10 @@ module TemplateInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll b/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll index bda2fe646c95..88bb4398297c 100644 --- a/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll +++ b/python/ql/src/experimental/Security/CWE-091/XsltInjectionCustomizations.qll @@ -52,7 +52,10 @@ module XsltInjection { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, StringConstCompareBarrier { } + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/src/experimental/semmle/python/security/dataflow/EmailXss.qll b/python/ql/src/experimental/semmle/python/security/dataflow/EmailXss.qll index 88e9af89ba63..c08a0e6b258b 100644 --- a/python/ql/src/experimental/semmle/python/security/dataflow/EmailXss.qll +++ b/python/ql/src/experimental/semmle/python/security/dataflow/EmailXss.qll @@ -19,7 +19,7 @@ private module EmailXssConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node sanitizer) { sanitizer = any(HtmlEscaping esc).getOutput() or - sanitizer instanceof StringConstCompareBarrier + sanitizer instanceof ConstCompareBarrier } predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { diff --git a/python/ql/src/experimental/semmle/python/security/injection/CsvInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/CsvInjection.qll index 316dd4d26035..d08e9b090a6f 100644 --- a/python/ql/src/experimental/semmle/python/security/injection/CsvInjection.qll +++ b/python/ql/src/experimental/semmle/python/security/injection/CsvInjection.qll @@ -15,7 +15,7 @@ private module CsvInjectionConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node = DataFlow::BarrierGuard::getABarrierNode() or - node instanceof StringConstCompareBarrier + node instanceof ConstCompareBarrier } } diff --git a/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/InlineTaintTest.ql b/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/InlineTaintTest.ql index 46263250a9b6..a71520eb1d3b 100644 --- a/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/InlineTaintTest.ql +++ b/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/InlineTaintTest.ql @@ -6,7 +6,7 @@ module CustomSanitizerOverridesConfig implements DataFlow::ConfigSig { predicate isSink = TestTaintTrackingConfig::isSink/1; - predicate isBarrier(DataFlow::Node node) { node instanceof StringConstCompareBarrier } + predicate isBarrier(DataFlow::Node node) { node instanceof ConstCompareBarrier } } import MakeInlineTaintTest From b2bddd3415d42bc7beb182c3bfceaadfb2185f9d Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 19 Sep 2024 15:03:29 +0200 Subject: [PATCH 058/162] Rust: write generated schema into schema/ast.py --- rust/generate-schema/src/main.rs | 106 ++-- rust/schema/ast.py | 891 +++++++++++++------------------ 2 files changed, 441 insertions(+), 556 deletions(-) diff --git a/rust/generate-schema/src/main.rs b/rust/generate-schema/src/main.rs index 693614044461..084faa51039e 100644 --- a/rust/generate-schema/src/main.rs +++ b/rust/generate-schema/src/main.rs @@ -1,3 +1,4 @@ +use std::io::Write; use std::{fs, path::PathBuf}; pub mod codegen; @@ -47,7 +48,13 @@ fn to_lower_snake_case(s: &str) -> String { buf } -fn print_schema(grammar: &AstSrc, super_types: BTreeMap>) { +fn write_schema( + grammar: &AstSrc, + super_types: BTreeMap>, +) -> std::io::Result { + let mut buf: Vec = Vec::new(); + writeln!(buf, "from .prelude import *\n")?; + for node in &grammar.enums { let super_classses = if let Some(cls) = super_types.get(&node.name) { let super_classes: Vec = cls.iter().map(|x| class_name(x)).collect(); @@ -55,9 +62,9 @@ fn print_schema(grammar: &AstSrc, super_types: BTreeMap } else { "AstNode".to_owned() }; - println!("class {}({}):", class_name(&node.name), super_classses); - println!(" pass"); - println!(""); + writeln!(buf, "class {}({}):", class_name(&node.name), super_classses)?; + writeln!(buf, " pass")?; + writeln!(buf, "")?; } for node in &grammar.nodes { let super_classses = if let Some(cls) = super_types.get(&node.name) { @@ -66,7 +73,7 @@ fn print_schema(grammar: &AstSrc, super_types: BTreeMap } else { "AstNode".to_owned() }; - println!("class {}({}):", class_name(&node.name), super_classses); + writeln!(buf, "class {}({}):", class_name(&node.name), super_classses)?; let mut empty = true; for field in get_fields(node) { if field.tp == "SyntaxToken" { @@ -75,10 +82,11 @@ fn print_schema(grammar: &AstSrc, super_types: BTreeMap empty = false; if field.tp == "string" { - println!( + writeln!( + buf, " {}: optional[string]", property_name(&node.name, &field.name), - ); + )?; } else { let list = field.is_many; let (o, c) = if list { @@ -86,20 +94,22 @@ fn print_schema(grammar: &AstSrc, super_types: BTreeMap } else { ("optional[", "]") }; - println!( + writeln!( + buf, " {}: {}\"{}\"{} | child", property_name(&node.name, &field.name), o, class_name(&field.tp), c - ); + )?; }; } if empty { - println!(" pass"); + writeln!(buf, " pass")?; } - println!(""); + writeln!(buf, "")?; } + Ok(String::from_utf8_lossy(&buf).to_string()) } struct FieldInfo { @@ -390,40 +400,45 @@ fn get_fields(node: &AstNodeSrc) -> Vec { result } -fn print_extractor(grammar: &AstSrc) { +fn write_extractor(grammar: &AstSrc) -> std::io::Result { + let mut buf: Vec = Vec::new(); + for node in &grammar.enums { let type_name = &node.name; let class_name = class_name(&node.name); - println!( + writeln!( + buf, " fn emit_{}(&mut self, node: ast::{}) -> Label {{", to_lower_snake_case(type_name), type_name, class_name - ); - println!(" match node {{"); + )?; + writeln!(buf, " match node {{")?; for variant in &node.variants { - println!( + writeln!( + buf, " ast::{}::{}(inner) => self.emit_{}(inner).into(),", type_name, variant, to_lower_snake_case(variant) - ); + )?; } - println!(" }}"); - println!(" }}\n"); + writeln!(buf, " }}")?; + writeln!(buf, " }}\n")?; } for node in &grammar.nodes { let type_name = &node.name; let class_name = class_name(&node.name); - println!( + writeln!( + buf, " fn emit_{}(&mut self, node: ast::{}) -> Label {{", to_lower_snake_case(type_name), type_name, class_name - ); + )?; for field in get_fields(&node) { if &field.tp == "SyntaxToken" { continue; @@ -433,45 +448,53 @@ fn print_extractor(grammar: &AstSrc) { let struct_field_name = &field.name; let class_field_name = property_name(&node.name, &field.name); if field.tp == "string" { - println!(" let {} = node.try_get_text();", class_field_name,); + writeln!( + buf, + " let {} = node.try_get_text();", + class_field_name, + )?; } else if field.is_many { - println!( + writeln!( + buf, " let {} = node.{}().map(|x| self.emit_{}(x)).collect();", class_field_name, struct_field_name, to_lower_snake_case(type_name) - ); + )?; } else { - println!( + writeln!( + buf, " let {} = node.{}().map(|x| self.emit_{}(x));", class_field_name, struct_field_name, to_lower_snake_case(type_name) - ); + )?; } } - println!( + writeln!( + buf, " let label = self.trap.emit(generated::{} {{", class_name - ); - println!(" id: TrapId::Star,"); + )?; + writeln!(buf, " id: TrapId::Star,")?; for field in get_fields(&node) { if field.tp == "SyntaxToken" { continue; } let class_field_name: String = property_name(&node.name, &field.name); - println!(" {},", class_field_name); + writeln!(buf, " {},", class_field_name)?; } - println!(" }});"); - println!(" self.emit_location(label, node);"); - println!(" label"); + writeln!(buf, " }});")?; + writeln!(buf, " self.emit_location(label, node);")?; + writeln!(buf, " label")?; - println!(" }}\n"); + writeln!(buf, " }}\n")?; } + Ok(String::from_utf8_lossy(&buf).into_owned()) } -fn main() { +fn main() -> std::io::Result<()> { let grammar: Grammar = fs::read_to_string(project_root().join("generate-schema/rust.ungram")) .unwrap() .parse() @@ -498,6 +521,15 @@ fn main() { let super_class_y = super_types.get(&y.name).into_iter().flatten().max(); super_class_x.cmp(&super_class_y).then(x.name.cmp(&y.name)) }); - //print_schema(&grammar, super_types); - print_extractor(&grammar); + let schema = write_schema(&grammar, super_types)?; + let schema_path = PathBuf::from("../schema/ast.py"); + let extractor = write_extractor(&grammar)?; + print!("{}", extractor); + codegen::ensure_file_contents( + crate::flags::CodegenType::Grammar, + &schema_path, + &schema, + false, + ); + Ok(()) } diff --git a/rust/schema/ast.py b/rust/schema/ast.py index 7fe56d7977a4..671f89473344 100644 --- a/rust/schema/ast.py +++ b/rust/schema/ast.py @@ -1,811 +1,664 @@ from .prelude import * class AssocItem(AstNode): - pass - + pass class Expr(AstNode): - pass - + pass class ExternItem(AstNode): - pass - + pass class FieldList(AstNode): - pass - + pass class GenericArg(AstNode): - pass - + pass class GenericParam(AstNode): - pass - + pass class Pat(AstNode): - pass - + pass class Stmt(AstNode): - pass - + pass class TypeRef(AstNode): - pass - + pass class Item(Stmt): - pass - + pass class Abi(AstNode): - abi_string: optional[string] - + abi_string: optional[string] class ArgList(AstNode): - args: list["Expr"] | child - + args: list["Expr"] | child class ArrayExpr(Expr): - attrs: list["Attr"] | child - exprs: list["Expr"] | child - + attrs: list["Attr"] | child + exprs: list["Expr"] | child class ArrayType(TypeRef): - const_arg: optional["ConstArg"] | child - ty: optional["TypeRef"] | child - + const_arg: optional["ConstArg"] | child + ty: optional["TypeRef"] | child class AsmExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class AssocItemList(AstNode): - assoc_items: list["AssocItem"] | child - attrs: list["Attr"] | child - + assoc_items: list["AssocItem"] | child + attrs: list["Attr"] | child class AssocTypeArg(GenericArg): - const_arg: optional["ConstArg"] | child - generic_arg_list: optional["GenericArgList"] | child - name_ref: optional["NameRef"] | child - param_list: optional["ParamList"] | child - ret_type: optional["RetType"] | child - return_type_syntax: optional["ReturnTypeSyntax"] | child - ty: optional["TypeRef"] | child - type_bound_list: optional["TypeBoundList"] | child - + const_arg: optional["ConstArg"] | child + generic_arg_list: optional["GenericArgList"] | child + name_ref: optional["NameRef"] | child + param_list: optional["ParamList"] | child + ret_type: optional["RetType"] | child + return_type_syntax: optional["ReturnTypeSyntax"] | child + ty: optional["TypeRef"] | child + type_bound_list: optional["TypeBoundList"] | child class Attr(AstNode): - meta: optional["Meta"] | child - + meta: optional["Meta"] | child class AwaitExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class BecomeExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class BinaryExpr(Expr): - attrs: list["Attr"] | child - lhs: optional["Expr"] | child - operator_name: optional[string] - rhs: optional["Expr"] | child - + attrs: list["Attr"] | child + lhs: optional["Expr"] | child + operator_name: optional[string] + rhs: optional["Expr"] | child class BlockExpr(Expr): - attrs: list["Attr"] | child - label: optional["Label"] | child - stmt_list: optional["StmtList"] | child - + attrs: list["Attr"] | child + label: optional["Label"] | child + stmt_list: optional["StmtList"] | child class BoxPat(Pat): - pat: optional["Pat"] | child - + pat: optional["Pat"] | child class BreakExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - lifetime: optional["Lifetime"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + lifetime: optional["Lifetime"] | child class CallExpr(Expr): - arg_list: optional["ArgList"] | child - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + arg_list: optional["ArgList"] | child + attrs: list["Attr"] | child + expr: optional["Expr"] | child class CastExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - ty: optional["TypeRef"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + ty: optional["TypeRef"] | child class ClosureBinder(AstNode): - generic_param_list: optional["GenericParamList"] | child - + generic_param_list: optional["GenericParamList"] | child class ClosureExpr(Expr): - attrs: list["Attr"] | child - body: optional["Expr"] | child - closure_binder: optional["ClosureBinder"] | child - param_list: optional["ParamList"] | child - ret_type: optional["RetType"] | child - - -class Const(AssocItem, Item): - attrs: list["Attr"] | child - body: optional["Expr"] | child - name: optional["Name"] | child - ty: optional["TypeRef"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + body: optional["Expr"] | child + closure_binder: optional["ClosureBinder"] | child + param_list: optional["ParamList"] | child + ret_type: optional["RetType"] | child + +class Const(AssocItem,Item): + attrs: list["Attr"] | child + body: optional["Expr"] | child + name: optional["Name"] | child + ty: optional["TypeRef"] | child + visibility: optional["Visibility"] | child class ConstArg(GenericArg): - expr: optional["Expr"] | child - + expr: optional["Expr"] | child class ConstBlockPat(Pat): - block_expr: optional["BlockExpr"] | child - + block_expr: optional["BlockExpr"] | child class ConstParam(GenericParam): - attrs: list["Attr"] | child - default_val: optional["ConstArg"] | child - name: optional["Name"] | child - ty: optional["TypeRef"] | child - + attrs: list["Attr"] | child + default_val: optional["ConstArg"] | child + name: optional["Name"] | child + ty: optional["TypeRef"] | child class ContinueExpr(Expr): - attrs: list["Attr"] | child - lifetime: optional["Lifetime"] | child - + attrs: list["Attr"] | child + lifetime: optional["Lifetime"] | child class DynTraitType(TypeRef): - type_bound_list: optional["TypeBoundList"] | child - + type_bound_list: optional["TypeBoundList"] | child class Enum(Item): - attrs: list["Attr"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - variant_list: optional["VariantList"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + attrs: list["Attr"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + variant_list: optional["VariantList"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class ExprStmt(Stmt): - expr: optional["Expr"] | child - + expr: optional["Expr"] | child class ExternBlock(Item): - abi: optional["Abi"] | child - attrs: list["Attr"] | child - extern_item_list: optional["ExternItemList"] | child - + abi: optional["Abi"] | child + attrs: list["Attr"] | child + extern_item_list: optional["ExternItemList"] | child class ExternCrate(Item): - attrs: list["Attr"] | child - name_ref: optional["NameRef"] | child - rename: optional["Rename"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + name_ref: optional["NameRef"] | child + rename: optional["Rename"] | child + visibility: optional["Visibility"] | child class ExternItemList(AstNode): - attrs: list["Attr"] | child - extern_items: list["ExternItem"] | child - + attrs: list["Attr"] | child + extern_items: list["ExternItem"] | child class FieldExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - name_ref: optional["NameRef"] | child - - -class Function(AssocItem, ExternItem, Item): - abi: optional["Abi"] | child - attrs: list["Attr"] | child - body: optional["BlockExpr"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - param_list: optional["ParamList"] | child - ret_type: optional["RetType"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + name_ref: optional["NameRef"] | child + +class Function(AssocItem,ExternItem,Item): + abi: optional["Abi"] | child + attrs: list["Attr"] | child + body: optional["BlockExpr"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + param_list: optional["ParamList"] | child + ret_type: optional["RetType"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class FnPtrType(TypeRef): - abi: optional["Abi"] | child - param_list: optional["ParamList"] | child - ret_type: optional["RetType"] | child - + abi: optional["Abi"] | child + param_list: optional["ParamList"] | child + ret_type: optional["RetType"] | child class ForExpr(Expr): - attrs: list["Attr"] | child - iterable: optional["Expr"] | child - label: optional["Label"] | child - loop_body: optional["BlockExpr"] | child - pat: optional["Pat"] | child - + attrs: list["Attr"] | child + iterable: optional["Expr"] | child + label: optional["Label"] | child + loop_body: optional["BlockExpr"] | child + pat: optional["Pat"] | child class ForType(TypeRef): - generic_param_list: optional["GenericParamList"] | child - ty: optional["TypeRef"] | child - + generic_param_list: optional["GenericParamList"] | child + ty: optional["TypeRef"] | child class FormatArgsArg(AstNode): - expr: optional["Expr"] | child - name: optional["Name"] | child - + expr: optional["Expr"] | child + name: optional["Name"] | child class FormatArgsExpr(Expr): - args: list["FormatArgsArg"] | child - attrs: list["Attr"] | child - template: optional["Expr"] | child - + args: list["FormatArgsArg"] | child + attrs: list["Attr"] | child + template: optional["Expr"] | child class GenericArgList(AstNode): - generic_args: list["GenericArg"] | child - + generic_args: list["GenericArg"] | child class GenericParamList(AstNode): - generic_params: list["GenericParam"] | child - + generic_params: list["GenericParam"] | child class IdentPat(Pat): - attrs: list["Attr"] | child - name: optional["Name"] | child - pat: optional["Pat"] | child - + attrs: list["Attr"] | child + name: optional["Name"] | child + pat: optional["Pat"] | child class IfExpr(Expr): - attrs: list["Attr"] | child - condition: optional["Expr"] | child - else_: optional["Expr"] | child - then: optional["BlockExpr"] | child - + attrs: list["Attr"] | child + condition: optional["Expr"] | child + else_: optional["Expr"] | child + then: optional["BlockExpr"] | child class Impl(Item): - assoc_item_list: optional["AssocItemList"] | child - attrs: list["Attr"] | child - generic_param_list: optional["GenericParamList"] | child - self_ty: optional["TypeRef"] | child - trait_: optional["TypeRef"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + assoc_item_list: optional["AssocItemList"] | child + attrs: list["Attr"] | child + generic_param_list: optional["GenericParamList"] | child + self_ty: optional["TypeRef"] | child + trait_: optional["TypeRef"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class ImplTraitType(TypeRef): - type_bound_list: optional["TypeBoundList"] | child - + type_bound_list: optional["TypeBoundList"] | child class IndexExpr(Expr): - attrs: list["Attr"] | child - base: optional["Expr"] | child - index: optional["Expr"] | child - + attrs: list["Attr"] | child + base: optional["Expr"] | child + index: optional["Expr"] | child class InferType(TypeRef): - pass - + pass class ItemList(AstNode): - attrs: list["Attr"] | child - items: list["Item"] | child - + attrs: list["Attr"] | child + items: list["Item"] | child class Label(AstNode): - lifetime: optional["Lifetime"] | child - + lifetime: optional["Lifetime"] | child class LetElse(AstNode): - block_expr: optional["BlockExpr"] | child - + block_expr: optional["BlockExpr"] | child class LetExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - pat: optional["Pat"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + pat: optional["Pat"] | child class LetStmt(Stmt): - attrs: list["Attr"] | child - initializer: optional["Expr"] | child - let_else: optional["LetElse"] | child - pat: optional["Pat"] | child - ty: optional["TypeRef"] | child - + attrs: list["Attr"] | child + initializer: optional["Expr"] | child + let_else: optional["LetElse"] | child + pat: optional["Pat"] | child + ty: optional["TypeRef"] | child class Lifetime(AstNode): - text: optional[string] - + text: optional[string] class LifetimeArg(GenericArg): - lifetime: optional["Lifetime"] | child - + lifetime: optional["Lifetime"] | child class LifetimeParam(GenericParam): - attrs: list["Attr"] | child - lifetime: optional["Lifetime"] | child - type_bound_list: optional["TypeBoundList"] | child - + attrs: list["Attr"] | child + lifetime: optional["Lifetime"] | child + type_bound_list: optional["TypeBoundList"] | child class LiteralExpr(Expr): - attrs: list["Attr"] | child - text_value: optional[string] - + attrs: list["Attr"] | child + text_value: optional[string] class LiteralPat(Pat): - literal: optional["LiteralExpr"] | child - + literal: optional["LiteralExpr"] | child class LoopExpr(Expr): - attrs: list["Attr"] | child - label: optional["Label"] | child - loop_body: optional["BlockExpr"] | child - - -class MacroCall(AssocItem, ExternItem, Item): - attrs: list["Attr"] | child - path: optional["Path"] | child - token_tree: optional["TokenTree"] | child + attrs: list["Attr"] | child + label: optional["Label"] | child + loop_body: optional["BlockExpr"] | child +class MacroCall(AssocItem,ExternItem,Item): + attrs: list["Attr"] | child + path: optional["Path"] | child + token_tree: optional["TokenTree"] | child class MacroDef(Item): - args: optional["TokenTree"] | child - attrs: list["Attr"] | child - body: optional["TokenTree"] | child - name: optional["Name"] | child - visibility: optional["Visibility"] | child - + args: optional["TokenTree"] | child + attrs: list["Attr"] | child + body: optional["TokenTree"] | child + name: optional["Name"] | child + visibility: optional["Visibility"] | child class MacroExpr(Expr): - macro_call: optional["MacroCall"] | child - + macro_call: optional["MacroCall"] | child class MacroPat(Pat): - macro_call: optional["MacroCall"] | child - + macro_call: optional["MacroCall"] | child class MacroRules(Item): - attrs: list["Attr"] | child - name: optional["Name"] | child - token_tree: optional["TokenTree"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + name: optional["Name"] | child + token_tree: optional["TokenTree"] | child + visibility: optional["Visibility"] | child class MacroType(TypeRef): - macro_call: optional["MacroCall"] | child - + macro_call: optional["MacroCall"] | child class MatchArm(AstNode): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - guard: optional["MatchGuard"] | child - pat: optional["Pat"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + guard: optional["MatchGuard"] | child + pat: optional["Pat"] | child class MatchArmList(AstNode): - arms: list["MatchArm"] | child - attrs: list["Attr"] | child - + arms: list["MatchArm"] | child + attrs: list["Attr"] | child class MatchExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - match_arm_list: optional["MatchArmList"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + match_arm_list: optional["MatchArmList"] | child class MatchGuard(AstNode): - condition: optional["Expr"] | child - + condition: optional["Expr"] | child class Meta(AstNode): - expr: optional["Expr"] | child - path: optional["Path"] | child - token_tree: optional["TokenTree"] | child - + expr: optional["Expr"] | child + path: optional["Path"] | child + token_tree: optional["TokenTree"] | child class MethodCallExpr(Expr): - arg_list: optional["ArgList"] | child - attrs: list["Attr"] | child - generic_arg_list: optional["GenericArgList"] | child - name_ref: optional["NameRef"] | child - receiver: optional["Expr"] | child - + arg_list: optional["ArgList"] | child + attrs: list["Attr"] | child + generic_arg_list: optional["GenericArgList"] | child + name_ref: optional["NameRef"] | child + receiver: optional["Expr"] | child class Module(Item): - attrs: list["Attr"] | child - item_list: optional["ItemList"] | child - name: optional["Name"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + item_list: optional["ItemList"] | child + name: optional["Name"] | child + visibility: optional["Visibility"] | child class Name(AstNode): - text: optional[string] - + text: optional[string] class NameRef(AstNode): - text: optional[string] - + text: optional[string] class NeverType(TypeRef): - pass - + pass class OffsetOfExpr(Expr): - attrs: list["Attr"] | child - fields: list["NameRef"] | child - ty: optional["TypeRef"] | child - + attrs: list["Attr"] | child + fields: list["NameRef"] | child + ty: optional["TypeRef"] | child class OrPat(Pat): - pats: list["Pat"] | child - + pats: list["Pat"] | child class Param(AstNode): - attrs: list["Attr"] | child - pat: optional["Pat"] | child - ty: optional["TypeRef"] | child - + attrs: list["Attr"] | child + pat: optional["Pat"] | child + ty: optional["TypeRef"] | child class ParamList(AstNode): - params: list["Param"] | child - self_param: optional["SelfParam"] | child - + params: list["Param"] | child + self_param: optional["SelfParam"] | child class ParenExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class ParenPat(Pat): - pat: optional["Pat"] | child - + pat: optional["Pat"] | child class ParenType(TypeRef): - ty: optional["TypeRef"] | child - + ty: optional["TypeRef"] | child class Path(AstNode): - qualifier: optional["Path"] | child - part: optional["PathSegment"] | child - + qualifier: optional["Path"] | child + part: optional["PathSegment"] | child class PathExpr(Expr): - attrs: list["Attr"] | child - path: optional["Path"] | child - + attrs: list["Attr"] | child + path: optional["Path"] | child class PathPat(Pat): - path: optional["Path"] | child - + path: optional["Path"] | child class PathSegment(AstNode): - generic_arg_list: optional["GenericArgList"] | child - name_ref: optional["NameRef"] | child - param_list: optional["ParamList"] | child - path_type: optional["PathType"] | child - ret_type: optional["RetType"] | child - return_type_syntax: optional["ReturnTypeSyntax"] | child - ty: optional["TypeRef"] | child - + generic_arg_list: optional["GenericArgList"] | child + name_ref: optional["NameRef"] | child + param_list: optional["ParamList"] | child + path_type: optional["PathType"] | child + ret_type: optional["RetType"] | child + return_type_syntax: optional["ReturnTypeSyntax"] | child + ty: optional["TypeRef"] | child class PathType(TypeRef): - path: optional["Path"] | child - + path: optional["Path"] | child class PrefixExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - operator_name: optional[string] - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + operator_name: optional[string] class PtrType(TypeRef): - ty: optional["TypeRef"] | child - + ty: optional["TypeRef"] | child class RangeExpr(Expr): - attrs: list["Attr"] | child - end: optional["Expr"] | child - operator_name: optional[string] - start: optional["Expr"] | child - + attrs: list["Attr"] | child + end: optional["Expr"] | child + operator_name: optional[string] + start: optional["Expr"] | child class RangePat(Pat): - end: optional["Pat"] | child - operator_name: optional[string] - start: optional["Pat"] | child - + end: optional["Pat"] | child + operator_name: optional[string] + start: optional["Pat"] | child class RecordExpr(Expr): - path: optional["Path"] | child - record_expr_field_list: optional["RecordExprFieldList"] | child - + path: optional["Path"] | child + record_expr_field_list: optional["RecordExprFieldList"] | child class RecordExprField(AstNode): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - name_ref: optional["NameRef"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + name_ref: optional["NameRef"] | child class RecordExprFieldList(AstNode): - attrs: list["Attr"] | child - fields: list["RecordExprField"] | child - spread: optional["Expr"] | child - + attrs: list["Attr"] | child + fields: list["RecordExprField"] | child + spread: optional["Expr"] | child class RecordField(AstNode): - attrs: list["Attr"] | child - name: optional["Name"] | child - ty: optional["TypeRef"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + name: optional["Name"] | child + ty: optional["TypeRef"] | child + visibility: optional["Visibility"] | child class RecordFieldList(FieldList): - fields: list["RecordField"] | child - + fields: list["RecordField"] | child class RecordPat(Pat): - path: optional["Path"] | child - record_pat_field_list: optional["RecordPatFieldList"] | child - + path: optional["Path"] | child + record_pat_field_list: optional["RecordPatFieldList"] | child class RecordPatField(AstNode): - attrs: list["Attr"] | child - name_ref: optional["NameRef"] | child - pat: optional["Pat"] | child - + attrs: list["Attr"] | child + name_ref: optional["NameRef"] | child + pat: optional["Pat"] | child class RecordPatFieldList(AstNode): - fields: list["RecordPatField"] | child - rest_pat: optional["RestPat"] | child - + fields: list["RecordPatField"] | child + rest_pat: optional["RestPat"] | child class RefExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class RefPat(Pat): - pat: optional["Pat"] | child - + pat: optional["Pat"] | child class RefType(TypeRef): - lifetime: optional["Lifetime"] | child - ty: optional["TypeRef"] | child - + lifetime: optional["Lifetime"] | child + ty: optional["TypeRef"] | child class Rename(AstNode): - name: optional["Name"] | child - + name: optional["Name"] | child class RestPat(Pat): - attrs: list["Attr"] | child - + attrs: list["Attr"] | child class RetType(AstNode): - ty: optional["TypeRef"] | child - + ty: optional["TypeRef"] | child class ReturnExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class ReturnTypeSyntax(AstNode): - pass - + pass class SelfParam(AstNode): - attrs: list["Attr"] | child - lifetime: optional["Lifetime"] | child - name: optional["Name"] | child - ty: optional["TypeRef"] | child - + attrs: list["Attr"] | child + lifetime: optional["Lifetime"] | child + name: optional["Name"] | child + ty: optional["TypeRef"] | child class SlicePat(Pat): - pats: list["Pat"] | child - + pats: list["Pat"] | child class SliceType(TypeRef): - ty: optional["TypeRef"] | child - + ty: optional["TypeRef"] | child class SourceFile(AstNode): - attrs: list["Attr"] | child - items: list["Item"] | child - - -class Static(ExternItem, Item): - attrs: list["Attr"] | child - body: optional["Expr"] | child - name: optional["Name"] | child - ty: optional["TypeRef"] | child - visibility: optional["Visibility"] | child + attrs: list["Attr"] | child + items: list["Item"] | child +class Static(ExternItem,Item): + attrs: list["Attr"] | child + body: optional["Expr"] | child + name: optional["Name"] | child + ty: optional["TypeRef"] | child + visibility: optional["Visibility"] | child class StmtList(AstNode): - attrs: list["Attr"] | child - statements: list["Stmt"] | child - tail_expr: optional["Expr"] | child - + attrs: list["Attr"] | child + statements: list["Stmt"] | child + tail_expr: optional["Expr"] | child class Struct(Item): - attrs: list["Attr"] | child - field_list: optional["FieldList"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + attrs: list["Attr"] | child + field_list: optional["FieldList"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class TokenTree(AstNode): - pass - + pass class Trait(Item): - assoc_item_list: optional["AssocItemList"] | child - attrs: list["Attr"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - type_bound_list: optional["TypeBoundList"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + assoc_item_list: optional["AssocItemList"] | child + attrs: list["Attr"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + type_bound_list: optional["TypeBoundList"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class TraitAlias(Item): - attrs: list["Attr"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - type_bound_list: optional["TypeBoundList"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + attrs: list["Attr"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + type_bound_list: optional["TypeBoundList"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class TryExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class TupleExpr(Expr): - attrs: list["Attr"] | child - fields: list["Expr"] | child - + attrs: list["Attr"] | child + fields: list["Expr"] | child class TupleField(AstNode): - attrs: list["Attr"] | child - ty: optional["TypeRef"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + ty: optional["TypeRef"] | child + visibility: optional["Visibility"] | child class TupleFieldList(FieldList): - fields: list["TupleField"] | child - + fields: list["TupleField"] | child class TuplePat(Pat): - fields: list["Pat"] | child - + fields: list["Pat"] | child class TupleStructPat(Pat): - fields: list["Pat"] | child - path: optional["Path"] | child - + fields: list["Pat"] | child + path: optional["Path"] | child class TupleType(TypeRef): - fields: list["TypeRef"] | child - - -class TypeAlias(AssocItem, ExternItem, Item): - attrs: list["Attr"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - ty: optional["TypeRef"] | child - type_bound_list: optional["TypeBoundList"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child + fields: list["TypeRef"] | child +class TypeAlias(AssocItem,ExternItem,Item): + attrs: list["Attr"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + ty: optional["TypeRef"] | child + type_bound_list: optional["TypeBoundList"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class TypeArg(GenericArg): - ty: optional["TypeRef"] | child - + ty: optional["TypeRef"] | child class TypeBound(AstNode): - generic_param_list: optional["GenericParamList"] | child - lifetime: optional["Lifetime"] | child - ty: optional["TypeRef"] | child - + generic_param_list: optional["GenericParamList"] | child + lifetime: optional["Lifetime"] | child + ty: optional["TypeRef"] | child class TypeBoundList(AstNode): - bounds: list["TypeBound"] | child - + bounds: list["TypeBound"] | child class TypeParam(GenericParam): - attrs: list["Attr"] | child - default_type: optional["TypeRef"] | child - name: optional["Name"] | child - type_bound_list: optional["TypeBoundList"] | child - + attrs: list["Attr"] | child + default_type: optional["TypeRef"] | child + name: optional["Name"] | child + type_bound_list: optional["TypeBoundList"] | child class UnderscoreExpr(Expr): - attrs: list["Attr"] | child - + attrs: list["Attr"] | child class Union(Item): - attrs: list["Attr"] | child - generic_param_list: optional["GenericParamList"] | child - name: optional["Name"] | child - record_field_list: optional["RecordFieldList"] | child - visibility: optional["Visibility"] | child - where_clause: optional["WhereClause"] | child - + attrs: list["Attr"] | child + generic_param_list: optional["GenericParamList"] | child + name: optional["Name"] | child + record_field_list: optional["RecordFieldList"] | child + visibility: optional["Visibility"] | child + where_clause: optional["WhereClause"] | child class Use(Item): - attrs: list["Attr"] | child - use_tree: optional["UseTree"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + use_tree: optional["UseTree"] | child + visibility: optional["Visibility"] | child class UseTree(AstNode): - path: optional["Path"] | child - rename: optional["Rename"] | child - use_tree_list: optional["UseTreeList"] | child - + path: optional["Path"] | child + rename: optional["Rename"] | child + use_tree_list: optional["UseTreeList"] | child class UseTreeList(AstNode): - use_trees: list["UseTree"] | child - + use_trees: list["UseTree"] | child class Variant(AstNode): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - field_list: optional["FieldList"] | child - name: optional["Name"] | child - visibility: optional["Visibility"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child + field_list: optional["FieldList"] | child + name: optional["Name"] | child + visibility: optional["Visibility"] | child class VariantList(AstNode): - variants: list["Variant"] | child - + variants: list["Variant"] | child class Visibility(AstNode): - path: optional["Path"] | child - + path: optional["Path"] | child class WhereClause(AstNode): - predicates: list["WherePred"] | child - + predicates: list["WherePred"] | child class WherePred(AstNode): - generic_param_list: optional["GenericParamList"] | child - lifetime: optional["Lifetime"] | child - ty: optional["TypeRef"] | child - type_bound_list: optional["TypeBoundList"] | child - + generic_param_list: optional["GenericParamList"] | child + lifetime: optional["Lifetime"] | child + ty: optional["TypeRef"] | child + type_bound_list: optional["TypeBoundList"] | child class WhileExpr(Expr): - attrs: list["Attr"] | child - condition: optional["Expr"] | child - label: optional["Label"] | child - loop_body: optional["BlockExpr"] | child - + attrs: list["Attr"] | child + condition: optional["Expr"] | child + label: optional["Label"] | child + loop_body: optional["BlockExpr"] | child class WildcardPat(Pat): - pass - + pass class YeetExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child - + attrs: list["Attr"] | child + expr: optional["Expr"] | child class YieldExpr(Expr): - attrs: list["Attr"] | child - expr: optional["Expr"] | child + attrs: list["Attr"] | child + expr: optional["Expr"] | child + From 2fdc529ac984fb2ae6a98f9b1669b96288bc2e35 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 19 Sep 2024 15:03:29 +0200 Subject: [PATCH 059/162] Rust: add qldoc annotations to schema --- rust/schema/__init__.py | 1 + rust/schema/annotations.py | 901 +++++++++++++++++++++++++++++++++++++ 2 files changed, 902 insertions(+) create mode 100644 rust/schema/annotations.py diff --git a/rust/schema/__init__.py b/rust/schema/__init__.py index 552a55f9480c..9d5aa440663a 100644 --- a/rust/schema/__init__.py +++ b/rust/schema/__init__.py @@ -11,3 +11,4 @@ from .prelude import * from .ast import * +from .annotations import * diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py new file mode 100644 index 000000000000..2c8b3d99e4fe --- /dev/null +++ b/rust/schema/annotations.py @@ -0,0 +1,901 @@ +from misc.codegen.lib.schemadefs import * +from .ast import * + + +@annotate(Module) +@rust.doc_test_signature(None) +class _: + """ + A module declaration. For example: + ```rust + mod foo; + ``` + ```rust + mod bar { + pub fn baz() {} + } + ``` + """ + + +@annotate(Expr) +class _: + """ + The base class for expressions. + """ + pass + + +@annotate(Pat) +class _: + """ + The base class for patterns. + """ + pass + + +@annotate(Label) +class _: + """ + A label. For example: + ```rust + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + ``` + """ + + +@annotate(Stmt) +class _: + """ + The base class for statements. + """ + pass + + +@annotate(TypeRef) +class _: + """ + The base class for type references. + ```rust + let x: i32; + let y: Vec; + let z: Option; + ``` + """ + pass + + +@annotate(Path) +class _: + """ + A path. For example: + ```rust + foo::bar; + ``` + """ + pass + + +@annotate(GenericArgList) +class _: + """ + The base class for generic arguments. + ```rust + x.foo::(42); + ``` + """ + pass + + +@annotate(Function) +@rust.doc_test_signature(None) +class _: + """ + A function declaration. For example + ```rust + fn foo(x: u32) -> u64 {(x + 1).into()} + ``` + A function declaration within a trait might not have a body: + ```rust + trait Trait { + fn bar(); + } + ``` + """ + + +@annotate(MissingExpr) +class _: + """ + A missing expression, used as a placeholder for incomplete syntax. + + ```rust + let x = non_existing_macro!(); + ``` + """ + pass + + +@annotate(PathExpr) +class _: + """ + A path expression. For example: + ```rust + let x = variable; + let x = foo::bar; + let y = ::foo; + let z = ::foo; + ``` + """ + + +@annotate(IfExpr) +class _: + """ + An `if` expression. For example: + ```rust + if x == 42 { + println!("that's the answer"); + } + ``` + ```rust + let y = if x > 0 { + 1 + } else { + 0 + } + ``` + """ + + +@annotate(LetExpr) +@rust.doc_test_signature("(maybe_some: Option) -> ()") +class _: + """ + A `let` expression. For example: + ```rust + if let Some(x) = maybe_some { + println!("{}", x); + } + ``` + """ + + +@annotate(BlockExpr) +class _: + """ + A block expression. For example: + ```rust + { + let x = 42; + } + ``` + ```rust + 'label: { + let x = 42; + x + } + ``` + """ + + +@annotate(AsyncBlockExpr) +@rust.doc_test_signature("() -> i32") +class _: + """ + An async block expression. For example: + ```rust + async { + let x = 42; + x + }.await + ``` + """ + pass + + +@annotate(ConstExpr) +@rust.doc_test_signature("() -> bool") +class _: + """ + A `const` block expression. For example: + ```rust + if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + return false; + } + ``` + """ + + +@annotate(UnsafeBlockExpr) +class _: + """ + An unsafe block expression. For example: + ```rust + let layout = unsafe { + let x = 42; + Layout::from_size_align_unchecked(size, align) + }; + ``` + """ + pass + + +@annotate(LoopExpr) +class _: + """ + A loop expression. For example: + ```rust + loop { + println!("Hello, world (again)!"); + }; + ``` + ```rust + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + ``` + ```rust + let mut x = 0; + loop { + if x < 10 { + x += 1; + } else { + break; + } + }; + ``` + """ + + +@annotate(CallExpr) +class _: + """ + A function call expression. For example: + ```rust + foo(42); + foo::(42); + foo[0](42); + foo(1) = 4; + ``` + """ + + +@annotate(MethodCallExpr) +class _: + """ + A method call expression. For example: + ```rust + x.foo(42); + x.foo::(42); + ``` + """ + + +@annotate(MatchArm) +@rust.doc_test_signature("(x: i32) -> i32") +class _: + """ + A match arm. For example: + ```rust + match x { + Option::Some(y) => y, + Option::None => 0, + }; + ``` + ```rust + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + }; + ``` + """ + + +@annotate(MatchExpr) +@rust.doc_test_signature("(x: i32) -> i32") +class _: + """ + A match expression. For example: + ```rust + match x { + Option::Some(y) => y, + Option::None => 0, + } + ``` + ```rust + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } + ``` + """ + + +@annotate(ContinueExpr) +class _: + """ + A continue expression. For example: + ```rust + loop { + if not_ready() { + continue; + } + } + ``` + ```rust + 'label: loop { + if not_ready() { + continue 'label; + } + } + ``` + """ + + +@annotate(BreakExpr) +class _: + """ + A break expression. For example: + ```rust + loop { + if not_ready() { + break; + } + } + ``` + ```rust + let x = 'label: loop { + if done() { + break 'label 42; + } + }; + ``` + """ + + +@annotate(ReturnExpr) +@rust.doc_test_signature(None) +class _: + """ + A return expression. For example: + ```rust + fn some_value() -> i32 { + return 42; + } + ``` + ```rust + fn no_value() -> () { + return; + } + ``` + """ + + +@annotate(BecomeExpr) +@rust.doc_test_signature(None) +class _: + """ + A `become` expression. For example: + ```rust + fn fact_a(n: i32, a: i32) -> i32 { + if n == 0 { + a + } else { + become fact_a(n - 1, n * a) + } + } + ``` + """ + + +@annotate(YieldExpr) +class _: + """ + A `yield` expression. For example: + ```rust + let one = #[coroutine] + || { + yield 1; + }; + ``` + """ + + +@annotate(YeetExpr) +class _: + """ + A `yeet` expression. For example: + ```rust + if x < size { + do yeet "index out of bounds"; + } + ``` + """ + + +@annotate(RecordExprField) +class _: + """ + A field in a record expression. For example `a: 1` in: + ```rust + Foo { a: 1, b: 2 }; + ``` + """ + + +@annotate(RecordExpr) +class _: + """ + A record expression. For example: + ```rust + let first = Foo { a: 1, b: 2 }; + let second = Foo { a: 2, ..first }; + Foo { a: 1, b: 2 }[2] = 10; + Foo { .. } = second; + ``` + """ + + +@annotate(FieldExpr) +class _: + """ + A field access expression. For example: + ```rust + x.foo + ``` + """ + + +@annotate(AwaitExpr) +class _: + """ + An `await` expression. For example: + ```rust + async { + let x = foo().await; + x + } + ``` + """ + + +@annotate(CastExpr) +class _: + """ + A cast expression. For example: + ```rust + value as u64; + ``` + """ + + +@annotate(RefExpr) +class _: + """ + A reference expression. For example: + ```rust + let ref_const = &foo; + let ref_mut = &mut foo; + let raw_const: &mut i32 = &raw const foo; + let raw_mut: &mut i32 = &raw mut foo; + ``` + """ + + +@annotate(BoxExpr) +class _: + """ + A box expression. For example: + ```rust + let x = #[rustc_box] Box::new(42); + ``` + """ + + +@annotate(PrefixExpr) +class _: + """ + A unary operation expression. For example: + ```rust + let x = -42 + let y = !true + let z = *ptr + ``` + """ + + +@annotate(BinaryExpr) +class _: + """ + A binary operation expression. For example: + ```rust + x + y; + x && y; + x <= y; + x = y; + x += y; + ``` + """ + + +@annotate(RangeExpr) +class _: + """ + A range expression. For example: + ```rust + let x = 1..=10; + let x = 1..10; + let x = 10..; + let x = ..10; + let x = ..=10; + let x = ..; + ``` + """ + + +@annotate(IndexExpr) +class _: + """ + An index expression. For example: + ```rust + list[42]; + list[42] = 1; + ``` + """ + + +@annotate(ClosureExpr) +class _: + """ + A closure expression. For example: + ```rust + |x| x + 1; + move |x: i32| -> i32 { x + 1 }; + async |x: i32, y| x + y; + #[coroutine] + |x| yield x; + #[coroutine] + static |x| yield x; + ``` + """ + + +@annotate(TupleExpr) +class _: + """ + A tuple expression. For example: + ```rust + (1, "one"); + (2, "two")[0] = 3; + ``` + """ + + +@annotate(ArrayExpr) +class _: + """ + An array expression. For example: + ```rust + [1, 2, 3]; + [1; 10]; + ``` + """ + pass + + +@annotate(ElementListExpr) +class _: + """ + An element list expression. For example: + ```rust + [1, 2, 3, 4, 5]; + [1, 2, 3, 4, 5][0] = 6; + ``` + """ + + +@annotate(RepeatExpr) +class _: + """ + A repeat expression. For example: + ```rust + [1; 10]; + ``` + """ + + +@annotate(LiteralExpr) +class _: + """ + A literal expression. For example: + ```rust + 42; + 42.0; + "Hello, world!"; + b"Hello, world!"; + 'x'; + b'x'; + r"Hello, world!"; + true; + ``` + """ + pass + + +@annotate(UnderscoreExpr) +class _: + """ + An underscore expression. For example: + ```rust + _ = 42; + ``` + """ + pass + + +@annotate(OffsetOfExpr) +class _: + """ + An `offset_of` expression. For example: + ```rust + builtin # offset_of(Struct, field); + ``` + """ + + +@annotate(AsmExpr) +class _: + """ + An inline assembly expression. For example: + ```rust + unsafe { + builtin # asm(_); + } + ``` + """ + + +@annotate(LetStmt) +class _: + """ + A let statement. For example: + ```rust + let x = 42; + let x: i32 = 42; + let x: i32; + let x; + let (x, y) = (1, 2); + let Some(x) = std::env::var("FOO") else { + return; + }; + ``` + """ + + +@annotate(ExprStmt) +class _: + """ + An expression statement. For example: + ```rust + start(); + finish() + use std::env; + ``` + """ + + +# At the HIR-level, we don't have items, only some markers without location indicating where they used to be. +@annotate(ItemStmt) +@qltest.skip +class _: + """ + An item statement. For example: + ```rust + fn print_hello() { + println!("Hello, world!"); + } + print_hello(); + ``` + """ + pass + + +@annotate(MissingPat) +class _: + """ + A missing pattern, used as a place holder for incomplete syntax. + ```rust + match Some(42) { + .. => "bad use of .. syntax", + }; + ``` + """ + pass + + +@annotate(WildcardPat) +class _: + """ + A wildcard pattern. For example: + ```rust + let _ = 42; + ``` + """ + pass + + +@annotate(TuplePat) +class _: + """ + A tuple pattern. For example: + ```rust + let (x, y) = (1, 2); + let (a, b, .., z) = (1, 2, 3, 4, 5); + ``` + """ + + +@annotate(OrPat) +class _: + """ + An or pattern. For example: + ```rust + match x { + Option::Some(y) | Option::None => 0, + } + ``` + """ + + +@annotate(RecordPatField) +class _: + """ + A field in a record pattern. For example `a: 1` in: + ```rust + let Foo { a: 1, b: 2 } = foo; + ``` + """ + + +@annotate(RecordPat) +class _: + """ + A record pattern. For example: + ```rust + match x { + Foo { a: 1, b: 2 } => "ok", + Foo { .. } => "fail", + } + ``` + """ + + +@annotate(RangePat) +class _: + """ + A range pattern. For example: + ```rust + match x { + ..15 => "too cold", + 16..=25 => "just right", + 26.. => "too hot", + } + ``` + """ + + +@annotate(SlicePat) +class _: + """ + A slice pattern. For example: + ```rust + match x { + [1, 2, 3, 4, 5] => "ok", + [1, 2, ..] => "fail", + [x, y, .., z, 7] => "fail", + } + ``` + """ + + +@annotate(PathPat) +class _: + """ + A path pattern. For example: + ```rust + match x { + Foo::Bar => "ok", + _ => "fail", + } + ``` + """ + + +@annotate(LiteralPat) +class _: + """ + A literal pattern. For example: + ```rust + match x { + 42 => "ok", + _ => "fail", + } + ``` + """ + + +@annotate(IdentPat) +class _: + """ + A binding pattern. For example: + ```rust + match x { + Option::Some(y) => y, + Option::None => 0, + }; + ``` + ```rust + match x { + y@Option::Some(_) => y, + Option::None => 0, + }; + ``` + """ + + +@annotate(TupleStructPat) +class _: + """ + A tuple struct pattern. For example: + ```rust + match x { + Tuple("a", 1, 2, 3) => "great", + Tuple(.., 3) => "fine", + Tuple(..) => "fail", + }; + ``` + """ + + +@annotate(RefPat) +class _: + """ + A reference pattern. For example: + ```rust + match x { + &mut Option::Some(y) => y, + &Option::None => 0, + }; + ``` + """ + + +@annotate(BoxPat) +class _: + """ + A box pattern. For example: + ```rust + match x { + box Option::Some(y) => y, + box Option::None => 0, + }; + ``` + """ + + +@annotate(ConstBlockPat) +class _: + """ + A const block pattern. For example: + ```rust + match x { + const { 1 + 2 + 3 } => "ok", + _ => "fail", + }; + ``` + """ From 57458d8f384a1fd57a02c6388705fba083a39af7 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 19 Sep 2024 15:48:00 +0200 Subject: [PATCH 060/162] Rust: remove qldoc annotations for classes that no longer exist --- rust/schema/annotations.py | 136 ++++++++----------------------------- 1 file changed, 28 insertions(+), 108 deletions(-) diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 2c8b3d99e4fe..64b02390264e 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -107,18 +107,6 @@ class _: """ -@annotate(MissingExpr) -class _: - """ - A missing expression, used as a placeholder for incomplete syntax. - - ```rust - let x = non_existing_macro!(); - ``` - """ - pass - - @annotate(PathExpr) class _: """ @@ -182,46 +170,17 @@ class _: """ -@annotate(AsyncBlockExpr) -@rust.doc_test_signature("() -> i32") -class _: - """ - An async block expression. For example: - ```rust - async { - let x = 42; - x - }.await - ``` - """ - pass - - -@annotate(ConstExpr) -@rust.doc_test_signature("() -> bool") -class _: - """ - A `const` block expression. For example: - ```rust - if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { - return false; - } - ``` - """ - - -@annotate(UnsafeBlockExpr) -class _: - """ - An unsafe block expression. For example: - ```rust - let layout = unsafe { - let x = 42; - Layout::from_size_align_unchecked(size, align) - }; - ``` - """ - pass +# @annotate(ConstExpr) +# @rust.doc_test_signature("() -> bool") +# class _: +# """ +# A `const` block expression. For example: +# ```rust +# if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { +# return false; +# } +# ``` +# """ @annotate(LoopExpr) @@ -487,16 +446,6 @@ class _: """ -@annotate(BoxExpr) -class _: - """ - A box expression. For example: - ```rust - let x = #[rustc_box] Box::new(42); - ``` - """ - - @annotate(PrefixExpr) class _: """ @@ -588,25 +537,25 @@ class _: pass -@annotate(ElementListExpr) -class _: - """ - An element list expression. For example: - ```rust - [1, 2, 3, 4, 5]; - [1, 2, 3, 4, 5][0] = 6; - ``` - """ +# @annotate(ElementListExpr) +# class _: +# """ +# An element list expression. For example: +# ```rust +# [1, 2, 3, 4, 5]; +# [1, 2, 3, 4, 5][0] = 6; +# ``` +# """ -@annotate(RepeatExpr) -class _: - """ - A repeat expression. For example: - ```rust - [1; 10]; - ``` - """ +# @annotate(RepeatExpr) +# class _: +# """ +# A repeat expression. For example: +# ```rust +# [1; 10]; +# ``` +# """ @annotate(LiteralExpr) @@ -689,35 +638,6 @@ class _: """ -# At the HIR-level, we don't have items, only some markers without location indicating where they used to be. -@annotate(ItemStmt) -@qltest.skip -class _: - """ - An item statement. For example: - ```rust - fn print_hello() { - println!("Hello, world!"); - } - print_hello(); - ``` - """ - pass - - -@annotate(MissingPat) -class _: - """ - A missing pattern, used as a place holder for incomplete syntax. - ```rust - match Some(42) { - .. => "bad use of .. syntax", - }; - ``` - """ - pass - - @annotate(WildcardPat) class _: """ From a9423f4bdb22e07884ac7dada892bf4c1c36c999 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 20 Sep 2024 11:00:12 +0200 Subject: [PATCH 061/162] Rust: codegen --- rust/ql/.generated.list | 581 +++++++++++------- rust/ql/.gitattributes | 239 +++++-- .../ql/lib/codeql/rust/elements/ArrayExpr.qll | 7 + rust/ql/lib/codeql/rust/elements/AsmExpr.qll | 8 + .../ql/lib/codeql/rust/elements/AwaitExpr.qll | 9 + .../lib/codeql/rust/elements/BecomeExpr.qll | 12 + .../lib/codeql/rust/elements/BinaryExpr.qll | 10 + .../ql/lib/codeql/rust/elements/BlockExpr.qll | 14 + rust/ql/lib/codeql/rust/elements/BoxPat.qll | 9 + .../ql/lib/codeql/rust/elements/BreakExpr.qll | 17 + rust/ql/lib/codeql/rust/elements/CallExpr.qll | 9 + rust/ql/lib/codeql/rust/elements/CastExpr.qll | 6 + .../lib/codeql/rust/elements/ClosureExpr.qll | 12 + .../codeql/rust/elements/ConstBlockPat.qll | 9 + .../lib/codeql/rust/elements/ContinueExpr.qll | 17 + rust/ql/lib/codeql/rust/elements/Expr.qll | 3 + rust/ql/lib/codeql/rust/elements/ExprStmt.qll | 8 + .../ql/lib/codeql/rust/elements/FieldExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/Function.qll | 12 + .../codeql/rust/elements/GenericArgList.qll | 6 + rust/ql/lib/codeql/rust/elements/IdentPat.qll | 15 + rust/ql/lib/codeql/rust/elements/IfExpr.qll | 15 + .../ql/lib/codeql/rust/elements/IndexExpr.qll | 7 + rust/ql/lib/codeql/rust/elements/Label.qll | 9 + rust/ql/lib/codeql/rust/elements/LetExpr.qll | 8 + rust/ql/lib/codeql/rust/elements/LetStmt.qll | 13 + .../lib/codeql/rust/elements/LiteralExpr.qll | 13 + .../lib/codeql/rust/elements/LiteralPat.qll | 9 + rust/ql/lib/codeql/rust/elements/LoopExpr.qll | 24 + rust/ql/lib/codeql/rust/elements/MatchArm.qll | 15 + .../ql/lib/codeql/rust/elements/MatchExpr.qll | 15 + .../codeql/rust/elements/MethodCallExpr.qll | 7 + rust/ql/lib/codeql/rust/elements/Module.qll | 11 + .../lib/codeql/rust/elements/OffsetOfExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/OrPat.qll | 8 + rust/ql/lib/codeql/rust/elements/Pat.qll | 3 + rust/ql/lib/codeql/rust/elements/Path.qll | 6 + rust/ql/lib/codeql/rust/elements/PathExpr.qll | 9 + rust/ql/lib/codeql/rust/elements/PathPat.qll | 9 + .../lib/codeql/rust/elements/PrefixExpr.qll | 8 + .../ql/lib/codeql/rust/elements/RangeExpr.qll | 11 + rust/ql/lib/codeql/rust/elements/RangePat.qll | 10 + .../lib/codeql/rust/elements/RecordExpr.qll | 9 + .../codeql/rust/elements/RecordExprField.qll | 6 + .../ql/lib/codeql/rust/elements/RecordPat.qll | 9 + .../codeql/rust/elements/RecordPatField.qll | 6 + rust/ql/lib/codeql/rust/elements/RefExpr.qll | 9 + rust/ql/lib/codeql/rust/elements/RefPat.qll | 9 + .../lib/codeql/rust/elements/ReturnExpr.qll | 13 + rust/ql/lib/codeql/rust/elements/SlicePat.qll | 10 + rust/ql/lib/codeql/rust/elements/Stmt.qll | 3 + .../ql/lib/codeql/rust/elements/TupleExpr.qll | 7 + rust/ql/lib/codeql/rust/elements/TuplePat.qll | 7 + .../codeql/rust/elements/TupleStructPat.qll | 10 + rust/ql/lib/codeql/rust/elements/TypeRef.qll | 8 + .../codeql/rust/elements/UnderscoreExpr.qll | 6 + .../lib/codeql/rust/elements/WildcardPat.qll | 6 + rust/ql/lib/codeql/rust/elements/YeetExpr.qll | 8 + .../ql/lib/codeql/rust/elements/YieldExpr.qll | 9 + .../rust/elements/internal/ArrayExprImpl.qll | 7 + .../rust/elements/internal/AsmExprImpl.qll | 8 + .../rust/elements/internal/AwaitExprImpl.qll | 9 + .../rust/elements/internal/BecomeExprImpl.qll | 12 + .../rust/elements/internal/BinaryExprImpl.qll | 10 + .../rust/elements/internal/BlockExprImpl.qll | 14 + .../rust/elements/internal/BoxPatImpl.qll | 9 + .../rust/elements/internal/BreakExprImpl.qll | 17 + .../rust/elements/internal/CallExprImpl.qll | 9 + .../rust/elements/internal/CastExprImpl.qll | 6 + .../elements/internal/ClosureExprImpl.qll | 12 + .../elements/internal/ConstBlockPatImpl.qll | 9 + .../elements/internal/ContinueExprImpl.qll | 17 + .../rust/elements/internal/ExprImpl.qll | 3 + .../rust/elements/internal/ExprStmtImpl.qll | 8 + .../rust/elements/internal/FieldExprImpl.qll | 6 + .../elements/internal/GenericArgListImpl.qll | 6 + .../rust/elements/internal/IdentPatImpl.qll | 15 + .../rust/elements/internal/IfExprImpl.qll | 15 + .../rust/elements/internal/IndexExprImpl.qll | 7 + .../rust/elements/internal/LabelImpl.qll | 9 + .../rust/elements/internal/LetExprImpl.qll | 8 + .../rust/elements/internal/LetStmtImpl.qll | 13 + .../elements/internal/LiteralExprImpl.qll | 13 + .../rust/elements/internal/LiteralPatImpl.qll | 9 + .../rust/elements/internal/LoopExprImpl.qll | 24 + .../rust/elements/internal/MatchArmImpl.qll | 15 + .../rust/elements/internal/MatchExprImpl.qll | 15 + .../elements/internal/MethodCallExprImpl.qll | 7 + .../rust/elements/internal/ModuleImpl.qll | 11 + .../elements/internal/OffsetOfExprImpl.qll | 6 + .../rust/elements/internal/OrPatImpl.qll | 8 + .../codeql/rust/elements/internal/PatImpl.qll | 3 + .../rust/elements/internal/PathExprImpl.qll | 9 + .../rust/elements/internal/PathImpl.qll | 6 + .../rust/elements/internal/PathPatImpl.qll | 9 + .../rust/elements/internal/PrefixExprImpl.qll | 8 + .../rust/elements/internal/RangeExprImpl.qll | 11 + .../rust/elements/internal/RangePatImpl.qll | 10 + .../elements/internal/RecordExprFieldImpl.qll | 6 + .../rust/elements/internal/RecordExprImpl.qll | 9 + .../elements/internal/RecordPatFieldImpl.qll | 6 + .../rust/elements/internal/RecordPatImpl.qll | 9 + .../rust/elements/internal/RefExprImpl.qll | 9 + .../rust/elements/internal/RefPatImpl.qll | 9 + .../rust/elements/internal/ReturnExprImpl.qll | 13 + .../rust/elements/internal/SlicePatImpl.qll | 10 + .../rust/elements/internal/StmtImpl.qll | 3 + .../rust/elements/internal/TupleExprImpl.qll | 7 + .../rust/elements/internal/TuplePatImpl.qll | 7 + .../elements/internal/TupleStructPatImpl.qll | 10 + .../rust/elements/internal/TypeRefImpl.qll | 8 + .../elements/internal/UnderscoreExprImpl.qll | 6 + .../elements/internal/WildcardPatImpl.qll | 6 + .../rust/elements/internal/YeetExprImpl.qll | 8 + .../rust/elements/internal/YieldExprImpl.qll | 9 + .../elements/internal/generated/ArrayExpr.qll | 5 + .../elements/internal/generated/AsmExpr.qll | 6 + .../elements/internal/generated/AwaitExpr.qll | 7 + .../internal/generated/BecomeExpr.qll | 10 + .../internal/generated/BinaryExpr.qll | 8 + .../elements/internal/generated/BlockExpr.qll | 12 + .../elements/internal/generated/BoxPat.qll | 7 + .../elements/internal/generated/BreakExpr.qll | 15 + .../elements/internal/generated/CallExpr.qll | 7 + .../elements/internal/generated/CastExpr.qll | 4 + .../internal/generated/ClosureExpr.qll | 10 + .../internal/generated/ConstBlockPat.qll | 7 + .../internal/generated/ContinueExpr.qll | 15 + .../rust/elements/internal/generated/Expr.qll | 1 + .../elements/internal/generated/ExprStmt.qll | 6 + .../elements/internal/generated/FieldExpr.qll | 4 + .../elements/internal/generated/Function.qll | 10 + .../internal/generated/GenericArgList.qll | 4 + .../elements/internal/generated/IdentPat.qll | 13 + .../elements/internal/generated/IfExpr.qll | 13 + .../elements/internal/generated/IndexExpr.qll | 5 + .../elements/internal/generated/Label.qll | 7 + .../elements/internal/generated/LetExpr.qll | 6 + .../elements/internal/generated/LetStmt.qll | 11 + .../internal/generated/LiteralExpr.qll | 11 + .../internal/generated/LiteralPat.qll | 7 + .../elements/internal/generated/LoopExpr.qll | 22 + .../elements/internal/generated/MatchArm.qll | 13 + .../elements/internal/generated/MatchExpr.qll | 13 + .../internal/generated/MethodCallExpr.qll | 5 + .../elements/internal/generated/Module.qll | 9 + .../internal/generated/OffsetOfExpr.qll | 4 + .../elements/internal/generated/OrPat.qll | 6 + .../rust/elements/internal/generated/Pat.qll | 1 + .../rust/elements/internal/generated/Path.qll | 4 + .../elements/internal/generated/PathExpr.qll | 7 + .../elements/internal/generated/PathPat.qll | 7 + .../internal/generated/PrefixExpr.qll | 6 + .../elements/internal/generated/RangeExpr.qll | 9 + .../elements/internal/generated/RangePat.qll | 8 + .../rust/elements/internal/generated/Raw.qll | 426 +++++++++++++ .../internal/generated/RecordExpr.qll | 7 + .../internal/generated/RecordExprField.qll | 4 + .../elements/internal/generated/RecordPat.qll | 7 + .../internal/generated/RecordPatField.qll | 4 + .../elements/internal/generated/RefExpr.qll | 7 + .../elements/internal/generated/RefPat.qll | 7 + .../internal/generated/ReturnExpr.qll | 11 + .../elements/internal/generated/SlicePat.qll | 8 + .../rust/elements/internal/generated/Stmt.qll | 1 + .../elements/internal/generated/TupleExpr.qll | 5 + .../elements/internal/generated/TuplePat.qll | 5 + .../internal/generated/TupleStructPat.qll | 8 + .../elements/internal/generated/TypeRef.qll | 6 + .../internal/generated/UnderscoreExpr.qll | 4 + .../internal/generated/WildcardPat.qll | 4 + .../elements/internal/generated/YeetExpr.qll | 6 + .../elements/internal/generated/YieldExpr.qll | 7 + .../generated/.generated_tests.list | 53 ++ .../extractor-tests/generated/.gitattributes | 53 ++ .../generated/ArrayExpr/ArrayExpr.ql | 11 + .../generated/ArrayExpr/ArrayExpr_getAttr.ql | 7 + .../generated/ArrayExpr/ArrayExpr_getExpr.ql | 7 + .../generated/ArrayExpr/MISSING_SOURCE.txt | 4 - .../generated/ArrayExpr/gen_array_expr.rs | 7 + .../generated/AsmExpr/AsmExpr.ql | 11 + .../generated/AsmExpr/AsmExpr_getAttr.ql | 7 + .../generated/AsmExpr/AsmExpr_getExpr.ql | 7 + .../generated/AsmExpr/MISSING_SOURCE.txt | 4 - .../generated/AsmExpr/gen_asm_expr.rs | 8 + .../generated/AwaitExpr/AwaitExpr.ql | 11 + .../generated/AwaitExpr/AwaitExpr_getAttr.ql | 7 + .../generated/AwaitExpr/AwaitExpr_getExpr.ql | 7 + .../generated/AwaitExpr/MISSING_SOURCE.txt | 4 - .../generated/AwaitExpr/gen_await_expr.rs | 9 + .../generated/BecomeExpr/BecomeExpr.ql | 11 + .../BecomeExpr/BecomeExpr_getAttr.ql | 7 + .../BecomeExpr/BecomeExpr_getExpr.ql | 7 + .../generated/BecomeExpr/MISSING_SOURCE.txt | 4 - .../generated/BecomeExpr/gen_become_expr.rs | 10 + .../generated/BinaryExpr/BinaryExpr.ql | 14 + .../BinaryExpr/BinaryExpr_getAttr.ql | 7 + .../generated/BinaryExpr/BinaryExpr_getLhs.ql | 7 + .../BinaryExpr/BinaryExpr_getOperatorName.ql | 7 + .../generated/BinaryExpr/BinaryExpr_getRhs.ql | 7 + .../generated/BinaryExpr/MISSING_SOURCE.txt | 4 - .../generated/BinaryExpr/gen_binary_expr.rs | 10 + .../generated/BlockExpr/BlockExpr.ql | 12 + .../generated/BlockExpr/BlockExpr_getAttr.ql | 7 + .../generated/BlockExpr/BlockExpr_getLabel.ql | 7 + .../BlockExpr/BlockExpr_getStmtList.ql | 7 + .../generated/BlockExpr/MISSING_SOURCE.txt | 4 - .../generated/BlockExpr/gen_block_expr.rs | 12 + .../generated/BoxPat/BoxPat.ql | 10 + .../generated/BoxPat/BoxPat_getPat.ql | 7 + .../generated/BoxPat/MISSING_SOURCE.txt | 4 - .../generated/BoxPat/gen_box_pat.rs | 9 + .../generated/BreakExpr/BreakExpr.ql | 12 + .../generated/BreakExpr/BreakExpr_getAttr.ql | 7 + .../generated/BreakExpr/BreakExpr_getExpr.ql | 7 + .../BreakExpr/BreakExpr_getLifetime.ql | 7 + .../generated/BreakExpr/MISSING_SOURCE.txt | 4 - .../generated/BreakExpr/gen_break_expr.rs | 15 + .../generated/CallExpr/CallExpr.ql | 12 + .../generated/CallExpr/CallExpr_getArgList.ql | 7 + .../generated/CallExpr/CallExpr_getAttr.ql | 7 + .../generated/CallExpr/CallExpr_getExpr.ql | 7 + .../generated/CallExpr/MISSING_SOURCE.txt | 4 - .../generated/CallExpr/gen_call_expr.rs | 9 + .../generated/CastExpr/CastExpr.ql | 12 + .../generated/CastExpr/CastExpr_getAttr.ql | 7 + .../generated/CastExpr/CastExpr_getExpr.ql | 7 + .../generated/CastExpr/CastExpr_getTy.ql | 7 + .../generated/CastExpr/MISSING_SOURCE.txt | 4 - .../generated/CastExpr/gen_cast_expr.rs | 6 + .../generated/ClosureExpr/ClosureExpr.ql | 17 + .../ClosureExpr/ClosureExpr_getAttr.ql | 7 + .../ClosureExpr/ClosureExpr_getBody.ql | 7 + .../ClosureExpr_getClosureBinder.ql | 7 + .../ClosureExpr/ClosureExpr_getParamList.ql | 7 + .../ClosureExpr/ClosureExpr_getRetType.ql | 7 + .../generated/ClosureExpr/MISSING_SOURCE.txt | 4 - .../generated/ClosureExpr/gen_closure_expr.rs | 12 + .../generated/ConstBlockPat/ConstBlockPat.ql | 10 + .../ConstBlockPat_getBlockExpr.ql | 7 + .../ConstBlockPat/MISSING_SOURCE.txt | 4 - .../ConstBlockPat/gen_const_block_pat.rs | 9 + .../generated/ContinueExpr/ContinueExpr.ql | 11 + .../ContinueExpr/ContinueExpr_getAttr.ql | 7 + .../ContinueExpr/ContinueExpr_getLifetime.ql | 7 + .../generated/ContinueExpr/MISSING_SOURCE.txt | 4 - .../ContinueExpr/gen_continue_expr.rs | 15 + .../generated/ExprStmt/ExprStmt.ql | 10 + .../generated/ExprStmt/ExprStmt_getExpr.ql | 7 + .../generated/ExprStmt/MISSING_SOURCE.txt | 4 - .../generated/ExprStmt/gen_expr_stmt.rs | 8 + .../generated/FieldExpr/FieldExpr.ql | 12 + .../generated/FieldExpr/FieldExpr_getAttr.ql | 7 + .../generated/FieldExpr/FieldExpr_getExpr.ql | 7 + .../FieldExpr/FieldExpr_getNameRef.ql | 7 + .../generated/FieldExpr/MISSING_SOURCE.txt | 4 - .../generated/FieldExpr/gen_field_expr.rs | 6 + .../generated/Function/Function.ql | 23 + .../generated/Function/Function_getAbi.ql | 7 + .../generated/Function/Function_getAttr.ql | 7 + .../generated/Function/Function_getBody.ql | 7 + .../Function/Function_getGenericParamList.ql | 7 + .../generated/Function/Function_getName.ql | 7 + .../Function/Function_getParamList.ql | 7 + .../generated/Function/Function_getRetType.ql | 7 + .../Function/Function_getVisibility.ql | 7 + .../Function/Function_getWhereClause.ql | 7 + .../generated/Function/MISSING_SOURCE.txt | 4 - .../generated/Function/gen_function.rs | 8 + .../GenericArgList/GenericArgList.ql | 10 + .../GenericArgList_getGenericArg.ql | 7 + .../GenericArgList/MISSING_SOURCE.txt | 4 - .../GenericArgList/gen_generic_arg_list.rs | 6 + .../generated/IdentPat/IdentPat.ql | 12 + .../generated/IdentPat/IdentPat_getAttr.ql | 7 + .../generated/IdentPat/IdentPat_getName.ql | 7 + .../generated/IdentPat/IdentPat_getPat.ql | 7 + .../generated/IdentPat/MISSING_SOURCE.txt | 4 - .../generated/IdentPat/gen_ident_pat.rs | 13 + .../generated/IfExpr/IfExpr.ql | 14 + .../generated/IfExpr/IfExpr_getAttr.ql | 7 + .../generated/IfExpr/IfExpr_getCondition.ql | 7 + .../generated/IfExpr/IfExpr_getElse.ql | 7 + .../generated/IfExpr/IfExpr_getThen.ql | 7 + .../generated/IfExpr/MISSING_SOURCE.txt | 4 - .../generated/IfExpr/gen_if_expr.rs | 13 + .../generated/IndexExpr/IndexExpr.ql | 12 + .../generated/IndexExpr/IndexExpr_getAttr.ql | 7 + .../generated/IndexExpr/IndexExpr_getBase.ql | 7 + .../generated/IndexExpr/IndexExpr_getIndex.ql | 7 + .../generated/IndexExpr/MISSING_SOURCE.txt | 4 - .../generated/IndexExpr/gen_index_expr.rs | 7 + .../extractor-tests/generated/Label/Label.ql | 10 + .../generated/Label/Label_getLifetime.ql | 7 + .../generated/Label/MISSING_SOURCE.txt | 4 - .../generated/Label/gen_label.rs | 9 + .../generated/LetExpr/LetExpr.ql | 12 + .../generated/LetExpr/LetExpr_getAttr.ql | 7 + .../generated/LetExpr/LetExpr_getExpr.ql | 7 + .../generated/LetExpr/LetExpr_getPat.ql | 7 + .../generated/LetExpr/MISSING_SOURCE.txt | 4 - .../generated/LetExpr/gen_let_expr.rs | 8 + .../generated/LetStmt/LetStmt.ql | 17 + .../generated/LetStmt/LetStmt_getAttr.ql | 7 + .../LetStmt/LetStmt_getInitializer.ql | 7 + .../generated/LetStmt/LetStmt_getLetElse.ql | 7 + .../generated/LetStmt/LetStmt_getPat.ql | 7 + .../generated/LetStmt/LetStmt_getTy.ql | 7 + .../generated/LetStmt/MISSING_SOURCE.txt | 4 - .../generated/LetStmt/gen_let_stmt.rs | 13 + .../generated/LiteralExpr/LiteralExpr.ql | 11 + .../LiteralExpr/LiteralExpr_getAttr.ql | 7 + .../LiteralExpr/LiteralExpr_getTextValue.ql | 7 + .../generated/LiteralExpr/MISSING_SOURCE.txt | 4 - .../generated/LiteralExpr/gen_literal_expr.rs | 13 + .../generated/LiteralPat/LiteralPat.ql | 10 + .../LiteralPat/LiteralPat_getLiteral.ql | 7 + .../generated/LiteralPat/MISSING_SOURCE.txt | 4 - .../generated/LiteralPat/gen_literal_pat.rs | 9 + .../generated/LoopExpr/LoopExpr.ql | 12 + .../generated/LoopExpr/LoopExpr_getAttr.ql | 7 + .../generated/LoopExpr/LoopExpr_getLabel.ql | 7 + .../LoopExpr/LoopExpr_getLoopBody.ql | 7 + .../generated/LoopExpr/MISSING_SOURCE.txt | 4 - .../generated/LoopExpr/gen_loop_expr.rs | 20 + .../generated/MatchArm/MISSING_SOURCE.txt | 4 - .../generated/MatchArm/MatchArm.ql | 14 + .../generated/MatchArm/MatchArm_getAttr.ql | 7 + .../generated/MatchArm/MatchArm_getExpr.ql | 7 + .../generated/MatchArm/MatchArm_getGuard.ql | 7 + .../generated/MatchArm/MatchArm_getPat.ql | 7 + .../generated/MatchArm/gen_match_arm.rs | 13 + .../generated/MatchExpr/MISSING_SOURCE.txt | 4 - .../generated/MatchExpr/MatchExpr.ql | 13 + .../generated/MatchExpr/MatchExpr_getAttr.ql | 7 + .../generated/MatchExpr/MatchExpr_getExpr.ql | 7 + .../MatchExpr/MatchExpr_getMatchArmList.ql | 7 + .../generated/MatchExpr/gen_match_expr.rs | 13 + .../MethodCallExpr/MISSING_SOURCE.txt | 4 - .../MethodCallExpr/MethodCallExpr.ql | 17 + .../MethodCallExpr_getArgList.ql | 7 + .../MethodCallExpr/MethodCallExpr_getAttr.ql | 7 + .../MethodCallExpr_getGenericArgList.ql | 7 + .../MethodCallExpr_getNameRef.ql | 7 + .../MethodCallExpr_getReceiver.ql | 7 + .../MethodCallExpr/gen_method_call_expr.rs | 7 + .../generated/Module/MISSING_SOURCE.txt | 4 - .../generated/Module/Module.ql | 14 + .../generated/Module/Module_getAttr.ql | 7 + .../generated/Module/Module_getItemList.ql | 7 + .../generated/Module/Module_getName.ql | 7 + .../generated/Module/Module_getVisibility.ql | 7 + .../generated/Module/gen_module.rs | 7 + .../generated/OffsetOfExpr/MISSING_SOURCE.txt | 4 - .../generated/OffsetOfExpr/OffsetOfExpr.ql | 13 + .../OffsetOfExpr/OffsetOfExpr_getAttr.ql | 7 + .../OffsetOfExpr/OffsetOfExpr_getField.ql | 7 + .../OffsetOfExpr/OffsetOfExpr_getTy.ql | 7 + .../OffsetOfExpr/gen_offset_of_expr.rs | 6 + .../generated/OrPat/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/OrPat/OrPat.ql | 10 + .../generated/OrPat/OrPat_getPat.ql | 7 + .../generated/OrPat/gen_or_pat.rs | 8 + .../generated/Path/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Path/Path.ql | 11 + .../generated/Path/Path_getPart.ql | 7 + .../generated/Path/Path_getQualifier.ql | 7 + .../generated/Path/gen_path.rs | 6 + .../generated/PathExpr/MISSING_SOURCE.txt | 4 - .../generated/PathExpr/PathExpr.ql | 11 + .../generated/PathExpr/PathExpr_getAttr.ql | 7 + .../generated/PathExpr/PathExpr_getPath.ql | 7 + .../generated/PathExpr/gen_path_expr.rs | 9 + .../generated/PathPat/MISSING_SOURCE.txt | 4 - .../generated/PathPat/PathPat.ql | 10 + .../generated/PathPat/PathPat_getPath.ql | 7 + .../generated/PathPat/gen_path_pat.rs | 9 + .../generated/PrefixExpr/MISSING_SOURCE.txt | 4 - .../generated/PrefixExpr/PrefixExpr.ql | 13 + .../PrefixExpr/PrefixExpr_getAttr.ql | 7 + .../PrefixExpr/PrefixExpr_getExpr.ql | 7 + .../PrefixExpr/PrefixExpr_getOperatorName.ql | 7 + .../generated/PrefixExpr/gen_prefix_expr.rs | 8 + .../generated/RangeExpr/MISSING_SOURCE.txt | 4 - .../generated/RangeExpr/RangeExpr.ql | 14 + .../generated/RangeExpr/RangeExpr_getAttr.ql | 7 + .../generated/RangeExpr/RangeExpr_getEnd.ql | 7 + .../RangeExpr/RangeExpr_getOperatorName.ql | 7 + .../generated/RangeExpr/RangeExpr_getStart.ql | 7 + .../generated/RangeExpr/gen_range_expr.rs | 11 + .../generated/RangePat/MISSING_SOURCE.txt | 4 - .../generated/RangePat/RangePat.ql | 12 + .../generated/RangePat/RangePat_getEnd.ql | 7 + .../RangePat/RangePat_getOperatorName.ql | 7 + .../generated/RangePat/RangePat_getStart.ql | 7 + .../generated/RangePat/gen_range_pat.rs | 10 + .../generated/RecordExpr/MISSING_SOURCE.txt | 4 - .../generated/RecordExpr/RecordExpr.ql | 13 + .../RecordExpr/RecordExpr_getPath.ql | 7 + .../RecordExpr_getRecordExprFieldList.ql | 7 + .../generated/RecordExpr/gen_record_expr.rs | 9 + .../RecordExprField/MISSING_SOURCE.txt | 4 - .../RecordExprField/RecordExprField.ql | 12 + .../RecordExprField_getAttr.ql | 7 + .../RecordExprField_getExpr.ql | 7 + .../RecordExprField_getNameRef.ql | 7 + .../RecordExprField/gen_record_expr_field.rs | 6 + .../generated/RecordPat/MISSING_SOURCE.txt | 4 - .../generated/RecordPat/RecordPat.ql | 11 + .../generated/RecordPat/RecordPat_getPath.ql | 7 + .../RecordPat_getRecordPatFieldList.ql | 7 + .../generated/RecordPat/gen_record_pat.rs | 9 + .../RecordPatField/MISSING_SOURCE.txt | 4 - .../RecordPatField/RecordPatField.ql | 12 + .../RecordPatField/RecordPatField_getAttr.ql | 7 + .../RecordPatField_getNameRef.ql | 7 + .../RecordPatField/RecordPatField_getPat.ql | 7 + .../RecordPatField/gen_record_pat_field.rs | 6 + .../generated/RefExpr/MISSING_SOURCE.txt | 4 - .../generated/RefExpr/RefExpr.ql | 11 + .../generated/RefExpr/RefExpr_getAttr.ql | 7 + .../generated/RefExpr/RefExpr_getExpr.ql | 7 + .../generated/RefExpr/gen_ref_expr.rs | 9 + .../generated/RefPat/MISSING_SOURCE.txt | 4 - .../generated/RefPat/RefPat.ql | 10 + .../generated/RefPat/RefPat_getPat.ql | 7 + .../generated/RefPat/gen_ref_pat.rs | 9 + .../generated/ReturnExpr/MISSING_SOURCE.txt | 4 - .../generated/ReturnExpr/ReturnExpr.ql | 11 + .../ReturnExpr/ReturnExpr_getAttr.ql | 7 + .../ReturnExpr/ReturnExpr_getExpr.ql | 7 + .../generated/ReturnExpr/gen_return_expr.rs | 9 + .../generated/SlicePat/MISSING_SOURCE.txt | 4 - .../generated/SlicePat/SlicePat.ql | 10 + .../generated/SlicePat/SlicePat_getPat.ql | 7 + .../generated/SlicePat/gen_slice_pat.rs | 10 + .../generated/TupleExpr/MISSING_SOURCE.txt | 4 - .../generated/TupleExpr/TupleExpr.ql | 11 + .../generated/TupleExpr/TupleExpr_getAttr.ql | 7 + .../generated/TupleExpr/TupleExpr_getField.ql | 7 + .../generated/TupleExpr/gen_tuple_expr.rs | 7 + .../generated/TuplePat/MISSING_SOURCE.txt | 4 - .../generated/TuplePat/TuplePat.ql | 10 + .../generated/TuplePat/TuplePat_getField.ql | 7 + .../generated/TuplePat/gen_tuple_pat.rs | 7 + .../TupleStructPat/MISSING_SOURCE.txt | 4 - .../TupleStructPat/TupleStructPat.ql | 11 + .../TupleStructPat/TupleStructPat_getField.ql | 7 + .../TupleStructPat/TupleStructPat_getPath.ql | 7 + .../TupleStructPat/gen_tuple_struct_pat.rs | 10 + .../UnderscoreExpr/MISSING_SOURCE.txt | 4 - .../UnderscoreExpr/UnderscoreExpr.ql | 10 + .../UnderscoreExpr/UnderscoreExpr_getAttr.ql | 7 + .../UnderscoreExpr/gen_underscore_expr.rs | 6 + .../generated/WildcardPat/MISSING_SOURCE.txt | 4 - .../generated/WildcardPat/WildcardPat.ql | 7 + .../generated/WildcardPat/gen_wildcard_pat.rs | 6 + .../generated/YeetExpr/MISSING_SOURCE.txt | 4 - .../generated/YeetExpr/YeetExpr.ql | 11 + .../generated/YeetExpr/YeetExpr_getAttr.ql | 7 + .../generated/YeetExpr/YeetExpr_getExpr.ql | 7 + .../generated/YeetExpr/gen_yeet_expr.rs | 8 + .../generated/YieldExpr/MISSING_SOURCE.txt | 4 - .../generated/YieldExpr/YieldExpr.ql | 11 + .../generated/YieldExpr/YieldExpr_getAttr.ql | 7 + .../generated/YieldExpr/YieldExpr_getExpr.ql | 7 + .../generated/YieldExpr/gen_yield_expr.rs | 9 + 467 files changed, 4623 insertions(+), 489 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/gen_array_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql delete mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql delete mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql delete mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql delete mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql delete mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Function/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Function/gen_function.rs create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql delete mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql delete mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql delete mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql delete mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/Label/Label.ql create mode 100644 rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Label/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Label/gen_label.rs create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Module/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/gen_module.rs delete mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/OrPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path.ql create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path_getPart.ql create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql create mode 100644 rust/ql/test/extractor-tests/generated/Path/gen_path.rs delete mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/PathPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RangePat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RefPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/WildcardPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index e158e287840b..a84793702397 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,143 +1,143 @@ lib/codeql/rust/elements/Abi.qll 322ff44609ee5febf82279342caf3e6b6e4decf43e680a81b7f7dcdf94c6b495 2dc061be4ef2e07fa5e7c566f089479b78b70b77fb5467cf342797c9430a67a4 lib/codeql/rust/elements/ArgList.qll e744d6cfc97d377b333538fced346b288e32f5609989b2c8e96c6e6a7d5b7ea6 7b134dcf9bc630409d27dfbce2a8302f4ea25590e55064999c99ef3629b3bd64 -lib/codeql/rust/elements/ArrayExpr.qll 11acf3298800c994e470a70ba50079d8c1e58039eb45cf15f6f6b80200433829 ba06e328d66dc55dd907aae5cb8cdb6021fb154fa029d0d71ab1b4c3fb993ce8 +lib/codeql/rust/elements/ArrayExpr.qll a3e6e122632f4011644ec31b37f88b32fe3f2b7e388e7e878a6883309937049f 12ccb5873d95c433da5606fd371d182ef2f71b78d0c53c2d6dec10fa45852bdc lib/codeql/rust/elements/ArrayType.qll 908aed01b9dd98e276f2331ce118ca032ed99b0a2512d69536c276ea8abd0927 345c3d46a42cbbdee921182ce36a0cf8618ae0b4448cb24cc64aa5c9fe049ca7 -lib/codeql/rust/elements/AsmExpr.qll 809666b0a7ed2c1e15618e7a93ad8ef78d8201de3f4d19c38ce63bb3578d05fd ec7419a5c93cb3eb00adbba778967f90a1ce25aef891f3bdd704f4885dc1080a +lib/codeql/rust/elements/AsmExpr.qll 2f1c78e92b56d66a559543b2103d8f880dd4fa4c6907346f668b3714cf2355e9 12e174fc469c067c957f6c1a5969ab56a71a07c537ca930a564cce81c7ab4481 lib/codeql/rust/elements/AssocItem.qll c6609cffdd0feb8f5d5bd032aaefaccb4954bc4857147c3fa8da3df9533c3f89 c3aeaa01b37d46a69c182713e26e7be048665d965ed263198b992a1c4f78b9bd lib/codeql/rust/elements/AssocItemList.qll 6ae9a697b5197c893db9b6bab8bdc7d9ecadc60558d9a776fdc20c7741a9932a 07598595241401ea70b5dee3da27940adbe0b69a539e488c9931b38e7a4b61a2 lib/codeql/rust/elements/AssocTypeArg.qll 977285121a7a9e1883f4e78f644c3ad09c85657ca2092c48ac4e08fc4b1d2b54 e671900cbe16f10a0a131f12c10e454c28c9a09980f1073dadee905a1e832253 lib/codeql/rust/elements/AstNode.qll 5ee6355afb1cafd6dfe408b8c21836a1ba2aeb709fb618802aa09f9342646084 dee708f19c1b333cbd9609819db3dfdb48a0c90d26266c380f31357b1e2d6141 lib/codeql/rust/elements/Attr.qll 3c81c8b8ead6a9f08c29557206c0305aee833d8a6592585b55e9ca79270627d5 44eb7b008600b3e069dd0d92a57e8a22ce07ca3dd012a7ed4185bed56de57525 -lib/codeql/rust/elements/AwaitExpr.qll 05df6468fced57583767ff48e269c433d63fcfe18f1294ef1d6974d0907a733a 55de39c230cf4aaa2eb597582e011819ef5efcaa981654e3fafafb539a1f31fc -lib/codeql/rust/elements/BecomeExpr.qll 3b623c597002c96229340daede10b28a014a46c6ca2805e910cfdf520062526e 78eaddbf7dc5532bf83a4fec306f706b2e7696e87aefea69b312df74199ad928 -lib/codeql/rust/elements/BinaryExpr.qll fd0c9d707a8a559afef60165f0751a475cb42064e56490815493bd976ac21f46 bd3f0838957c0e9ee8c9d74fb100acbf487175634a4f92ccf09c35a8a584cdc5 -lib/codeql/rust/elements/BlockExpr.qll 29674108e1f538868f9ba7550c494640062e486a125cd2a85539cd95812c3ef2 2c6d0a4a3b40e41ee435b156de6ba01d79d6a33f00dd9fe6f3026e0190c11f18 -lib/codeql/rust/elements/BoxPat.qll 9de030a1384e3152b390019906024d02e25c56dd2d2b3f7a0c44c724eeaca020 c5bee47a9319bc45963253f7c199eb53ea579b114e2436236a4be697bf35e7f2 -lib/codeql/rust/elements/BreakExpr.qll 34acf69df9e993786de8f8ef22315752b85bbeac54763b91041f4de58abccb62 62126b4cb10711a5b672505850504a22b58da03054516fa99bf64a26d53f5e2f -lib/codeql/rust/elements/CallExpr.qll d74e1fd0929906d52a42794803e1ebd55db652428cbf40e0989486f687992974 6737cf81af028f317217af27701b4f82fa9494ba92e5874f695f20a088dbdcff -lib/codeql/rust/elements/CastExpr.qll 84fd6297f361d6bf435c354abf90d0b8dfa029d43b346b3037c491e675fdb915 1325752f6d0cb56febed06a75f25f60e9427854df5c9a78a589717be63494336 +lib/codeql/rust/elements/AwaitExpr.qll d8b37c01f7d27f0ec40d92a533a8f09a06af7ece1ae832b4ea8f2450c1762511 92cdb7ff0efddf26bed2b7b2729fddd197e26c1a11c8fec0c747aab642710c21 +lib/codeql/rust/elements/BecomeExpr.qll 7a3cfc4894feb6be1cde664f675b18936434e68ccea52e55314c33d01491e34f 49666eca509b30d44bb02702bda67239c76bf8d9f231022c9cf6ecca123f8616 +lib/codeql/rust/elements/BinaryExpr.qll 394522da3bc3a716fc7bc40c3560143ca840f5d210cfcba2a752c3026dd0f725 fbbd6fb79bf16a7d9820613654c584cd7ff3e7a29988f3920b6cfbe746acfd8d +lib/codeql/rust/elements/BlockExpr.qll b952fd44b89de248931d4089834d2c9406f6f2fc1a3f5c2365156be4e55157cf daccc07ab11ac696679b9fadc99f40b1bf579c90bf6c7cca6e82eaa313932ede +lib/codeql/rust/elements/BoxPat.qll 1b2c3fff171aa6aa238c9460b122f26c79e04577cea67fa856de99842ba873d4 0caf8d23ed6e0997a6b8751def27641582151fba6e24fccf798712a4690b42f1 +lib/codeql/rust/elements/BreakExpr.qll 0b0e1c3bb027acb8a3144cac4bd5043ec4af2160a186c9ef41e1d4f8d9c605e3 caaf17700c95b35fa5806fa6b21e4d89b7bd53e32b884780c7f1ff46702b978a +lib/codeql/rust/elements/CallExpr.qll 6760ef2753fcaa9f02860bfeadfd1b1603d0d5b35f5dd72b33a474c206f51a29 55afe003eb51ef28b382af368429930d858d291bb7d76d71149eee1c805731f1 +lib/codeql/rust/elements/CastExpr.qll ba281bde130f43c486c4ad889539b77fba9e41afdf7980e50b6a8696a1ec7527 61257003d395896ec60729d0bc01da36697615bb725d07141255fbb5c44e50a0 lib/codeql/rust/elements/ClosureBinder.qll 5b2d33fc693c08e678e6897329cab21667fbf6a917677eeaea75b16069e42118 9b224af67ca2f4a5161dda5d73926f1e96f051e1e3c17fe1ad44cd4837255bb9 -lib/codeql/rust/elements/ClosureExpr.qll f90360d132ed97a1ed4e44b93fe0cadc00c9114e8dfef6b1fe3a5562f9f7a13e 45a0fdb3ad2cafaef61e869f2a55034f3ce720f469f5ee52f3010c1737c329a4 +lib/codeql/rust/elements/ClosureExpr.qll 8f06357ae134e42c073eef994c83c04b8cf294fe33b286dbd75c0e705ce29d05 9d9e282d965fed723965376801d4afa49444d1d9be9b093d02e276729a2cf7ad lib/codeql/rust/elements/Const.qll 594d7752b0ec94b0da6e79447a58792c7a755e67b18edac1dcb51308a067b23b 43eb0b88746ce303485a08761fa0da8448da45a3a49207708956b7d228b6b6e4 lib/codeql/rust/elements/ConstArg.qll 55b1697280cd21f80f9fba946eb377f5188475e003e09667b414f76c6423835b b261890b6756df3d8292a467a483f8ccc124e26ba6a82fbc88470c7a90cea19e -lib/codeql/rust/elements/ConstBlockPat.qll 305e1abfa80f3421040a717d95b57a3a7c7d5c1f0dbcff1e08db29f184497d18 07f6c445585af7b45b5df79515add06ca4cf354daa43a4d549145ddddf6ac08f +lib/codeql/rust/elements/ConstBlockPat.qll a25f42b84dbeb33e10955735ef53b8bb7e3258522d6d1a9068f19adaf1af89d9 eeb816d2b54db77a1e7bb70e90b68d040a0cd44e9d44455a223311c3615c5e6e lib/codeql/rust/elements/ConstParam.qll 7728c64ad0f7b23ab8b3ba20e30a8108069a98b3584a14a3829abfd126ef3345 0617a5134b50437e96b4d83539951e022ab0720cbaaff50321da7d9aaabaedfa -lib/codeql/rust/elements/ContinueExpr.qll 4e841104fd15646febdf15c63ea97ba4f5ba7066f324df904ca380b49ecccbdd 90df1113319797cafb33e9cde01c2344ed6422083f402e16b0baf894506ab91d +lib/codeql/rust/elements/ContinueExpr.qll 9f27c5d5c819ad0ebc5bd10967ba8d33a9dc95b9aae278fcfb1fcf9216bda79c 0dc061445a6b89854fdce92aaf022fdc76b724511a50bb777496ce75c9ecb262 lib/codeql/rust/elements/DynTraitType.qll 6c050745216ed0b91299c3620fb3bec16c6e111197857c7d0971beca58964f93 df3a45f933d7e2df6cf28129a92a566c721103e35ab7439e0fecf8381f034046 lib/codeql/rust/elements/Element.qll 0b62d139fef54ed2cf2e2334806aa9bfbc036c9c2085d558f15a42cc3fa84c48 24b999b93df79383ef27ede46e38da752868c88a07fe35fcff5d526684ba7294 lib/codeql/rust/elements/Enum.qll 2011275d3ba5ee38ac84bb918bbbcf17bac77563b8cd85ffc36632db91929ef0 beec7cdf716d367d56867664f352bd54b6dec1a8286f7f535c7177084869b876 -lib/codeql/rust/elements/Expr.qll ab5c72082c789544429e0695f2f8ab9e48ff82dc23b46e045c7393abf4cf9b87 53681ee07d2ed3c10441edb9549b3901f9f6742bdc51ffe73d8d5cd71c298326 -lib/codeql/rust/elements/ExprStmt.qll b2a2f778b9d79214b98f853e08590454174ee1a35288faf50823b512925f1df1 ca616cb9da0f51b6b719410ad99a505e9d4740ad2ed32bf7ad737df7a21070dd +lib/codeql/rust/elements/Expr.qll e5d65e805ccf440d64d331e55df4c4144ab8c8f63f367382494714087659ffe8 2bbc1e5d3a65f413ec33d9822fa451fbdbe32349158db58cc0bfcfafb0e21bda +lib/codeql/rust/elements/ExprStmt.qll ea950ac5cbe8d8004bd674b5aeaf1f0b33d5b5910a41f2d4bca07f8ea36d1066 d882208b17fd3d2c8da07b1b84cb40d4c15938dc67c3d8404e36de57da84428c lib/codeql/rust/elements/ExternBlock.qll 815d0cdf459d57e38b1281cb288e4595824caa2e7c860ba3c988c209ba8e5362 6d6e0eb80545d08afbe0bad2472889611010534259bbe9628d8b7b781e1bd581 lib/codeql/rust/elements/ExternCrate.qll b8b163815ab45307c732809c4813784c93ce97b97e7b0478f2404e25e6e41179 4647c3895a5ed7039c3d8317399e23c3420ad5e3193d9a70441abd3c8dd4361a lib/codeql/rust/elements/ExternItem.qll 41e79b67937795b6eca3dadaf3b668358f7de0b56077a2f4cc99b37ba3f79df2 adfa255c5e201a42377b0e591e09b8747fe2641f510129750b804fd5bdd110e9 lib/codeql/rust/elements/ExternItemList.qll e90fe2d5805d81802ada7300a309c2b0e190223d2203420970ae9df40c97559f 2d628d08244a1fab9c703fb9eec0b96737681d001ffa5e78b27425de983762b6 -lib/codeql/rust/elements/FieldExpr.qll fb7202dc05aa694fe28eaa724a9c59409a196a55be5542aa25aff4d5ef9809d7 ab6e5d0ef4da3076b40eb450989190218b534aebcba9dc5f3079efedc045371e +lib/codeql/rust/elements/FieldExpr.qll 8102cd659f9059cf6af2a22033cfcd2aae9c35204b86f7d219a05f1f8de54b3b f818169dddf5102095ae1410583615f80031376a08b5307d0c464e79953c3975 lib/codeql/rust/elements/FieldList.qll 521b88b7df0cc559240ba53abeb63c9e6e306ebda90544b4d38968c1b2f9226d 130f057c42ca924a1b97bda82a77c13a679aa8fd580a18b4344cc7ad03a0ccfb lib/codeql/rust/elements/FnPtrType.qll 1be7ca0325d7601b876bb3face80f2d8bb53d36d4c892500d95897e51c46568d 643426781d89a2b0288aaa280d97e0b580ae62d5d2d77934490f7cc56b554f16 lib/codeql/rust/elements/ForExpr.qll c5d48fb35d0797b05a567fc6c769651cb9d32f327a66432870d21a7e56fe84f9 dd6f86a1fb462d764d77d5474fcfb9e8e43041b0b5d1928a0c9ca575b807d617 lib/codeql/rust/elements/ForType.qll 7eb52c4fb8463423d1fb5d2e306dbc3585cf0a65a4dd20cfcb76db59fbc00496 25d043cf7c90a5920af9638c99317c7fcf711eb99912ed28057660f212f6a778 lib/codeql/rust/elements/FormatArgsArg.qll 5f4635101ef3a7de0ce27dc3ce0e9ddbfff92bac6266c2dfe1bc0949a9fa7f35 dde33150ce905f18e96db9e5d5cdd15fbf7f9aff78f91a5c18b183d1e4f925e3 lib/codeql/rust/elements/FormatArgsExpr.qll e0f54d22bfec9fb8cf1b90627a419c47042c8e4bed90ebf2a040be0f95ee1f7f 02d9ae076dc8d5791bb6cd5200dec2ca888aa6f68c867cc0f918dfa3d5033bf6 -lib/codeql/rust/elements/Function.qll bce3559b2e3943912f648a85f2e830babd649f4ac249afd8fec3734128ae6eb1 919a1f99a10bd8fd2caefcf40bdea6607316db9c46cabe49793070b5b2ab1e13 +lib/codeql/rust/elements/Function.qll 736c53408f8674c88c352cd1f08f7c77e51551c68ef802f2e1c1aaf3d44fa8e9 6b52dbea081a5e799f1a2cedd57be5485bc8e018ded7249a1852343053d849a6 lib/codeql/rust/elements/GenericArg.qll 1b45a5f91e4a3124cab7123657608bf9fa2985ebb8272d1f227696d36df77464 5954d7feda97ea092dfa5eb615d00fdb6f863507a96610db13dcb590713091c1 -lib/codeql/rust/elements/GenericArgList.qll 2421509f1dd45356c2421b03ea18125661f1b8d81c065cfd0ca3616f28af921a 0dd495642c68ab5aff0458033c529c23d6d54b53532969d2953f6f07ddc30a58 +lib/codeql/rust/elements/GenericArgList.qll dcf274db517b0e8f19e4545d77f86cdd4066ff2805e68c808d0bb5750b49f569 1055a82929e850264e501b367ef4d314a3e6bb8943ec95f4284d157fb4d0092f lib/codeql/rust/elements/GenericParam.qll 7810d9e153c088b751beba5f0d1cc264bf72874dbdcb2cb0212002d610ab0928 4615742f478a7423b9c8b0a1967923e2532e3b2fa013c8bc2dcf5d25ae8e6d65 lib/codeql/rust/elements/GenericParamList.qll e85142f953f232b3c9fad15df39cb1246d21d27f8400a60483d1744c51cc2f49 407ee992651a074846028bfaa66649c6b785fca6456b47425ba4ca8bcac6dd5c -lib/codeql/rust/elements/IdentPat.qll 8d1dc7eda1f71ad69cc20f462892a8c46835f042f5e1d0b213b264c405e86de7 41136f510070ccecb3a77031a6153cceccf2ddf7e33cd67c210eb224d10e8677 -lib/codeql/rust/elements/IfExpr.qll 02c836a36286082409532403526d2d9e082ef209e44b921a7b72d2eddc8f04ab e96f1d12f34541e3ccb250a64bf455e588859d64637a192b50cd0078b4e6be23 +lib/codeql/rust/elements/IdentPat.qll ad5f202316d4eeee3ca81ea445728f4ad7eb6bb7d81232bc958c22a93d064bf2 7ce2772e391e593d8fd23b2b44e26d0d7e780327ec973fcc9dce52a75fda0e36 +lib/codeql/rust/elements/IfExpr.qll 277cda4e962ec19a70bef282945de9064d1652e788901d4d0b15c6e228663c36 6fd342afbbbc6335e23aa9d179c14ef5dacfe7d14420f3a75655cf6d1030183e lib/codeql/rust/elements/Impl.qll f12c5804c16ec58091d2faa58f5dc6295a78ef72068845f64d151f445dd26ad8 184cfe4516a8857cfb7b30e4ed42ce8b10dd50a0a7cd7e4ac3fd53a4bc5cc2ca lib/codeql/rust/elements/ImplTraitType.qll 727c0caa362310397df340d00d0c1807dcefb8d8f4cb1205ba8469dd4ec27e83 e18d9096450aaac743cdc42b19a6496ef00805f44089c3691e8afccbb8f29959 -lib/codeql/rust/elements/IndexExpr.qll 5b1319137e56e536fe27ac04d52775f6348c5ff363d286ccd050b36c3de93e72 aa34d9951eb54d5340998a9f8b3759cb812737ee150044aa2d096c04bc8bffdb +lib/codeql/rust/elements/IndexExpr.qll 0e2e9f018d06ae72be0fc4ddbc019a9aacd8a06f42b4c4431760bd149e7f2290 2bcfd557abd53a48e48de7915c4f2089107c62dfb3e732a904848248dfd3727b lib/codeql/rust/elements/InferType.qll b4f4b3a309b08f743f35210fb847d99ab478202adc5b473eb6aa6b267a669f79 1edb680976456cd1237b31b776579d8efe44e80b040a0e810908d1733a10c3bf lib/codeql/rust/elements/Item.qll d822fafd28c573b4fe1b42838ed58cea04ce0f417cb7704148a097531f86841c d15d24bdd2564f284e8e5a15c9e88036444394909a270ca0d449ce6126ef44dd lib/codeql/rust/elements/ItemList.qll 621661f43ef2a0955f101b3cad3687fc2b5a6a13ccf54b5395f81ab0c870d97c 02c23b9b6debeb84632b1c09eea9fc21ba6b5ee37109524a596e23aa394157e1 -lib/codeql/rust/elements/Label.qll ffd5dc0dda957c93263edf04ff2b2490fcb69595ea1f6fd39a99dca51f0e04ef e165d1213afb54f3db5ba2521d5cdf0e77595da3f162f6eb2717250fad100d13 +lib/codeql/rust/elements/Label.qll a31d41db351af7f99a55b26cdbbc7f13b4e96b660a74e2f1cc90c17ee8df8d73 689f87cb056c8a2aefe1a0bfc2486a32feb44eb3175803c61961a6aeee53d66e lib/codeql/rust/elements/LetElse.qll 4574e2a8abfd2670b20f6ad88473a70bedddc2725ad033630b6942388f769978 97b2ebf3e0d1b41a8333f09a919437ec47ca0585e35e006aff1cf929998cbd48 -lib/codeql/rust/elements/LetExpr.qll 534e11381c83b6f5db95baebd16e86b5db0ca1eabed547278386eb7dd3caf79b b6a173e4057e83d5e498556ea40be0dcf2d9712a1c810b7edff073049e103fca -lib/codeql/rust/elements/LetStmt.qll 5db3edef77c08a44f617b373d78d4db8a7410a72341d3621d0c62d4f15c5ed1a 491f208fe2789fdee7cb7731eebc98e6e4961a71b8e0383b6df865ae5c842aac +lib/codeql/rust/elements/LetExpr.qll 435f233890799a9f52972a023e381bc6fe2e0b3df1e696dc98b21682a3c1d88e b34da72dd222a381e098f160551ec614ebb98eb46af35c6e1d337e173d8ec4b9 +lib/codeql/rust/elements/LetStmt.qll e589d750ff87c25e28e15dab61e1a3555a45ced42158b05c991c6f5873abd86a 383484181b825cd7bc20e014fc4d5888f66e1f257502e1893f3d55aed2cdef3d lib/codeql/rust/elements/Lifetime.qll 301c0e27d7af2a9806d4b3a51017e6b5ed32608b21506253edf6363edeeeb6eb 866876f34b8955b17f334aab2f70d5daad09aa72fdc598d1c24d533825aca4ef lib/codeql/rust/elements/LifetimeArg.qll b32eca7690196f868a6f13a403f0a82fc015ec0061f8004438e2914ed4fef99e b76ef565c1cc811b9a674f761bb28229f7ba59af8e7ed44738ab928a07c00f32 lib/codeql/rust/elements/LifetimeParam.qll ca52a21220761530fae5bc655147d4450f07576d6cf6c17ae9424a6002b99cfd 88bb222864816b06318575bc7053da8972247657392f9bd65edcd1f7fb40648c -lib/codeql/rust/elements/LiteralExpr.qll 572742cf18b975ec9eca2b28e9a675396257d8a35d1d81c42e47e0bc74491f24 2dbd4a42d9f050383c9367dc5aadd6b3f28859e91f09e1048641dca155512cac -lib/codeql/rust/elements/LiteralPat.qll 5bdcc7e0063f01d588f273aac627e574143f5bbc5c1d3a9b0b8d06116e4bcbed 09c69fab842741309358dc07f9e13d94cbae84d854feed9eff7ac0804d827b05 +lib/codeql/rust/elements/LiteralExpr.qll 40b67404b7c2b81e5afabc53a2a93e0a503f687bb31a2b4bfa4e07b2d764eb8d 67ab1be2286e769fba7a50ca16748e3c141760ccaefaebae99faa71f523a43d5 +lib/codeql/rust/elements/LiteralPat.qll daffb5f380a47543669c8cc92628b0e0de478c3ac82685802c63e8d75a206bed adfe9796598cf6ca4a9170c89ffd871e117f1cea6dd7dd80ecbbb947327a1a5d lib/codeql/rust/elements/Locatable.qll 2855efa4a469b54e0ca85daa89309a8b991cded6f3f10db361010831ba1e11d3 00c3406d14603f90abea11bf074eaf2c0b623a30e29cf6afc3a247cb58b92f0f -lib/codeql/rust/elements/LoopExpr.qll e958cc58f4900bac20cfc7daca2bf427c2eabe6cd7d2ae1e7f74fff21ac333a4 65101b8488553b926473a1348ecc5e904ea949053ef0a5a8686dbcacb658fc81 +lib/codeql/rust/elements/LoopExpr.qll 58ade0bc4a01a1cc361363682fde3ea56f4c5fbb4b28f5723ceff52ebaf897d7 fa299162c742bcf3b2211dc20821b312e3c133350c288a050eb26e6f8b5a5c78 lib/codeql/rust/elements/MacroCall.qll 11302a676f6801ea415d143aa8e55051a45ff40d01780989685b1783e8312a52 b486f1b8282f3fd60e93803437765cb75516f02ce3dcdd7a4ec1278bafee2c05 lib/codeql/rust/elements/MacroDef.qll a8a2df4bd0b498812844a17bc8397d9996b2075795e532498e79530f652e7f71 995ce0aec88db5b907e55462a29eaad5df5a1a78c339dcddd21ab4b3cdff34f3 lib/codeql/rust/elements/MacroExpr.qll 3caf5f53f537fe745ff21eca903dc1a8094a8b525f3ab2401a03d8c2f6282d44 a5ddf8e05b3773bd845a3e82c22aa3164aa096ba780260b76d1e9ce30f8c218d lib/codeql/rust/elements/MacroPat.qll 46535f173a99a4cf576ca9d56f609628bab7d8642e4d43f1f6486dc27e4d8732 8fba3149baf8ebe9412f5e9aff2dfc60ce44021c6fda955c31079e665382a681 lib/codeql/rust/elements/MacroRules.qll 9b65c2da9615838db92f3a19cdabea55d533c1bc93221449ea0dc002ff2cf9f0 74da2a5699f86333ee48253f4bb1ab03828909b0eff50d57cd9c4ee4b3109d04 lib/codeql/rust/elements/MacroType.qll 9ea2f5d87ed3b1c629a2351504fb1e4ec9ac45c00e3f8ec14f8214e0410f5978 90096afa3116352244658bd67639fd1d9929ad2a1fb4ae89bdf0e9a531ab54eb -lib/codeql/rust/elements/MatchArm.qll 0a525f57585a22c60a62e14fc543396432b0306e0c5b76c5ca470095ef5522d6 4cf161041fdd262f11af1c705d96ebbf2a32ec6775db7421d049dbde974fbf99 +lib/codeql/rust/elements/MatchArm.qll c39fd6cc0da24b1ff8d1e42835bcfee7695ad13580e3c7c50acd7c881b1cd894 62a31d2bd125e6aaebefc406e541a641271d3c497a377959f94dd4735b2bfbf8 lib/codeql/rust/elements/MatchArmList.qll c1528b48d956a8fcbf70bc9a5c7ddbe13c741c7f59a2938c4a9bff052e0476c2 ed0dad75585cab71d5d4d49790b6c68eee78aa8a9bebefdf3e197bbf6a75452e -lib/codeql/rust/elements/MatchExpr.qll 040509624fb0b1c40455a05968e8e7dff3aeb4cf806815d120ab377617d00992 fa6ff76707ba73bb6e67150ff35b9d9c16076098e44aca152df055a09dd6201b +lib/codeql/rust/elements/MatchExpr.qll e9ef1664f020823b6f4bb72d906a9dc0c1ee6432d4a9a13f7dbdbab2b2b1ee4d 38d71e5c487abcb5682293c573343be66e499a6e131bb630604c120d34b7777b lib/codeql/rust/elements/MatchGuard.qll 89bbd82f98e0ea6e7345656f2c8c496c63571651605632a29048c16b95f44251 f82e00902cb0d40ec0a9bee01b376f64d37db9436c3beb54f9d803bb5a6671dc lib/codeql/rust/elements/Meta.qll c9c3d5d8116e0e5ae56fbab028326f84a85b08f929ff20629ae4fdfbc52dc7f6 f85f763274564c54996561fcc45ff64ee8761c54834e3d5ee2dbcbf1e1fb906a -lib/codeql/rust/elements/MethodCallExpr.qll c99169e6ea85330ccc6bf8153778e4b76487e7643865f385ff40614ab4b574cb ee80107df869157ed63f4069ff01b40d56a43db702dff39acd637797ebfb5067 +lib/codeql/rust/elements/MethodCallExpr.qll 0a5cab9f21741f6a38956e6de4f6beb143db5d85ee590f9908dab3da300a6b72 df21eba9cf2823a7b06eb6672dd8249225e7c16d5b6c1c37c1f2a175d9513272 lib/codeql/rust/elements/Missing.qll 70e6ac9790314752849c9888443c98223ccfc93a193998b7ce350b2c6ebe8ea4 e2f0623511acaa76b091f748d417714137a8b94f1f2bdbbd177f1c682c786dad -lib/codeql/rust/elements/Module.qll 3b056c11691766f8ea87140812fde2b7130a5460e5f938c0fda1e2587cfe9c77 c18d6576cfbe6b3becf475c795dc533dfbc4640e88e4c8d58ca9f311b7d4a412 +lib/codeql/rust/elements/Module.qll 0bc85019177709256f8078d9de2a36f62f848d476225bff7bba1e35f249875c7 3fbb70e0c417a644dd0cada2c364c6e6876cfa16f37960e219c87e49c966c94e lib/codeql/rust/elements/Name.qll 02e9014297ceabe390dedbef555328c80b227972395447b11830ee14d6910576 8ada21fc70bf25e22fd826977cdcdee663ddefb951f341c2337490b7e8301efe lib/codeql/rust/elements/NameRef.qll 6e7df9bf072a847623ad4e29b0d93eb40c81f87e6884a3a71ba1694389cabbd7 d7444a0bd177335c3469bd43fdabb7103372c06f145d29ba4258904f8e0ee1c3 lib/codeql/rust/elements/NeverType.qll 1bc700f522e9563c1cb651492ae37996217d6d0fb3a8c9aac474e65c0498d7c3 417957c37d93551d291030962add29520b8bf4b7ba806ec0a7d78ed699d4d6c8 -lib/codeql/rust/elements/OffsetOfExpr.qll 6ff3cd7821d705a5796811a96a917357fd4497fc7418568fedf80986773b5557 490c815b04f0259635c6352ec51666c3727c2738dc0cb655f9a2cb7cdc956adb -lib/codeql/rust/elements/OrPat.qll b2b1c91c34a2ef56a4a62e82dc6ffdf2b857658e0618a6b8a7c87088c3df633f 9a6ac1862b645acc43e1e122218fad01e9509d40f76d567fff7a48a9c93bce09 +lib/codeql/rust/elements/OffsetOfExpr.qll 8f6dd1fe0aad1642e58f5e97620306e4b36cdf01324fead1e2a92e8e60951c41 b192f7a5fae3049a6cac3b7a225a0e590f744e6c5ff6346ffdd1699f83bf718f +lib/codeql/rust/elements/OrPat.qll 408b71f51edbfc79bf93b86fb058d01fa79caf2ebfeef37b50ae1da886c71b68 4a3f2b00db33fe26ee0859e35261016312cb491e23c46746cdd6d8bb1f6c88ef lib/codeql/rust/elements/Param.qll 0b7f5ab881456be2ec2649b9ffcdf49d51c68c3c7105158418bce81b9e3b5e47 dcfbb663dedd54028ac353bad0ab9c0f4d248854b55aeab049f014a8f11078b9 lib/codeql/rust/elements/ParamList.qll e3531c564025ceae12aae5052aa973b9526759b11e3728a486b307957cdcb4b9 e681004ba2cf954d497d1d053a111c065fc1249df7ab8261939139631e63c720 lib/codeql/rust/elements/ParenExpr.qll 0bbcbde9fdb475fb3283cdface0ef56c63a61af94e75afeace91af2a920b1945 097309cf4630d2ace72e6438d54170d2c555f860d3aabbf3a12d1465dbc7ee4a lib/codeql/rust/elements/ParenPat.qll a67e472bca21b732081ca8ab3d0b5baa9edb626211f92a4c2cd92d5430b2d4f9 35eb182f9280cfcfff3ea56a5e0d9ab09aa8854cf4c505951d00dbc70de4a045 lib/codeql/rust/elements/ParenType.qll beaa3b2a2eee3fc65e35bc64170652b4028f729d86a4f71101084b4604cb9509 22d45d5bd3491f6b86f7afe667a635c8dc1c2655e6c3682d38e33247e73ea9ba -lib/codeql/rust/elements/Pat.qll 03e6cc8118e924ef0a594e1f7f768ff58380d767bfaa6a4c9601a0c7bdf78cf9 913d152fb4879958cbe630945d771e79c393284720106387cbc958f11d7a91de -lib/codeql/rust/elements/Path.qll 6cb729e4f5d68d26ee67b98a5719ecc9180bf38b145480dfa02d6addc1529045 1106b0418d624febf12af4b1a308c4dcc69e05ebc8d4aab1a247980672fab04b -lib/codeql/rust/elements/PathExpr.qll 0a2df31d2151cf24a403179b902c79c4b271761e318d6d25cf915d68d3739695 7eeb90954a858b447079bfd94a545664103af89bb46a9d2cb2b4b823b05b4e1d -lib/codeql/rust/elements/PathPat.qll 93e08eebcfd13a1e885eac0f4d1aaa3bcc9b8263f640a8fde6fb23b5bc857454 61f6481a75d261f95084828bfc4ffb1b80519e11b5d8343540fac71e4d7cd874 +lib/codeql/rust/elements/Pat.qll 56211c5cb4709e7c12a2bfd2da5e413a451672d99e23a8386c08ad0b999fd45c b1b1893a13a75c4f0390f7e2a14ee98a46f067cfdc991a8d43adc82497d20aff +lib/codeql/rust/elements/Path.qll 0655adfe84b08c286022a0307511a781bc1bfc943c12bc50600ebffb9d00e4b0 48e55afee9d019b7c62bfb02110c626c570ecbf683258cf23786807966f0b6fc +lib/codeql/rust/elements/PathExpr.qll 99aa8af9deb9e276eb262b1fbd1a19f1c816cafac605aedb173ecb245c3c3cbd 306c837388ba60a5a89d2a546453527c62006696e15c043ed04d1ba27345815b +lib/codeql/rust/elements/PathPat.qll 6897e69bcb24b56d39ede796cf5767988dcd5741e02333fa8495dd7c814f771a 2a011fb92f17e4b4ff713e6d29f591054dfede22a9aaa006e67fca2c23ab76bf lib/codeql/rust/elements/PathSegment.qll a2d6105814c489969eec82c4cab714182020260dd5a2a1423123465e880680ef 127b41326b1baddf972a7a55d0ac138d07b78cff69090ab36e6fcbd4e9b03301 lib/codeql/rust/elements/PathType.qll 111acad0faa584cb0ed55714c5724a203badea644f31c8997682b2c02523fa11 479e3e719d32116016840e518c71df794145162670143782c67ed4a9191cfdae -lib/codeql/rust/elements/PrefixExpr.qll 9ca37b526b956cadf11688a8c2196d4545ffd5debd8bfb797f19b3eb4ad89e77 35219ee4993863fde6e1faf6746187a6e4886364223ff17c2d29d9a7b7bee41d +lib/codeql/rust/elements/PrefixExpr.qll 63975ca70b011ce5fbe67338493f21e7da45e1c6c508c76b122dcdfc557fb72a b3863e8722774edfff4c0cffc2bcc8235055f1ef68cf164bc0fb9316d3a8ed2a lib/codeql/rust/elements/PtrType.qll 37bd4c591084af79566a83d1c295b83bcb7092e9da1baf66648973c080dc6683 545d88a398ab33096781c75df64f513c16e3c527b2c19466b05f07cb723b0b4f -lib/codeql/rust/elements/RangeExpr.qll f4046b72f3360b9943ed0ef517fe346c9522aa0d66828ba5bc96b1b06adb8d4f c8cd0df781c6e84e9c290dabc823c763b167b68a2aef68b23ef129040e1fcc0c -lib/codeql/rust/elements/RangePat.qll 1cd02952efbd556d30c936678bce54ff5b88436858479eb9db54a33e0d31c30c 4c0cebde21d6e566507df112e72bbf95ffb3c5594353a1be3043c9950342c141 -lib/codeql/rust/elements/RecordExpr.qll 93df401c11de8027e14abfb6bf82a59f9214a6bb81071ef920f1795d77ca81b5 0bcea4b6146435ea1dace83836edcd624daf67ff4f2e8422e43d2ed5e99f9027 -lib/codeql/rust/elements/RecordExprField.qll 28ab1d9406341b3ad1b4737a828dd26e78265ca22645bb8c21c689eb6182ec47 5aff0ebeed1b2f4c753339582877e95e9a6bdbb5fbdf50a6fad1d99df651c10a +lib/codeql/rust/elements/RangeExpr.qll 43785bea08a6a537010db1138e68ae92eed7e481744188dfb3bad119425ff740 5e81cfbdf4617372a73d662a248a0b380c1f40988a5daefb7f00057cae10d3d4 +lib/codeql/rust/elements/RangePat.qll b5c0cfc84b8a767d58593fa7102dcf4be3ff8b02ba2f5360c384fa8af4aac830 cc28399dd99630bfa50c54e641a3833abe6643137d010a0a25749d1d70e8c911 +lib/codeql/rust/elements/RecordExpr.qll eb402960c5c6a14d0a0ffebd61a352b59b5d1cc1c2531cacd54754310a812d77 415c93384e63cf38003dde987715554ebf45fc32ba03bc5fd78b8d2501812de1 +lib/codeql/rust/elements/RecordExprField.qll edac04146849e2aeca27e7bbb896c21aa2e2b15736b1e8a06ac51ab01433b3ac 7c062bd6d5dd5b1d972450fb0b3272cd9b45f94ccd668c3bd4347e2dce3279ed lib/codeql/rust/elements/RecordExprFieldList.qll 71f140d9fb765ec07ddad8979f0b90181e3a38ccdcc0526c54ff2f779f22c096 6f9bbdaf67c1bf4cc6452c452903c4f1bb477d95e7db488b70bbf9d35557daa6 lib/codeql/rust/elements/RecordField.qll 1316edde13918662e8a8ca744e1d33fb91d85eaad6377d479e8e58cc40db7cbd f75d8e40748b69d0e34ae5939d1d8c287bde0840c271fe767a2b6df8f1f0211b lib/codeql/rust/elements/RecordFieldList.qll f0c404eacf9d84541c1e5927c9cc950bb5737b0140e3dc8faec3958ac36d8494 105280c2dcc2282773c003426dc4d0caab69af6c8a4f0c84d6bf9647175782ec -lib/codeql/rust/elements/RecordPat.qll 5995213f63b8417dc61a508d0c114a19a7c4c7822a058639bea4a3740bb4134b fe7b415e5e6cbbbb1069a42f2615a2f7af272d0456756292190fe69ff4b7d378 -lib/codeql/rust/elements/RecordPatField.qll ebf9e0fa41f73f9f2ff725276266c7e2a1e99bced7668ce1d28c4f0d358f31f4 7daa0f07fc401d4fe330f956fb91b301c1cbb48dd101c705902878ae346ed471 +lib/codeql/rust/elements/RecordPat.qll a210d700e710107100fedad1098fb789056a0c0b8dbc11de2b242877e692ec20 3efa12d7bfa0da7c09a42b2b43c50ff3985c55676db7f3be2c771765d81f9a10 +lib/codeql/rust/elements/RecordPatField.qll 7487461887e82bcf224b02628dfc64457121ab17e731e2dc7aa7e731ab16c02f f2018e55722245eb4273fb067242aaa503c43f91671a55b3a4bb51fe7bc0a03c lib/codeql/rust/elements/RecordPatFieldList.qll 0ac388e3087c8f8ec74cfb1a7894c67ebbe2e3d6849732e1ccbd54474fbbb6b0 544256e97a8ba62bfa2abfd07d605b8d0f06f9523880d15bb6ac3356493bc310 -lib/codeql/rust/elements/RefExpr.qll 4cf33802476335fff3c6c0ce4df43219818f53471c6502be3f9369718021c3ac 002a31b3061d3ed9124658462c81c5a7c8a9409a7af014daa4250b373d751b5a -lib/codeql/rust/elements/RefPat.qll 5783a062439c2e13ba9b43665d8f837260fd2bdd4315afbe3c85f53519b3abb7 1e4087342089316d5130005f1299523452b3cd5678a8efa5c3dade910c3c5677 +lib/codeql/rust/elements/RefExpr.qll 91a0d3a86002289dc01ffbe8daca13e34e92e522fbb508241a9d51faf1d4a9d2 b6e63d8e6f8956d2501706d129a6f5f24b410ea6539839757c76ba950c410582 +lib/codeql/rust/elements/RefPat.qll fe076bdccb454111b38f360837d180274ba8a003b4cffe910b5197cd74188089 2604c8bb2b0b47091d5fc4aa276de46fe3561e346bd98f291c3783cef402ba06 lib/codeql/rust/elements/RefType.qll 91cabfdb6698fb4940065313c7c95a43438d23fdfea3050838b98d589f3d91e0 cd4b6b13242cf0725b46138f2a2425df7e2badecd9c2e23b640d48c520dc64f1 lib/codeql/rust/elements/Rename.qll 72fa505670ddcbbda8df58654e28804c48c24f37dea5b1370601fe6d0855ee90 9dee2aa1afc38eb8115f5fda5194089792245f5f0bae64be49fbdfdd9d29f912 lib/codeql/rust/elements/RestPat.qll 0ba0d4a16637e11a21f6a1924ca1852b51bd28dbb76b3bd9f016532b51ba65dc f12c231eca1458e8d2c86e08918e6deeea449ad6d149dd89f744799976e6bb30 lib/codeql/rust/elements/RetType.qll cb606a93759058672a080b08cf742c1a6223050783da34e8ccd63763d028434a 741e8a4a947426271eab320f9b964bdc15380500697349d49d305eda9418d347 -lib/codeql/rust/elements/ReturnExpr.qll edc21a9deb5df89220038eb94ae6b3df09d79818ba4096636cec28a06562af18 6f8ac4c34a462ad3308fae8e195140e46487227a373beca105801a9a0efb2a72 +lib/codeql/rust/elements/ReturnExpr.qll b87187cff55bc33c8c18558c9b88617179183d1341b322c1cab35ba07167bbdb 892f3a9df2187e745c869e67f33c228ee42754bc9e4f8f4c1718472eb8f8c80f lib/codeql/rust/elements/ReturnTypeSyntax.qll 8ee6a20cc7ba4f01926b889722970976747de47a6766cdd6f350db7fdf9b40e8 f8a855d11b1bb4270917367bcdd64f0ee671ed779ee83ca8223cbc218f09c7b7 lib/codeql/rust/elements/SelfParam.qll 57715a45985005d0639edb613a7faca28544f6304657147c8da2e9c6de2bc899 18766e2455e976993e3b1ebd3416a433bf0eec50e6df6e5a745c4e7ead87c13a -lib/codeql/rust/elements/SlicePat.qll 750ce938c11b6061ddea387cbc2be6969f242869a50171778efbb5326c75eef9 8bed136b1bcb9f073009dd5ae27def6150e6f040510eb5e62079cfda30e9986a +lib/codeql/rust/elements/SlicePat.qll f48f13bb13378cc68f935d5b09175c316f3e81f50ef6a3ac5fdbfbfb473d6fc1 4c8df0b092274f37028e287a949f1a287f7505b7c2c36ee8d5f47fb8365d278a lib/codeql/rust/elements/SliceType.qll c2925eebc41d0f803e19da384282028c476168ccef7a1cc45f69e2cf57260699 064c51bec431a4e8667cf561e0766469902566767252a6dd61a8719fc22621df lib/codeql/rust/elements/SourceFile.qll 73573ddd3882bcf42f23c582eddffafc31f30a96366db79b9a095215e40ac12b 10e7a199bf8ceb77b06cdf21526d11856ef09d2c472cc4342299b08d72017a55 lib/codeql/rust/elements/Static.qll 269c38356b5503a88d3c1366b584bfae998400447043a409eb4fe0e5d2bc73b5 21404ceb9fe49003d0563ed3315091d3dc28fb996928136a9b31b9446fc8b61a -lib/codeql/rust/elements/Stmt.qll 8052f50d89e86ac2060d5178e6c72bbd0e18a5307263f97b0f1092d7b94c9300 31a3750eab488fc62558da8dd1c5fa727659d17835e538191fb2b87bd56c8d4f +lib/codeql/rust/elements/Stmt.qll 532b12973037301246daf7d8c0177f734202f43d9261c7a4ca6f5080eea8ca64 b838643c4f2b4623d2c816cddad0e68ca3e11f2879ab7beaece46f489ec4b1f3 lib/codeql/rust/elements/StmtList.qll 93011b77781f85c95109f64d127e8af37bd9c3bae9715fa67a06d1e8afd50eb2 b9ebeb924d0c802475dc70dc0820e59fa9d409bb628d7cdbe598f4367a8d575b lib/codeql/rust/elements/Struct.qll f91908f8e9215720e669c55c97fea0661240cf2da0218630e559aefff106e112 a760d21937dd233d2a7cfbf7a6c830e2e41d897337c011213fc819b0d8f2b818 lib/codeql/rust/elements/TokenTree.qll 131b62731515e9bb5bf551aa53b311f436e4d3ca9df01a0db1206d5c3ce0e924 1c0cf19dfd03823716cad8ebd57c8246e6636fa501a48acc811f54e5738bd037 lib/codeql/rust/elements/Trait.qll 5bbd2afcc25c6f1abf0268d653f1833179b3404491f85106fd169cefad8a5cb0 2572ae760fe70fa72d8c7b937a18c9830b1c664186c914e04b6fa5eeef95ff7a lib/codeql/rust/elements/TraitAlias.qll 749609802fcfaebd754b093de6970f42ecb39053ca2683d44f7f6e2e20b85792 530b45723b60405578d0ddbdd550096d5de60eaad293393fc4e50078bb92c5fc lib/codeql/rust/elements/TryExpr.qll 7a3104c8f02badc431dda4776514f6cd12884b2c7ab316eecbe63a687eb9cc5e 1bfb023569081ecbb9362a0ebb6e53901ed8985e95ab8dbd0e8a2458dcbcaedc -lib/codeql/rust/elements/TupleExpr.qll ba254b60432e5e63b2e72fa0d0248eadf5b64dc70aae5bac45770750e4680227 88a55ac4a08864dd38f25bbafa08f79bed0972fc88a0241e46eda8f108074ea8 +lib/codeql/rust/elements/TupleExpr.qll 561486554f0c397bc37c87894c56507771174bfb25f19b3bf258a94f67573e56 d523246820853ff0a7c6b5f9dbe73d42513cadd6d6b76ea7e64147140ac93c15 lib/codeql/rust/elements/TupleField.qll 93ff5685ace01f11bf737b9a21d4fbb42e71a3b88acc3bae9bd075fbdb18f3c5 1bd5a3009a93b219166ffee911283d9bb7fe807072a33ed37b47d3a7674424cb lib/codeql/rust/elements/TupleFieldList.qll 608f6f159f0496a908f9e18acd0423df80d4e33dc450a7c207de259cfb50a427 ecb6b3352d23057540e18da7c96e7b5511958b493cec420092661a5bf4683d57 -lib/codeql/rust/elements/TuplePat.qll 1cf4b405e1dd83b876ec269b37956931a85c776c958ac14a6c06cb765c0392fe 1e57b6a8b2445bb6b8e153c84e31386fdf95bf0e6b3735c176f1935c5c9ae41b -lib/codeql/rust/elements/TupleStructPat.qll aa4970cd7d4b90167e2b23ab7d7a7bb23c21712bb8282023e08360d342b9ab04 2b1f4bb4521792cc641c6693e6dd91ab8a8832159a026fc0ca3b1d570f02e67b +lib/codeql/rust/elements/TuplePat.qll 028cdea43868b0fdd2fc4c31ff25b6bbb40813e8aaccf72186051a280db7632e 38c56187971671e6a9dd0c6ccccb2ee4470aa82852110c6b89884496eb4abc64 +lib/codeql/rust/elements/TupleStructPat.qll 16a3f10992db62cc6630dc962a2a0d243c41b8aca064d6cb6c82a2f4e6987a12 c2b4c14567ee2dd65e0b643c9d18dfe5098fb3bd4ed45dcc825065bfa7c7c02d lib/codeql/rust/elements/TupleType.qll faff8c142538cd817689e7609991a583c80f666c62308af40f7a12d4bd24a9b0 0c43bb9f452e2b0649ec8f347521adeec8a399b50783eb6686654b0091c815d9 lib/codeql/rust/elements/TypeAlias.qll 87d1fdd688278a79239d78358dab0b5e4e3de0c79b33df47b99808709ed661e0 c3543b2d655b9d3adaa06a4c4cbcdb52223fbb5ebe6f5ae17c41ccfdd0173d83 lib/codeql/rust/elements/TypeArg.qll 6101b94ff56746fafb706c7adaf58fae51ee3cf59e0d8949ac5d14f0a833f081 c6595d8a9e708b6880e71085757d51898c37685ca49253764a12de076b839d68 lib/codeql/rust/elements/TypeBound.qll 25ae1ac5df3cd5ce15ba1031958ffaffd7c535199383618052ef9415c8273f02 a11a17bff537dcea17cc8fc85d8a1aecc01429971d19e2b3d2e30570cf66936b lib/codeql/rust/elements/TypeBoundList.qll b16ccaa927ff011c2cfda79d720874b734010cf4b2d73d5903b50a9e594ac618 a00003fada90852454bef3ee13ba38036ce5ce703f3efb3d4a47ae7bda51278c lib/codeql/rust/elements/TypeParam.qll 1e1850af760f4dca2edee590a28083e82adbc876b37d407d42d19f3f91a9174e d50e77afddaf9192cca674086b496405507d14e272b953332b1c87295eb11c41 -lib/codeql/rust/elements/TypeRef.qll 9e790eb79b00ddbdaa74a1036c53af053967cfdc9e49e1d8b8a614e79bf301a5 6801ec8286ba87b5681559e0f03d1d3a544dacd7010628cacb55a39a0cf6a80d -lib/codeql/rust/elements/UnderscoreExpr.qll 4915102f13f4a800e5191c93456d787d8329d455a2fa314c89dbea67a3277483 aef9865547c4ac8c50c9facec145f84b3151395d3f4bc048b7acef549efbb3d7 +lib/codeql/rust/elements/TypeRef.qll b180dc4fe85d0eb3032ed3a63aea54ca0b667a6a00f2fa0505fa742bd89d6927 b0210ee96929ca0f335955f76d2a0c06ce32201b8bb45d8424aece786ed6dae5 +lib/codeql/rust/elements/UnderscoreExpr.qll 233661b82b87c8cda16d8f2e17965658c3dc6b69efb23cb8eb9c4f50c68521e0 8edff8e80aac2ecf83a6b58f310cab688cbaeea0a0e68a298b644e565960cc74 lib/codeql/rust/elements/Unextracted.qll 12e60c79ef5b94d72b579b19970622e7b73822ebc13fbcfedfe953527ab1ac36 ec015db2eb12c3c82693ddc71d32d9ab9ef7a958e741e2510681bb707ceca23e lib/codeql/rust/elements/Unimplemented.qll bf624d28163e5c99accda16c0c99f938bec4a3b1b920a463e86fc8529ff5ff02 013bc7777298d250338f835cd494b5a8accea2d6a4f9561851f283ac129a446b lib/codeql/rust/elements/Union.qll f01ce120830eb53e0d88492d92564312bcf04ad436a10fb74e35fbdccd16265f ad51279fc8ca4141b691bd6b8f67f5d44e8df65f94568362930bf517000e85e1 @@ -150,19 +150,19 @@ lib/codeql/rust/elements/Visibility.qll 787dd6a8eda02e41210210cf5c2282bdfb9bc334 lib/codeql/rust/elements/WhereClause.qll 82436d4fb7f1981b06ab5cd3fa18525278236876c2af5eb5c8ced5bd1ed2fc2e 4ecdab4660648909d890edab0d6f9821ccb50d20c7b92eb7f0a8df112396bd8f lib/codeql/rust/elements/WherePred.qll 1ea4f0b6023a2048472d767dbb095751fed01037245cbdfaa660c2060876b551 c0374dc5cb3d16c0a3e789044ac5b47635cc84a149f554324e2e628a5a76c795 lib/codeql/rust/elements/WhileExpr.qll a40ac60e328f4dbd09eba101026ea8d3b33656e97462818c98616896f8e67adc 9864b147fddfb118fb00b6bbfede2fc2563db326b14df28c425e38c239333986 -lib/codeql/rust/elements/WildcardPat.qll b9697f41321ce33898888e95885973f0c510e152ef218fc2956d5e9c53710f5a 49112c667060275bbf5a1d579a62f8227d423bb2e3b9d447873d52b205aa1e12 -lib/codeql/rust/elements/YeetExpr.qll 07f328b342e46be198559269fe4866609bbbd4a4149fcbe5a1bbff88bb87b8ed 8af886ca1fba3718a591d175073cf1bfe289daec42d095f70bdf91ea7b987210 -lib/codeql/rust/elements/YieldExpr.qll f79310809d5f5aa569e60ca348f140294d38f02556e94b64a1ff11bd8fcfbd07 8ceb3f710aacaa9ec12e5a0071868aaeb2588997525a02ae6ba9b4c8dbbf67cf +lib/codeql/rust/elements/WildcardPat.qll 4f941afc5f9f8d319719312399a8f787c75a0dbb709ec7cf488f019339635aab a9140a86da752f9126e586ddb9424b23b3fb4841a5420bac48108c38bb218930 +lib/codeql/rust/elements/YeetExpr.qll 4172bf70de31cab17639da6eed4a12a7afcefd7aa9182216c3811c822d3d6b17 88223aab1bef696f508e0605615d6b83e1eaef755314e6a651ae977edd3757c3 +lib/codeql/rust/elements/YieldExpr.qll de2dc096a077f6c57bba9d1c2b2dcdbecce501333753b866d77c3ffbe06aa516 1f3e8949689c09ed356ff4777394fe39f2ed2b1e6c381fd391790da4f5d5c76a lib/codeql/rust/elements/internal/AbiConstructor.qll 4484538db49d7c1d31c139f0f21879fceb48d00416e24499a1d4b1337b4141ac 460818e397f2a1a8f2e5466d9551698b0e569d4640fcb87de6c4268a519b3da1 lib/codeql/rust/elements/internal/AbiImpl.qll 9dc7a7fcfc6ded40f8bf9a1e242eaba1cac5f223bfd306d422604f0485a2df5b 9e4316b613d11f34a15f1d662d6574cc71eece4692a60d92201e636a9ec97f18 lib/codeql/rust/elements/internal/ArgListConstructor.qll a73685c8792ae23a2d628e7357658efb3f6e34006ff6e9661863ef116ec0b015 0bee572a046e8dfc031b1216d729843991519d94ae66280f5e795d20aea07a22 lib/codeql/rust/elements/internal/ArgListImpl.qll 604b71b8fe35ebdefeff01aea16103e27f2ec62d6a477dfd2891522155d70db2 7b4e7189a16a2b4689c6958dc00eac25fbd15a43ca6bed6fb90e4f71829fa361 lib/codeql/rust/elements/internal/ArrayExprConstructor.qll f4ac4efefe5fe4fe1e666f35b1ee92d2243d977b3f3308151c89f61582203c09 4167ae58ec869f7dbd8467093c4a53afd7c1efcf1cc865efa62b4eb484bd7ff8 -lib/codeql/rust/elements/internal/ArrayExprImpl.qll a4f2eea902e859646823be9ee5e30032862901a581b896c1bac17ecc02e5e8bd ce1ae9bb034841987604f4a0792445e5cbabfa8b74a37e7062a4bcc80425e040 +lib/codeql/rust/elements/internal/ArrayExprImpl.qll 205db9816ec56409db1a0c3987e3a64b8e88b9942055d4bcf84a5fd5943efded 094c954c2861fa7dea69247c9c16ddc6c8699dcd3201a993c72229450bed1490 lib/codeql/rust/elements/internal/ArrayTypeConstructor.qll 9e92e6c40df992b4d71ae0e80392e81499604c7586a671b89d31d2d98060380e 76a1915a88f50ffa60bf129237bae2d66cf26d2a9018aca8ccb343929e847531 lib/codeql/rust/elements/internal/ArrayTypeImpl.qll aca3bd1b98bc924eaf145c48e5134cc2867ff2a5aa480fd8d98df6c3bca69847 199681b92757ef1302ce941649661f1a53d8afb98b68d54cb9d724692a289f6e lib/codeql/rust/elements/internal/AsmExprConstructor.qll 36c68023b58beec30af9f05d9d902a4c49faa0206b5528d6aad494a91da07941 4d91b7d30def03e634b92c0d7b99b47c3aadd75f4499f425b80355bc775ea5b6 -lib/codeql/rust/elements/internal/AsmExprImpl.qll 6d782d415c15bb7e28163a3fbc4fea36ee8bf7c1318b1cc1081af968f86c7e56 279028e7a44d02fb991d8219eb6f01cb5cdf46501798f9ffc61341a3834a040f +lib/codeql/rust/elements/internal/AsmExprImpl.qll c34419c96378e2ae2ebb17d16f9efb4c97d3558919c252be9203aee223ac30a2 1d99c8fa35fabf931e564383c06c95fb39201fd588b759d28aef2fda7ed2c247 lib/codeql/rust/elements/internal/AssocItemImpl.qll 77463fc2a0675063d79169d5e8f7cfc17d978067248dbfe8307a2d7891aa1122 ccb5c62f76a556fbd0c851e325109de19e007ab841cf88911c2d7049680c3cd1 lib/codeql/rust/elements/internal/AssocItemListConstructor.qll 1977164a68d52707ddee2f16e4d5a3de07280864510648750016010baec61637 bb750f1a016b42a32583b423655279e967be5def66f6b68c5018ec1e022e25e1 lib/codeql/rust/elements/internal/AssocItemListImpl.qll 426d360e1fe939b411fe458ceb7d78171957a747c4227a126bdfcdc56825e666 99f76d71da72133f9ff154c7c71cbff02d566437cbe8ccbae964fa91c02e8cdc @@ -172,42 +172,42 @@ lib/codeql/rust/elements/internal/AstNodeImpl.qll 76446505990a4018cad1e70b1e8f3b lib/codeql/rust/elements/internal/AttrConstructor.qll de1dd30692635810277430291ba3889a456344dbd25938d9f8289ab22506d5cd 57b62b2b07dee4a9daeed241e0b4514ba36fd5ec0abb089869a4d5b2c79d6e72 lib/codeql/rust/elements/internal/AttrImpl.qll 1232481cd7cad3be3018e8083ebd82adabdf89df187613a648ca1a6020fb8af9 1b1eb8115b9fd9a449686e7ddbabefed3b9b14f15677c651a52efbf13f385db1 lib/codeql/rust/elements/internal/AwaitExprConstructor.qll 44ff1653e73d5b9f6885c0a200b45175bb8f2ceb8942c0816520976c74f1fc77 11e6f4a1e1462a59e2652925c8bd6663e0346c311c0b60ebe80daa3b55b268b0 -lib/codeql/rust/elements/internal/AwaitExprImpl.qll 03589acdee250f62b35005b87ea6d25ba8a739a27f6f74e60cd114e10e435311 b9b111a16a9857946efbdcb0b143b05bbafbc4048720a3979df0bff552a91700 +lib/codeql/rust/elements/internal/AwaitExprImpl.qll 97eb9abc0f30ead9385f31c87b461e6f1bbfbeaac17810838bb94543bfca181f 66357ffc8c106aae565524d7110e9f50f2b3f573b1508c1d1b02db02af4cc52e lib/codeql/rust/elements/internal/BecomeExprConstructor.qll ba073aaa256cb8827a0307c3128d50f62b11aac0b1f324e48c95f30351a9b942 3a787ded505c3158fa4f4923f66e8ecdcb7b5f86f27f64c5412dc32dca031f18 -lib/codeql/rust/elements/internal/BecomeExprImpl.qll b81bd325cff5cc8658421e1b104c75cfd54b64195718e8781c3ccfaae842ce9a 48d69bf28aa91ee472b440fd68f72a310c67b43f4259390d36e8e3d5c680180a +lib/codeql/rust/elements/internal/BecomeExprImpl.qll 8522410257ca9ff09e5314c3a39fba02f6ba18e1d4349b91f8823586317f3e47 073a877a6d72c5b762aac64cdd843fd2872aaefb9e264fb90eac8c25753a6e07 lib/codeql/rust/elements/internal/BinaryExprConstructor.qll 7f9b17757f78b9fb7c46e21d2040a77fa50083bef4911c8464991c3d1ad91d87 a59390cd8e896c0bfbdc9ba0674e06d980ffcefa710fbc9886be52ed427e9717 -lib/codeql/rust/elements/internal/BinaryExprImpl.qll a320bb2e68392ce6fe4dcf33b3cdda5a90d2d664bc8d9884b2582aa063dec991 d25b08d4a55b3f17f93ee7a1d6a6ea178380f1a0a26b4770a2d8665e9671d66d +lib/codeql/rust/elements/internal/BinaryExprImpl.qll 6e22b183edc36083c45a03a600da6ea995563268ecdcdd4980b612fb8c3e7d33 7d8f32500f1edf8e9b8a725a640605e2ecfd88f21ad09d10f81b0ac18f27360d lib/codeql/rust/elements/internal/BlockExprConstructor.qll 438337c807645e98a01440f3f4610d68b0567ba15c8f51dc43bf5a30c9af3696 48ce7a546910c884619762349b8ada9836284f8008298fdb0070a38f7ddf25a0 -lib/codeql/rust/elements/internal/BlockExprImpl.qll 4c22d91a26f47defc6057cb71020fb4b1cf8b3b126a5d619528fd88f4152b7cd 50d5ffa94c98b7a540143bb5d31885dc8b88b298b887b582516ad425c60eda2b +lib/codeql/rust/elements/internal/BlockExprImpl.qll 36ac09e4a6eeeec22919b62b1d004bdb5bb2527e67932c308aec383a770768d6 3b4b2a2014f6fe075c63a2d633b297566b548ef2e4343cadf067a9edbcadc876 lib/codeql/rust/elements/internal/BoxPatConstructor.qll 153f110ba25fd6c889092bfd16f73bb610fa60d6e0c8965d5f44d2446fcd48a2 9324cf0d8aa29945551bf8ab64801d598f57aab8cd4e19bcd4e9ef8a4a4e06eb -lib/codeql/rust/elements/internal/BoxPatImpl.qll c4906d968a5223e87332c63e6bcfd7f826955f2525d984946988dde9c8d23589 2532ed6d43abd11c9684ed739d41fa32ab1ae5cf1a1fe33f0ff742d8d5550ee6 +lib/codeql/rust/elements/internal/BoxPatImpl.qll d62a3cc1d5bab6bd258f702ec731ec57f0e5ef2672ab9de4b6f3b558078629eb 26b4fabb676adbbdb0d7f81449e493ee49380ea04d131f779714ac2434bb323a lib/codeql/rust/elements/internal/BreakExprConstructor.qll 356be043c28e0b34fdf925a119c945632ee883c6f5ebb9a27003c6a8d250afd9 bb77e66b04bb9489340e7506931559b94285c6904b6f9d2f83b214cba4f3cfd5 -lib/codeql/rust/elements/internal/BreakExprImpl.qll fff93db12b562458782368eeec53f94f9ccb0fa384c1370a23ef0350d8ca11ae 74f8a0eb820f369f575de6ccf5a099a363369f877daba320af751629a007f5e3 +lib/codeql/rust/elements/internal/BreakExprImpl.qll ab01a4db514ccccf286f7bc0537456dc07c288c83b79f024bc24a3ebe7af706a fcbabae9b526741ea4518c138317ad2aed4069126fd2bac92c5c16eaecb2e8a3 lib/codeql/rust/elements/internal/CallExprConstructor.qll 742b38e862e2cf82fd1ecc4d4fc5b4782a9c7c07f031452b2bae7aa59d5aa13a cad6e0a8be21d91b20ac2ec16cab9c30eae810b452c0f1992ed87d5c7f4144dc -lib/codeql/rust/elements/internal/CallExprImpl.qll eea69291c85b6e7503806d10a3a7556572144d6973072f29302e60ba141cedc7 cc037677f9b7cd142447f212537d5c71a58ec4c5931a08bdf4ee92e722d98e81 +lib/codeql/rust/elements/internal/CallExprImpl.qll 7e48610680ba6f2876a1a005ab0743496dd2364b9c44aca441bd33e11317e2d7 bb12c3c28156b40796fe3ba112760f87bb5abb323aab3c5b7bb3e0facaef8d35 lib/codeql/rust/elements/internal/CastExprConstructor.qll f3d6e10c4731f38a384675aeab3fba47d17b9e15648293787092bb3247ed808d d738a7751dbadb70aa1dcffcf8af7fa61d4cf8029798369a7e8620013afff4ed -lib/codeql/rust/elements/internal/CastExprImpl.qll 77b5f7d1ddb8f94bfe5b56cc0890a2f143190924639f7a5e561e194bcd9279cf fd11cc83473c034dc799ea297d33bfe8948a63d9b0f9439cfddee818adcedcd2 +lib/codeql/rust/elements/internal/CastExprImpl.qll 3c57b75f01efc70013ba3f05bd79fe2747fe1d1de47b84ff73b06ad38b4f1093 da813adc3390d23ec0643e37226a58e8afdb78e889380ad265d7531a344b841c lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll 6e376ab9d40308e95bcdaf1cc892472c92099d477720192cd382d2c4e0d9c8a1 60a0efe50203ad5bb97bdfc06d602182edcc48ac9670f2d27a9675bd9fd8e19f lib/codeql/rust/elements/internal/ClosureBinderImpl.qll 86de0c037bde046caee2d98f77778b12891a03963da78799d6978e4edb525e96 c4d31fc1d925d8a90c107a68eacb676dee1f5a4fa8aef8d232832e661fc92305 lib/codeql/rust/elements/internal/ClosureExprConstructor.qll a348229d2b25c7ebd43b58461830b7915e92d31ae83436ec831e0c4873f6218a 70a1d2ac33db3ac4da5826b0e8628f2f29a8f9cdfd8e4fd0e488d90ce0031a38 -lib/codeql/rust/elements/internal/ClosureExprImpl.qll 9196827a41858c176240203e052f13c623ad0fa5e0e29384ddc02acf1a4b37dd 534415f73f7cda684a32cff477854925237d63bcc724f3cb75fa106a76eae14a +lib/codeql/rust/elements/internal/ClosureExprImpl.qll 5ae3d211273b3effc3bff9f06bcef480f8264084e0509e69b8ff29bc29f47b05 ff562bc8d15ecb76ada3111c7c74dd990a0e80f41a32477f5f2f7db9e8f71102 lib/codeql/rust/elements/internal/ConstArgConstructor.qll f63021dc1ca2276786da3a981d06c18d7a360b5e75c08bca5d1afece4f7c4a83 487a870cbf5ed6554d671a8e159edd9261d853eba2d28ce2bd459759f47f11f2 lib/codeql/rust/elements/internal/ConstArgImpl.qll 55ced0d4099d123deb9dbe88d57bb548d74c329c5d6488ff37d0b77c20b14b12 e99494d09a0007db0b9814a3ee3b77912e0d90f87f7c5476c2eec50ca87041c2 lib/codeql/rust/elements/internal/ConstBlockPatConstructor.qll ddb4a0045635d477e87360ecafec0ba90ddcffc6e62996eb6e7edd5a5d65b860 442061d0497a615b3f008b990f5e3c4f045110f76500eff81a7f44ffd1319acf -lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll d178f48169eb49d0cc626dde4fd323edca706046a33971e08728cd3426ac807e 5fadf931f08b99561710e17b4a77e9d9ea163b776af2588f4b2396024834de42 +lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll 2082a3244c21e03b6dadfba9b3f97a00981324e10d1465d3a51cf3c921eb89e4 889e347834d8c6e90dfef9714af073b3b2193f6830f1c8356cee9c6573b3ecb4 lib/codeql/rust/elements/internal/ConstConstructor.qll 72a31fd9b8b3fd910e35af1b2b30fa54cc4d9e14e7eabdb94b4cd2af95b2df38 3edc0a82a7b446fdfd3e71947801f3c7cac010b2a217b8accb69980387bdd67a lib/codeql/rust/elements/internal/ConstImpl.qll 850f68856be529df21c98c2d2bd8aae20f165dce0e8549ddf4fefaf974f64e64 86e513d4be1e2688e52f20ef79340228ceeaaa42adedf429bf1a13e45454c69b lib/codeql/rust/elements/internal/ConstParamConstructor.qll f6645f952aac87c7e00e5e9661275312a1df47172088b4de6b5a253d5c4ed048 eda737470a7b89cf6a02715c9147d074041d6d00fd50d5b2d70266add6e4b571 lib/codeql/rust/elements/internal/ConstParamImpl.qll 9bc4a79a98b990dada2d281a00ab6b76ac203c256116414e423e2d2184bba6d0 e7319f3b552ba903092a9e46d3c9d621b916d13a7364ef2a32cc6ce2cf63bb0d lib/codeql/rust/elements/internal/ContinueExprConstructor.qll cd93f1b35ccdb031d7e8deba92f6a76187f6009c454f3ea07e89ba459de57ca6 6f658e7d580c4c9068b01d6dd6f72888b8800860668a6653f8c3b27dc9996935 -lib/codeql/rust/elements/internal/ContinueExprImpl.qll 611f38d558c98806e8b325611c24d137453bdb90e16254db5bbd944fa11ad666 2a968b7bfadf10317aa929c7476b07685127ca63dba782f5aea2467551b2d73e +lib/codeql/rust/elements/internal/ContinueExprImpl.qll 976890d17681315d2297b600a58c655ccc7c4db44cf587d7b5c359303f309acf 1ecae04df07ee20dcea4f00a9af33c108a0e15ed2ccf8b936804ad88ed66f883 lib/codeql/rust/elements/internal/DynTraitTypeConstructor.qll 2bfd81fdf116b76f4a62b47bed5f0a730c04ce79747ecd1d3b683b8de22ff4aa 375c57350c432351396b92f28fded1e95a8002e3a1b31f3b66039f9b3d9bdea9 lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll c8cd31bcd5ef0cb6212fa87d1e03d44fbb97721d8a94583cbf0265b7e8918be3 74f55ff9a8d97f1218f62ad1a636ae7605b5643e3f69f3c58a429873f4b37f2e lib/codeql/rust/elements/internal/EnumConstructor.qll eca1a13937faacb1db50e4cf69d175f992f2204a5aaed9144bb6f3cb63814ac5 1bafba78b2729fdb052a25a1ba3f4f70871564aa4df632b4a1d467858a437924 lib/codeql/rust/elements/internal/EnumImpl.qll 9f5292cd1be251a2833a11be902b664a45a4b798c0d1c164058ff0753e17763f cf24a430ea5e8a197a6c084a7d938d4d1513df5fe22272f1d25a7e4ffd94473a -lib/codeql/rust/elements/internal/ExprImpl.qll e8432a70b391b4211ecf6f3a616cc880ac7e12a3a2162976654b22ef81ee80e5 f99ce6e274b22c339ddb4f7dee40a82f83002c74d4de925f9b5fcef70f89a531 +lib/codeql/rust/elements/internal/ExprImpl.qll ab20ee174e2e786f34af6e5dedf3ec071bb89fc266b3e91df6377f72aa38d3f2 f68192700f449bf1c229cfbaabd5353c7c559941c915d5a0c88752cf9844194b lib/codeql/rust/elements/internal/ExprStmtConstructor.qll dd6bb06a7d48c12f630aafd611621cc50ce0f3e7d9abba5484a695f90879264b dc8b6ec8acc314e041ae71868803630c5d4cab488c72c1ea929bb756e1847c52 -lib/codeql/rust/elements/internal/ExprStmtImpl.qll eae3cc48d6b0d2e9197b705897a98d7315cbf8b9c1df75ccafdcd10edb16b132 5003f6eb1b637769f06c6bb9c0c57e1c2de281517486c2f0f25f315bb232485a +lib/codeql/rust/elements/internal/ExprStmtImpl.qll b6791b2152812597f2147d7bab1835e6e96ccb6eb2dacb124aaf4a53dee54d83 bae6bfd615ee551c926df3654b9d235bf3428abe1ab479e5b08da6c8188a9075 lib/codeql/rust/elements/internal/ExternBlockConstructor.qll 884bafd1cb5a6ce9f54a7a6b9ba1c8814f38e3baf69a2ff8cfc8b02163204b9d ee26e070fcbfd730bbfaf0502d5ed54110c25f84e7b65948c8638a314b67ea5d lib/codeql/rust/elements/internal/ExternBlockImpl.qll 6a75af33b235efc8fde1b40afc187fb8d731d738f3a654160ca88b4f35840a6c 153f5cc8ee93566919686afd17dd372bd4c968189f62c41d0291cb4810654d8c lib/codeql/rust/elements/internal/ExternCrateConstructor.qll edd4d69ca7e36bd8389a96eac4ce04d9dd3857b0470b9f24319312469b0f8654 c80f4968e675f4b29e92a2fd8783f800823cc855ad193fee64869d5ba244d949 @@ -216,7 +216,7 @@ lib/codeql/rust/elements/internal/ExternItemImpl.qll c83d31fb59f7692338f4988f258 lib/codeql/rust/elements/internal/ExternItemListConstructor.qll 9e4f6a036707c848c0553119272fd2b11c1740dd9910a626a9a0cf68a55b249b efde86b18bd419154fb5b6d28790a14ea989b317d84b5c1ddbdfb29c6924fd86 lib/codeql/rust/elements/internal/ExternItemListImpl.qll 97f43aa548ce8c1da9b0b60509f8ed2ea5b99194b541460dc836351a62917db2 21865267852bfeff98ff439816f0cbd0711c974606a132d128648e477bffb98d lib/codeql/rust/elements/internal/FieldExprConstructor.qll b3be2c4ccaf2c8a1283f3d5349d7f4f49f87b35e310ef33491023c5ab6f3abc5 645d0d4073b032f6b7284fc36a10a6ec85596fb95c68f30c09504f2c5a6f789f -lib/codeql/rust/elements/internal/FieldExprImpl.qll 38cc95d81547f7f1676a21cec91e3dd701a14b902c340fb2e166935842255424 181d0175b7a86c14281aac12b24191435d25170ffc544c189decf5e9ebb87d2b +lib/codeql/rust/elements/internal/FieldExprImpl.qll bae3828bdee6fa3b36219e831cecc2a09fd3c40c4a945f8a19fb5d8765c6f302 be4b89e39013a380bc172ac46e496f14ebdebb1d93e1b7ffb3bab98e08db3f6f lib/codeql/rust/elements/internal/FieldListImpl.qll 421c9939413f0ac258d0b02eadce508bb0af85e3ab23d7807d948dc17855df74 2d337c3daf02987f5f4daf519eda42371b04646a79a60d9ff520107fc79c9afa lib/codeql/rust/elements/internal/FnPtrTypeConstructor.qll 494c53ee599039c02145f91394d8dfe7635b32d03f9fcde5efcc99ced437fec8 992462b1b6b9e64b6201f3c6c232ca524f126efcb562c9f0c176677bb559f33c lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll c84bbcf6dd357437f581e757ea38c1b51597d930af3158cdb433b93fcb8f82a9 9fd9f8caedeb34a1a0653105dd19f1b9f2e680a6a4d39a87e529386b6dfb1dfe @@ -231,33 +231,33 @@ lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll 8149089bb0768cdd610e3ef lib/codeql/rust/elements/internal/FunctionConstructor.qll b50aea579938d03745dfbd8b5fa8498f7f83b967369f63d6875510e09ab7f5d2 19cca32aeaecaf9debc27329e8c39ecec69464bb1d89d7b09908a1d73a8d92a2 lib/codeql/rust/elements/internal/GenericArgImpl.qll ae15f5c58d34903bca90d1fef153c2f74c9f1810651a9dfe20eae58a3d1e44fe dff3231fb1a2693de2e051224bcc60b8a6dc82a3a827129b7f48e42fa0ae19a8 lib/codeql/rust/elements/internal/GenericArgListConstructor.qll 46859bb3eb09d77987a18642d65ba2e13471a4dc9c0a83a192fddc82e37c335c 2c7d54c876269a88d3461b05745e73b06532b1616cae9b614ac94b28735d8fc4 -lib/codeql/rust/elements/internal/GenericArgListImpl.qll 96eb20d511db423ff711836fdffc4a49f02f746716c691c4cd684128f4d03f31 4484db1ff89f67465514e9ccee5ab663741ad5c1706982fd20fa1a6e3eace746 +lib/codeql/rust/elements/internal/GenericArgListImpl.qll 1a39ba7080147abccaaba451852c9c124fb6177f2ebd64e38ee74014444a34e1 80df3150c961936037ac02b46ef5f775c3f82e66490afbca00a016cb9eee798a lib/codeql/rust/elements/internal/GenericParamImpl.qll ac0a1524ab2a190af5cb6940a97d9f4d3b234e0e055d2efc54da3192b772c215 0c8727ac009069d7e192f6068b69abca51fb276629bf9bbfdaf534e7f406e959 lib/codeql/rust/elements/internal/GenericParamListConstructor.qll 7221146d1724e0add3a8e70e0e46670142589eb7143425e1871ac4358a8c8bdb 2fbb7576444d6b2da6164245e2660d592d276ae2c1ca9f2bda5656b1c5c0a73a lib/codeql/rust/elements/internal/GenericParamListImpl.qll 39666ec454d49c64a326e822f4bea9c75e4758e9f3069295d1d08af9ad0a0db4 eb40f0901ba35d460388669dca564b441714b3d662a0af1d3048336f74cb5bc5 lib/codeql/rust/elements/internal/IdentPatConstructor.qll 09792f5a070996b65f095dc6b1b9e0fb096a56648eed26c0643c59f82377cab0 0bb1a9fcdc62b5197aef3dd6e0ea4d679dde10d5be54b57b5209727ba66e078b -lib/codeql/rust/elements/internal/IdentPatImpl.qll 6e53a323967756e0e0f2197ef8998d9c8a91ef424bb86ba27305f8b1ac5f30e3 7866779a0c24ac3fba74924ac96be93af4f3fe2b5f9d12a58367204ade8f21c7 +lib/codeql/rust/elements/internal/IdentPatImpl.qll 10b2758419b48d34013d0e1ea55006a72ea351e5298c9cde4d988f510d4094eb 63bdb210d7bcab42888b4f44688966a33951061573b0a9a734b5b262cbfa2cd8 lib/codeql/rust/elements/internal/IfExprConstructor.qll 03088b54c8fa623f93a5b5a7eb896f680e8b0e9025488157a02c48aaebc6ad56 906f916c3690d0721a31dd31b302dcdcec4233bb507683007d82cf10793a648f -lib/codeql/rust/elements/internal/IfExprImpl.qll 96edff0ae8d42a9ded048576c0c2d68812f8442c390d4da8835df01a18d90eae 0909c086a0cb5b501d4b247cdb27dded409b71e3fbeeb470e582e0538e771849 +lib/codeql/rust/elements/internal/IfExprImpl.qll 3f1496ad8622e83aeffc9269e8f3d1dfd5da1672e98bcd98cd2e67ead659fee3 9cd037ff01af557be51f792e36d5f1b62c838f0f988c8bfba38124f430416345 lib/codeql/rust/elements/internal/ImplConstructor.qll 24edccca59f70d812d1458b412a45310ddc096d095332f6e3258903c54c1bb44 7eb673b3ab33a0873ee5ce189105425066b376821cce0fc9eb8ace22995f0bc7 lib/codeql/rust/elements/internal/ImplImpl.qll bd01d2d678a7a1a3c0ba99741374b243774f8dc7b113f2886c022efb915a48d6 0190b27f870cbdc35bb207ee7d048d3b15aed67d8c24989d94d05fe84358c391 lib/codeql/rust/elements/internal/ImplTraitTypeConstructor.qll b47501280b026a4e9c21ace21d9ae59f4d126a3a1e03a6088ca38cd676cc4f6d 3b0b325ab0139b290a81355559227050ba3096a58f9ff01c4c0f5c5fb5beb6ee lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll dfeee70f08cd0a1e22a120eebf4dfd3603f0129803f67fd552c067d82a622199 edab585496996f3d6280d9935f4d01ced37e40200438276839d68e840bd2c6ea lib/codeql/rust/elements/internal/IndexExprConstructor.qll 99bdc3d793c4dbd993860da60abe2b7c604345d645e86916462bc55a6939a5d1 3fe9d7da725956903707806aadbecac8d5b3874e8bed63c9bab54fff630e75dd -lib/codeql/rust/elements/internal/IndexExprImpl.qll 11c55117a0ce9c095fdd4b034b9810221c8508f77b98357062adace060a10f42 7089f86aa25611d0ff6f73ea78cf11c8d8c8d74692632a801a6872b44f1f3722 +lib/codeql/rust/elements/internal/IndexExprImpl.qll 7914bace26dadf2c1752b65afad2ed226165507e20f3dba7949696103f3d586e 708a9f7eff1cbfcf93841ee009dc01354f4ea3d2e1e00608924e670070410e20 lib/codeql/rust/elements/internal/InferTypeConstructor.qll fb8f2aec6cd1e681cd84a7bd574459e19b9b2a152009290e2eac550f012a06b7 e2b1694f00a4e6a82b13d08d7bb95c98a73792370c1155263d696e60d39b2c3b lib/codeql/rust/elements/internal/InferTypeImpl.qll 0fe181340f580066fbd6781e9ab5cb6f43715da1f0bc804d54e485f80a0f43be 0867c58fb59ce9f1179f2612c205629eeba564236a90e2a8b2a6cc85cac5b369 lib/codeql/rust/elements/internal/ItemImpl.qll a9e02ddc6763e01e738d8b9c9d7782b8a303bd26fd7a4518260c9bbfd4584e18 02c94d8abbcff3160fb05fdf709cc3116db71fe11cd77e1025835404e4f20724 lib/codeql/rust/elements/internal/ItemListConstructor.qll 08af3bd12536941c3dd4a43c81cc861be24325e242e2593c087a3ce632674291 2fa166159c409d2aaffa73a30babb40829a6de580bd40894d909ee6152801082 lib/codeql/rust/elements/internal/ItemListImpl.qll 95f83c6d0594fc2c23278103d651d18e42f465eb8c4a858c1dd41717c01828c3 c55a84d9ba98de6c9852bde10c283ed05c2ed8b8650fe8f42c2104adfbb9afd7 lib/codeql/rust/elements/internal/LabelConstructor.qll 1f814c94251e664bfa1b1a606aef995382e40e78d4f953350ec951ee0bc8bd34 3157fb8c7c6bd365a739f217ad73ba1e0b65ccd59b922e5ab034e3449915b36c -lib/codeql/rust/elements/internal/LabelImpl.qll e675a130e813d6c98565f2b6e17ac74432c8fe03e23a3b74b36b6208a813e17b f62488b639db74b4d112d272d8f49beb8ce3d6170d1f124de4838315bfc6b9db +lib/codeql/rust/elements/internal/LabelImpl.qll e1934c3f01e6c9a2517001285bc8e36166757a50ff63be09f9000171c04130f7 4f93e722af890b5241bf55674b29ac5cb134cfefb47eba983503dbd4212abb20 lib/codeql/rust/elements/internal/LetElseConstructor.qll b2b5d68e5701379a0870aa6278078e09f06aa18ddd14045fc6ae62e90827ece7 7359e70bea8a78bcaf6e6ecc8cc37c5135ae31415b74645594456cc8daa82118 lib/codeql/rust/elements/internal/LetElseImpl.qll 5cc447b2adc97b2f01e182ca80973cda141ed7075a528b22d81b0227bd3f3505 ac19fe01a7df5bc381b92a7ab9567317351a27c22f96fea267dc4738d0a992c1 lib/codeql/rust/elements/internal/LetExprConstructor.qll 66f27cbdafb2b72b31d99645ec5ed72f4b762a7d6f5d292d7639dd8b86272972 7da048f4d7f677919c41d5c87ead301eacc12ece634d30b30a8ae1fab580ff30 -lib/codeql/rust/elements/internal/LetExprImpl.qll 9287a482f3f24b8407d674d6e49bda6f24f54241c6c7fdf209d892e162c14ff6 04c8a59a4a3e048c743b238e5af838f859a8cd780181e99d2ce093e243059322 +lib/codeql/rust/elements/internal/LetExprImpl.qll d9e2f8a2f4c7cf3b80178012b5f38b029064a52e705301b99c7477ec1d9fe479 1a059d383a5988b32ade329d2ac809f3a830eb9c54020e3271861aa9ef136ab8 lib/codeql/rust/elements/internal/LetStmtConstructor.qll 7ee0d67bebd6d3b9c7560137c165675d17b231318c084952ba4a2226d61e501f 84199ba755bb6c00579eee245b2bca41da478ca813b202b05abaa1246dcf13d8 -lib/codeql/rust/elements/internal/LetStmtImpl.qll cd8798854d9d5d704757f94680843fac4c4765239b7bcc5129af421ee367081d 7979973f75c2d306840f98a585d17ba74a74c16b73fb1876a25a320885424cf7 +lib/codeql/rust/elements/internal/LetStmtImpl.qll 2f3f387a78d1751652bd22dc0ea6cb39f0e186847b6f0dafd74d0f89e2db495a 2ab5a17f588e385f614c8a104a17a91859389227635bd239694a799643727ffc lib/codeql/rust/elements/internal/LifetimeArgConstructor.qll 270f7de475814d42e242e5bfe45d7365a675e62c10257110286e6a16ce026454 643d644b60bfe9943507a77011e5360231ac520fbc2f48e4064b80454b96c19b lib/codeql/rust/elements/internal/LifetimeArgImpl.qll 50ae74ad177f562b83f7a1bad953c049eaa1b8e47f62e1f84b413d4f9d4f107f 5653a3a250513f7ef1c883b8fa40b9befe9eecd6294bf3b05135dd54fa593659 lib/codeql/rust/elements/internal/LifetimeConstructor.qll 2babe40165547ac53f69296bb966201e8634d6d46bc413a174f52575e874d8cd ef419ae0e1b334d8b03cdb96bc1696787b8e76de5d1a08716e2ff5bd7d6dc60d @@ -265,11 +265,11 @@ lib/codeql/rust/elements/internal/LifetimeImpl.qll 761fc6dca34b935717a90d8e81e13 lib/codeql/rust/elements/internal/LifetimeParamConstructor.qll 530c59a701d814ebc5e12dc35e3bfb84ed6ee9b5be7a0956ea7ada65f75ff100 ff6507e5d82690e0eec675956813afabbbcfb89626b2dbfffe3da34baeff278c lib/codeql/rust/elements/internal/LifetimeParamImpl.qll b8f64a0980d78d2e43f6ef3953e02aec3e32170964c9221c72ef1e6ea84163fb f3003c0168599a6033a568eab690a8215a1ab4e5ac24281f9d18b53bcbd05fb2 lib/codeql/rust/elements/internal/LiteralExprConstructor.qll 8ea3569bd50704ce7d57be790d2dfd38f4c40cb0b12e0dd60d6830e8145a686f 88d07ad3298003f314f74bd8e3d64a3094de32080ad42a7e6741c416c3856095 -lib/codeql/rust/elements/internal/LiteralExprImpl.qll 11ae53095f49606dbe1db2992c5efa1efeaa683d8d0f00f5b6bf3ee8f965ddfe fc3bed6b6b549337ba82890f7808f72a3c1eda29cf4dc1f754a0b23fb60115b9 +lib/codeql/rust/elements/internal/LiteralExprImpl.qll 0a8c8b398ed2f7f3dce5969b98fa61d65bbb690df035b7149a90926b692fab47 26ff1638781af837c454c3cf14d87d1e404c7b47f2582ad520925183c8c769e8 lib/codeql/rust/elements/internal/LiteralPatConstructor.qll b660cb428a0cba0b713fc7b07d5d2921de4a2f65a805535fb6387684c40620de 2dbc9fbc56e9de53d24265d6b13738ef5b9ced33cc3c4c1c270e04dc2fc1330f -lib/codeql/rust/elements/internal/LiteralPatImpl.qll d9fd80c751f98547cd77e0c0c57e6eb083b6aff5582a281828f25d5540fec140 5a8caaf2cea292f265313bbb5a6d8858413271d6f968aa61b42b808ebbe1f7bc +lib/codeql/rust/elements/internal/LiteralPatImpl.qll af74456649e3949bf27e91f2127389e5c9f2ee99241958afeaa5b55276170994 b8b744b1d0c1b85ec86c535a35fc75d6289636a0e1988500debf236faf24a2cd lib/codeql/rust/elements/internal/LoopExprConstructor.qll 45f3f8f7441fcab6adc58831421679ee07bac68ac0417f3cbc90c97426cc805b f7ab3361b4a11e898126378ea277d76949466946762cd6cb5e9e9b4bb9860420 -lib/codeql/rust/elements/internal/LoopExprImpl.qll fd2b330775712fd5da1f635f7c6b30fb82ff58ca77c5ddd7de930230781aafb0 e4b2971498cab29309d828f6cdd8ddc6e80afeed1e87c4d0113f77beb9163494 +lib/codeql/rust/elements/internal/LoopExprImpl.qll 068b98978296b22ae59bf9e941e7e2683f4fee0f6c1affbda1fa42c93f015114 e40e384aeff61099d102a681e5dca1aabc6dd6694731f8570d6358e0197368b0 lib/codeql/rust/elements/internal/MacroCallConstructor.qll 707fee4fba1fd632cd00128f493e8919eaaea552ad653af4c1b7a138e362907d b49e7e36bf9306199f2326af042740ff858871b5c79f6aeddf3d5037044dbf1f lib/codeql/rust/elements/internal/MacroCallImpl.qll 4eda536e5a22dc9df12759a291df59c19e0bbd1b5cff70687f94cd747ada13af 6ec8404164514006316f2db4b54edd56f16245e9195888699af7e0d01548cc66 lib/codeql/rust/elements/internal/MacroDefConstructor.qll 382a3bdf46905d112ee491620cc94f87d584d72f49e01eb1483f749e4709c055 eb61b90d8d8d655c2b00ff576ae20c8da9709eeef754212bc64d8e1558ad05ce @@ -283,21 +283,21 @@ lib/codeql/rust/elements/internal/MacroRulesImpl.qll 85e4ca6bf0a9feb0a259471e367 lib/codeql/rust/elements/internal/MacroTypeConstructor.qll 0a23573a6f69b38f3d7470050b16197601d67bdd5a4b1a43a155b0b99ccdf6b5 19b623962e8e1f73e55e3ed9712d2a3fe84b9510b99062173902feb2458ec12a lib/codeql/rust/elements/internal/MacroTypeImpl.qll 9705f2bc1222a601ed5f9c7febfc5ee0da4c8db98824c23c541683bd74461f9f 573e35686f6d27faa577d1090ba24fe2dc4baf84edc3ab6f361a63598ee0a850 lib/codeql/rust/elements/internal/MatchArmConstructor.qll b41c1d5822d54127ce376ef62c6a5fa60e11697319fc7d9c9c54fd313d784a93 96cca80e5684e5893c0e9c0dff365ef8ad9e15ff648c9969ba42d91f95abea05 -lib/codeql/rust/elements/internal/MatchArmImpl.qll 9887e13c17b14b540569412d33a25f91d70e5fc8e349fb811759dee732759c37 9d71c504567c8c44f7b8119e78e54e93457a43a5ac85c729c8dbe522df061852 +lib/codeql/rust/elements/internal/MatchArmImpl.qll 065dff16fc70b51924eb4db57be121283f4b5651105320901558bc93bfdf2641 37f4f6ecd23c5170ee5cb0041625c19a8d3245d56f6f1587a2e588eb86baecf9 lib/codeql/rust/elements/internal/MatchArmListConstructor.qll 8bc5ac978fe1158ef70d0ac06bdad9e02aadd657decb64abcc4ea03f6715a87a 4604ab0e524d0de6e19c16711b713f2090c95a8708909816a2b046f1bd83fe24 lib/codeql/rust/elements/internal/MatchArmListImpl.qll c52142add563ff0cf3d12a70d7182ef00d3ab3b7a76bf899e6ae3de41fa2b4bf d67cf90c95b3a766acfdf408bcbc3d468ad70fb0c84ec9e2693b77598e2ff0bf lib/codeql/rust/elements/internal/MatchExprConstructor.qll 0355ca543a0f9ad56697bc2e1e2511fa3f233bc1f6344d9e1c2369106901c696 78622807a1c4bff61b751c715639510146c7a713e0c4f63246e9a2cf302f4875 -lib/codeql/rust/elements/internal/MatchExprImpl.qll a4410121d177f7880c80f1d2e679029d68d395097727ec6a7fc217a6d0a62483 1fab1ad49806a925e1c722ed52034f6f41af300cfc6aff84e64066435ba9017e +lib/codeql/rust/elements/internal/MatchExprImpl.qll 2f933805bbe6f2676501c1c72ce1dbcffb0acff34883fa7b423b1a20eaf58afb 56f1c727f327717afc48c1dc505241d56c46e84094395ca32a33824cf64ebdce lib/codeql/rust/elements/internal/MatchGuardConstructor.qll d4cae02d2902fe8d3cb6b9c2796137863f41f55840f6623935a1c99df43f28d8 0c89f2ca71a2fd5a3f365291e784cb779e34ba0542d9285515e1856424cec60d lib/codeql/rust/elements/internal/MatchGuardImpl.qll 361c96dae2fc099eea6b670306bce1558fecba1a4be9f0746bfa8aa3b660e838 4cc6f0fed420efdeb9965443be58c48b6fb7525ed964bf11912f70a26c18ff9a lib/codeql/rust/elements/internal/MetaConstructor.qll 49ab9aafdcab7785fc5fc9fb8f7c5bb0ae76cf85d0d259c4b3ac4b0eccbbeb56 bc11aef22661077e398b6ca75e3701fd8d0ac94a0e96dc556a6f6de4089d8b8c lib/codeql/rust/elements/internal/MetaImpl.qll 59bf4038b0320bef8adffa89365957aa62833e7fb890c40d8ba9924fb60ab503 751c99270f0c94960ba530d1a38093230efeb4d36f599694bfb02e8fe4817bf5 lib/codeql/rust/elements/internal/MethodCallExprConstructor.qll a1b3c4587f0ae60d206980b1d9e6881d998f29d2b592a73421d6a44124c70c20 8d4eaa3eb54653fac17f7d95e9cc833fe1398d27c02b2388cd9af8724a560ded -lib/codeql/rust/elements/internal/MethodCallExprImpl.qll abf0bab14f902879558633d160c4d00e91c46fea24e851a435e952556acfee09 32eeb4750fb064fd08ea8eaf8de9c4bd2ca4ea53e1c8c1d41991e827e4c86242 +lib/codeql/rust/elements/internal/MethodCallExprImpl.qll 85bb150fa738c4206913cf8de15d3b0525e47c1a2cf5de77ac1978194f4b6333 a565680745b8c1374c17c6a0a9b1b4c8058b4f44ea934e36a919d2eb454b289d lib/codeql/rust/elements/internal/MissingConstructor.qll aab0b7f2846f14a5914661a18c7c9eae71b9bde2162a3c5e5e8a8ecafa20e854 8f30b00b5b7918a7500786cc749b61695158b5b3cc8e9f2277b6b6bf0f7850a0 lib/codeql/rust/elements/internal/MissingImpl.qll e81caa383797dfe837cf101fb78d23ab150b32fef7b47ffcc5489bfcd942ac3e 9f3212d45d77e5888e435e7babd55c1e6b42c3c16f5b1f71170ac41f93ee8d0b lib/codeql/rust/elements/internal/ModuleConstructor.qll 31cc83c9d8f25ac07375d19e568f05c068e1f5aa205ff3d9ac31c2510e6f8468 8a70f3f1c18ff87f17e6baf2f05ccaed55c70469288192fc39ef0bb5531b8c0e -lib/codeql/rust/elements/internal/ModuleImpl.qll bd1810aa0b2a985b5ee0c3e18516c946070639052c367d509956e361cb1dbb7b 34cb4d81c8ec9e2f0b3d28175ee7b9c79fb93121ed9a9876fe28ab4c052b0dd1 +lib/codeql/rust/elements/internal/ModuleImpl.qll bbff32cadbad54bdb613df8c1ac6da8cd2a80d0576361b843f1529e6c63b1938 7342473026561b8e4923625a083ba52c31d3b6797f9061accd1a712598244410 lib/codeql/rust/elements/internal/NameConstructor.qll a760134c6d4fc785746e1a5dc042a6bf25b8adaa3947a6897c31e50fd91dd5fd 1359f903d57112bcc1f62a609febb288301bfa810e569aa12e1045fd48b5b5c9 lib/codeql/rust/elements/internal/NameImpl.qll a16fbc2f8f015e82698f0d0ae0ebe137b27ee9263bfc6ed3c31d7dcfc861829a c52e6bdfd09ca8aab012545eba0c6f95e09038fc360c3f0728caecc8098c86e9 lib/codeql/rust/elements/internal/NameRefConstructor.qll 5ff6eacc614fd41f98b54cbb4960a07a1471cf4ea291758d33e54a48fd5d1bc4 c538d65414a24dfdbeb49cfd997588227559ba038f0b55d14bb5d89ed1a016f2 @@ -305,9 +305,9 @@ lib/codeql/rust/elements/internal/NameRefImpl.qll 55a41f67cd4af010a956c937c5407e lib/codeql/rust/elements/internal/NeverTypeConstructor.qll 6a86bff9d885eddf39a159698710def40d693ccfd0888aefd090a283cb59ae95 9c51d6569f267dde5597067a8470d19d7714304399de4f730e7b85ca21feee20 lib/codeql/rust/elements/internal/NeverTypeImpl.qll 26959da017a517d8aa899abe3e331aa86e994a25cd66e914aab1c998832e3223 ba541a7eb97a5b912e9f3ccf2589a685f856562e9a5dc12c87d2caa88ebe36d0 lib/codeql/rust/elements/internal/OffsetOfExprConstructor.qll 616e146562adb3ac0fba4d6f55dd6ce60518ed377c0856f1f09ba49593e7bfab 80518ce90fc6d08011d6f5fc2a543958067739e1b0a6a5f2ed90fc9b1db078f0 -lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll 551312b99587ec549d4ee9683b17acf81e4c550deb0a99fbc7a5bf3aac0e0b39 724cc0a9d3c72027b42fdbac6e58f07ca229ca2fc6242f7b7318cae2ed6cc116 +lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll e52d4596068cc54719438121f7d5afcaab04e0c70168ac5e4df1a3a0969817a6 6ab37e659d79e02fb2685d6802ae124157bf14b6f790b31688f437c87f40f52c lib/codeql/rust/elements/internal/OrPatConstructor.qll 4ef583e07298487c0c4c6d7c76ffcc04b1e5fe58aba0c1da3e2c8446a9e0c92b 980a6bd176ae5e5b11c134569910c5468ba91f480982d846e222d031a6a05f1a -lib/codeql/rust/elements/internal/OrPatImpl.qll a6d59ef97389b6510488c47bc47d0bda73ff0d4632e5ff6e013f1aec512a8b18 a4acfbe9432552b8a1575daf1341040cb978d1483f4b373566294abee08ba681 +lib/codeql/rust/elements/internal/OrPatImpl.qll 0dbc461115f62306e679f69c4354550bc3425d4291aec0124ad8f7a55c779d51 d32ebaa5a3002e87b35949cb624b20377155869ad33aec873326f60f2f0b666d lib/codeql/rust/elements/internal/ParamConstructor.qll b98a2d8969f289fdcc8c0fb11cbd19a3b0c71be038c4a74f5988295a2bae52f0 77d81b31064167945b79b19d9697b57ca24462c3a7cc19e462c4693ce87db532 lib/codeql/rust/elements/internal/ParamImpl.qll 7c97099f6ea0ede0ac630e0d21f98450426a5cd1d1ba1c04008da63b26215436 ba0b610558b49d12e72bbda616a6b06bb8a896d14826722186b614b5850f51a3 lib/codeql/rust/elements/internal/ParamListConstructor.qll 3123142ab3cab46fb53d7f3eff6ba2d3ff7a45b78839a53dc1979a9c6a54920e 165f3d777ea257cfcf142cc4ba9a0ebcd1902eb99842b8a6657c87087f3df6fe @@ -318,45 +318,45 @@ lib/codeql/rust/elements/internal/ParenPatConstructor.qll 9aea3c3b677755177d85c6 lib/codeql/rust/elements/internal/ParenPatImpl.qll 72e2400b80908267962f20bc2e50ee8f14fe2e8dd1d78535b6d6fed447caaa36 e1a183b837a0497fdaa4e4b9e14442adfd47443242c04a92f785bc0a3e7f9ef8 lib/codeql/rust/elements/internal/ParenTypeConstructor.qll d62e656a4a3c8ffd4eb87d49585a7a3bfb5dbe3826fbcbd11cb87b46f34c19ae febf6535965afa0f6eac4d2b08730f5a07bbb36a7434abe0a7663d7264961a3f lib/codeql/rust/elements/internal/ParenTypeImpl.qll 47964e1578c116bf0d762eedbac14ffe1f4b6cc724d391fda4b03ffdf37607a0 146915450f466cf0111af30eda4159d2ee3feaa19d8ba884badcae1e279c43f0 -lib/codeql/rust/elements/internal/PatImpl.qll dce07d0458cbaa008087086aa10d12939fc805002b6abb6f1f9c7a03db2dbeba 8bd0f1546bdd53111ff11f628a34124f3f3d361031e77deabf651800627d3293 +lib/codeql/rust/elements/internal/PatImpl.qll 37c9b1da7aa625117644e2cd74ec0b174f69a38cf66926add01786a05d5ad2ad 143685a0b4873fa0b73b204285dca956e59b32d527bfac6cc336326d244994b7 lib/codeql/rust/elements/internal/PathConstructor.qll 5c6354c28faf9f28f3efee8e19bdb82773adcf4b0c1a38788b06af25bcb6bc4a 3e2aeef7b6b9cda7f7f45a6c8119c98803aa644cf6a492cf0fce318eba40fe8f lib/codeql/rust/elements/internal/PathExprConstructor.qll cf6e0a338a8ed2d1042bdee4c2c49be5827e8c572d8c56e828db265d39e59ae3 36a3d1b7c5cc2cf527616be787b32071b9e2a6613a4f6b3f82e2a3b0e02a516f -lib/codeql/rust/elements/internal/PathExprImpl.qll 412f2ce2ba8b2d81b5a626eb49aca16fff9cbf560061c7b55aa78f512e0d2155 510a07db0dc8e5e21189cf3e72f3ca9e36ce44c2102f786b3099dabfbe7a5405 -lib/codeql/rust/elements/internal/PathImpl.qll 7105070c7a5cea4b2fb4d7b078c208ada8e1b3d7143751fee1ac1d2a7bfd40f3 947e6a308558c9da398080e98b321665bf678542c16385d66d395bdbc44dae98 +lib/codeql/rust/elements/internal/PathExprImpl.qll 01ad25aa940bf949056db86220362f0f5a1b03a772af6a2f6aff8854170c5e49 a0f5ff6b04e2f9f22bda78bb2a7352d890899ba16cb7f6a267af902a3650c5ed +lib/codeql/rust/elements/internal/PathImpl.qll 67ccef5792c0d17d800b910cbda3651aaa5c0ba8daa64e1fea23a1518b562193 6a54b958f7206c43565889a273a64b95aa4b915044a986ffffe7cfb4b8f9c3a9 lib/codeql/rust/elements/internal/PathPatConstructor.qll 966c4ea22218ef71e000d7ce8dd5b570c39ad96b9239a3aa8a38292e2a9f36d2 8a1f348e9257ffc6e6bedcd70389b8e7ec2a3ed6e7b3733744ddfab284826e57 -lib/codeql/rust/elements/internal/PathPatImpl.qll 27b6551f092ea78a537e58d047ced185a3550e30a2210e0a759753d9f097ce1f a2aef1917021d05c51dfc1b7b431a2a288630966a118d29e0f00e76e83694720 +lib/codeql/rust/elements/internal/PathPatImpl.qll 6ab5b5959cfd94e74f60422cbdbd764a5f51ff541db428938c36ba3a512d1d6b 47585157460e8384047de307b0b05deaab758d0f07fd0183d874f7bb9d8bda4b lib/codeql/rust/elements/internal/PathSegmentConstructor.qll 2d9639e42035dc7e73b7d6ddb8a977beadc6b4492dee4292b2f85b4409344441 c337fc3b9ef56366428772563e3f25f711474d16e860d3e89c1395a95d9e83e7 lib/codeql/rust/elements/internal/PathSegmentImpl.qll 188e96a2939aa5529fede1984d2ec652fbda2715298a4b75a1c3b6fc198e43fb bbb932c32ead04defbeca3de9c1513425ddbc36dd8b8e710d9b96d31931b68b1 lib/codeql/rust/elements/internal/PathTypeConstructor.qll 8949742c7ab7fcfa3a3f6469e87355a6888931ab9ac7a6a07d2bd51e3fdf8283 fb1a402e94e9a1f33b7757338d7e95b107933339615a4fe86de33e41206dd94a lib/codeql/rust/elements/internal/PathTypeImpl.qll 00776695c062a01034a639c81dcfe9309c9293a7639eb79103d1bb8e978b7a86 7d7a6fd02edcff2a7f6ea843c97efc74a3484622bf9b25c5b9ed21bc8bdf251f lib/codeql/rust/elements/internal/PrefixExprConstructor.qll 90c50b0df2d4b4cbf5e2b7d67a9d243a1af9bfff660b7a70d8b9c7859c28bca7 1a1b5ea1f06ed8d41a658c872e8e1915c241a7c799c691df81b9a7b55d8f2f1e -lib/codeql/rust/elements/internal/PrefixExprImpl.qll 705f30cc07e10a70561d7fae318531042b7abac2e01fe9c6ee093ac463259bcd f066327bde8cae9bc57aae311fb1482e0118af0cb7834b3b28cb1b0bc7890eac +lib/codeql/rust/elements/internal/PrefixExprImpl.qll f3c6a88cead13fb88f5be170123e9d5fc0819e6626602c42d38e756ef5a46213 e5cd78e6a77484e164334befd533d52e4de00c0c3b30dd2fa03f412f669cf369 lib/codeql/rust/elements/internal/PtrTypeConstructor.qll ee3c4326ea3f198d2537a914dd6eb51d0cf247310f037e13e87632fbd6cfb50a 3814218b5271f3c6c45b52082cca2a3250a2573abced43fe53e1b4145374afe3 lib/codeql/rust/elements/internal/PtrTypeImpl.qll 1bb1b033919ef5c9984e9ff467ad9f25fa40c7a91935763fd491e83dbfea81c9 b45341d062ce3eea54cb9002e7f7f93b54b6019973d6c5a3e65610acaeb86584 lib/codeql/rust/elements/internal/RangeExprConstructor.qll a0aa90a1c38c5deea56475399016afae2a00a858b961fbbab8ddeb3bc6a08103 0ddf1bcf28aafc56d7334e6138fb268f9b36a429e4cbdd982cd8384e0644076b -lib/codeql/rust/elements/internal/RangeExprImpl.qll 5a450edc738a4a749e3ab52067cc69174800a17b41a12d4d76f52306b331c054 d6dbf897facd96115491c0ce216f999d96ed7756a6377462e5fb59d290b9a292 +lib/codeql/rust/elements/internal/RangeExprImpl.qll a6ff92a27e44c2184f5c2d8483de1d0d4a77eb7a5154ff93a8f3a9fc8b63e561 d53d44bc1c1ae426f208595002adcddb88643e1027bbee7445095ca09e433331 lib/codeql/rust/elements/internal/RangePatConstructor.qll fe4345cb41d970ab64196ca37eccb26e5b9cf85fab4253cacfd2b31de03bd070 1d09d5ec8203d76aed2dfb7e7f14c0c07d6559c8f589e11860fff8a2c682c1a6 -lib/codeql/rust/elements/internal/RangePatImpl.qll ee26a19138173a1f02252d94560116921b368466316b3a9ae563583ab31d3852 5cb78aeeec2e6aa91113335905c55e4eec8560ef0cb719fc0af89647bcf2b318 +lib/codeql/rust/elements/internal/RangePatImpl.qll ef11ab2c002896036553231741a7cf896fafa09e22e920e15661b9cbe4393cae 24ac2dcce3055a77f3a5e0b38cf13aebefd2eeaefa53674ff144a6225634ac0d lib/codeql/rust/elements/internal/RecordExprConstructor.qll 742198bd8223902b5625b4a574a9e3539a8b6cf8e48eecc57cc2de4e980fba6e 0a99e454e234e8b7b59dc11b167172a5fcd31b8a5282349956d6fd861ec735df lib/codeql/rust/elements/internal/RecordExprFieldConstructor.qll 11620bc4e2dc7b3903be764cd9510a8e002892722b502876cf3467994aa7a63c e42e50747dd9453a44705b2d6a05e7a4a8c6debed988a0335a774a547d8f7157 -lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll 848dc10812e04826589dfceb96881fd2060e640f3dc4f07bc7cd577e7a94fb53 53272a6c7b03991e2de6ad78d0f895ba4b09521c8ace556d2225667953521884 +lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll 8af196cbaeeb7997e933fde9ddba50ec099df51f66e03501f00157f238505fe7 29ae10546577a354b0439876ce5deb5ab13455028f02c01fe3903b11eaee35e2 lib/codeql/rust/elements/internal/RecordExprFieldListConstructor.qll 3a0d6ec872792c400d3a0a5ed1c5051b248a597a4b17ada1a078ea5d972b6721 52bae8222e7aa5bc89b73bec3fd1c3c1de0fe11bf30ccf5668454f63fbfc9b83 lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll 34b1274862d771477b474a01525ec6328a9d5a2f2b69c56988c90533d94027a6 8683af4afd5b3063ba5aa842463c506a81bc570a49d005f245dea8b8dc831ac3 -lib/codeql/rust/elements/internal/RecordExprImpl.qll e25f6e969e5d854203b7cdf122056a2b21bcebc7b45621c308e8b8f581b03e35 0e5ab6e1291fbdb04e8247b5c4a28ce98a42ef9711f0320e81df2161c9703deb +lib/codeql/rust/elements/internal/RecordExprImpl.qll 233b3f7ee8dbd1e5431bea5436c6b7ee38e631c041111dcf53e45c6c4c08a6cf 9537497edb739c535d75ce80122f597ad93241bff5399b1dae17a7bfff1c15cd lib/codeql/rust/elements/internal/RecordFieldConstructor.qll 9fc05f5101e48a45a028c479b35ec3d2f1a3cc33f0938667fcb813c5a4ab9526 98791dcf7f3209524f6132f9c26980e499cbcf94c1559e95c67544732245f05b lib/codeql/rust/elements/internal/RecordFieldImpl.qll 2c40da630d03e007bfc59bd4445efbcf4f741d0703accfe5eb1c64f7ce0ea160 466434091028554820d4f88571f1cacf7df98e77a6952c73782208d035cdb64c lib/codeql/rust/elements/internal/RecordFieldListConstructor.qll 9f1d916f3784092dcbff7224451c8f4f0daf6f8293a466b0a30ec9b92cd41358 8aafe377714a134287362c4b96439c1c6baa5a31c2c36a544bd5f73e9213477a lib/codeql/rust/elements/internal/RecordFieldListImpl.qll c4e0928eb68e028ad7e03e3227b27a87e50d15bbb863fac303681918f645500c ae057b73fb5fd7f845f8fab802f26ad73492d9e5a565d73346c90288f0635ecd lib/codeql/rust/elements/internal/RecordPatConstructor.qll a5507e0db7cb297c74faa9d571e613799d7b3327584e4696d1d5c219d1ea84ba aa5c8042a88e99dca09a6ea7775bd6963825a3c2dd5d61f118dbbc57a336c4a1 lib/codeql/rust/elements/internal/RecordPatFieldConstructor.qll 6e1880ed05401b39c1e5e1a4eedb0a8a18c857aeb79c44c812cdc879eb3af1f4 1f7a5a2d4df22f7d7479fe348665d8a1411de47f8cc5b95b30ba4c3490ed8f61 -lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll 38124e111d2024c00ec528075cb3db6c4e695c83449b63141358ce39ceab1169 bd2f31e65992656e25fc67ca0d32e745ecd6d7979c049e3dd38cd3d36720fd78 +lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll 04bc31b857c8250096d9d1bf3fad1e556a28d83bb3f3b48a3f049048d1e6785f 5853105e55650d05a4b196f17b89baf12b898df0a010e4f88289ce01d16a0379 lib/codeql/rust/elements/internal/RecordPatFieldListConstructor.qll b8f0ef9b75ffe6be6ce7e601d528f0a1b871123c63e39cead3fd13b8bd4f54b7 166f07c708ab8b3de6bfaf193bac93081b2aacad046aa86de7441085dd20a8c5 lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll 7b7096f1b64c481f00147b19a016db9a2338be232e977aa37a705f297b2ebebf bfbf15b1be611b66aa59cf166a592d3c3e3540f81cf169f6fec5c33f2fb6fde3 -lib/codeql/rust/elements/internal/RecordPatImpl.qll 303cc3709283004a8174785106264f705149bd2a5a0690170c65cd0ce1a545b4 05d8598bc5a439e61ab5eb37ed43229cf780d507582d509aad6e42862c86d33d +lib/codeql/rust/elements/internal/RecordPatImpl.qll 3c7086be84e336c069f4c7b538c7ad32a7728e7fbf42e4dc7f04c4c99d393c0d 8020215f38639965398c62ddb36c3560579d63928e71e0d773b254e121a68cc3 lib/codeql/rust/elements/internal/RefExprConstructor.qll 9ad08c0f3d980a56a2af8857cb84db589941d20ab3ae5c8ece004ccaccaaf950 4cac3ace31b7ed77a72e989fce9cdbae2247f03c28a3f0c50d67385d02c7f193 -lib/codeql/rust/elements/internal/RefExprImpl.qll 15b0b04ab1933b2d12b05c6c7ac3b86c86df35852fdfe7fdcb7891dd142497a3 31df2ab59987bcc959ad231c7a49f9562c1a1c8d8485da1675c9117357f389f2 +lib/codeql/rust/elements/internal/RefExprImpl.qll 56ed831a3b30ed375e7369b0a60b9b7635a1b00f058364a6b15078031a85af5f ca7e772b409514363e49d56a174ae9bd2e076755cbd09c4e7e5b732d09acdb25 lib/codeql/rust/elements/internal/RefPatConstructor.qll d8b88c2c468b08072f6f853306eb61eb88ee1e6c5cfb63958f115a64a9715bb3 0c1d6a8af6a66912698acce47e89d4e3239e67f89c228a36a141f9c685c36394 -lib/codeql/rust/elements/internal/RefPatImpl.qll 2ba9579cf0eb23ae744632c046644a18a3e7ea675bf365f01440d76e8e9c7a31 94d5f6b70130ee61c1ccea1dddcc91073f8212eded23d096ef581001fb31a67f +lib/codeql/rust/elements/internal/RefPatImpl.qll 3e06e8130d412b47267497097cffc9f4b930b9e54bc90465ab5ac620fbe52048 b8ac844ec99f30605ce476f89ced4fb1159d2df0df43c631f60b3c868e0e1fd7 lib/codeql/rust/elements/internal/RefTypeConstructor.qll e1952aa69586b440f878400a52d09b2d12d5a29dbe9651360344631cb9493cd4 e4ae45e89472dfd4547d647c75e1635cf065a7d221ed60ed34554f265c0c5405 lib/codeql/rust/elements/internal/RefTypeImpl.qll b8781f1d1f4f1f76086a7206dc249b2f7866925f8f9fb68068aee8629e209adf 3282fe28629779f3defd83b0e439512828a8fef8d099afff0d17b34a56eed576 lib/codeql/rust/elements/internal/RenameConstructor.qll 65fa2e938978d154701e6cac05b56320b176ee014ef5c20a7b66f3e94fd5c4a7 dfc0ff4606b8e1c14003cc93a0811f4d62ec993b07ff3c1aa0776746577ed103 @@ -366,20 +366,20 @@ lib/codeql/rust/elements/internal/RestPatImpl.qll 80426dcb1e70079b6179527c9305cc lib/codeql/rust/elements/internal/RetTypeConstructor.qll a96d803c6e4b40be49cfed0853a3e04ae917c47351e5c880fcab06eddf1af9cc d06a0a191cb14c270c0441ffc3d289263808170dcbe05e01847a35ac9d61dfb3 lib/codeql/rust/elements/internal/RetTypeImpl.qll 907a3cfe03b65ff36dcd357caccb72a9d3c18ea5c25d7cb8e3502dfdef6583cd 3c622c4860c2feacd10331125e9765e07e57e62706035ad2aca2a97b916c257a lib/codeql/rust/elements/internal/ReturnExprConstructor.qll 57be5afbe20aa8db6e63c1f2871914c19c186730ad7dccaa424038c6305730d5 4d3c4f2e9b38a4b54ff26a0032455cdcca3d35fec201b6c932072a9e31fbb4fe -lib/codeql/rust/elements/internal/ReturnExprImpl.qll 735e30000f638d6fec40cf4cde512e4069cc6e898a17f7ed648026691af193a3 af904ca196a99ee30e502e1aa96a84892c3c8d4105e53e96eca0731570306938 +lib/codeql/rust/elements/internal/ReturnExprImpl.qll eef4960a8c27eaa0540d048fe88893cfe9a6ac377a770cc23d72ebe05d5782f1 b7f35650d80f2f8b4893f0091fea74646341af406b6248f75c477112aca96dea lib/codeql/rust/elements/internal/ReturnTypeSyntaxConstructor.qll 8994672e504d1674e5773157d0ad8a0dc3aad3d64ef295e7722e647e78e36c11 abe7df754721f4ff7f3e3bb22d275976b2e9a1ef51436a461fe52ebd2d29cff1 lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll 1a9bc60d92d845f5b82c1b826d479394a96707c798ba0e1dc57113bd4c443980 1967d10995463346f6c25651d31f1b9dde45d5b2f9c46b9d2ccc090ae1a6b6bc lib/codeql/rust/elements/internal/SelfParamConstructor.qll a63af1d1ccde6013c09e0397f1247f5ab3efd97f3410dd1b6c15e1fb6cd96e54 0d8977653c074d5010c78144327f8b6c4da07f09d21e5cc3342082cd50107a81 lib/codeql/rust/elements/internal/SelfParamImpl.qll 0c69ad2ea3dada21c207bdd2e0059d13bb6a11a68226262f10257ca01c6cbe30 4b18864e576069651eba6df6dce609a7a75991900da9ca3693f112d39f29585c lib/codeql/rust/elements/internal/SlicePatConstructor.qll 19216ec9e87ca98784d78b29b8b06ea9ac428e2faa468f0717d1c0d0a8e7351c 458e5be76aa51aec579566be39486525ec9d4c73d248cb228da74892e2a56c08 -lib/codeql/rust/elements/internal/SlicePatImpl.qll b2b730e769c5e01c3773072591ddb6252623160c405cc8a4b29f9ae40325ca77 496b2b120434e131f7dd5789374444a957121339b299609ca1031d8bc93e81a2 +lib/codeql/rust/elements/internal/SlicePatImpl.qll c6176095360e3b23382557242d2d3ff0b5e0f01f8b1c438452518e9c36ff3c70 644ab41a59a619947f69f75e2d0807245d4ddefc247efaeab63b99b4f08c1cc1 lib/codeql/rust/elements/internal/SliceTypeConstructor.qll 643e7a2ae261e8f62de8bc2886efddcc096e0c7e8159c0b9e87b24d0509e10d0 719545abb0ccf6e8a203ec9c9f75109c5ab0593c838e2f90e388858680ec62f7 lib/codeql/rust/elements/internal/SliceTypeImpl.qll 0ea170d7ebd3655637fe2c8e40a51f5209b0c20b6f3d987477f0fff138f16c2a f253a681c9db9ea75085421091bd336f3e222ca84910eeae992242c160305e03 lib/codeql/rust/elements/internal/SourceFileConstructor.qll 1dc559887ea7798774528b5505c8601c61030c17480f7ffca49b68b76fcc0321 75a635b88622e3110b16795bd12ca6fc4af176c92d6e441518d60aa47255edc1 lib/codeql/rust/elements/internal/SourceFileImpl.qll a23017bc5c4c88446cd31bb2e9cef7068bed0413129a6b81767cded64c1c7e64 8f4bb769e590469e936bee0d6811ba41e566d4eb76f8aa2ba57f77b376f1254b lib/codeql/rust/elements/internal/StaticConstructor.qll 6dd7ee3fd16466c407de35b439074b56341fc97a9c36846b725c2eb43fd4a643 5bf5b0e78d0e9eb294a57b91075de6e4b86a9e6335f546c83ec11ab4c51e5679 lib/codeql/rust/elements/internal/StaticImpl.qll ad41f8d031d53b4e69704ce3e816f61ea70104ae5d0b905552f5ab0e7d44e70c 5b547decc6a8c4d0476e48b07492fa872196bc9decb89f222b664c8a1692f7e2 -lib/codeql/rust/elements/internal/StmtImpl.qll 5536f44c61ee00a69281dd37f3d44fbcf829ae265b21a2d4d15abfdcca338a2c a154dad2b15d052e5f144f234fd7e85f2b3b7ed4431b3704f6994e45156ec33e +lib/codeql/rust/elements/internal/StmtImpl.qll ea99d261f32592ff368cc3a1960864989897c92944f1675549e0753964cb562f 9117b4cdfad56f8fa3bc5d921c2146b4ff0658e8914ac51bf48eb3e68599dd6b lib/codeql/rust/elements/internal/StmtListConstructor.qll 435d59019e17a6279110a23d3d5dfbc1d1e16fc358a93a1d688484d22a754866 23fcb60a5cbb66174e459bc10bd7c28ed532fd1ab46f10b9f0c8a6291d3e343f lib/codeql/rust/elements/internal/StmtListImpl.qll 8ba7e9751a851f22b74aed8e6663f235b71769dd6e32495c9b0df8458a808f88 ad4d0128407eecf094ed7890a68851972262efc5d315fc31cc66e695875dd38f lib/codeql/rust/elements/internal/StructConstructor.qll 52921ea6e70421fd08884dc061d0c2dfbbb8dd83d98f1f3c70572cfe57b2a173 dcb3ea8e45ee875525c645fe5d08e6db9013b86bd351c77df4590d0c1439ab9f @@ -393,15 +393,15 @@ lib/codeql/rust/elements/internal/TraitImpl.qll 3a540288020ec7b87a77cd96bf8b0aa1 lib/codeql/rust/elements/internal/TryExprConstructor.qll 98e3077ebc4d76f687488b344f532b698512af215b66f0a74b5cea8ed180836c b95603c10c262911eeffdf4ccba14849e8443916b360e287963d5f2582d8e434 lib/codeql/rust/elements/internal/TryExprImpl.qll dee6d67ab6f065f8391f68d05e4f6ae50a2faaf7325040ecd4f4998acb9cbfab 9387b7fd773036db97dde4aa699e1ce0e451cf9e3110e3728fce8a376f873cb5 lib/codeql/rust/elements/internal/TupleExprConstructor.qll 71c38786723225d3d90399b8a085b2b2664c62256654db9e1288fadd56745b9d 639ad70b49ebadc027127fbdc9de14e5180169a4285908233bc38ccac6f14110 -lib/codeql/rust/elements/internal/TupleExprImpl.qll aecd557e196af3b72e74b56b753b96821e25afaac60422782f75236c999418e5 662f9c345782287ab05beecd00cd46554f08ec496c185141496a75c3e6ce1643 +lib/codeql/rust/elements/internal/TupleExprImpl.qll 23a0e4367fbcfcec3e2cf4a429f329a222b399c6729dd60f7ea42550273a6132 615f3b4897fdcbfddcf5c58e6edd64bf6e395923af89cc4e2a336099168bb6ad lib/codeql/rust/elements/internal/TupleFieldConstructor.qll 89d3cf2540235044ed5a89706cfbdebc5cdf9180fd5b6d3376c79a1b2c0430c0 16861fe089aac8e42a5a90d81dd48d5015391d0a06c78ca02bd876d65378699f lib/codeql/rust/elements/internal/TupleFieldImpl.qll d19737bb02e86705a20501acd730775c666b2bcc9e8d0cbada3c8a9781d08dd8 94729e3b264de6e77b68c067284055f6f255eff6e39fe45956ef680914a7090c lib/codeql/rust/elements/internal/TupleFieldListConstructor.qll 4335ba2061b6e4968db9ec05c0b4d3e6a564db89a2df69e036f317672a7900b1 0b8dded875dbf696cf588e8c21acc27332a2ff66ced7bfabdfc1ad621991f888 lib/codeql/rust/elements/internal/TupleFieldListImpl.qll eed8fd8801361bbe6d37f472f05804a4194771d469bf586e3dd050b6143087dc bee1d26a424ee262e61d7939cd8c7a6d7f6f930dde6c54a48c21852bf4a6c540 lib/codeql/rust/elements/internal/TuplePatConstructor.qll 2a5e83ad5b8713a732e610128aeddf14e9b344402d6cf30ff0b43aa39e838418 6d467f7141307523994f03ed7b8e8b1a5bcf860963c9934b90e54582ea38096a -lib/codeql/rust/elements/internal/TuplePatImpl.qll 4f70ce09ef78f7e49cb6aa06f0c33d16aca6732d4fd8bc821dbbf9c161f47e42 e0762a8026031197478a11b85616dbc0dd3f6ac999e601c9fc50fda1b47ec44e +lib/codeql/rust/elements/internal/TuplePatImpl.qll 4adb38f0f8dae4ff285b9f5843efb92af419719a7549e0ff62dc56969bd3c852 3f622130771d7731ed053175a83b289bab1d1f5931526c4854923dbcec7e43f1 lib/codeql/rust/elements/internal/TupleStructPatConstructor.qll 9d68f67a17a5cec0e78907a53eccfa7696be5b0571da4b486c8184274e56344a 3ffa29f546cd6c644be4fecc7415477a3a4dc00d69b8764be9119abe4c6d8b9e -lib/codeql/rust/elements/internal/TupleStructPatImpl.qll 5c405ee33f6dd1ba3c2416cf545ca573e2f30885e4078d03f5946a05dff7bf13 910da4a0f9ecb69b12a89576f621b96eac2ef99f43ad41b55d3e837bcf1c81c9 +lib/codeql/rust/elements/internal/TupleStructPatImpl.qll 896f001d82938bd018516a2b59ba5ad76350edb6b9747ed2ef5b96760aa16388 0552f9c0361d14be9896cbcfda17d8884d03a82c4f23c511a8de77fe71cfbb9f lib/codeql/rust/elements/internal/TupleTypeConstructor.qll 88eaec829cd4dcc6a152c7a335b1d365702ef410e46d9c04806fe53f06325b23 044fd0aca067bae82eb8ac448b7bcc66bc736e7e0ab8b770ee126381888fac3d lib/codeql/rust/elements/internal/TupleTypeImpl.qll e05ca0beac96ba091083c9c73c458f2458b055c0e4f0a4a376066399d43145ce da55303ba9d00d7a4cac4b032836a9fbd4aec1473f1289ecb86ac31c5b5aaf8b lib/codeql/rust/elements/internal/TypeAliasConstructor.qll 048caa79eb7d400971e3e6d7e580867cbee4bd6b9d291aafac423aa96c321e76 d1d1e33a789ae6fa1a96af4d23d6376b9d82e14e3cbb777963e2d2cb8b22f66d @@ -414,9 +414,9 @@ lib/codeql/rust/elements/internal/TypeBoundListConstructor.qll 4b634b3a4ca8909ce lib/codeql/rust/elements/internal/TypeBoundListImpl.qll db2c83f1b79cca056c6489ae523c1dc6b2433700da6dce39fddabdf7fb217dec cae68f45cf7c364a19d4bbf1bb8bb2eb3984b99425901b44c7f444a8652fbdcc lib/codeql/rust/elements/internal/TypeParamConstructor.qll a6e57cccd6b54fa68742d7b8ce70678a79ac133ea8c1bfa89d60b5f74ad07e05 0e5f45d250d736aaf40387be22e55288543bdb55bbb20ecb43f2f056e8be8b09 lib/codeql/rust/elements/internal/TypeParamImpl.qll b88bd98abf477c87e6e219a97ab0191f4fc8e6c84c0dd1416fba543e6fc86a9f d22d269320c7672a68aa3e5d2d754a8eb732a8d1a28d676e86e6309df72a434f -lib/codeql/rust/elements/internal/TypeRefImpl.qll e9384aac4aabd6a584bf08153b9620bd367043a0c3ea309c408e23576b67528f 27a82e9491fc57421c85a6c00608bf7194ccb4cd6097881abf6593612e58691d +lib/codeql/rust/elements/internal/TypeRefImpl.qll cfc08bdcc8e7e588f533c7e64c0c08d317d63cdb50f4cba4b4b3e589b37b0fea b46ee7de9b5e9894807004e1bedf39e7d25912ed79de6ac5adfb37a43aa4804b lib/codeql/rust/elements/internal/UnderscoreExprConstructor.qll 8dc27831adb49c1a47b9f8997d6065e82b4e48e41e3c35bd8d35255cea459905 6c5a5272d37f83f1c1b17475f8adb7d867e95025d201320e20a32dab1f69f7bf -lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll 9346749d0cdcc3d70f7c7992c746565af7bc98c1788dc0fee8f54f83cc84ae0a aba18af12c354c47e4b90a729440de211e06ab1fbc4c24d6e460b66a60fe8d75 +lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll 4277b23a09a4ba5e53ca2cfbb20eba6a5f66039b6268da79410e0be30332fedd b9ed79468157a7e751f78aa7597165672cbc38191d5f85ecc15cfdaff388a26a lib/codeql/rust/elements/internal/UnextractedImpl.qll 5c23df7e448184d76ccab2c22757ace24663b8be2592a3fa2a44bef43159ebd3 77b0c9fe75a307adc08c422cc88423c5349756878793cf9e79c006c83b4c403b lib/codeql/rust/elements/internal/UnimplementedConstructor.qll 70b0489fdc75fed389de8203947ed9c8eabb91373a1264eb2c8018ddbb2d9baa 0f2592c1697a2f2f913014ecd73b0e3ff1ec5b038ba1c3a22e7939bf8759e664 lib/codeql/rust/elements/internal/UnimplementedImpl.qll 06771abc088e0a8fc24032c9d2633618e8e40343ef8757a68cc0a70f1617165a 5738f626f1f4f573fdf7dcd5bd57a0948d290ed89342b9160e95ef3c84044f9a @@ -441,135 +441,135 @@ lib/codeql/rust/elements/internal/WherePredImpl.qll 9e1042908a067abcb3812a4254ed lib/codeql/rust/elements/internal/WhileExprConstructor.qll 01eb17d834584b3cba0098d367324d137aacfc60860752d9053ec414180897e7 e5e0999fb48a48ba9b3e09f87d8f44f43cc3d8a276059d9f67e7714a1852b8a5 lib/codeql/rust/elements/internal/WhileExprImpl.qll c44fb9d80d1592de199fb077e800cd238992550bf79067fe67bb2ef4ceb3d45a da48b1f09c940ed35f7516d29c5eee0d3aef1bb8a6ecade8b4aaa7a734f10bdb lib/codeql/rust/elements/internal/WildcardPatConstructor.qll 5980c4e5724f88a8cb91365fc2b65a72a47183d01a37f3ff11dcd2021e612dd9 c015e94953e02dc405f8cdc1f24f7cae6b7c1134d69878e99c6858143fc7ab34 -lib/codeql/rust/elements/internal/WildcardPatImpl.qll 231b87bcacde310efff1f4c19fadcfd65f974951673d71a8019575d91e610142 17ffba210fe40a03816e0835cb8d8b96c7d008251cb9064ca07daf3b1b349fbb +lib/codeql/rust/elements/internal/WildcardPatImpl.qll 01e5fac111cce3bb139fc290dbdb2a80e7369a90952178228efeb025915d40b7 875e91fb1354ab8d94d5fa426b63714c70904f53d7bab15158fcbc290c62a0f1 lib/codeql/rust/elements/internal/YeetExprConstructor.qll 7763e1717d3672156587250a093dd21680ad88c8224a815b472e1c9bba18f976 70dd1fd50824902362554c8c6075468060d0abbe3b3335957be335057512a417 -lib/codeql/rust/elements/internal/YeetExprImpl.qll 7eabbb715dc95aaa5baf482eecf28bf4af93e5845ae66382ff1835e9fd680108 6724868963937ad4d4506812e20333107478a707b52c936e1bedf1fd4e3acc58 +lib/codeql/rust/elements/internal/YeetExprImpl.qll e8924147c3ebe0c32d04c5b33edfd82ae965c32479acfd4429eeab525cf42efb b2debcfa42df901f254c58705a5009825ec153464c9ab4b323aa439e5924e59e lib/codeql/rust/elements/internal/YieldExprConstructor.qll 8cbfa6405acb151ee31ccc7c89336948a597d783e8890e5c3e53853850871712 966f685eb6b9063bc359213323d3ff760b536158ecd17608e7618a3e9adf475f -lib/codeql/rust/elements/internal/YieldExprImpl.qll e907bc6badee79b31f6e59d3c0110855fdcf3e4692aa078391eb9b1731250e6b 5aed36dcd3e661f22714d242dd6140339c1e99805815aff87d63a90272a6f83c +lib/codeql/rust/elements/internal/YieldExprImpl.qll af184649a348ddd0be16dee9daae307240bf123ace09243950342e9d71ededd9 17df90f67dd51623e8a5715b344ccd8740c8fc415af092469f801b99caacb70d lib/codeql/rust/elements/internal/generated/Abi.qll 7939df86f8f52b5c153dd317c26893fb539f98f55ec5bce6269b4ac35858b03b cba6a0e7b621720d153c9e3c768c70a6704b99d1b27df7f05fcf7faf49374044 lib/codeql/rust/elements/internal/generated/ArgList.qll c1abda8f4b6405d29e42029b504781202280fd7b0a38fb243c5832d5cf1b772d 9b6fecac7304ea27bf138e273fbd15e3efe8c8a17c2beaa0ea75c954719f5cb4 -lib/codeql/rust/elements/internal/generated/ArrayExpr.qll 0c01f5352168de713d33e3baa593f535984c3a23d884f70e251af5414ff068f5 5c7887baa84d53572294ee89a7c5ee3c44a9d21123862c35b317c99e66227f7a +lib/codeql/rust/elements/internal/generated/ArrayExpr.qll 2ca97b602a707fe2c566002d8709792bb166ae52fdb7da28d7c4b8e0d66dd4bc 1cae1ef017171ec9a1ca28b4f2993b1ee26d22b51b3b04816d9b4e89fdff1fb3 lib/codeql/rust/elements/internal/generated/ArrayType.qll 022eab237cff44d4473362315b6d77d6cf2d1565c171845745d70f6046cdb3db b1560c189bfeae92df8247ae0c4c69794701439d9300da1e68953be68848e27d -lib/codeql/rust/elements/internal/generated/AsmExpr.qll 4c2f0e04d10e3cb9ce0b841f5267b1541afe40c823fd34ac2a438206618a94c4 136e16a9406b94ab6d8e60085a6987bd8dbd3b0a589c7ca1d0de413edac5fedd +lib/codeql/rust/elements/internal/generated/AsmExpr.qll b5fef59589c02c17857a4a7f5c7b5efb747a1e98710167efa5c2e88cffd7bcbb b43b297a3b4894e8dd92ef3a23b76f2684c303d41e6030398e69b7754ebea9cd lib/codeql/rust/elements/internal/generated/AssocItem.qll f0d132b27a27956882b75a7509663fe9992570fe3b6c4636a63cce4c9cdaf2f7 a3849ce1c8f665f90c919c8c4b2c4ec429e33ad2034635828c25b045d2749c3c lib/codeql/rust/elements/internal/generated/AssocItemList.qll 4d13c3c32887452ac38297a55a70196def9f64d952be52057e47f9d24b418eba 0777e766f5d05a26fd2810b817d55859e44fcaae18c1a195e57e5f671d46c8a8 lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll 213a8c099e8abbb299068562f6a603d59b3470a126dcee7cae425cc5559ce6d4 d9b3976982310eef48976174acc2def14cb4de4525af18753c96fedec3f4b366 lib/codeql/rust/elements/internal/generated/AstNode.qll 1cbfae6a732a1de54b56669ee69d875b0e1d15e58d9aa621df9337c59db5619d 37e16a0c70ae69c5dc1b6df241b9acca96a6326d6cca15456699c44a81c93666 lib/codeql/rust/elements/internal/generated/Attr.qll be2280024194e1866470fd2fc04092ed5b1a2da08c018a5dd7c081f5a1842089 9149d1ae2fa107738168157f686abda25901905e895f0a356767a8674614d89e -lib/codeql/rust/elements/internal/generated/AwaitExpr.qll e06c30e9ae66c74302be0daf4eff2449cdea82796f2e865d6728ede3ce262063 d6ef0451dd65929133c8717af366e766a964a8c5db036db523b47026ab5b3719 -lib/codeql/rust/elements/internal/generated/BecomeExpr.qll 11c86f7b891b01fd2f25147bbbdea8ab3bf63e261ea16c710e106f148d694613 62b0badf83912b1f23c8da16ad837fa84add47cffc37b6c332078aec35fdb481 -lib/codeql/rust/elements/internal/generated/BinaryExpr.qll 5fa1f45dfdfcfd494a31cc4d4f2834f5ed556a9f0391e953a5f1d4cf0aad062c 9030e78695448e6beea07ece1d778767656a64a4eedc1a04a0d3666a154d8541 -lib/codeql/rust/elements/internal/generated/BlockExpr.qll 615d70ff53c8853e84b05e00d70a479e4481c72ea082b72098144794a605b6a8 713012095f4fed18a2184c2b9c9cf4ab7c44779d4fe69a308c68493e903bcee3 -lib/codeql/rust/elements/internal/generated/BoxPat.qll 6c31f3daae9505966cec065ace3bab860abfb17c619ea9275e3878ae1ea25373 c08656b0061578b723198b02b529a9fa98590fe16a35a657b34d7f788fc07144 -lib/codeql/rust/elements/internal/generated/BreakExpr.qll a8aee3397ecd318539c4f95039640274464c9e2fe5086d258acb1d281b20f018 3fab3c8ddb7967464a653f2dd6da84509aa01f1e01af94bf6b36fa98a1a1624a -lib/codeql/rust/elements/internal/generated/CallExpr.qll 60024d892e3b53df61b211a672197ab0ca13b568f014c3e49aae7bf9210d1e11 30290dc80255fa9860c7ccd03fabb25b9858cefb04ec3f7ff74e568758902890 -lib/codeql/rust/elements/internal/generated/CastExpr.qll 57371f440e94988b73d1e9e5081ba6a95400d1f8b2d1591d6aeece43495a35e9 b34c659e8e364330742b573cb53c10afb41e1570c6d3a300a9930d3769dc9484 +lib/codeql/rust/elements/internal/generated/AwaitExpr.qll 1d71af702a1f397fb231fae3e0642b3deeba0cd5a43c1d8fabdff29cac979340 e0bfa007bdecc5a09a266d449d723ae35f5a24fbdfc11e4e48aeea3ec0c5147c +lib/codeql/rust/elements/internal/generated/BecomeExpr.qll 7a211b785a4a2f961242d1d73fd031d381aad809f7b600ce7f7f864518bb7242 17a0388680007871748cfdc6621f700a7c2817b9601e1bd817fb48561e7c63ad +lib/codeql/rust/elements/internal/generated/BinaryExpr.qll 64e9bd9c571edd6e5f3e7662b956b1d87fa0354ce6fe95da9caf25ac16b66c68 3fca09fdbe879db2ca3293618896a462e96376a2963d15cce3d5b1baac552fcb +lib/codeql/rust/elements/internal/generated/BlockExpr.qll 6fc90a80e60f017bf3418e45bcc35b5ddac59b51037c21aed3955d47c147ce4a 1f3f8e5107b0c6de381b7c94aab93dc5fd758a845c6ff9554888df453f1315d0 +lib/codeql/rust/elements/internal/generated/BoxPat.qll ec946a3e671ab7417e04b0207967adad004df512c570c4f0780ca5816d12d75f b0e64860855c4e85914042b1a51034899ff7cd1b2c6857188de89310a2726ea3 +lib/codeql/rust/elements/internal/generated/BreakExpr.qll a5e9576bde3d9dca3b1321a4f5348306b6b5593e9fa39769df00645d80b68f6c 25f190aaa10ab71315947d544c5ef8eedb701a0e665e282031062006c6d3d175 +lib/codeql/rust/elements/internal/generated/CallExpr.qll c2700dbd9c33dcc14de10dc72ff49abafdf0952257864d4435cf8ac46849a2ee 7932f725f97ffbe1b050c2622a61a0d56f18c9264a3293466cba9915313495b5 +lib/codeql/rust/elements/internal/generated/CastExpr.qll d6fbf02e9e202254666082a9116634d0eb933177866ac4c0a57b5e9c4bb4b383 477f67773492e3b82695461d56327c9db05a7d1a67e8d192406265f2ce369670 lib/codeql/rust/elements/internal/generated/ClosureBinder.qll 27439d34951bd0ec33233fc7eeaf41161953c68220bd3388cd3bd1a8f8c32900 0b12dca7defc36fd5b62518d2013ea10a211c004b0601dc9fd05ba7d5231804b -lib/codeql/rust/elements/internal/generated/ClosureExpr.qll b6eb0866cd0f4e7fbf49fe785b218b6b4ceb4d42356106da8507181e9012df38 d384d00eceb307d3965b5bfe62e010a1b9c384b5bf60bd34c1b6624e2f62a867 +lib/codeql/rust/elements/internal/generated/ClosureExpr.qll f9047451cb8b53f8b77e1c01f7ef485d5b5a92999e0591c6702062050052fa2f 2252be8b3022c587a8c6ad93b64d856263be7bfe2938c1d063e7cad845dd38e2 lib/codeql/rust/elements/internal/generated/Const.qll 192d4ca56780f564235eb34c23b5d6b0609bda74bed3e36494cd2fd5707caa1b 819b8f5d9f4739bdbe9fd3edcbadac6fa513f88e9e3d0b16beb975a5bcf022a7 lib/codeql/rust/elements/internal/generated/ConstArg.qll 1838ad9d6ad0727fe95041dea6d1596baca5456effdf0865d32e433e9ed43fc8 68c2bdece406c1c2f6c38ee4237f2fbb026bd2cdbe99c301a20278a958908c22 -lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll aaa58a33eb4353ec76a481e0e01a07969f4385043d3717c92a3982f35fc45753 232e85eed23ac9ff1eb4f1445c234a137f995542699922eccb1e740c559ec450 +lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll e90cf24d7f995595111f2b48bd3775d064bc968c24074c122141aa0f058dcb83 a44f6e14da8cc760a0aae947c20ec47fff488da1e9a8dfab58b7dbc42c296fec lib/codeql/rust/elements/internal/generated/ConstParam.qll fd701710329f49b344328b16c86860effffd9fb993f7c4d968e618fab1b56262 2a65ccdc056437576fb83ac20fe583fed6b4b17aca6b2bd125d009a154ba42c3 -lib/codeql/rust/elements/internal/generated/ContinueExpr.qll d5892ce4fd708f125cb05e51b7e7a0652803f3ffe92b7e1f9ced9a9e9e38659c 4642f6138ac966981abad035c79f7190a789eb3b8ec9c63c0a710b37a406a544 +lib/codeql/rust/elements/internal/generated/ContinueExpr.qll e2010feb14fb6edeb83a991d9357e50edb770172ddfde2e8670b0d3e68169f28 48d09d661e1443002f6d22b8710e22c9c36d9daa9cde09c6366a61e960d717cb lib/codeql/rust/elements/internal/generated/DynTraitType.qll 5ae11052fbc7a40e5bfb9e6b5254d4d6a0107ee4b3b9da6603f3aaf4f8ab5b8a 262b3f1976a69b34adb3adaca1c71dd37eeeefbf10fe6389b894c8713d3fb28d lib/codeql/rust/elements/internal/generated/Element.qll fb483b636180c699181c8aff83bc471b2c416206694f7028c671015918547663 542d1b9ae80c997974c94db3655887186df3921a8fa3f565eaf292dcfdac3c4c lib/codeql/rust/elements/internal/generated/Enum.qll 29f6d078ce9b92d35c6634654d221627d09bd58521456863b107302ace5f516c 6b4709358042d2eee20e4827a16fc389835daed03ec185f9bbc9c30dd63f9109 -lib/codeql/rust/elements/internal/generated/Expr.qll b714c4d1ef42ac4010c0c325bcc0384e4b2fdf17bfc4dffee7dc847ed841c6e5 4b51b4b5ebf076259b0fecf1fb306e1a3b488557ac85134383e2a8ad23d0ed89 -lib/codeql/rust/elements/internal/generated/ExprStmt.qll cfff86fb1552742275c0b7ca244b3a554153aaf055e7884885c28121d79ae024 3b620102da074ccc3aff905a1ed79229654069cb2f2bbd59eda00633424c59ac +lib/codeql/rust/elements/internal/generated/Expr.qll 5fa34f2ed21829a1509417440dae42d416234ff43433002974328e7aabb8f30f 46f3972c7413b7db28a3ea8acb5a50a74b6dd9b658e8725f6953a8829ac912f8 +lib/codeql/rust/elements/internal/generated/ExprStmt.qll a5947ce40426114df440bc910d2f0117e2a084e8c8bf32ac9a77a4ad68acc119 bc5077b764146db27ddada71a6f1dd10c092322bad05febc3b64798aa24c5360 lib/codeql/rust/elements/internal/generated/ExternBlock.qll b92413df78a94db12870cc52d06a403c044b75b7110387118e93a1debdd9043a 7ffeff9a0dba5d82789a8c0776d89f6ae2821de36dfcf740c807d6fa0d295160 lib/codeql/rust/elements/internal/generated/ExternCrate.qll f2ce6c92410f7844502d26577c5ae397dc9652d9bf531396100e47c3de887a56 4b9bcfc8af817f26e9184347bda4b60e2a734f0e4d062f5bfd6b3e7b26d0365d lib/codeql/rust/elements/internal/generated/ExternItem.qll 851a0ebe12e73300f84a4dae213a2e9beb143946f3e741f4ada49fb49d458ddd f599e6da76f03be2cbb56b74a239a45fd074fa911cfd97bb6a466e88427e7284 lib/codeql/rust/elements/internal/generated/ExternItemList.qll 947c16a4cd479757a6b39516aab4ae84c442177e9ec7a7e95ef1acce43c6e9d7 ab7a3bb55c37956da87c6ada71e0054008eaef586498bd01e785ada5010440d3 -lib/codeql/rust/elements/internal/generated/FieldExpr.qll b120542f90e45ffc72832475ecf2132c0ce1b27ee08e60dd307dd23173b344c6 938dc1c6e3c989e5c76c4a1851a47fb73d42c742e9c0b97fc22e2522a739be34 +lib/codeql/rust/elements/internal/generated/FieldExpr.qll 3e506b5cb93793ec30f56bb637a600db869fcba6181b068516a671d55c362739 7bbf953696d763ad6b210f378f487ba85b875fa115b22c0c0508599a63633502 lib/codeql/rust/elements/internal/generated/FieldList.qll ebd3aa1139bd79324d79e19dfd463a8647d96e470e5a1298f4a21e005b856710 0f9fe87948bdf3446671c336631483049fde954d4ab3d2c262d949a8ffedbe87 lib/codeql/rust/elements/internal/generated/FnPtrType.qll 92d4142c87c42ceb6991bec97e14cbd1082a854716cc203869f356bec5dcbcd6 145b48ae097c4272782af7f492bff266448482340f6a7a4c000a032e91305be9 lib/codeql/rust/elements/internal/generated/ForExpr.qll e9292d42ebe71f3d843dd1f0baa0c40e2a2cec47ece5b49be95533a7406a84c5 ec369c4bbbb51e89e2e3f89df2a52c021aaac181509ae583ab1cbbbbda390421 lib/codeql/rust/elements/internal/generated/ForType.qll 58dd689f0dc8af9bb4313cc631056e57781cfc0ceeb25953ce63a7dc4b05fd5d 13c7677e340b54dcc0eb3c176e662f889a0640d87bcc0e539459b8bb7b5ec58e lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll 09d8929b63fee13cfb9f8a2de204cfc864ff6ead4f65c85e3cc41bff23facada f86393ec1413b7972e77173dba195e0e9d745427dd7cdba598b78c694d131600 lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll 7fe594abecbac5cdfb762741766797cd5644419e911f7c9b74ace84bcf279e45 0369b61f40a7a7b8dcdfd36dc3ee949531b49662d4903f50536f80d882977ee0 -lib/codeql/rust/elements/internal/generated/Function.qll 1ece447874e65bbccba04d22273eefed916831e62dc13bcb00527b5e999b17ce 5467c211bdcf1ac2e72cc0401f4c8b1e1235f7715025c4fbdf257e94daca6f60 +lib/codeql/rust/elements/internal/generated/Function.qll b239af1a8874802b8a311706c53d56e3ceaad7ed23a7f97d1694bf961b63768b 4bc3c23685fa05820222e472ab1cdb40a271f862727d3bd878d47de9c2e3f485 lib/codeql/rust/elements/internal/generated/GenericArg.qll ab1316af9d9c3db0c987a74bb3020cf7835ea264472b27c9a5c18d102e5f1141 02d08e22400bac7721b5424e018414f8734694181aabd26d1f5d31613cd8daee -lib/codeql/rust/elements/internal/generated/GenericArgList.qll 215c29ff35e7e834598b836a7e70bd73e2e87326beb520a6ae10e914e1dd0bb1 1778f2153f37c8977901c4d35c7e57462ebbb0bba8612020e5f40a9d71d98b4b +lib/codeql/rust/elements/internal/generated/GenericArgList.qll b8cd936bba6f28344e28c98acf38acb8ef43af6ecf8367d79ed487e5b9da17cb 8b14331261e49d004807285b02fca190aafd62bfb9378b05c7d9c1e95525fe7b lib/codeql/rust/elements/internal/generated/GenericParam.qll 3ae8f4060d578c37f4b2bcbeef16484c44fceba070f5fef569e4b84a2b0139f7 ace1e7c7c5d920a27430b8859cdcecbfc536c9ec4814c1e4a03d28b904f29b35 lib/codeql/rust/elements/internal/generated/GenericParamList.qll 2bd4aa05d99872aba5c76743edc69645890d3e93d04d8df41a7a1ea7902eed39 d23e1c7fafaaa70a2d8ced7ed2e9e8b2c4225d5b0ca8cbb8c62a17673bee923a -lib/codeql/rust/elements/internal/generated/IdentPat.qll ad4a1a539918580e5bcc0a389e8193e17ee6c48e68cff349d5bfc136f7721f4d 16fc316a4599416c72a0d3438c63beb733c4e6c8572b60a0ca8bb49794b1cf79 -lib/codeql/rust/elements/internal/generated/IfExpr.qll c07f116935646d46bc00e15c7d962d9dd70aa798fdb6d59565164e1f891e29c4 9804231a57993736617fea381be8fc2c6189cdd13eef90abd43fb4eb410e7d8e +lib/codeql/rust/elements/internal/generated/IdentPat.qll 557b2b1fe9e719ac6658c06c162f03d5925d848d7fdc4364da850e588a3ca9df 5517fde679c47c0604a0d177c53bed64f83e33e14d1b64f45e3467e3a8be77fb +lib/codeql/rust/elements/internal/generated/IfExpr.qll 3d3655fae99a338559f538c245346730ac8cc615ed39e809e7140d217ba3353f 0a58f73b8007980238a039841edaedfcd40368fcf3b1d90d890d2ef405545c45 lib/codeql/rust/elements/internal/generated/Impl.qll b25fe00b55d48ed53f3092003605e4bb383c44391f392a26d5bfcedcb366565b bca673b397702a39355e6bf30f4f8f964f9f726dc5b3f581b203b27bd0a6e6f8 lib/codeql/rust/elements/internal/generated/ImplTraitType.qll 12677e9fbc982b622ca46b78c889b816a4d924a933d76734fb74ccf22c717ffb 0e2537cc97c20d44d4ebef381eb12f278075e108d02e111b25243dbe16d796ec -lib/codeql/rust/elements/internal/generated/IndexExpr.qll 30694c6e669cf38e8f5cbc832d177e28b8100e560fee9836b99b01cbef58733e 80909c48efe7d41d78af290046ea8993f381d62bb060d380bd4d93bf2f76fcb4 +lib/codeql/rust/elements/internal/generated/IndexExpr.qll cf951fc40f6690e966b4dc78fa9a6221aa5c6cade44759dcb52254f799292d11 1572e71918cc4e0b7e028331b6d98c9db23100a3646cd3874d1915e06ab6211d lib/codeql/rust/elements/internal/generated/InferType.qll 136359028a0aaa957a3788469c6cfe95c4e51282f9ce361ab9d21fe6e6a60fd7 d494b9f9f3e03ade31a9c8ccaa212ef920d7a7ff88fcc20eb4f91bd362db30a9 lib/codeql/rust/elements/internal/generated/Item.qll f9e954d39375e9abd604a877046641f1726544e73f7f2dd6d6d35a339ad4060f 4265dc3d91ddeeec236f6ec436fa6bb09cd0ff83cfd16db02483f904e231dd45 lib/codeql/rust/elements/internal/generated/ItemList.qll cd230f40f075e57ac51b4cfaf18682de3c042c1c3aa8ab3bf516e4fa9d4f83b0 dae003281463725de231b697ee0c7b7b10c4b4dbfa641eb412165aefb11d5c4f -lib/codeql/rust/elements/internal/generated/Label.qll d156dd0553c770f7d2ad4e42f22066b0f87d2f871bc582953963c38f39716435 59d51cc70021aa58479f11b10815d735e42251e60977f6d230e81dbafe435da8 +lib/codeql/rust/elements/internal/generated/Label.qll 6630fe16e9d2de6c759ff2684f5b9950bc8566a1525c835c131ebb26f3eea63e 671143775e811fd88ec90961837a6c0ee4db96e54f42efd80c5ae2571661f108 lib/codeql/rust/elements/internal/generated/LetElse.qll 61254c4e7d2f84482b5551d065bb43aaef55a8b5698547e2e0fe8a038932050c 38736f60234e46fbd1c0f937992661f9f56b40d8be7ebf79e33f7276d005c7a0 -lib/codeql/rust/elements/internal/generated/LetExpr.qll d99c97aec6f8039a853c3aa11281ae39086097500570d051c6caa20d708c63fa 8df2c915b095576777e1db778cf1f45a7bac9c58344492e65f9df947011c473b -lib/codeql/rust/elements/internal/generated/LetStmt.qll 7a8d5194ec1dd56f707c697bf49dd2d93a0829d7ccf2447a9d18661367812c6f 73379847c1932636c27c280b928e61522b8a22ca29216c2269218424008bce8f +lib/codeql/rust/elements/internal/generated/LetExpr.qll 9af0f89b294c8a0a751317e7074fe370339563d36c1df4911d1ea082a4df77fd 68272593d1feb88990bfbd0b8c222776f085e49694894384fc6d96e9464ba734 +lib/codeql/rust/elements/internal/generated/LetStmt.qll aa1852db86ec29f857a90677f0c6b4a07f0fd965fc193d4141be95ce15862fca 40f32a37c0cc161b099fe0b4c7d713da928781d3e2c3de90db991df1d9062647 lib/codeql/rust/elements/internal/generated/Lifetime.qll 551636289598d15b6b0b8f3940fdc74193f73f42a4077c7d6ee58d0aaf349e3c 686306339fe5d2ec35a42fff49b1546f8005a51a509d354fb2742ef03fd13118 lib/codeql/rust/elements/internal/generated/LifetimeArg.qll 6470c3dcec621462f72f0423f5a54aa713e977f359dee97853f8e36147ffce67 8e12b9b24a04bc719393c2681da0dba3882c2c8b3918cf9cf6956dea3e0f5047 lib/codeql/rust/elements/internal/generated/LifetimeParam.qll 55943ccc6ed1cc8182dc782917a795cfda2270c8d605c39a41530a826cd4c4f2 6c8c6894bc91eae551af4ec88de3e20b7dfec659aee8c4b47311e6172beccae5 -lib/codeql/rust/elements/internal/generated/LiteralExpr.qll 7519f9a5b1995dee4fab795e0b972cc99491ea848f78ae8034dd9d01fb0765d3 7db0386ddf718852fc805ee7a9422fbe4178d6e3afd99091cc0bd6309db7da05 -lib/codeql/rust/elements/internal/generated/LiteralPat.qll 16b2fba1347db1c13e7fcab4a17fc50688d77799f538d604a7bc9e572523cf89 7de2b7044591d2879fe31306bc3d2231b49396d877adb16f8911695cd43439a6 +lib/codeql/rust/elements/internal/generated/LiteralExpr.qll f3a564d0a3ed0d915f5ab48e12246777e4972ad987cd9deaafeb94cf407b2877 2337c3d5f60361bd10f6aeca301e88255f5dffb85301cf36cbbfa1a65bfad1cd +lib/codeql/rust/elements/internal/generated/LiteralPat.qll ecc2bfe559abfce1be873fbf7b61b5728897c9afc3bb3f69551d8320d273da71 42196fb6a4a0ff9b570fd0bdbc920f24744b3f46772efbb46648af7fbfe1fbda lib/codeql/rust/elements/internal/generated/Locatable.qll c897dc1bdd4dfcb6ded83a4a93332ca3d8f421bae02493ea2a0555023071775e b32d242f8c9480dc9b53c1e13a5cb8dcfce575b0373991c082c1db460a3e37b8 -lib/codeql/rust/elements/internal/generated/LoopExpr.qll 8abddd3e3403ef8cd6854df07dc63962f64a4ac24450285285987a22af648b32 a822e2767a552944184cfb4f8f7c6db8741a49c05704263e4bd7c0cd4046024e +lib/codeql/rust/elements/internal/generated/LoopExpr.qll 22b755dfaf238ecea722c0c94c399992014e23481ec6fdd61f803bbec012b6f9 08731630c2dc05aa1e0ada222a6057752d9ce737329c62076708828247a358be lib/codeql/rust/elements/internal/generated/MacroCall.qll 0fdb6642a8e064e59c4fbe98e419fd5c018936a48b9447f4253ddeccf82542e5 de7c3915b84719b182f6471b32c57a2176f71a6ab7301c69215a7bf0b7981422 lib/codeql/rust/elements/internal/generated/MacroDef.qll 4d3e70503fd345203faccc36363a74aa75da5d1f32b5ac7e789505bf710867d6 3d5dc863c0d77b97610ce87c16556ead1a0a1e09b55991fabf7453678e05f39c lib/codeql/rust/elements/internal/generated/MacroExpr.qll cf6ee2d287ec1b4cdfed5bc0aa3bb2419edbce11d255b677893638b6bfe6550b 513bea7d4eef4f0d8bea5dfe7ece05f59b4e03bdfe48bd724d97d1652eb8ec44 lib/codeql/rust/elements/internal/generated/MacroPat.qll 7b1a0f02cdd9592957ba65623d392aee1eb51654a0ba024a3f09d124ee113f2e 0ea48a47635bfb9c5066b7ca4822311bef725f92950592491eaad47b771bf0ef lib/codeql/rust/elements/internal/generated/MacroRules.qll dfc1d7b91c0aa90b4c043b501f6aebe75b8b3c75f25f5645e61353739967ecab 62bdd514ee595ef80f744021d16c7d0f95bd8e52286bd226d02e3c3ce9e5f977 lib/codeql/rust/elements/internal/generated/MacroType.qll 810abd757bb55e10c9899dc79380ed7a29a76c44778b69b0504abb62a9f30ef7 f28f2585280532a5b628ad579340a998984acc604518d9693ad8f3c812d2aacf -lib/codeql/rust/elements/internal/generated/MatchArm.qll 978d2b019dde1299885bde894388e0aea0b66030a6129a57b8ddf3efbbb153d0 7ec3a2a6a691b4a46804220d1eac31d562178677e04289b9f73ab116e8cb3473 +lib/codeql/rust/elements/internal/generated/MatchArm.qll 8fb740a0f2e308782d9cf390672969cd7cf6e698e5b847fb02ae3fa6c205646f 42bfe8dd94fc24ec925fbd44016df111600f99d1216c9a698631373bb6048830 lib/codeql/rust/elements/internal/generated/MatchArmList.qll 645cf17a5d585106911b6aad573784dc5770d965e10577a1b90ed4a68caff231 b24d8a255568878c9b14f14b889e819280a244afea73f87670a127142a948749 -lib/codeql/rust/elements/internal/generated/MatchExpr.qll 83faf895e2a5517855825c1fd9e308f2f7f3664fdd87e4a77f4aade0fd704239 93bebedafc1781e01962ae3bd44c82e66a91aaa54ffc2847ace834b3d5d6bdb1 +lib/codeql/rust/elements/internal/generated/MatchExpr.qll 689d65f690fe05bc262d0a5bfe69bb4f8a142db387c5765fcc4958a9b49989f8 2979cd2017d0538870d17b2b7592c75cc05b706bd36c9de3e5dc38fa3a957e5b lib/codeql/rust/elements/internal/generated/MatchGuard.qll ffc296730932710f0da0332cd8563f6ac1eff5019e1625a4ab7dc722755fe5a0 f04d4d5c7ab5ea53b461a690ac6f13174aa39daf157788649bd7814df5b07b11 lib/codeql/rust/elements/internal/generated/Meta.qll f729fe8541204780f1e3827fc81b947023b06400d912236f673505ec8bf3d654 70b13073d38beeafec59a37fc25bf9d6bf28493f147333d4bb8a0028b3a4d345 -lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll b51e72bb078e8a9c79eef9db875b289fbc4781ec75aa6217357cb3927e5c9375 dca2457490758422f49e5590aaee2848c521c2c5218952dc97da8b7f0f1e57cd +lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll c2d6faf1f840628dbc5aa59c90dbd8b244f6bd4a7dba25e410047fcde11ff378 2d0251b095bf15b0275d493efdd1f9ce0926a3cff6671bb550a7a672aaf62a30 lib/codeql/rust/elements/internal/generated/Missing.qll 16735d91df04a4e1ae52fae25db5f59a044e540755734bbab46b5fbb0fe6b0bd 28ca4e49fb7e6b4734be2f2f69e7c224c570344cc160ef80c5a5cd413e750dad -lib/codeql/rust/elements/internal/generated/Module.qll 2ec10715d2b372368f698f6262f4c9d06958c7a9dfacdc73d29cb2c5f624643e 34e92b85940e83b3eb356f51434c60d36286ad4af560ac7feb4a3bd1db74a9b7 +lib/codeql/rust/elements/internal/generated/Module.qll ebae5d8963c9fd569c0fbad1d7770abd3fd2479437f236cbce0505ba9f9af52c fa3c382115fed18a26f1a755d8749a201b9489f82c09448a88fb8e9e1435fe5f lib/codeql/rust/elements/internal/generated/Name.qll 9269c6eba59ac706b2efaddf9300b107f67ac5b5ac50868b57519102195b27c1 e02a8ae65999e0d7527f0036527677050b6d1e37fe9d044d908d831703cdfcfd lib/codeql/rust/elements/internal/generated/NameRef.qll 8ceff5552a2c1b855c389d69e23db3719b0f4046bb540113f6c1bb8a34d98f41 f86553b63fd62c534cc1aa8167341bfabd7d13d926213d1133a89547d69adb73 lib/codeql/rust/elements/internal/generated/NeverType.qll 50433d111288dbd18d12c74daad963f6229166d6575a7d8828a8e7dc933594cb aac974c8338634f8012952f8af1b45cf808e9ba78ae9f2154c7a5b6173380e3d -lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll 487343ffb4a45666b85ea3b0eff07ce903e022867c5335b85df6e4b3f22633ff 6f362381f5d847964e3b433e90760360f00167c2928726c9f72a5805f6c99c66 -lib/codeql/rust/elements/internal/generated/OrPat.qll 1191b21950c8955c63e54bf42012f2b21323e4d1894c5a4a3ba73949bcc6a048 2c385fc397a02a50944c57ef90d3f7db4445cecc068e0fb7a3dae3731bf6991d +lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll bb17a1e1d4332225cf4bbbae4a1bab9302c2d81d191fe835f2f973915d40dd2a f9e73210b81992040a5a5a9ac3ad936159fb3475445f130c7b28f83dfb4170f5 +lib/codeql/rust/elements/internal/generated/OrPat.qll ee0487b90849c3e2a836c956ae8837f27515a9dc795bf17287cba2cf7a39d839 35117b6a3dcebab09f12665441332b6863200e206679ee97894170dd9ef7795c lib/codeql/rust/elements/internal/generated/Param.qll ed78b4383e95ae259ded868843b48c27c6015809a9707cd9a74c298d9b622896 e8e0e253cdbe735766b93b99a9ecec5d5d9c6c2986cfc64deb3f683bdb084583 lib/codeql/rust/elements/internal/generated/ParamList.qll ff7f9c67d1d85a48ad2a0c6027011414682caf84c1bfeac4f0d98289dbd8cc5b 13d4dd1bc8c3d04547905dd1e4588baa15f33e85c743b3e09666a02f58cbc941 lib/codeql/rust/elements/internal/generated/ParenExpr.qll 2b16c61f9efc534d182be3da010c92e2ec9ff12b1b0252d4d90dc9cda3eb3a28 cf487691c5badcf389ea110b15bbc74797194d3251aff2fbaa8eddd7959471b3 lib/codeql/rust/elements/internal/generated/ParenPat.qll c79ae30c86d401140d44ff574166b547c5f73a6fb73964eec2e1797a36e43b4d d80595a9e85ef0d3d9543049a9d1eb31c21f36d8fe3b79480f87c4514c67b67e lib/codeql/rust/elements/internal/generated/ParenType.qll 23a22694557ba1faa2f87ad77511e74850bf3abb6569cb179944a94c40a18233 5a2a9503092bea581b4117b38137533da7f2a31be5b1512e5f6444c191962436 lib/codeql/rust/elements/internal/generated/ParentChild.qll 62153298532ad8787b0c02df71c1ac4076db75d519ed1bf726f2d71dd5d7ad68 c57903db3133f8e251991cdf9c9c53398ca5e0536ccde5158b959487c05f7856 -lib/codeql/rust/elements/internal/generated/Pat.qll 006d7a3a13ed7831afca4a831883047ac82b37f5cd0592ff9b08d60b82c5a0f7 a891211a8b608f850c7ecc155ce6d2c633f9ffc7559a5e73dd69266e10c08548 -lib/codeql/rust/elements/internal/generated/Path.qll 9df863c3ff5af00f402c6d9a4039db607ba71d633709fc3c483f87b4611bdd44 009a7252c221aae4e9be09a8ef2e09778e21a458f8aa5e431ed4b2b63b297373 -lib/codeql/rust/elements/internal/generated/PathExpr.qll 6fe87f13ceb7c12a8a1c26e0b5c9a484dea18566dfb5a48e557a9722c2034ea0 18c75182032e5bc8edd462f91636ddf4193a84b67c81ba13d4058beb9135cdf2 -lib/codeql/rust/elements/internal/generated/PathPat.qll 34446b975f479de888d377416debb12273737f193abd85e9950c737b2b912db9 00afe73becee1211596fbf345afd9c25555a0daa5e6c91d9dc1713a31f2ad817 +lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 +lib/codeql/rust/elements/internal/generated/Path.qll 299abce24762a5ab023f3cf1ab9718b83047e171aed42a8092e7a155914b1657 db1a23d18640c548f08c9f94823838b5e019ac85877c7b15df2d1493d1846572 +lib/codeql/rust/elements/internal/generated/PathExpr.qll 17cdb0a7393258a207450f08e37178fc9d35d167f064ba6015be94246f3dc933 a75fdd280aff6d87e083a92030e041c2eb52b57cf7151d4a6989fcd31d6a64bf +lib/codeql/rust/elements/internal/generated/PathPat.qll 98c9938d6a359fd717829b196eb09701d2c798e18c1f43fa7b2a9145afdf6c19 caba2e629cae08682baac90a76ae9a48cda2d7d6f9c23d506fa0ff3f292978a4 lib/codeql/rust/elements/internal/generated/PathSegment.qll efb651b099cc6e26bb7f25e37ada698a85196e4298b20d8165157ec8b7f2213a 7e4c60588f547316f7dc4f74fd7302e78c080a6eb704063eae03b14eee0aefec lib/codeql/rust/elements/internal/generated/PathType.qll bf8332463698fdf2c77f440ddab58d563dbe9d2862eb50f2af5c7f598245bfcc d586d81e8a3a08b4815b182d09a256a6c4d3dadb30e159384fda4f7d6e02fa5d -lib/codeql/rust/elements/internal/generated/PrefixExpr.qll e7c76ebee4504a82abd5d0dd81348b7b651fbe47bea307424cdc2320993f0bcb 4fda721fc27db2361fd6ace9b7a3b00e7efb9d43acd049bc3ce4e4e462108fcd +lib/codeql/rust/elements/internal/generated/PrefixExpr.qll d723079487d2f648121721dd5e43436e95efd9b0876eee39c0d5e044269718d3 20e5fed17709435245d946e9e0dae51a29d879e66c5dfc21c3140f801cde47ac lib/codeql/rust/elements/internal/generated/PtrType.qll 55e27062bb52ceeb7e43d02986895f5646c261e51586d1d4d007df8aa6ea4624 607e8915f4cbd4db38e4b147c41536f646dac00a28ea2833b2da255088363f2a lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll dc03515d678ba052c2ff2dd9f0883e0bce54cac740ba9a15e5173f292c1b6971 dc03515d678ba052c2ff2dd9f0883e0bce54cac740ba9a15e5173f292c1b6971 -lib/codeql/rust/elements/internal/generated/RangeExpr.qll 070b3ac06474e39e0cc52afcb8396367e8df8986271df2d2064639917358df84 b9a4d3b6da61f25fc61040708f01ed24438c70c2237ffc31dc5f615a963990cd -lib/codeql/rust/elements/internal/generated/RangePat.qll 6383449e3630c6ac3c410f096ec67037417aa3593c5846529ba033e3bdcc0ca9 3e74c9e07ac162dfce5ebb3c25e48d6f82b01a90e281a22adb5bcab066e3fd2f -lib/codeql/rust/elements/internal/generated/Raw.qll 109d99befd273a926bb344753be8c579b8b36a6d25ae8fbd1a203dbc54159dfd cc787bd54388b6a0c4d7589058c34b4cac593f0d2dbbbad09feba9f2ba9aa7b6 -lib/codeql/rust/elements/internal/generated/RecordExpr.qll 2bb4ef1bacf9670fe4cf1e5be5dc45f1b787f0659e885f8152b5d4284f9d2975 991e9e6a2e68f3c066fd65ab1d9d5fc8065c70c80d76c7ad9cd52b0677528f68 -lib/codeql/rust/elements/internal/generated/RecordExprField.qll 81bd5f571ac021117c349a50ace92937a62df89cdf7eec10bc9a7db0699b015f e3c90ddb365820c81babf391407dfeb5f5c6a28ce781d81934e42445ad0c0531 +lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9 +lib/codeql/rust/elements/internal/generated/RangePat.qll efd93730de217cf50dcba5875595263a5eadf9f7e4e1272401342a094d158614 229b251b3d118932e31e78ac4dfb75f48b766f240f20d436062785606d44467b +lib/codeql/rust/elements/internal/generated/Raw.qll c9b1e59237692c0b65d5e3d6a230cefde205be1b26a76170c63c6d7308ff468d 5938446ce1ac3a8c60321a709f79558f08f5e1b797a453a2b38e9a1e7ea5419d +lib/codeql/rust/elements/internal/generated/RecordExpr.qll eb6cb662e463f9260efae1a6ce874fa781172063b916ef1963f861e9942d308d 1a21cbccc8f3799ff13281e822818ebfb21d81591720a427cac3625512cb9d40 +lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1 lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll eed92ac7305b53090d12eb64b882815f10c862dd35c6b6952c44676a4d992d0b 22ef8801700874012f3c67449f5a80e694fb8051bf622f7e99ddc7d181260332 lib/codeql/rust/elements/internal/generated/RecordField.qll 9e9af45a478c446c44b4c9b73300a0b5d99324cf2bba9f52f94a494aac52f672 7e939c8525d2d6863f6090b0ca4883a3282f0c43fc62639026e05b46c6299c1f lib/codeql/rust/elements/internal/generated/RecordFieldList.qll 925b941cfda35def43b37a982e5648f45497a3b6e4805cb2a8bd7b8479f97d6f d0acee1c40e16435a4f45b6c2d834eda308c49d7bc4a761d0cbee1e987f16d60 -lib/codeql/rust/elements/internal/generated/RecordPat.qll 4c5c4d216d85b131113ecbca9e1bacb4dcb9fdd2d7fb75ac8a00757685e0afea 66da55f88774d831a94547053defb0d343bd1330b543e2bc8d966ef90f00babe -lib/codeql/rust/elements/internal/generated/RecordPatField.qll db8a0a45e9a24e062687339d9800965bcd8d53e7d82674969af9d17507f63856 5e9f5406494b708b020199cdde5869c0341fd7ae01e68eb638077c5ad678e9f9 +lib/codeql/rust/elements/internal/generated/RecordPat.qll f5f9904fcd8b8fa5fe65b46a68f830021a5e4a68f95ff403151565c3ec770477 56294ed2ff753d8be7742a501b15b5f3f5f20afe0f8171ee6771d049f26489e4 +lib/codeql/rust/elements/internal/generated/RecordPatField.qll f17b1aa265091fd8309fd90d5c3822d170870e304f160225327de5a844a9aed4 0458e39dbe88060b4b664692cf0b41ebf4364de268d9417658c14c883c9c1b33 lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll 091843c79f5a5f311d82da2e6b3c4927ece8adac379d741a65fa382f598776ad fcda9a27dbd830b1280df231347a26ee841309d2161524d2003b08995f209609 -lib/codeql/rust/elements/internal/generated/RefExpr.qll b15c820c21b2285a35fc669d8df48887688602f36e47a87a8771d659bbce27e1 6a4ab6df06dbc1f7602c0a93b1062659acc6c71edd11299f3ef88189f7c3e45c -lib/codeql/rust/elements/internal/generated/RefPat.qll 94db972d0879c6f10b5d2223d95109e7ee4c0394602e54f0733dd9e0aba6dc0b d2933b5b8beef7057a01299ce120cb8585fb72166574a3ddd69a44019bc0cafe +lib/codeql/rust/elements/internal/generated/RefExpr.qll f75a9550456e8b53044d0aa94b69148cb04950273000ac19eda57a836091670e 24ea42dc26b6b84f5807959e787a0487b7a33ed1f20c24d34af2799110a1902b +lib/codeql/rust/elements/internal/generated/RefPat.qll 7483fcf9bf555a0ca60bfdbb91fd1c7344c98cb60506469cab24fddd90450005 b233f86eec76a3916ca5daac4812083f452f26089cabc13811a5600862ac1832 lib/codeql/rust/elements/internal/generated/RefType.qll 69a50e86d2888e34e1fa890bb3b9e97a6e43629eaa0b9fd3f4e5e1f17cf4ea8e b62db90677618bced85937876cb99ae6ae499460b69db5a89407f64239920258 lib/codeql/rust/elements/internal/generated/Rename.qll 9b6288e058229406ae9ac3574cff29ac79cf60149f7969249e73c26f2bc622b1 abf96eb6b15b8aa8e51e66d526c20c71fdd4e6375354f3dd597f04c5cf56d6e3 lib/codeql/rust/elements/internal/generated/RestPat.qll 55aa7afd8675082bc879458205a18c73234332797a6ff9c3ea8de7af1cad7182 902230cb2818bbd44390c67df2e604cff913b6afdc17ca0aba2c3b0f19fb2836 lib/codeql/rust/elements/internal/generated/RetType.qll 3efba9799e12d4e4c21ba8e01ca3a6a905adb7af301d1ed0209699cdb77a3cbb 878b9b0e1a013de26a23b3746e03dc2c0c61d7642e3390f15701bb4001408a55 -lib/codeql/rust/elements/internal/generated/ReturnExpr.qll 46c194907f0f6598988e79b6519d9d0a19956fe482c93e6b0b9a4a0d72d43e7f 7e51eb5dc1251c67ba0afa8e70a1ba6862371aa7b6918126638e3890725d502e +lib/codeql/rust/elements/internal/generated/ReturnExpr.qll c9c05400d326cd8e0da11c3bfa524daa08b2579ecaee80e468076e5dd7911d56 e7694926727220f46a7617b6ca336767450e359c6fa3782e82b1e21d85d37268 lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll 423a15bd9d6f427ca06134e51ddfdb23a7c29cbf275dc55bf1367bc63bf73e51 e0492b85d829c0fc5c40f553c2c598a3f151c9798e517717575baf693636362c lib/codeql/rust/elements/internal/generated/SelfParam.qll 39f520f8a72d63baa944d77f22134c3ea40277b4cd15af5bfc484896650c7136 421cb0ffc3d7d1c4d5a0a73094f4766701c1471afb7bf19e17eef524636b6ac9 -lib/codeql/rust/elements/internal/generated/SlicePat.qll 9b330e396a1721f8bab5326486720debba2279393a88d401e0afa6397e9f48d5 9012f47588610e19c816de896633578ee089247d6296c5c2f44c69a7930940e5 +lib/codeql/rust/elements/internal/generated/SlicePat.qll 8b1463758d7b15a0303384c8136a48a8e71ce27da4ba6e421272b9751a988e64 7562d47308f197bc63ade0f114cd23a17e7f60fa696716f6a30fc7b7411642fe lib/codeql/rust/elements/internal/generated/SliceType.qll e007b3bb897454c5a292c7846b784b9fdf92126f3447be6c7a33138390a88e50 86164f1ae9b8eb622c589d97c07d76ef53273cd68247fe0d6d261b34195f951f lib/codeql/rust/elements/internal/generated/SourceFile.qll a7670e531ad818f273b6bd3e0c581d863420a745a5572792002764e376e912c3 cbed30f759fcbbb348da4c1c4e0e1eaddf2eb6368bcb2d203eae275c78c5eb0a lib/codeql/rust/elements/internal/generated/Static.qll d2e643b301409f515037f445f29600cfca2b97c9d198c869ef4f71a5a86e1c5d aae164e6b058f464f61225fe8ad19be3035d12403b926a17ef2c73e50243ff2c -lib/codeql/rust/elements/internal/generated/Stmt.qll 960e85930e7b1d75f1f0874609d8d841096f6e3841a1a1854c84e28b5bbdf95d 577b98a72a3bc87cf8c4cc6c2ee0b4439601333297db15c4d116b124c31a2ee6 +lib/codeql/rust/elements/internal/generated/Stmt.qll 8473ff532dd5cc9d7decaddcd174b94d610f6ca0aec8e473cc051dad9f3db917 6ef7d2b5237c2dbdcacbf7d8b39109d4dc100229f2b28b5c9e3e4fbf673ba72b lib/codeql/rust/elements/internal/generated/StmtList.qll 1cc19cef831648b7a9888c9dd5cad173a1bb37269469d74d433dec89351306c9 da5db9a60c7851bfd9aaa8f23f92470f49fd93d140e060c0b6b2f8e9088b148e lib/codeql/rust/elements/internal/generated/Struct.qll 55238e18dea9c861a3f8190fad9afe2b601d4ede45df1d5f344329928d312122 8afb6516367a8470ce818120b69dee16bc2f4ecc3a8f7a51b0af4190e3a51712 lib/codeql/rust/elements/internal/generated/Synth.qll a5d3868a9c6fef100ef71aed486db8ee3a38b122659531f95270f54dbae087f9 922ac8372f274090881b5ae462af8624f1136864b1f93f3a8de52e47f5cce7b5 @@ -578,19 +578,19 @@ lib/codeql/rust/elements/internal/generated/TokenTree.qll 8e5a519b7e8df18a0002fe lib/codeql/rust/elements/internal/generated/Trait.qll 6c841ff68aa7e8b15041b8dd005dc282b4abad7cfd0ed6525bee103a1e84cd0f 9b45005dd7466e480e4a34bdf033bf94966d71e7654debdb64091f5713caae19 lib/codeql/rust/elements/internal/generated/TraitAlias.qll 43d8186b6f68853c743286a1f0128b3f871adfadc014332aca7ad67b1e361d16 be292b7b49928bcf7a07ed92ea79a185f5add9a9dd018756d3372aba0f887f15 lib/codeql/rust/elements/internal/generated/TryExpr.qll cc3572fffabba8502ca0f09d7051fe18e5e56c76eb1e22e563d3cef498a42417 53fcd5c57e4929ba985b10b33757bcf287e01792c062db57cdd3bc62bb00e7ce -lib/codeql/rust/elements/internal/generated/TupleExpr.qll a291fa486d797230a78b7469a592315b172969ae1bd3b3f4895ac89ffe3e44b9 301eda50938f9170ee305dba2821dbbc2fe16e7ba1d0f3b26bddd959c7a347fa +lib/codeql/rust/elements/internal/generated/TupleExpr.qll 75186da7c077287b9a86fc9194221ab565d458c08a5f80b763e73be5b646b29f 0250d75c43e2e6f56cdc8a0c00cc42b3d459ea8d48172d236c8cdf0fe96dfed2 lib/codeql/rust/elements/internal/generated/TupleField.qll d8704db5c3c09f3a0146bd88f149d7c271c4b31f70aba69ba526ea5fa9bf76f4 fad6f0b60aee223ea900accf7b434b49881a523bb2197c3e62661bc620ab72eb lib/codeql/rust/elements/internal/generated/TupleFieldList.qll 25f2afad44f4bd86d44a781f9c37aae395c8fe10c1c6b0efa1c4ae3f13964975 13a6677f5c626818a0853878c7c338adfc74719f0aecc8da16584f9873cc533f -lib/codeql/rust/elements/internal/generated/TuplePat.qll ef46756db8fd15dcfb99b417330c0564f04f02853784116fccf83445a1c112c0 0b6bd93921ba25f95111a83cb132125fa4be6b8e6b0b94a0117f575d64cecf5f -lib/codeql/rust/elements/internal/generated/TupleStructPat.qll 29d7310c1f309b78934d7b8640a802d1c0c2dce5d41ecaaa286be848e1b269f0 cd6de8c9105848127a822c3f01648411471be5dd12d7e5f2f76e5c81f43e919e +lib/codeql/rust/elements/internal/generated/TuplePat.qll d61163a380f3f2c1709080e2df69a90764509af060e607e27e832862e4dae18c 108b7db493a21fe1fa0db99fceee952aabb0a128eac41e050877ab9136407403 +lib/codeql/rust/elements/internal/generated/TupleStructPat.qll 87e0acfeb51d48c55648d5af783f5ea006aaeccce990ba26458c6935fbdf7c11 7c761e66ddacb51307e653c6ad45bec3fba8315049fbe6c4503ed19241204d41 lib/codeql/rust/elements/internal/generated/TupleType.qll bdf7ef010405f5c4e888bf5bd5f946c755fbf84af3be0cb802b84692c3184486 a1508000050ec96a92bce5a70610948a51f6b5b9be69e9b5d5bcaa57d24eea7a lib/codeql/rust/elements/internal/generated/TypeAlias.qll f2999fd1a692130e77e60db5fdddf5298884769fa0655c3478fb61ed06c11821 b394fb46c755a1170b39ef19aa6944d70f54880fe5c9f8061c661b8d724ba368 lib/codeql/rust/elements/internal/generated/TypeArg.qll 074cb3ff177f1d8cc08053c379bf4a19d63c5434270d6954439b1911806838b0 91da3cd1052c9d5c83b08889808bdd7f4409221241788e0e0a6854e16672cfa2 lib/codeql/rust/elements/internal/generated/TypeBound.qll 0f7c56054d08c9128428f7b44ca0eb49f7c74678c9a19359e58744275944ff13 2a6fcc9ea2c10eeeedf9c101155866e251a7ae8cf792f4558847bff1a15af224 lib/codeql/rust/elements/internal/generated/TypeBoundList.qll 1ee71cd9281c47d2950bad0d30476f04251a053e1584d9ffc56630e83ad11834 23f04a00b7ee221a426badaad1959c7a04b46a502e434adb64d46f882cedd435 lib/codeql/rust/elements/internal/generated/TypeParam.qll 85b22de3b0a520aa73ef464559388341c1132eda0e1a8a68a7fa7cdbb4c2b3c2 e575950dd3a0c7f12965db1b9516c1ce828276ed3a3b2be3272edc06af929fa6 -lib/codeql/rust/elements/internal/generated/TypeRef.qll ee4ca60dad4f3f280f68e5914a918eb06d282aa0b879428b0a65c8b42778582e e1807e78ef5225cc5271c7037f31312b6dd847f22a7468744a9d7b262b212095 -lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll f10d3935056b511547490d29ab549425c745fb4563ca5e2609e7f702132a3065 006ad35941df178c85da475fb1965af87e82466033fd524102f07edebb9602fb +lib/codeql/rust/elements/internal/generated/TypeRef.qll c4c3bdafe3deb05338f5031c798fa6e72b58301ee7737a785314e72c9c4f091c e6ec0c680bcfe61ff79468de485241a75fbd795b2d501004324b66b003fddbce +lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll b3780c99c5d57159bef4c6bd2fd8ec44ebd1854c892c1ca776c740f71249e58c 2fd451cbf0a779e8042e439882e7d9cadc19d1e596df3bbb086d16f2596407c7 lib/codeql/rust/elements/internal/generated/Unextracted.qll 01563dfd769d6dc3c6b8a40d9a4dc0d99a3b6a0c6725c180d2bf4d7633929a17 a93ce90f8c03f4305e59de9c63f089fc7935298fc9a73d091d76933cf63e790c lib/codeql/rust/elements/internal/generated/Unimplemented.qll a3eb304781991bff1227de1e4422b68bf91e7b344e4f6c9e874b324e82a35e60 6bc4839fda3850a56dc993b79ef9ba921008395c8432b184e14438fba4566f21 lib/codeql/rust/elements/internal/generated/Union.qll aadaf31598f7c0569e581cdad1b42782fbc8a2d62f3ce9d9b9181790ddcc872b c49923c6bd694105ad8dd401e44a4fb0fcd1f0adead4a4efe7fe853cc6eb6abf @@ -603,115 +603,238 @@ lib/codeql/rust/elements/internal/generated/Visibility.qll 25d4070c2018a00f91703 lib/codeql/rust/elements/internal/generated/WhereClause.qll 9373648f2097cfa1b008aff6264fbdf7a2ffd23d5fc4a48eac9e555ac5ca8b8b 81275c7b63f9327ddde9cd0c838c7524b107d467ffaf3ed2bcf93ae39cb3b158 lib/codeql/rust/elements/internal/generated/WherePred.qll e221e0d5c42e075b0c8b5b8440fda499f75bff6a4810f42154b002e3a5e569d5 703b726d858f1373d8de2471ac696eaa2f564b851247a1e3349409366194aaab lib/codeql/rust/elements/internal/generated/WhileExpr.qll 94c22d2bcf1e33023466cced2aad307d11e529f4167d8a1358a77423b5e4283a 06a18e476bc44b68316bfa15a45e68198e6116827a58f932e07275d7ebfa33b3 -lib/codeql/rust/elements/internal/generated/WildcardPat.qll 4ad8b12ee5aeb5d292f8d2e4fc1313a95d97be3a97925a6bcf91458a5a0ec968 9e8d55e228b9db6e5d16a207a3101a7ce92ecd0b68fd7b5de6ab9c1b5a03d79d -lib/codeql/rust/elements/internal/generated/YeetExpr.qll 056a028398c4e6dc1e90c81419a6cefb5f1cb52e85cb21f891b1527de3ca734b 6137ea3f96dd80a1bc592f98f51c3369814784146d719c285895a027b8bd6dbe -lib/codeql/rust/elements/internal/generated/YieldExpr.qll ef3de99ea1c0e0a5830651964d8f9dbaa5839a368f36eb44cddf72211b1442e4 a80f27d6b5548258b03c32823583a015672046d26cd6f81e1303b9e4871ffac6 +lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499 +lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b +lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85 lib/codeql/rust/elements.qll 881084ba8191ae735ffc905d7d05aadb82739aa0887282a226f513f25c790e88 881084ba8191ae735ffc905d7d05aadb82739aa0887282a226f513f25c790e88 test/extractor-tests/generated/Abi/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ArrayExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql fd4e504678714c99a987069e5013bda04313573cec2bab31b74bc4559bb73d7f 0b63120b61964a215ec451793a1b5aef525882484ad62193d7635b5a370881d4 +test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql ce143c8b416c35270cca839848baf6d8cda74251f3717314e0f332fcb74a9259 c86d282153feee3facad752ed0fc1638be0cbaafca4ec620f337ad61b694cade +test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql e8b7e24db6fc6098131fea1053430920b2e2f33d2aa52b10d2ff29b9efd70a88 a52b6b2476104695b395d86bbd1a99068372ca56989ea94b150055e664ba034a test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/AsmExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/AsmExpr/AsmExpr.ql 1273efcd8aab7de2a04ead74075d25c8a22afc9f0e6a3fb4322e3508a2cb6f84 cdd5389a269c048f56afaf3e93a0fb076ba1f445d6dcfc6621d8a324cac2f421 +test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql 93e644147ddc4de00c882c32d17ff3c22822e116b67361d52217619153b7d4c4 4c0c3f72707f41e879426ff75c5631e9283dc0507316740bec22216c5feb04e9 +test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql 4a37390e948fe336b592342b0c2b63afeac3000ce1416f5875cc9b0ce5a826e4 d32df64ddc3ce1b0536018ddcff30a24d9099c67e6bcbe9a4693ffb6e478361d test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/Attr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/AwaitExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/BecomeExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/BinaryExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/BlockExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/BoxPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/BreakExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/CallExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/CastExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql 8dcc94a553fbddf17dfc619fbac563a9dc4fc6029860e10703e9ae9765d9ab66 52e7f0c98e6ab5dcef04b2ab5283ecde76e61a2297aa2080d16998f93dc923b7 +test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql c5ee1fc6017c4432a59dfec7d10d32681bd23f98cac70bbe65bc2aec8a680f3a ce6cf93c6305e6585c9d452bcc23af9dc8cbe2c872d2af5238a54c85df2071ee +test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql 143158284c8b7cc40fd2fa47c0bcf3f137ecd080b830476faca0c950b97c797c 0c9f64ce70cccf90fff7e7e9602f8ffdf68535d113914aab24f6450505b61d10 +test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b095c87b128d667f76585cda671173808130df6d094ac7ebcf89fc345d7908f4 aa3f1caba1cc7a40a0903f91458807e9ac9e8e9f3f5688acea061cebc8a2ff07 +test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql 88c6342cfaa4d199a6c9f69612d3f783ad48c715c729f4909d563e032ee50be3 d90c139b22bf7350f9ae32b8b3ae6c19bf190fb2b4d5154b845f2252090fde32 +test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql c8942270a2ff2b1b5c9ee4319185f0a8f1f8acb39eb825029c02a2457a8cd641 fb4c910ab658404869506718e18a5c8097629ba56111329552abbf429df0a324 +test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql 1c36f72c679d4c0e7d0653bf5f7b70e3019d68e9115645f6db61f6fccabfeaf4 890b64875e44a73eec0d7c905de3363fffec3468171de628652b5066a4306bed +test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql 26d985ac4b668d78d2fefc6b5a37f2dc334e4c5f8511dd14b89014e2ef5c3b07 4546dae1816b2618f8d881e0ca8eaa851c768fcd994f3edd3285a3880878177c +test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql c3f19d8a60066ad6b1810291a669473c75b659cd2f6ac3ab9ed3db2203d4145c c05c5e0226e30f923155669ffc79cfe63af1ca464e8dfc85888dda5f7049711b +test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql 33612159be1c111e3306009d0b04579450fc962a81119b6ea4e255d3c409b401 1a0995b298f50242217cfef81dca8ac978e19e06f90a5f4caadcb6f84460fec2 +test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql 3bcd36b678e87d5c29a43b69c54c80468a89aefa7e69481b48158ae794a53160 a629dc1472b3f6fd7c608ff760e83d8e1363db81dfe9a4b2968690c2ba4925ca +test/extractor-tests/generated/BlockExpr/BlockExpr.ql 45aba7a94638c343b05560309ecf11e436b1265565072f1cba138bac804e57f2 6d556c1d1f6ac58dc93e542930940f127a7f69181e39275afdc6852d90f12a23 +test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql 15d4d9853d3262ce6ec629c075c60a76eb112dcafe34b71df0e09b39282223cf 792c498bc7079bb5b93034b8a87db3b275a591d78954e844821aeacffe4258ea +test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql de3c28a2677ed71ebd95207aa43ce270765f7f556283f095f1f6296622b80cbc 414ebbb2bfbe4350f933fc3d3636b49a6bb8242e200180780caf95ab8523adb0 +test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql 8c391dfeb69bd92c547a2417bf231cc960a8f34845802722214294728772316a f3e847fa594e9d9cf25d09a0396a10176aad1100c1977a24756ff6287a79e69e +test/extractor-tests/generated/BoxPat/BoxPat.ql 228052e5303f523797994232b1b762c26ce29bd1e38b49d496ccf04090b97c00 6501e816dcb8839b9b72c6ab231db449b8f7779e5faadf5a8c5be81f53eb001f +test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql 7372e29737d968820108211612ed880f3e13084992419f5b52eaddf4bbfa874c dda2f412fcfba756604c03b766e9bbd17e6c2141b2d355fc0e33ec33573ffadb +test/extractor-tests/generated/BreakExpr/BreakExpr.ql cdde2855d98f658187c60b9edc2aa36b1853270f3c183a37b11801ff24d22a8b 687ec032ff86ee21952d2b95dde93fba026a09f6f39a284fbc6e9b42647d80e3 +test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql c7690a9aab1923bf3c2fb06f0a1d441d480b3c91ee1df3a868bbbd96c4042053 c592dd077fb6e22b2d6ddcaec37da2c5a26ba92d84f5d1ae4c78a615b9013765 +test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql 0358f4fe6a66da56177703cf0e991042729c5e34ae8b6dccbb827f95fe936c72 1cb2dd778c50e19fe04c5fdf3a08a502635ea8303e71ff38d03aa7dc53213986 +test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql ad83cc0db3c0f959fef6bb7ce0938d241a877e8cf84d15fb63879be2fe47238c 240b2fe2156b763d3a82fc64159615872db65b65ffb9ba2f3fd5d1ebd6c60f34 +test/extractor-tests/generated/CallExpr/CallExpr.ql 69d88b3c799f6e81fe53fe04724ed6c1cbfbfcc21023dd62aed3a3f852c6a2aa 0caa94802919d30bf2749d8a1c58545163e2b1cad5490f19158b5e5063806443 +test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b022e7b6b6db9932e787e37b7760c6a09c91140a0368940374a2c919688e0488 c20849c96b53c96f6f717efff5e8b4c0e900c0ef5d715cfbaf7101c7056ad8f4 +test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql 1ace458070875b9ff2c671c2ee18392ea7bf6e51b68ee98d412c8606e8eb8d33 4c35da8255d2975cef4adee15623662441bb8f2e1d73582e4c193d1bc11cc1b5 +test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql f680f04423ece282c459d5908e5aa0bc43ca072ff0e605587dfa94210da1d06d f8a709015b8317b8e2dcf3b3ee9370e2c3a655ef7e3c6034b1b90f4d75ebdda2 +test/extractor-tests/generated/CastExpr/CastExpr.ql 2ffb22ebc6e47953a49162488b3605d36b9d89330b1e71187066e7bbc40a22ad 7621a39d49f573b9862b9a4e1021d53205670ee59b49e4d81128637926f76485 +test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql 5d5d98172e495cdb8b5cea9d6588c4c245107b441464e3ffd6c27668af11ab4e 5820bf083aaa4c3275004a2cd9eeecc4b45ab96916cbc0655a1b42611c540715 +test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql c37186b8f3e3dab8ae28c0da7263ff7272c40501beb16736ec0fb8990d285e22 59d50d7349234afcf84986b7570db9dcd342e16812f7c46199d4736cdfa5462d +test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql ad5d6e260e1495ba360bd2ade3b60f09705a86a08d618acf8c4aff342c8ee200 c02c1dc65ba9160bc28827e40473915de5403bdc91c16d9d8b6778aa97314a1b test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql d79b1a60e9cd4266f756872f44363d062e8030baae9eb4b1dbaf9465ae88f0ec 46414e0aa4330a42f67083bf866a360fb5e2b234b7df5564559285046311e8e1 +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql f7f803afa4e2a5976c911fdf8a91ec607c2f998e22531b9c69a63d85579e34c3 1296acd0fb97e1484aa3f1d5ba09d18088001186f3ba5821eb3218a931ca0d54 +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql 22a973a61274e87620e38338b29beef395818b95a88e2261fff197f7a78a8f76 bd28ed426e4d07823044db869aa8022dc81e8599d156e3e0e7cd49be914a1f36 +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql cbfcf89b8efb5cb9b7bfbea26b5a78b3d4c7994cbf03d5ca60b61ee1b5cb4be5 621431277732ef79c585cb0b7199c49b14c597ee6b594a70d9e6966a09d40a9f +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql 68ce501516094512dd5bfed42a785474583a91312f704087cba801b02ba7b834 eacbf89d63159e7decfd84c2a1dc5c067dfce56a8157fbb52bc133e9702d266d +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql c95bc7306b2d77aa05a6501b6321e6f1e7a48b7ad422ba082635ab20014288ae fe72d44c9819b42fff49b9092a9fb2bfafde6d3b9e4967547fb5298822f30bc3 test/extractor-tests/generated/Const/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ConstBlockPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql b3e1f8c54af03af3cfe16dcf1831777404e360058f67acc4453c0d4211897d12 6f842cf96153219c7ab0d7d04db9a52b8fec71996d527bce69acb6678e437861 +test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql cc06e762e1652e467c7cf02c34f17c621fb3a938f294ee527fa04ed78c8701ec f863f8f6bfc9d169b585ae56b4e4ac0fc1603fd14775450e950cca4d5ea28e8a test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ContinueExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 971ccb238aec663855745fa2669d5f8973a4e6c76bacdf0deaf23522ec1cf80c 4e3ceb4c4cd833ad8311bb02e5cda18163082e341cd8a3def60734a53cca8929 +test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql acb261869d3b3c65e364e7b6fbd7afdf5305806d4417b05044beed9a81e66ea4 af35ce0aee87ddc7a0cd34be4a480c619940d036d5cecce0e4e1fcd75b7c553e +test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql 39dae9872d92fa9b15343c93da545c2b0e15b4f27f2296c200fd4611b68858d5 52a209022e3b83260b4ef5513ffbcc1ca1f7c21bad2c721a0d3698793d2161d2 test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/Enum/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ExprStmt/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ExprStmt/ExprStmt.ql 811d3c75a93d081002ecf03f4e299c248f708e3c2708fca9e17b36708da620e5 a4477e67931ba90fd948a7ef778b18b50c8492bae32689356899e7104a6d6794 +test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql e269bb222317afe1470eee1be822d305fc37c65bca2999da8d24a86fa9337036 088369d6c5b072192290c34c1828b1068aeedaabdae131594ca529bbb1630548 test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/FieldExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/FieldExpr/FieldExpr.ql 1b45da610feb62cee42f7a3866e6a9396c1e4c880ce1a82f09892047090e1322 980eae97fdeff4b8b3b264080a3cbb320d3a2530960fa185108f665b4c2aee29 +test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql 609c4f1e275d963cf93a364b5ec750de8cb4790abdaa710cb533ff13ab750a4e 8c2aa84b1ea6ef40a7ee39a2168baf1b88323bfbc6b9f184e7b39631765a48dd +test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql 57df2d733faf3e3e30ae106d8423aab612ab0ddf8659da008e384130cf1e8023 1e240bee8e83dc26f78d2c55464ca1fb88d773691d47aee9a2182c90f57eb8f1 +test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql 8631f5e8bdd72443a1ee3d667ee9136a51ad49dfd206612a36b79686da1beb19 692aef607108b8e3eaa78b8c915f2fd1d310905f8fea770b9694722a9a2a6232 test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ForType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Function/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/GenericArgList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Function/Function.ql 608e1053c5be5a5d36e4be5cd9da5d4398a0a374adf0ded9f6b652c8b9e085f7 133260e1104616b467aa14a7e0237337aadac918f1b08bd1b9b4f1818fd911e9 +test/extractor-tests/generated/Function/Function_getAbi.ql e5c9c97de036ddd51cae5d99d41847c35c6b2eabbbd145f4467cb501edc606d8 0b81511528bd0ef9e63b19edfc3cb638d8af43eb87d018fad69d6ef8f8221454 +test/extractor-tests/generated/Function/Function_getAttr.ql 44067ee11bdec8e91774ff10de0704a8c5c1b60816d587378e86bf3d82e1f660 b4bebf9441bda1f2d1e34e9261e07a7468cbabf53cf8047384f3c8b11869f04e +test/extractor-tests/generated/Function/Function_getBody.ql cf2716a751e309deba703ee4da70e607aae767c1961d3c0ac5b6728f7791f608 3beaf4032924720cb881ef6618a3dd22316f88635c86cbc1be60e3bdad173e21 +test/extractor-tests/generated/Function/Function_getGenericParamList.ql 0b255791c153b7cb03a64f1b9ab5beccc832984251f37516e1d06ce311e71c2b d200f90d4dd6f8dfd22ce49203423715d5bef27436c56ee553097c668e71c5a1 +test/extractor-tests/generated/Function/Function_getName.ql 3d9e0518075d161213485389efe0adf8a9e6352dd1c6233ef0403a9abbcc7ed1 841e644ecefff7e9a82f458bcf14d9976d6a6dbe9191755ead88374d7c086375 +test/extractor-tests/generated/Function/Function_getParamList.ql f888802ab00defb58de59cc39d1e0518e3884db7eaf845f39dfa55befdda58b2 ba0d1a07676f1c987b820a3d126a563ecf9a3d53ac1115b87a5af487a8a03c3e +test/extractor-tests/generated/Function/Function_getRetType.ql b3a1ab90c8ebf0543e5db6a415896e44a02f984321f49bc409aec2657298942b cdfa37772e5026febb19c9bcd0d325688b0fbf2f6e7bba424b73eca38b9b3e38 +test/extractor-tests/generated/Function/Function_getVisibility.ql 490b0a369c809a757d4835b97becf617b0399f16a63a2b06258c9a227d5cc415 25ceff15d3cd03821e1cb2c04cb8894bcd101eeca62b66b54d1751b628107818 +test/extractor-tests/generated/Function/Function_getWhereClause.ql 37a44ce54bfa7e54dda5db2e5662d0fd70ad6e2caa07ffdedd923a6492b4c6a3 2ced4e49d19cf717b9bf26859fa20f94713b6438e817c63c29ccaf34bb5f373c +test/extractor-tests/generated/GenericArgList/GenericArgList.ql 2d3e37da2c02a88ec8a1f99baebf352196f84c76c093c6f851d2c2d2ee941e9a 1cd884cfbaf59a2da080f50d966dc511243055fcfdd08a61bdfb10cc5701e1aa +test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql 7f92dc62d814c39bc50dfd46c359540261fe433fcad1752ea2fe139a05071183 9863976c97c1b7c07d5d18d8ffee798b1c1b0223784a61066ee2c9ffc46c4979 test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/IdentPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/IfExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/IdentPat/IdentPat.ql 8fc54811b0fabda503949557737d14a2e71ec68170b6e42e69fde08ba1a2c39d aff69e979a6084eb4e1d902df2bafd0cde806a41ab8ef83336585a60d4e3a7c8 +test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql 02607c8c616dc94152777390f912fc1e6bb420cc3ea687397e31392848942aa7 aeb10434577815d9a9f0f45a1a448656323f05d5321ff07d435ca4a449527d53 +test/extractor-tests/generated/IdentPat/IdentPat_getName.ql b96a3dbca1bade052cad294d95f95504665ad0b14c7f5f9f8083486d0ee64026 28c851703250c25b518024add1052d3204271db3f89eddf862d9a1e122ee6eb0 +test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql fea604fee0db39f83a3dadb4583cb53123c63351282bc3387b84f90477be19cb ef2e620ade30e0225f6bf1c84982d1b8f949ee0c2ced5edbd00e5547e0a81a7c +test/extractor-tests/generated/IfExpr/IfExpr.ql 1401ba0ed88e27d24e5dc3911bfcc2aee3e0f3da30981866bfec2c71c238e6b9 2bd7abeb5ab28418eb4155206696356cc484ed83705a3a215e0d779b632a521c +test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql f5872cdbb21683bed689e753ebe1c49cded210188883a5f846ab79c0b2147e1b 6cb3a47778c3116ee95f7aeac0e2dd640bbf0c07f8b65236e9040e139f02e5fb +test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql 5bab301a1d53fe6ee599edfb17f9c7edb2410ec6ea7108b3f4a5f0a8d14316e3 355183b52cca9dc81591a09891dab799150370fff2034ddcbf7b1e4a7cb43482 +test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 8674cedf42fb7be513fdf6b9c3988308453ae3baf8051649832e7767b366c12f e064e5f0b8e394b080a05a7bccd57277a229c1f985aa4df37daea26aeade4603 +test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql 0989ddab2c231c0ee122ae805ffa0d3f0697fb7b6d9e53ee6d32b9140d4b0421 81028f9cd6b417c63091d46a8b85c3b32b1c77eea885f3f93ae12c99685bfe0a test/extractor-tests/generated/Impl/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/IndexExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/IndexExpr/IndexExpr.ql 0a93213b755faaab84b7eccb5b8f3d8f8ba87910ad661f194e06917722dbf6a8 46497b3e92523c6c015373fe122678846618b45412b903323ff3644e37f2c52d +test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql 360dbf8e7d69c691a1f4c9bb0aaa7860a6b0f09b21a1d1a6db908ec7a7d7561a e50b942f7592cb944f607bd64f8e4d4abac30bdc53f73b4dc851e689dce61be9 +test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql 841cacda1a1cd976229f2bd18dcee4315506105c2cb3789c30a7539fd6d49d0c 37a92e9151f10cf971b24f5af6e2ca6dccf87b6e0e0b2237a0564f97719a0d66 +test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql 1aa934524dd44009297ef89a657d1ba99304f6590514a0b0b51b2769780f8c20 a42f25640f0331318bbc8f44af133095580b8947309628511bf0b3675149506a test/extractor-tests/generated/InferType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Label/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Label/Label.ql 6a92a27d615dd9c380cb9d889eecf827fc3a26f4bef65c2374e5ffbd6a7ce6b3 a344e26bc6ef835f2fa818413ba518c23f956750f9a2232acb1ad77aab9df446 +test/extractor-tests/generated/Label/Label_getLifetime.ql 3d6ddc3b44182e6432e938d5c1c95e0281575e320d517e431f6bad7748efb93e 56d07e485cb5e4263443eb5a0d62d7d4456bb0c2748331b371e519bfe14d3b81 test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LetExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LetStmt/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/LetExpr/LetExpr.ql a25072a00cfe1242dc846b38199c000ed7217d33fdd50d2763237fdfda7b9449 8c9367af79d9fbc98ed2fe62450929fa876512f1c999615b5c1ecff082fdc7bc +test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql 911b143afebaa0a487b13d533f089c5b0eaf336a44a4cab42147c284338484ba 625c91fb6d8c2e3a9f13e5679cc0cd29329c6c2b213d2e1191e23db2b65841dd +test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql ccabfaa15cfc8685e86cb950cb62b7f2fec278f28906ab34deb97b308f160cc4 e0574537d47a77f1be85090970f3e1263858174479002fd4de3f85b777ee4336 +test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql bc0363f77bc2ba583619ab7d309293ace0ed6a851bfb9b886f75729f96eb40a8 bc0cd9233b7904d8cc7f9021377120f5f4bcc5c7aa28b1b55f17bc738c434d78 +test/extractor-tests/generated/LetStmt/LetStmt.ql 02db64303bfe87a11a85663e4c79bdabd9ca13693f146c7923b47c4c92850fcc 9ec1326b8bc58b270b178a4c02621b1650d107de7c02a9408d97c59f0d8a6178 +test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql 68f69c4c054514140c0f0833a170e9f3facf950bd7af663ac9019f6c88ba0ea7 ca54d25cc052289458c7e34e40f0304bca2c412cecfb407f31279262bd74c15a +test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6a5f0eed3ce3e8cbc57be6ec2b4eed732f00e084108d21a61d9ab28b65e494ca a48b426b97a6c347ad04fe2e592cd25b5c66b2a6a299cbf8c0da03e14304fd70 +test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql 21f8f1cbf725399da80c24c4d3ca27072758b76cbdfd726a7f1e851ea12e58fc c01a4eda22088184357288910fa41692f52486d60fbf7c0bc3b5b01f8f67fe07 +test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql 978e4f7861c7b03e6f2a3a2f7ae82e9b72bb5ef000f111127cb583a04ea6f971 3c92dbb765dfb01c290413e538290b0b2bee5a83bcfee383d081f56202a784fa +test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql a13e89ca2f87aa6e5e0cfce296b9515656f4bc9b5291337cf18c2bdd7a04c4e3 7c7c8ac2cc5112d74081a5c239358d62e082b48b361e757cea23022f5ffcf04f test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LiteralPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LoopExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql a5644e5cf8b03121a1bdee793083cfe27286a7ac67d6ab5f1733b1fa81c5b38c 711d44afb1d0fba47f355563a040f4b21ca63a1c59a73d9b6510715133fee5b3 +test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql 6e76da2bb7858f493641f91216ea28f22dc5825931841327e34330f11d20c8b3 3f10a510944ea049b636ffc2c6223c0a15fd9b528ada7ffce54fb70637640768 +test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql 7049fec0bbbf0e048af1ff318f42f43d0f8a7354a5638dc21174c4ea725b54ce 2edc94cc0a7f58ec9808b63ddb4d20a3907c88e50bd9ffb14f0281b433f5621b +test/extractor-tests/generated/LiteralPat/LiteralPat.ql 3d3db6cad0eb13f84b69efa24a9f9a32d35c62582274d2751cc3ac54dca3b538 7feb64af87546ea64c139c61ac20176a99ad40b9949b361742a424b164fe6d54 +test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql 2cb03a22220e99237d4f3cd94d5090757cd6e57df708d32e80bca3964507651f 4dd9a6c1e23ad9851d9aa8c42c79535f7a2c7224bbaaff286eac7fd04b39c6f0 +test/extractor-tests/generated/LoopExpr/LoopExpr.ql 636c28bff5f8c1ca0fb834f614b3215e02bdb00826fd8be26f9c4fa22c68a79a 1694c27850419d4edf366fe3f1d60fff578094adc3aeeb9691a3d6a8ec0100e1 +test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql d557c1a34ae8762b32702d6b50e79c25bc506275c33a896b6b94bbbe73d04c49 34846c9eefa0219f4a16e28b518b2afa23f372d0aa03b08d042c5a35375e0cd6 +test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 0b77b9d9fb5903d37bce5a2c0d6b276e6269da56fcb37b83cd931872fb88490f c7f09c526e59dcadec13ec9719980d68b8619d630caab2c26b8368b06c1f2cc0 +test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql 0267f54077640f3dfeb38524577e4a1229115eeb1c839398d0c5f460c1d65129 96ec876635b8c561f7add19e57574444f630eae3df9ab9bc33ac180e61f3a7b8 test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MatchArm/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/MatchArm/MatchArm.ql 512aa404c94ba40b859564f07e9dffe6a5e687fafb039556e9145f4f3742981c 529f96e38cede8a26054f8981d4ba1d189c17d14d0f92d622eb20acd8f3d7e5d +test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql 4faf7a542702d13283262be7cb2e1cc3c862bc2e1953a460fd2bb5e75a7e9b1e 1d43f4d2a580d0ac309dd18a45a9693ab92107cafd817ccdb26fd7998728edf3 +test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql 116f02bef8650d27784a8657208e9215b04af9139d19a54952c6ba2523770f4b e0677aed6d53148e120fd0b03f4bc4fa108c6dd090f605c87b2e3ba413fb0155 +test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql 54e2c2805d54b353c9e36258ed750189846cd422dfb476c6eb52301860d7ff13 8fd408a3e9c6e5c138860144ba0f69dc2099a7a062e3bdf7d324c09df7d132f3 +test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql b346bca229226414b32acc3d8ab0ae26647563fd79e1c434d1ef8d14bda2d65b e72eb69bb243c39fa997d17bb7060e2f82f2bb33d11a58caaae48f8372996704 test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MatchExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/MatchExpr/MatchExpr.ql ec116bca37079488977a50beeba508c440cf337799947fcb810b6bd7a7605255 42dc7b5f0dd6fd91417d9846a7b4f678cbfcf095791aaf57c8d3b4548ce2dd98 +test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql cb8057372dcf24dfa02896ebf4e60a0b757dc4742b94011edc38f5b898ed4d25 6809695c2d3ac3b92c06049c9b920e8c0e99ee1998a11a7f181f2b0ceb47c197 +test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql 7baaa64071cf2666e3b2bc05630d92a7a3b6cf04a026b1f7053c5e2a735bcaa8 d9ba8d8bbff05cfc0461ab41295f921b48429b4376c29adf54428bd5a9aa5298 +test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql d97055bcb0431e8b258b5ecdd98aa07cb24ece06b0cd658b697cd71da4ede8fc 5e9c03b2665ef6b2af98897996abb2e0a9c18d54eb64588340b8efbcee9793bd test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/Meta/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MethodCallExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Module/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 05b938f3fdc53ca16a6403e79d04d44ba2a7ea3d1f643fc3aa82a04593d459b9 099fa93ce75278505b38e8025fcc6961308bb88866ce3e17748a3f958f01262b +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql 180e0b1715f5cd2be0de01bff3d3a45594b495b8250748d40ff7108d6c85923d bdadcdbecca5891287a47b6dd6b2fda62e07457718aef39212503ab63bc17783 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql 2ce876a04a159efce83b863dffc47fbb714b95daea2b91fa6fbb623d28eed9ec 7bca1cd0e8fbceec0e640afb6800e1780eff5b5b402e71b9b169c0ba26966f96 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql 655db9a0501b1ef20d604cc4cd9d708371781291443e8dec97b70ec2914601d2 2fc7df0eca22dcef2f9f5c86d37ee43452d372a4c0f9f4da0194828c82ba93e0 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql 9a4829a174388e818f0c63ee6b8bdf1b68beaab48f51734ec6cc14635d24001c f57c9cdaf5235aad604f60b53ce92e73946d03a085f95ed051a26683967be4ba +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql 77407ac956c897ff7234132de1a825f1af5cfd0b6c1fd3a30f64fe08813d56db d80719e02d19c45bd6534c89ec7255652655f5680199854a0a6552b7c7793249 +test/extractor-tests/generated/Module/Module.ql 6418f9760fd67de8f3d9d8414f4750ea7cd19b481b46bfb7d4bb0ce74327bb3c 2c7eefa44243b1d29bd22875e90f2a715c3898919ba2ebbd4805db9ee49d0cde +test/extractor-tests/generated/Module/Module_getAttr.ql b97ae3f5175a358bf02c47ec154f7c2a0bd7ca54d0561517008d59344736d5cd f199116633c183826afa9ab8e409c3bf118d8e626647dbc617ae0d40d42e5d25 +test/extractor-tests/generated/Module/Module_getItemList.ql 59b49af9788e9d8b5bceaeffe3c3d203038abd987880a720669117ac3db35388 9550939a0e07b11892b38ca03a0ce305d0e924c28d27f25c9acc47a819088969 +test/extractor-tests/generated/Module/Module_getName.ql 7945dc007146c650cf4f5ac6e312bbd9c8b023246ff77f033a9410da29774ace 9de11a1806487d123376c6a267a332d72cd81e7d6e4baa48669e0bb28b7e352e +test/extractor-tests/generated/Module/Module_getVisibility.ql bdce43e97b99226f55c84547a84d99b44f5d1eac757d49bcc06d732e0fb0b5a8 a482c18851286fb14ec6f709dc7f3280a62de8c3d59c49ba29d07bd24cf416cd test/extractor-tests/generated/Name/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/OrPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql f7d7b30870567124e46dc81503a33cb6425fff51f99fa57894228847e68291a3 b0c242095e0df52687502baae97f36e0fc7b4e1e01cd05f75ff0cbe92a6e2f33 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql a12e828c85577184a41b255f54b10d4a654b57703074a7ebcfde2d43a358955f bc2590e76b60a3ddda9cc10903c68d07c6af19a593c8426d108a2a6520304145 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql 6d729fb91deacb1f620df5cbc86473183664e81849958624195da883c410a707 f3374c3d7306699d1f9d1c6c5788ee7c5a17103345bf53847be9d94e5fb9f14d +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql b8597637cffd7a492148020b306c4ab1d2f17f919f441f462ebc00d229b038ca 2c7de1df4351929c221b30e3cede4cd6981fe8a2c1861e194489981c65e00f33 +test/extractor-tests/generated/OrPat/OrPat.ql 49d881b384acaf68fa79de46da997cacab3e75467641f61150908f4112c47fa4 5d721da23be44e79d7b8a0dd475119836828d6a1edaff2c55decea8da83e65b8 +test/extractor-tests/generated/OrPat/OrPat_getPat.ql d56b78287cecebacb25249380647500387e0d9e28be20034b8a12406a999a7c4 cba7bb60afaaed4333ea5ff6d3850fb44a8b42edee67d86fd16df85938454269 test/extractor-tests/generated/Param/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Path/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/PathExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/PathPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Path/Path.ql 2bdcd99b3b5ffc83ac47d8cc27a4561d616bcf06844f0c452c699cd10ee640ca 5a7d7ffb8b0c04d6a8cbb2a953761df8561b796c4372bef1bd55c359b2f19911 +test/extractor-tests/generated/Path/Path_getPart.ql 8aa45a0b58203ef1177166efbe1c2851faf4b4c9a453c83137f0c9298badcdbf b82d490d9b3a8237487cd5da8b3b6fc4aa477977b332a5c6539b3cd4e6d5b45b +test/extractor-tests/generated/Path/Path_getQualifier.ql 9af95e22cdf3a65da6a41d93136aef4523db5ce81d38f6ed4bc613f1c68784d0 3102d9241a417a92c97a53ac56a7a8683463f1adc7a593cda1382c0d25b3f261 +test/extractor-tests/generated/PathExpr/PathExpr.ql b9696cd7ad9f3874e4bc4b1b9c77f42f06ab6c61b77fb641458da63667087b9b db84a7a8dd05e30ff80733af01f08d43ff031bb4b3e3af06332a73ba7e7bbc43 +test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql 2ccac48cd91d86670c1d2742de20344135d424e6f0e3dafcc059555046f92d92 9b7b5f5f9e3674fad9b3a5bcd3cabc0dff32a95640da0fce6f4d0eb931f1757d +test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql e7894071313a74166bdd31d7cd974037fcd5a7f0e92d5eec42833266196eb858 46a06e8a1207e7a0fa175cd4b61068e5fd6c43b5575b88986409f0ac2be64c51 +test/extractor-tests/generated/PathPat/PathPat.ql 823732954a5882e33a37bd0bf0cafb2cec51659a5203a4831eec2516da0e49fa 54001149718a9ca15d8c0d4be63f3fe00a9f0d44fa1309e2f605d7932355ea5d +test/extractor-tests/generated/PathPat/PathPat_getPath.ql 6c0c71c80a6e631ea7775ec8660b470ff6b264bab14a399606cf113b1fb190fc 8e34cbb4d064db929e94652e1901ec4f26affa71e30e556b7acdff71dd622cbb test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/PathType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/PrefixExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql 44fb7174365c6deecdc22c720d84617c6e060c05d49c41c90433451588f8aa6f 871fab471c82fede3c36edc003f9decee5bb7844c016951d28be78d0c91487e5 +test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql fdad6ad5199435ded1e4a9ea6b246e76b904cd73a36aaa4780e84eef91741c5b 75d63940046e62c1efa1151b0cac45b5ec0bab5e39aec2e11d43f6c385e37984 +test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql 2d1d97f6277794871fbb032ea87ac30b1aa902a74cd874720156162057ea202e b1b9880fce07d66df7ec87f12189c37adf9f233a1d0b38a1b09808d052a95642 +test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql d27602e77ddf491a278426de65041dda8568f427d1e0ff97c0f23069ae64670e 4e4766e948adf88a6b003ead7d9de1ad26174fe9e30c370f1d3e666aa944df52 test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RangeExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RangePat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RecordExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RecordExprField/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/RangeExpr/RangeExpr.ql 707c08aab49cc0a22c80a734e663b13ecbbddf0db28b6a25fdbc030a1ce38d6f 1f78950b30485cdde9fe7d9e416ad1dfdac8c5b6bc328172e6e721821c076131 +test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql 8767e670f88c2115bc61b16195d2c9d02bc074adc4ca57d2aa537c1af9b4c530 4fa51652c60ca7d06bd9ad604107e002603ee2a7b4587636f6b46b8e8060e06c +test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql 0328c3d0597004f3facf3d553ed763566344f54e1b9c9e26f2f41b8146b6bdba 8e701b595631af117fd0a79154e298dfc64cb0874eb58018921f94076a0c7ebe +test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql 355a4d61bcb6ac37003c49e736e0e3d4c6d223343db4d79ecb43a78fbf6b4c94 a81c79a5d54dec5f3918ad486cb07ffcb0af067823f7597d8e86efaffdb70935 +test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql e6e35c735b2bc56adf38f96f32ef59a004391cafbb23b9acc34d2177764588c7 478969212626b1d101c19115f726ca7616fdd4d8de82fa1e91c50a26515c2ee1 +test/extractor-tests/generated/RangePat/RangePat.ql 97314b9a5543a7471d722ae188a657fd325974eb38eafe0997a6cf1095d04d69 5dd655582157b3436722b4ba3118bdd29853b0bc170248ad2c4c1162c534afe6 +test/extractor-tests/generated/RangePat/RangePat_getEnd.ql 723eb5030ec52d3aa3650a3e2de6cc0195a0030630239b972235963320e0d808 2df3b1a6197c3abd43dc743fd09cbf55165e3191f2b49336777594541e5da96a +test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql 564216b2342f56dc8c1aed6306f57b6dafb33de9e3ba337a840a8c077ce95933 2a76ec7a59bada29733a1515bc1ea8bedd37429d1694ca63c7a8fbf94098a4c7 +test/extractor-tests/generated/RangePat/RangePat_getStart.ql ad2066efa32fced2dd107031f2a9b9635c3c892e874870a4320522bae9309aa4 b4a8c57a838074e186b823938d1a9372153c193da6c839b5f242ca25c679e83f +test/extractor-tests/generated/RecordExpr/RecordExpr.ql 1b8f5c315f8038e531bd92c5402acdafdbc9468e2f4474cbeffddca37cc87fb6 9458b2815fd13848659bdc2ce1e9566fccdb0b2c9f018c79885ba7608df07a5a +test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql 2eb8f7591f08199d124732d7f2d7dd3e81792a52f8e6c90003aa0609923f8cb0 27e245224d6c9aa20023b418ce8dffff1293b50a0e10938932631fca7c559e78 +test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql 6d3d872eb64ff8cd7317190f9b2627d3fa6a74976e362cfb49e21c6623d63f82 d98b07f932ecb25a427e655017de47f951d3eabc4eedbc6f873571ce8921e9ff +test/extractor-tests/generated/RecordExprField/RecordExprField.ql 62ee00e478fcf07421b5989943a487ecc0c99cf50ec87f05aabe89dfb03f2a32 ad7c6ce362032e18fc9950b885c4b7b5c907e6abd2af2d13ecef84eb980027fb +test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql 789d20f8c0bb0e9567d3d9a0c0266a04841cda0dbdbe10af8c450d5a82bb289e 9036f5b0e7ddf301012f52f3919804382421061366d2a4f3a016e9783befec6d +test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql 7dcb5cf0d04bcd62b655fa0626535526cdaa0f891845f4b22cb50fcf1ae3e511 a177db76e4e9583438fad9bfb1300fed9e812c1046c44dccd307bf3a46603a69 +test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql 4607b1adb0e25fc5314c108dab14c19aff5a35a6b16445ed64a82c01bb7f6086 0040f2b4dffb37b257fea9870b2ac742ea3c1f9dfdeff6f69b449f9a4a3719d7 test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RecordPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RecordPatField/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/RecordPat/RecordPat.ql 01510828e1facc6551e06241e41636259883a546ad43b08499468c14d6052768 fcf3873fe1cd1ebe4910150763aa350f882ca8e84603f35520bb0beeea2c21af +test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql 187b8d44de158fc809257e28b2e8fdd246c8eb3c60115d54cd53396a320e372d 74813fd13c6f34927420ed44620743f7c80c537984e0db72c1c5f4b754b40b83 +test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql 32e45a6f59cdb8edbf7f9326164e225a7f545fabd2dd168b660699954a999fdf 325c9121dc130459426b473691876a0698b51d5cdf4530698a398510ce8e3051 +test/extractor-tests/generated/RecordPatField/RecordPatField.ql 6c51343258e56673d21b7ae73e7de011319ffa2eb65390e697f875bb428d25d1 82c3232db0cb353140618749b1cba5549b0ff43cbbaafb203077e18dbedb2c10 +test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql fb0592f7a1be4fd9c6f36c79dee5a0f6711b0a7820b079f8e95413722ae1aeb7 9dfb0de00ec9c4a23efd38515c63a3567204f2a3ac2634858296f58aa564d170 +test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql 3380a41d6cecd80681fc955719fa11377c32a5e0be276871f2d0d75ae62d8f0a 44efe89657d3a59fb94962d0fbf52d06571e203863a3d9e9dd47a5135a8ba4d9 +test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql 577187a4775283bbce66abcb54af50e5684e1f03f8b55e59d84f1914d142b04f 7c23778ad92a6dccf193abb269bd8fbcb33f3b778eb18c6d23135540a27fcec7 test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RefExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RefPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/RefExpr/RefExpr.ql 6a4d786b68003295ed2cc9a7a9b2f93d6b91f91e4faa7165537e369c3bb0923c 6dd9467a92ce7e966095c01c0356f8429e340e21c036e3ad5665c6442e705580 +test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql 477fb3fee61395fabf78f76360ea27656432cb9db62e6f1dab1e9f3c75c83d39 5210f2ac54c082b616d8dcb091659cdad08a5d4ae06bf61193c33f208237482f +test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql 180d6417fd7322cabf4143d0ddd7810f65506b172a5c82484b3ef398041636b2 a291f0bec1ec5b3fa6d088b3d1a658889b9a3521c39ff3bb7a5ab22a56b8b20a +test/extractor-tests/generated/RefPat/RefPat.ql 2d2e9b058d66d2183a0795cdd719a36e53d27d9c267eca22e34624c558991250 b95d435925f0bd38a101eb00eab548acbc39a9d7e8fdaa10e1d65f0f72362a9b +test/extractor-tests/generated/RefPat/RefPat_getPat.ql 60f5e010b90c2c62d26674323d209b7e46c1c2b968a69765e1b1cde028893111 fe9e7dc6a5459250355336eca0bdf2a0be575b1e34936280fd12a76a004f7b46 test/extractor-tests/generated/RefType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/Rename/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/RetType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ReturnExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 8e9eba0837a466255e8e249e62c69c613cb5a78193fe50e26a617cf9d21c995a f33f6cc874f74d1ce93a6975c88748bd5bca6dc10360f8fd59493d939be63658 +test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql 9fb7e1c79798e4f42e18785f3af17ea75f901a36abf9beb47a1eede69c613ba9 9cdb7cc4a4742865f6c92357973f84cee9229f55ff28081e5d17b6d57d6d275f +test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql 7d4562efb0d26d92d11f03a0ef80338eb7d5a0c073f1f09cbb8a826f0cef33de 523ebd51b97f957afaf497e5a4d27929eed18e1d276054e3d5a7c5cfe7285c6e test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/SlicePat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/SlicePat/SlicePat.ql c6ff3c926ebbea3d923ba8ed00bf9cc20eaaee4c6ae49ea797c0975d0535240e 1b27e0caeb793da3b82059268b83bd624e81f215de42acbb548c52bacba3ed9e +test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql e2f892a3a4c623fe3f7e64e1438128126bc4d8b8c0f657ae53bb99d3209a3b13 af835d9ec840c63e13edc6a9230a4e34cb894f4379b85b463b8068de5a8bd717 test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/Static/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 @@ -721,18 +844,24 @@ test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3 test/extractor-tests/generated/Trait/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/TupleExpr/TupleExpr.ql d6caa8d9ff94f27f88d338b07cacc280289970931e101680c6574e32bc0c863e 70508104013003dcf98f22db6eb9b60d14552831714048f348f812807189e9b1 +test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql b1e93069613a8cd2b49af93a5cdd1571b343571e9c3d049d8bf19b25a461f9d3 be18008a00e3b0fb786f5dd36268201fd43bf8527d8a40119b147a3a8c973b3b +test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql 308cd14873afedc74e3ed61d283f72da50008ce7690510c57fe0934c92158d58 5e3e23a7221486ead6502debb5d4978fb67046c8b0a5c8a688e4e196cb1f28a1 test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TuplePat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TupleStructPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/TuplePat/TuplePat.ql 24ee56bc848537da65eb8ecef71e84cc351a2aedcc31d6fb53a5b7865f15f7c2 81db1076e2e4921ceb50933b96cd7b574caab1818de257c1e9038f3f97447d59 +test/extractor-tests/generated/TuplePat/TuplePat_getField.ql f000bed41af031bc56d0705ce312abe7ab3dc6745b2936798c9938781e51475e f464a84dbc36aa371d60d6db68d6251f6b275dc4ecebdc56f195637be390b067 +test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 6e6cfba0d2565782088af55ca977ada3d8093200aa180a49a67c9a176c52c254 c10c93823a9d814d694ca88fdf65a9bf8c1bb178e50c08982a97aa8d445284b3 +test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql f3f2e23cc2a32aa5abc1e0fda1300dab1693230632b9eaa75bb3b1e82ee9ea1a 24b87a39ec639a26ff8c1d04dc3429b72266b2a3b1650a06a7cd4387b6f0e615 +test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 13a06696bbf1fa8d5b73107e28cdba40e93da04b27f9c54381b78a52368d2ad1 5558c35ea9bb371ad90a5b374d7530dd1936f83e6ba656ebfbfd5bd63598e088 test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 4ad6ed0c803fb4f58094a55b866940b947b16259756c674200172551ee6546e0 d3270bdcc4c026325159bd2a59848eb51d96298b2bf21402ea0a83ac1ea6d291 +test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql d8502be88bcd97465f387c410b5078a4709e32b2baa556a4918ea5e609c40dd7 b238dc37404254e3e7806d50a7b1453e17e71da122931331b16a55853d3a843f test/extractor-tests/generated/Union/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/Use/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 @@ -743,6 +872,10 @@ test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt b6cf5771fdbbe981aeb test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/WildcardPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/YeetExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/YieldExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/WildcardPat/WildcardPat.ql c6da9df739528763f423eac0fa537bfd524d3ea67794abdbc7f7c56193163273 42be2c5e296ad3afd05b5dcc208a4d2db2fda9323cda2df66054f921e37f6efe +test/extractor-tests/generated/YeetExpr/YeetExpr.ql 8a9f110486be12494256382374d6d5af8aa2210a84fd4452e99a3a3882b0eb59 510fa9eadeb062bd4f733ca6b6892e8908c2c6d58ec8478efc6942bd63a527f4 +test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql 84e44a1fbf1a9d18f255781a3a9aaa71583b6c05da228989471dbe03da4e817f 560332129d3341fbb1c0ea88c894033f0bde19d0adc081111f7bf8af55b61f88 +test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql d77b68b621e5b903231e2dfbc53a1e1421d59a0ad2e8c346c2abc1a2dfc11efd 642eb5791eb336ff05594d06eca08735e54bdac3aecf5d31a4de1267d10cf440 +test/extractor-tests/generated/YieldExpr/YieldExpr.ql 1700b4b2660724d8dbabde5f3441424b79690e2a43dcc599dd69af255a7fc8ff a11e48d9fab0cc358c5806c01753d61e48713b740739ffc87f933754e7f103cc +test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql d4c5e2710b4e41f6fcec51e74041a8af4c3e8116d42fd14fad6ae166a9c18031 cc6763b9f06a3fe6cafc672054cea8835f800f934af47c3c135b443486400394 +test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql 592f8938120a036d78d180eb59634341d72d5e76854d9df48ab1b9b69db99c35 efe2955a5b4acc24257f9d79a007d39951736ce8ca11970864d1e366c4e516e6 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 24f9a5ec4f33..33cf15e7a924 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -611,109 +611,232 @@ /lib/codeql/rust/elements.qll linguist-generated /test/extractor-tests/generated/Abi/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ArrayExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql linguist-generated +/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/AsmExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/AsmExpr/AsmExpr.ql linguist-generated +/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Attr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/AwaitExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/BecomeExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/BinaryExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/BlockExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/BoxPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/BreakExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/CallExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/CastExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated +/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated +/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql linguist-generated +/test/extractor-tests/generated/BoxPat/BoxPat.ql linguist-generated +/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql linguist-generated /test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated /test/extractor-tests/generated/Const/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ConstBlockPat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql linguist-generated +/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql linguist-generated /test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ContinueExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql linguist-generated /test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Enum/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ExprStmt/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ExprStmt/ExprStmt.ql linguist-generated +/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql linguist-generated /test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/FieldExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql linguist-generated /test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ForType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Function/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/GenericArgList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Function/Function.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getAbi.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getAttr.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getBody.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getName.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getParamList.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getRetType.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getVisibility.ql linguist-generated +/test/extractor-tests/generated/Function/Function_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/GenericArgList/GenericArgList.ql linguist-generated +/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql linguist-generated /test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/IdentPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/IfExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat.ql linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql linguist-generated /test/extractor-tests/generated/Impl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/IndexExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql linguist-generated /test/extractor-tests/generated/InferType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Label/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Label/Label.ql linguist-generated +/test/extractor-tests/generated/Label/Label_getLifetime.ql linguist-generated /test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LetExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LetStmt/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql linguist-generated /test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LiteralPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LoopExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated +/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql linguist-generated +/test/extractor-tests/generated/LiteralPat/LiteralPat.ql linguist-generated +/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql linguist-generated /test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MatchArm/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql linguist-generated /test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MatchExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql linguist-generated /test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Meta/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Module/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql linguist-generated +/test/extractor-tests/generated/Module/Module.ql linguist-generated +/test/extractor-tests/generated/Module/Module_getAttr.ql linguist-generated +/test/extractor-tests/generated/Module/Module_getItemList.ql linguist-generated +/test/extractor-tests/generated/Module/Module_getName.ql linguist-generated +/test/extractor-tests/generated/Module/Module_getVisibility.ql linguist-generated /test/extractor-tests/generated/Name/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/OrPat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql linguist-generated +/test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated +/test/extractor-tests/generated/OrPat/OrPat_getPat.ql linguist-generated /test/extractor-tests/generated/Param/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Path/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/PathExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/PathPat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Path/Path.ql linguist-generated +/test/extractor-tests/generated/Path/Path_getPart.ql linguist-generated +/test/extractor-tests/generated/Path/Path_getQualifier.ql linguist-generated +/test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated +/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated +/test/extractor-tests/generated/PathPat/PathPat_getPath.ql linguist-generated /test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/PathType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/PrefixExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql linguist-generated +/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql linguist-generated /test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RangeExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RangePat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordExprField/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql linguist-generated +/test/extractor-tests/generated/RecordExprField/RecordExprField.ql linguist-generated +/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql linguist-generated +/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql linguist-generated +/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql linguist-generated /test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordPatField/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat.ql linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql linguist-generated +/test/extractor-tests/generated/RecordPatField/RecordPatField.ql linguist-generated +/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql linguist-generated +/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql linguist-generated +/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql linguist-generated /test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RefExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RefPat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated +/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/RefPat/RefPat.ql linguist-generated +/test/extractor-tests/generated/RefPat/RefPat_getPat.ql linguist-generated /test/extractor-tests/generated/RefType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Rename/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/RetType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ReturnExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/SlicePat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat.ql linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql linguist-generated /test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Static/MISSING_SOURCE.txt linguist-generated @@ -723,18 +846,24 @@ /test/extractor-tests/generated/Trait/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/TupleExpr/TupleExpr.ql linguist-generated +/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql linguist-generated /test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TuplePat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TupleStructPat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/TuplePat/TuplePat.ql linguist-generated +/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated /test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated +/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/Union/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Use/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt linguist-generated @@ -745,6 +874,10 @@ /test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/WildcardPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/YeetExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/YieldExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/WildcardPat/WildcardPat.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll b/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll index 785933ea8947..9b039cc15344 100644 --- a/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll @@ -7,4 +7,11 @@ private import internal.ArrayExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * An array expression. For example: + * ```rust + * [1, 2, 3]; + * [1; 10]; + * ``` + */ final class ArrayExpr = Impl::ArrayExpr; diff --git a/rust/ql/lib/codeql/rust/elements/AsmExpr.qll b/rust/ql/lib/codeql/rust/elements/AsmExpr.qll index 2dfc5e66a32e..da0fdc8b6cc0 100644 --- a/rust/ql/lib/codeql/rust/elements/AsmExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AsmExpr.qll @@ -7,4 +7,12 @@ private import internal.AsmExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * An inline assembly expression. For example: + * ```rust + * unsafe { + * builtin # asm(_); + * } + * ``` + */ final class AsmExpr = Impl::AsmExpr; diff --git a/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll b/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll index 44d0bf7a1862..16c6790294c2 100644 --- a/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll @@ -7,4 +7,13 @@ private import internal.AwaitExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * An `await` expression. For example: + * ```rust + * async { + * let x = foo().await; + * x + * } + * ``` + */ final class AwaitExpr = Impl::AwaitExpr; diff --git a/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll b/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll index cac2ccfa7a72..0348b8628497 100644 --- a/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll @@ -7,4 +7,16 @@ private import internal.BecomeExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A `become` expression. For example: + * ```rust + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } + * ``` + */ final class BecomeExpr = Impl::BecomeExpr; diff --git a/rust/ql/lib/codeql/rust/elements/BinaryExpr.qll b/rust/ql/lib/codeql/rust/elements/BinaryExpr.qll index 9b312ac96332..39df861aba8d 100644 --- a/rust/ql/lib/codeql/rust/elements/BinaryExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BinaryExpr.qll @@ -7,4 +7,14 @@ private import internal.BinaryExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A binary operation expression. For example: + * ```rust + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + */ final class BinaryExpr = Impl::BinaryExpr; diff --git a/rust/ql/lib/codeql/rust/elements/BlockExpr.qll b/rust/ql/lib/codeql/rust/elements/BlockExpr.qll index 9f99a43e6a80..a87bbe472528 100644 --- a/rust/ql/lib/codeql/rust/elements/BlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BlockExpr.qll @@ -9,4 +9,18 @@ import codeql.rust.elements.Expr import codeql.rust.elements.Label import codeql.rust.elements.StmtList +/** + * A block expression. For example: + * ```rust + * { + * let x = 42; + * } + * ``` + * ```rust + * 'label: { + * let x = 42; + * x + * } + * ``` + */ final class BlockExpr = Impl::BlockExpr; diff --git a/rust/ql/lib/codeql/rust/elements/BoxPat.qll b/rust/ql/lib/codeql/rust/elements/BoxPat.qll index 23e9cc4ff83d..fd8b3dd3f2ab 100644 --- a/rust/ql/lib/codeql/rust/elements/BoxPat.qll +++ b/rust/ql/lib/codeql/rust/elements/BoxPat.qll @@ -6,4 +6,13 @@ private import internal.BoxPatImpl import codeql.rust.elements.Pat +/** + * A box pattern. For example: + * ```rust + * match x { + * box Option::Some(y) => y, + * box Option::None => 0, + * }; + * ``` + */ final class BoxPat = Impl::BoxPat; diff --git a/rust/ql/lib/codeql/rust/elements/BreakExpr.qll b/rust/ql/lib/codeql/rust/elements/BreakExpr.qll index fdc214645812..0776fe2bd01d 100644 --- a/rust/ql/lib/codeql/rust/elements/BreakExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BreakExpr.qll @@ -8,4 +8,21 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.Lifetime +/** + * A break expression. For example: + * ```rust + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ```rust + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` + */ final class BreakExpr = Impl::BreakExpr; diff --git a/rust/ql/lib/codeql/rust/elements/CallExpr.qll b/rust/ql/lib/codeql/rust/elements/CallExpr.qll index 5aee9f2aa608..7047d6a8c3cf 100644 --- a/rust/ql/lib/codeql/rust/elements/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CallExpr.qll @@ -8,4 +8,13 @@ import codeql.rust.elements.ArgList import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A function call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` + */ final class CallExpr = Impl::CallExpr; diff --git a/rust/ql/lib/codeql/rust/elements/CastExpr.qll b/rust/ql/lib/codeql/rust/elements/CastExpr.qll index 2e851f56c407..8dfbcfc2e4f0 100644 --- a/rust/ql/lib/codeql/rust/elements/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CastExpr.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.TypeRef +/** + * A cast expression. For example: + * ```rust + * value as u64; + * ``` + */ final class CastExpr = Impl::CastExpr; diff --git a/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll b/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll index 645a8e40d97c..9dee274c4a3b 100644 --- a/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll @@ -10,4 +10,16 @@ import codeql.rust.elements.Expr import codeql.rust.elements.ParamList import codeql.rust.elements.RetType +/** + * A closure expression. For example: + * ```rust + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` + */ final class ClosureExpr = Impl::ClosureExpr; diff --git a/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll b/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll index 1adeb059ebe4..4aae647af80f 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll @@ -7,4 +7,13 @@ private import internal.ConstBlockPatImpl import codeql.rust.elements.BlockExpr import codeql.rust.elements.Pat +/** + * A const block pattern. For example: + * ```rust + * match x { + * const { 1 + 2 + 3 } => "ok", + * _ => "fail", + * }; + * ``` + */ final class ConstBlockPat = Impl::ConstBlockPat; diff --git a/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll b/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll index 24c1093ef65b..7db17ff82777 100644 --- a/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll @@ -8,4 +8,21 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.Lifetime +/** + * A continue expression. For example: + * ```rust + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ```rust + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` + */ final class ContinueExpr = Impl::ContinueExpr; diff --git a/rust/ql/lib/codeql/rust/elements/Expr.qll b/rust/ql/lib/codeql/rust/elements/Expr.qll index ed10a1a04337..b91061856a95 100644 --- a/rust/ql/lib/codeql/rust/elements/Expr.qll +++ b/rust/ql/lib/codeql/rust/elements/Expr.qll @@ -6,4 +6,7 @@ private import internal.ExprImpl import codeql.rust.elements.AstNode +/** + * The base class for expressions. + */ final class Expr = Impl::Expr; diff --git a/rust/ql/lib/codeql/rust/elements/ExprStmt.qll b/rust/ql/lib/codeql/rust/elements/ExprStmt.qll index 88e95ae7a460..ba07a0d02a00 100644 --- a/rust/ql/lib/codeql/rust/elements/ExprStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/ExprStmt.qll @@ -7,4 +7,12 @@ private import internal.ExprStmtImpl import codeql.rust.elements.Expr import codeql.rust.elements.Stmt +/** + * An expression statement. For example: + * ```rust + * start(); + * finish() + * use std::env; + * ``` + */ final class ExprStmt = Impl::ExprStmt; diff --git a/rust/ql/lib/codeql/rust/elements/FieldExpr.qll b/rust/ql/lib/codeql/rust/elements/FieldExpr.qll index c855ba37e65f..ab8a9594954c 100644 --- a/rust/ql/lib/codeql/rust/elements/FieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/FieldExpr.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.NameRef +/** + * A field access expression. For example: + * ```rust + * x.foo + * ``` + */ final class FieldExpr = Impl::FieldExpr; diff --git a/rust/ql/lib/codeql/rust/elements/Function.qll b/rust/ql/lib/codeql/rust/elements/Function.qll index 27ba56f08ff9..0c1ea3b16523 100644 --- a/rust/ql/lib/codeql/rust/elements/Function.qll +++ b/rust/ql/lib/codeql/rust/elements/Function.qll @@ -17,4 +17,16 @@ import codeql.rust.elements.RetType import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A function declaration. For example + * ```rust + * fn foo(x: u32) -> u64 {(x + 1).into()} + * ``` + * A function declaration within a trait might not have a body: + * ```rust + * trait Trait { + * fn bar(); + * } + * ``` + */ final class Function = Impl::Function; diff --git a/rust/ql/lib/codeql/rust/elements/GenericArgList.qll b/rust/ql/lib/codeql/rust/elements/GenericArgList.qll index b677acebfb18..74ac1ba688e7 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericArgList.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericArgList.qll @@ -7,4 +7,10 @@ private import internal.GenericArgListImpl import codeql.rust.elements.AstNode import codeql.rust.elements.GenericArg +/** + * The base class for generic arguments. + * ```rust + * x.foo::(42); + * ``` + */ final class GenericArgList = Impl::GenericArgList; diff --git a/rust/ql/lib/codeql/rust/elements/IdentPat.qll b/rust/ql/lib/codeql/rust/elements/IdentPat.qll index 09cd5b22ed16..91ad47b42e1f 100644 --- a/rust/ql/lib/codeql/rust/elements/IdentPat.qll +++ b/rust/ql/lib/codeql/rust/elements/IdentPat.qll @@ -8,4 +8,19 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Name import codeql.rust.elements.Pat +/** + * A binding pattern. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * y@Option::Some(_) => y, + * Option::None => 0, + * }; + * ``` + */ final class IdentPat = Impl::IdentPat; diff --git a/rust/ql/lib/codeql/rust/elements/IfExpr.qll b/rust/ql/lib/codeql/rust/elements/IfExpr.qll index 48bda448aa59..4cc9cde31c70 100644 --- a/rust/ql/lib/codeql/rust/elements/IfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/IfExpr.qll @@ -8,4 +8,19 @@ import codeql.rust.elements.Attr import codeql.rust.elements.BlockExpr import codeql.rust.elements.Expr +/** + * An `if` expression. For example: + * ```rust + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ```rust + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` + */ final class IfExpr = Impl::IfExpr; diff --git a/rust/ql/lib/codeql/rust/elements/IndexExpr.qll b/rust/ql/lib/codeql/rust/elements/IndexExpr.qll index 29550835793e..ea19aad353d0 100644 --- a/rust/ql/lib/codeql/rust/elements/IndexExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/IndexExpr.qll @@ -7,4 +7,11 @@ private import internal.IndexExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * An index expression. For example: + * ```rust + * list[42]; + * list[42] = 1; + * ``` + */ final class IndexExpr = Impl::IndexExpr; diff --git a/rust/ql/lib/codeql/rust/elements/Label.qll b/rust/ql/lib/codeql/rust/elements/Label.qll index dfeca837d405..a2a6eb28f5c1 100644 --- a/rust/ql/lib/codeql/rust/elements/Label.qll +++ b/rust/ql/lib/codeql/rust/elements/Label.qll @@ -7,4 +7,13 @@ private import internal.LabelImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Lifetime +/** + * A label. For example: + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + */ final class Label = Impl::Label; diff --git a/rust/ql/lib/codeql/rust/elements/LetExpr.qll b/rust/ql/lib/codeql/rust/elements/LetExpr.qll index 9ead73ee470e..0792a10cbb7b 100644 --- a/rust/ql/lib/codeql/rust/elements/LetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LetExpr.qll @@ -8,4 +8,12 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.Pat +/** + * A `let` expression. For example: + * ```rust + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` + */ final class LetExpr = Impl::LetExpr; diff --git a/rust/ql/lib/codeql/rust/elements/LetStmt.qll b/rust/ql/lib/codeql/rust/elements/LetStmt.qll index 0ae1ccc69759..63bf60e3e6f7 100644 --- a/rust/ql/lib/codeql/rust/elements/LetStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/LetStmt.qll @@ -11,4 +11,17 @@ import codeql.rust.elements.Pat import codeql.rust.elements.Stmt import codeql.rust.elements.TypeRef +/** + * A let statement. For example: + * ```rust + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + * ``` + */ final class LetStmt = Impl::LetStmt; diff --git a/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll b/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll index a29fdd32293a..91fcd8910cef 100644 --- a/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll @@ -7,4 +7,17 @@ private import internal.LiteralExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A literal expression. For example: + * ```rust + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + * ``` + */ final class LiteralExpr = Impl::LiteralExpr; diff --git a/rust/ql/lib/codeql/rust/elements/LiteralPat.qll b/rust/ql/lib/codeql/rust/elements/LiteralPat.qll index 6155245ce0dc..92afa2074c7a 100644 --- a/rust/ql/lib/codeql/rust/elements/LiteralPat.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralPat.qll @@ -7,4 +7,13 @@ private import internal.LiteralPatImpl import codeql.rust.elements.LiteralExpr import codeql.rust.elements.Pat +/** + * A literal pattern. For example: + * ```rust + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + */ final class LiteralPat = Impl::LiteralPat; diff --git a/rust/ql/lib/codeql/rust/elements/LoopExpr.qll b/rust/ql/lib/codeql/rust/elements/LoopExpr.qll index d1f512db722c..6abc449c6261 100644 --- a/rust/ql/lib/codeql/rust/elements/LoopExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LoopExpr.qll @@ -9,4 +9,28 @@ import codeql.rust.elements.BlockExpr import codeql.rust.elements.Expr import codeql.rust.elements.Label +/** + * A loop expression. For example: + * ```rust + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ```rust + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` + */ final class LoopExpr = Impl::LoopExpr; diff --git a/rust/ql/lib/codeql/rust/elements/MatchArm.qll b/rust/ql/lib/codeql/rust/elements/MatchArm.qll index c49dc73102f7..39505198021f 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchArm.qll @@ -10,4 +10,19 @@ import codeql.rust.elements.Expr import codeql.rust.elements.MatchGuard import codeql.rust.elements.Pat +/** + * A match arm. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * }; + * ``` + */ final class MatchArm = Impl::MatchArm; diff --git a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll index 7057494a969e..ec1a5c538a4f 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll @@ -8,4 +8,19 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.MatchArmList +/** + * A match expression. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * } + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ final class MatchExpr = Impl::MatchExpr; diff --git a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll index c463efc25cb1..ec3d305f63cf 100644 --- a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll @@ -10,4 +10,11 @@ import codeql.rust.elements.Expr import codeql.rust.elements.GenericArgList import codeql.rust.elements.NameRef +/** + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` + */ final class MethodCallExpr = Impl::MethodCallExpr; diff --git a/rust/ql/lib/codeql/rust/elements/Module.qll b/rust/ql/lib/codeql/rust/elements/Module.qll index 49cad8828b75..efb31c3e74f6 100644 --- a/rust/ql/lib/codeql/rust/elements/Module.qll +++ b/rust/ql/lib/codeql/rust/elements/Module.qll @@ -10,4 +10,15 @@ import codeql.rust.elements.ItemList import codeql.rust.elements.Name import codeql.rust.elements.Visibility +/** + * A module declaration. For example: + * ```rust + * mod foo; + * ``` + * ```rust + * mod bar { + * pub fn baz() {} + * } + * ``` + */ final class Module = Impl::Module; diff --git a/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll b/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll index 2fc49b1f2246..3cd31677a690 100644 --- a/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Expr import codeql.rust.elements.NameRef import codeql.rust.elements.TypeRef +/** + * An `offset_of` expression. For example: + * ```rust + * builtin # offset_of(Struct, field); + * ``` + */ final class OffsetOfExpr = Impl::OffsetOfExpr; diff --git a/rust/ql/lib/codeql/rust/elements/OrPat.qll b/rust/ql/lib/codeql/rust/elements/OrPat.qll index f423814315df..755516e9819d 100644 --- a/rust/ql/lib/codeql/rust/elements/OrPat.qll +++ b/rust/ql/lib/codeql/rust/elements/OrPat.qll @@ -6,4 +6,12 @@ private import internal.OrPatImpl import codeql.rust.elements.Pat +/** + * An or pattern. For example: + * ```rust + * match x { + * Option::Some(y) | Option::None => 0, + * } + * ``` + */ final class OrPat = Impl::OrPat; diff --git a/rust/ql/lib/codeql/rust/elements/Pat.qll b/rust/ql/lib/codeql/rust/elements/Pat.qll index 29ad7c9db16e..7a0bf62c5c2c 100644 --- a/rust/ql/lib/codeql/rust/elements/Pat.qll +++ b/rust/ql/lib/codeql/rust/elements/Pat.qll @@ -6,4 +6,7 @@ private import internal.PatImpl import codeql.rust.elements.AstNode +/** + * The base class for patterns. + */ final class Pat = Impl::Pat; diff --git a/rust/ql/lib/codeql/rust/elements/Path.qll b/rust/ql/lib/codeql/rust/elements/Path.qll index 7d5b845efa2b..df6b4a880dff 100644 --- a/rust/ql/lib/codeql/rust/elements/Path.qll +++ b/rust/ql/lib/codeql/rust/elements/Path.qll @@ -7,4 +7,10 @@ private import internal.PathImpl import codeql.rust.elements.AstNode import codeql.rust.elements.PathSegment +/** + * A path. For example: + * ```rust + * foo::bar; + * ``` + */ final class Path = Impl::Path; diff --git a/rust/ql/lib/codeql/rust/elements/PathExpr.qll b/rust/ql/lib/codeql/rust/elements/PathExpr.qll index 3155406c20e1..7bbccd89a633 100644 --- a/rust/ql/lib/codeql/rust/elements/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/PathExpr.qll @@ -8,4 +8,13 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.Path +/** + * A path expression. For example: + * ```rust + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` + */ final class PathExpr = Impl::PathExpr; diff --git a/rust/ql/lib/codeql/rust/elements/PathPat.qll b/rust/ql/lib/codeql/rust/elements/PathPat.qll index 5fc0f06f503e..17dc5f71381c 100644 --- a/rust/ql/lib/codeql/rust/elements/PathPat.qll +++ b/rust/ql/lib/codeql/rust/elements/PathPat.qll @@ -7,4 +7,13 @@ private import internal.PathPatImpl import codeql.rust.elements.Pat import codeql.rust.elements.Path +/** + * A path pattern. For example: + * ```rust + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` + */ final class PathPat = Impl::PathPat; diff --git a/rust/ql/lib/codeql/rust/elements/PrefixExpr.qll b/rust/ql/lib/codeql/rust/elements/PrefixExpr.qll index e07a0b021fde..a90e69c4c818 100644 --- a/rust/ql/lib/codeql/rust/elements/PrefixExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/PrefixExpr.qll @@ -7,4 +7,12 @@ private import internal.PrefixExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A unary operation expression. For example: + * ```rust + * let x = -42 + * let y = !true + * let z = *ptr + * ``` + */ final class PrefixExpr = Impl::PrefixExpr; diff --git a/rust/ql/lib/codeql/rust/elements/RangeExpr.qll b/rust/ql/lib/codeql/rust/elements/RangeExpr.qll index e5fb58a66401..78fec598e0cd 100644 --- a/rust/ql/lib/codeql/rust/elements/RangeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RangeExpr.qll @@ -7,4 +7,15 @@ private import internal.RangeExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A range expression. For example: + * ```rust + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` + */ final class RangeExpr = Impl::RangeExpr; diff --git a/rust/ql/lib/codeql/rust/elements/RangePat.qll b/rust/ql/lib/codeql/rust/elements/RangePat.qll index 38f6eba9db0f..11abd87f4c4c 100644 --- a/rust/ql/lib/codeql/rust/elements/RangePat.qll +++ b/rust/ql/lib/codeql/rust/elements/RangePat.qll @@ -6,4 +6,14 @@ private import internal.RangePatImpl import codeql.rust.elements.Pat +/** + * A range pattern. For example: + * ```rust + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` + */ final class RangePat = Impl::RangePat; diff --git a/rust/ql/lib/codeql/rust/elements/RecordExpr.qll b/rust/ql/lib/codeql/rust/elements/RecordExpr.qll index 61610375f767..90edf3d0c03c 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordExpr.qll @@ -8,4 +8,13 @@ import codeql.rust.elements.Expr import codeql.rust.elements.Path import codeql.rust.elements.RecordExprFieldList +/** + * A record expression. For example: + * ```rust + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` + */ final class RecordExpr = Impl::RecordExpr; diff --git a/rust/ql/lib/codeql/rust/elements/RecordExprField.qll b/rust/ql/lib/codeql/rust/elements/RecordExprField.qll index 49ecea53cc42..c17e1993ff80 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordExprField.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordExprField.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.NameRef +/** + * A field in a record expression. For example `a: 1` in: + * ```rust + * Foo { a: 1, b: 2 }; + * ``` + */ final class RecordExprField = Impl::RecordExprField; diff --git a/rust/ql/lib/codeql/rust/elements/RecordPat.qll b/rust/ql/lib/codeql/rust/elements/RecordPat.qll index 27133bae3d3d..671bafda1c31 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordPat.qll @@ -8,4 +8,13 @@ import codeql.rust.elements.Pat import codeql.rust.elements.Path import codeql.rust.elements.RecordPatFieldList +/** + * A record pattern. For example: + * ```rust + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` + */ final class RecordPat = Impl::RecordPat; diff --git a/rust/ql/lib/codeql/rust/elements/RecordPatField.qll b/rust/ql/lib/codeql/rust/elements/RecordPatField.qll index c27d0365c7ff..8e4545c61a3a 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordPatField.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordPatField.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.NameRef import codeql.rust.elements.Pat +/** + * A field in a record pattern. For example `a: 1` in: + * ```rust + * let Foo { a: 1, b: 2 } = foo; + * ``` + */ final class RecordPatField = Impl::RecordPatField; diff --git a/rust/ql/lib/codeql/rust/elements/RefExpr.qll b/rust/ql/lib/codeql/rust/elements/RefExpr.qll index 018fee69b2f1..8bbc0a8c87ec 100644 --- a/rust/ql/lib/codeql/rust/elements/RefExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RefExpr.qll @@ -7,4 +7,13 @@ private import internal.RefExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A reference expression. For example: + * ```rust + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` + */ final class RefExpr = Impl::RefExpr; diff --git a/rust/ql/lib/codeql/rust/elements/RefPat.qll b/rust/ql/lib/codeql/rust/elements/RefPat.qll index 8158f303d580..02a6c48c1283 100644 --- a/rust/ql/lib/codeql/rust/elements/RefPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RefPat.qll @@ -6,4 +6,13 @@ private import internal.RefPatImpl import codeql.rust.elements.Pat +/** + * A reference pattern. For example: + * ```rust + * match x { + * &mut Option::Some(y) => y, + * &Option::None => 0, + * }; + * ``` + */ final class RefPat = Impl::RefPat; diff --git a/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll b/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll index 5a60d34f984a..73a499ec7876 100644 --- a/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll @@ -7,4 +7,17 @@ private import internal.ReturnExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A return expression. For example: + * ```rust + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ```rust + * fn no_value() -> () { + * return; + * } + * ``` + */ final class ReturnExpr = Impl::ReturnExpr; diff --git a/rust/ql/lib/codeql/rust/elements/SlicePat.qll b/rust/ql/lib/codeql/rust/elements/SlicePat.qll index 0f903cdf60b6..9732b6c35840 100644 --- a/rust/ql/lib/codeql/rust/elements/SlicePat.qll +++ b/rust/ql/lib/codeql/rust/elements/SlicePat.qll @@ -6,4 +6,14 @@ private import internal.SlicePatImpl import codeql.rust.elements.Pat +/** + * A slice pattern. For example: + * ```rust + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + * ``` + */ final class SlicePat = Impl::SlicePat; diff --git a/rust/ql/lib/codeql/rust/elements/Stmt.qll b/rust/ql/lib/codeql/rust/elements/Stmt.qll index 8dcbbc87ac64..7da272f973d9 100644 --- a/rust/ql/lib/codeql/rust/elements/Stmt.qll +++ b/rust/ql/lib/codeql/rust/elements/Stmt.qll @@ -6,4 +6,7 @@ private import internal.StmtImpl import codeql.rust.elements.AstNode +/** + * The base class for statements. + */ final class Stmt = Impl::Stmt; diff --git a/rust/ql/lib/codeql/rust/elements/TupleExpr.qll b/rust/ql/lib/codeql/rust/elements/TupleExpr.qll index 0ae043b70332..e66d46957fc7 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleExpr.qll @@ -7,4 +7,11 @@ private import internal.TupleExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A tuple expression. For example: + * ```rust + * (1, "one"); + * (2, "two")[0] = 3; + * ``` + */ final class TupleExpr = Impl::TupleExpr; diff --git a/rust/ql/lib/codeql/rust/elements/TuplePat.qll b/rust/ql/lib/codeql/rust/elements/TuplePat.qll index e017f607a97a..59be8ffd3ac0 100644 --- a/rust/ql/lib/codeql/rust/elements/TuplePat.qll +++ b/rust/ql/lib/codeql/rust/elements/TuplePat.qll @@ -6,4 +6,11 @@ private import internal.TuplePatImpl import codeql.rust.elements.Pat +/** + * A tuple pattern. For example: + * ```rust + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` + */ final class TuplePat = Impl::TuplePat; diff --git a/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll b/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll index d7be3ead7809..c43672509f73 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll @@ -7,4 +7,14 @@ private import internal.TupleStructPatImpl import codeql.rust.elements.Pat import codeql.rust.elements.Path +/** + * A tuple struct pattern. For example: + * ```rust + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` + */ final class TupleStructPat = Impl::TupleStructPat; diff --git a/rust/ql/lib/codeql/rust/elements/TypeRef.qll b/rust/ql/lib/codeql/rust/elements/TypeRef.qll index a6b081d9be01..f30bd7a0a61e 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeRef.qll @@ -6,4 +6,12 @@ private import internal.TypeRefImpl import codeql.rust.elements.AstNode +/** + * The base class for type references. + * ```rust + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` + */ final class TypeRef = Impl::TypeRef; diff --git a/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll b/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll index 583bc802698a..14d9a39d55f0 100644 --- a/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll @@ -7,4 +7,10 @@ private import internal.UnderscoreExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * An underscore expression. For example: + * ```rust + * _ = 42; + * ``` + */ final class UnderscoreExpr = Impl::UnderscoreExpr; diff --git a/rust/ql/lib/codeql/rust/elements/WildcardPat.qll b/rust/ql/lib/codeql/rust/elements/WildcardPat.qll index 961f34a984d4..1bfbd8ee363d 100644 --- a/rust/ql/lib/codeql/rust/elements/WildcardPat.qll +++ b/rust/ql/lib/codeql/rust/elements/WildcardPat.qll @@ -6,4 +6,10 @@ private import internal.WildcardPatImpl import codeql.rust.elements.Pat +/** + * A wildcard pattern. For example: + * ```rust + * let _ = 42; + * ``` + */ final class WildcardPat = Impl::WildcardPat; diff --git a/rust/ql/lib/codeql/rust/elements/YeetExpr.qll b/rust/ql/lib/codeql/rust/elements/YeetExpr.qll index 3966abb61686..c7e9f8ebdb75 100644 --- a/rust/ql/lib/codeql/rust/elements/YeetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/YeetExpr.qll @@ -7,4 +7,12 @@ private import internal.YeetExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A `yeet` expression. For example: + * ```rust + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` + */ final class YeetExpr = Impl::YeetExpr; diff --git a/rust/ql/lib/codeql/rust/elements/YieldExpr.qll b/rust/ql/lib/codeql/rust/elements/YieldExpr.qll index 962fed243d16..f156071d6f3a 100644 --- a/rust/ql/lib/codeql/rust/elements/YieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/YieldExpr.qll @@ -7,4 +7,13 @@ private import internal.YieldExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A `yield` expression. For example: + * ```rust + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` + */ final class YieldExpr = Impl::YieldExpr; diff --git a/rust/ql/lib/codeql/rust/elements/internal/ArrayExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ArrayExprImpl.qll index 7f8f5cc6a511..ff4ce2248209 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ArrayExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ArrayExprImpl.qll @@ -12,5 +12,12 @@ private import codeql.rust.elements.internal.generated.ArrayExpr * be referenced directly. */ module Impl { + /** + * An array expression. For example: + * ```rust + * [1, 2, 3]; + * [1; 10]; + * ``` + */ class ArrayExpr extends Generated::ArrayExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/AsmExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AsmExprImpl.qll index de46e3bf1135..24160ec3386d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AsmExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AsmExprImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.AsmExpr * be referenced directly. */ module Impl { + /** + * An inline assembly expression. For example: + * ```rust + * unsafe { + * builtin # asm(_); + * } + * ``` + */ class AsmExpr extends Generated::AsmExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/AwaitExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AwaitExprImpl.qll index 8d7cb1b42973..39bbe3017df6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AwaitExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AwaitExprImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.AwaitExpr * be referenced directly. */ module Impl { + /** + * An `await` expression. For example: + * ```rust + * async { + * let x = foo().await; + * x + * } + * ``` + */ class AwaitExpr extends Generated::AwaitExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/BecomeExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BecomeExprImpl.qll index d4589b9097ca..748659cfdd32 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BecomeExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BecomeExprImpl.qll @@ -12,5 +12,17 @@ private import codeql.rust.elements.internal.generated.BecomeExpr * be referenced directly. */ module Impl { + /** + * A `become` expression. For example: + * ```rust + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } + * ``` + */ class BecomeExpr extends Generated::BecomeExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll index 9742f4179d41..10490787fc1c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll @@ -12,5 +12,15 @@ private import codeql.rust.elements.internal.generated.BinaryExpr * be referenced directly. */ module Impl { + /** + * A binary operation expression. For example: + * ```rust + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + */ class BinaryExpr extends Generated::BinaryExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll index 36425a6ed89a..9011109b194e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll @@ -12,5 +12,19 @@ private import codeql.rust.elements.internal.generated.BlockExpr * be referenced directly. */ module Impl { + /** + * A block expression. For example: + * ```rust + * { + * let x = 42; + * } + * ``` + * ```rust + * 'label: { + * let x = 42; + * x + * } + * ``` + */ class BlockExpr extends Generated::BlockExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/BoxPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BoxPatImpl.qll index fd757bedc453..06fb2c0fbfa2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BoxPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BoxPatImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.BoxPat * be referenced directly. */ module Impl { + /** + * A box pattern. For example: + * ```rust + * match x { + * box Option::Some(y) => y, + * box Option::None => 0, + * }; + * ``` + */ class BoxPat extends Generated::BoxPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll index 0315687e50ce..6b1a9eb9ec8b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll @@ -12,5 +12,22 @@ private import codeql.rust.elements.internal.generated.BreakExpr * be referenced directly. */ module Impl { + /** + * A break expression. For example: + * ```rust + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ```rust + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` + */ class BreakExpr extends Generated::BreakExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll index 84a7c91262fa..c03a7b9ac138 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.CallExpr * be referenced directly. */ module Impl { + /** + * A function call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` + */ class CallExpr extends Generated::CallExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll index e713e7d671fc..308c321dfbd2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.CastExpr * be referenced directly. */ module Impl { + /** + * A cast expression. For example: + * ```rust + * value as u64; + * ``` + */ class CastExpr extends Generated::CastExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ClosureExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ClosureExprImpl.qll index 604dfbf3bfb1..b1c6574b17f9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ClosureExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ClosureExprImpl.qll @@ -12,5 +12,17 @@ private import codeql.rust.elements.internal.generated.ClosureExpr * be referenced directly. */ module Impl { + /** + * A closure expression. For example: + * ```rust + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` + */ class ClosureExpr extends Generated::ClosureExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll index 533ca97f26a4..7d823a729568 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.ConstBlockPat * be referenced directly. */ module Impl { + /** + * A const block pattern. For example: + * ```rust + * match x { + * const { 1 + 2 + 3 } => "ok", + * _ => "fail", + * }; + * ``` + */ class ConstBlockPat extends Generated::ConstBlockPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll index 5f78d4d85ee1..dd2476c79b7f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll @@ -12,5 +12,22 @@ private import codeql.rust.elements.internal.generated.ContinueExpr * be referenced directly. */ module Impl { + /** + * A continue expression. For example: + * ```rust + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ```rust + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` + */ class ContinueExpr extends Generated::ContinueExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ExprImpl.qll index dc8c86b6cc9d..a07961ca0825 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ExprImpl.qll @@ -12,5 +12,8 @@ private import codeql.rust.elements.internal.generated.Expr * be referenced directly. */ module Impl { + /** + * The base class for expressions. + */ class Expr extends Generated::Expr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ExprStmtImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ExprStmtImpl.qll index b254ce5a77ef..73806be519b8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ExprStmtImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ExprStmtImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.ExprStmt * be referenced directly. */ module Impl { + /** + * An expression statement. For example: + * ```rust + * start(); + * finish() + * use std::env; + * ``` + */ class ExprStmt extends Generated::ExprStmt { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll index 8e301eb515cf..003d2789e683 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.FieldExpr * be referenced directly. */ module Impl { + /** + * A field access expression. For example: + * ```rust + * x.foo + * ``` + */ class FieldExpr extends Generated::FieldExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/GenericArgListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/GenericArgListImpl.qll index edc4cf4b919a..44d74bffbc6f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/GenericArgListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/GenericArgListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.GenericArgList * be referenced directly. */ module Impl { + /** + * The base class for generic arguments. + * ```rust + * x.foo::(42); + * ``` + */ class GenericArgList extends Generated::GenericArgList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/IdentPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/IdentPatImpl.qll index 7c19e5f5fac7..6f90f3d6d032 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/IdentPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/IdentPatImpl.qll @@ -12,5 +12,20 @@ private import codeql.rust.elements.internal.generated.IdentPat * be referenced directly. */ module Impl { + /** + * A binding pattern. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * y@Option::Some(_) => y, + * Option::None => 0, + * }; + * ``` + */ class IdentPat extends Generated::IdentPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll index e0ee97b4d35c..a500d39c298e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll @@ -12,5 +12,20 @@ private import codeql.rust.elements.internal.generated.IfExpr * be referenced directly. */ module Impl { + /** + * An `if` expression. For example: + * ```rust + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ```rust + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` + */ class IfExpr extends Generated::IfExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll index e700ce01ef32..94ff116cf1d4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll @@ -12,5 +12,12 @@ private import codeql.rust.elements.internal.generated.IndexExpr * be referenced directly. */ module Impl { + /** + * An index expression. For example: + * ```rust + * list[42]; + * list[42] = 1; + * ``` + */ class IndexExpr extends Generated::IndexExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll index ce51e125b72b..6740bb23ea88 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.Label * be referenced directly. */ module Impl { + /** + * A label. For example: + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + */ class Label extends Generated::Label { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LetExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LetExprImpl.qll index 79c0ecb88908..4a99a43ba0fe 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LetExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LetExprImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.LetExpr * be referenced directly. */ module Impl { + /** + * A `let` expression. For example: + * ```rust + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` + */ class LetExpr extends Generated::LetExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll index ac61dd478968..2bcaa6d7905c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll @@ -12,5 +12,18 @@ private import codeql.rust.elements.internal.generated.LetStmt * be referenced directly. */ module Impl { + /** + * A let statement. For example: + * ```rust + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + * ``` + */ class LetStmt extends Generated::LetStmt { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll index 1dcfc59a540c..6c4d1464bd07 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll @@ -12,5 +12,18 @@ private import codeql.rust.elements.internal.generated.LiteralExpr * be referenced directly. */ module Impl { + /** + * A literal expression. For example: + * ```rust + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + * ``` + */ class LiteralExpr extends Generated::LiteralExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll index 9cd51c5499f2..a71d9b1bf848 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.LiteralPat * be referenced directly. */ module Impl { + /** + * A literal pattern. For example: + * ```rust + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + */ class LiteralPat extends Generated::LiteralPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LoopExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LoopExprImpl.qll index 7ca4b9917b5e..c56ea8770d48 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LoopExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LoopExprImpl.qll @@ -12,5 +12,29 @@ private import codeql.rust.elements.internal.generated.LoopExpr * be referenced directly. */ module Impl { + /** + * A loop expression. For example: + * ```rust + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ```rust + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` + */ class LoopExpr extends Generated::LoopExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchArmImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchArmImpl.qll index 701b25790ac7..117e6eb3498b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchArmImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchArmImpl.qll @@ -12,5 +12,20 @@ private import codeql.rust.elements.internal.generated.MatchArm * be referenced directly. */ module Impl { + /** + * A match arm. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * }; + * ``` + */ class MatchArm extends Generated::MatchArm { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll index 99d94b58fe37..fd2cb793ca81 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll @@ -12,5 +12,20 @@ private import codeql.rust.elements.internal.generated.MatchExpr * be referenced directly. */ module Impl { + /** + * A match expression. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * } + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ class MatchExpr extends Generated::MatchExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll index 7d235c28497d..729c2fff0ed8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll @@ -12,5 +12,12 @@ private import codeql.rust.elements.internal.generated.MethodCallExpr * be referenced directly. */ module Impl { + /** + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` + */ class MethodCallExpr extends Generated::MethodCallExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ModuleImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ModuleImpl.qll index 5f9a254f35e2..2e94fad609ca 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ModuleImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ModuleImpl.qll @@ -12,5 +12,16 @@ private import codeql.rust.elements.internal.generated.Module * be referenced directly. */ module Impl { + /** + * A module declaration. For example: + * ```rust + * mod foo; + * ``` + * ```rust + * mod bar { + * pub fn baz() {} + * } + * ``` + */ class Module extends Generated::Module { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll index e440f7f317c3..53a0c2e06dc7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.OffsetOfExpr * be referenced directly. */ module Impl { + /** + * An `offset_of` expression. For example: + * ```rust + * builtin # offset_of(Struct, field); + * ``` + */ class OffsetOfExpr extends Generated::OffsetOfExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/OrPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/OrPatImpl.qll index 01379ef8d5e8..c00be2a77938 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/OrPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/OrPatImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.OrPat * be referenced directly. */ module Impl { + /** + * An or pattern. For example: + * ```rust + * match x { + * Option::Some(y) | Option::None => 0, + * } + * ``` + */ class OrPat extends Generated::OrPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PatImpl.qll index 29b24c7073d7..a6266bdad7a6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PatImpl.qll @@ -12,5 +12,8 @@ private import codeql.rust.elements.internal.generated.Pat * be referenced directly. */ module Impl { + /** + * The base class for patterns. + */ class Pat extends Generated::Pat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll index 46667524d3f5..68b11db73b03 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.PathExpr * be referenced directly. */ module Impl { + /** + * A path expression. For example: + * ```rust + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` + */ class PathExpr extends Generated::PathExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll index c0e8b9cee1f7..9e3d4127cb7e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Path * be referenced directly. */ module Impl { + /** + * A path. For example: + * ```rust + * foo::bar; + * ``` + */ class Path extends Generated::Path { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll index a6826c36584f..0acf7a588ba6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.PathPat * be referenced directly. */ module Impl { + /** + * A path pattern. For example: + * ```rust + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` + */ class PathPat extends Generated::PathPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll index 51bcde87a29f..f5878bac274e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.PrefixExpr * be referenced directly. */ module Impl { + /** + * A unary operation expression. For example: + * ```rust + * let x = -42 + * let y = !true + * let z = *ptr + * ``` + */ class PrefixExpr extends Generated::PrefixExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RangeExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RangeExprImpl.qll index 6dd3fc5adc14..c015171253f7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RangeExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RangeExprImpl.qll @@ -12,5 +12,16 @@ private import codeql.rust.elements.internal.generated.RangeExpr * be referenced directly. */ module Impl { + /** + * A range expression. For example: + * ```rust + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` + */ class RangeExpr extends Generated::RangeExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RangePatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RangePatImpl.qll index 61b8659b452b..dc88a8070a5a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RangePatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RangePatImpl.qll @@ -12,5 +12,15 @@ private import codeql.rust.elements.internal.generated.RangePat * be referenced directly. */ module Impl { + /** + * A range pattern. For example: + * ```rust + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` + */ class RangePat extends Generated::RangePat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll index f0bde6b05a46..12b86bb1e4ab 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RecordExprField * be referenced directly. */ module Impl { + /** + * A field in a record expression. For example `a: 1` in: + * ```rust + * Foo { a: 1, b: 2 }; + * ``` + */ class RecordExprField extends Generated::RecordExprField { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordExprImpl.qll index b55dbcb7599a..befc9b26ebbd 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordExprImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.RecordExpr * be referenced directly. */ module Impl { + /** + * A record expression. For example: + * ```rust + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` + */ class RecordExpr extends Generated::RecordExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll index 7dc44dd849e4..baab0c1964d5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RecordPatField * be referenced directly. */ module Impl { + /** + * A field in a record pattern. For example `a: 1` in: + * ```rust + * let Foo { a: 1, b: 2 } = foo; + * ``` + */ class RecordPatField extends Generated::RecordPatField { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll index 814827bcb601..6378e3220e0f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.RecordPat * be referenced directly. */ module Impl { + /** + * A record pattern. For example: + * ```rust + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` + */ class RecordPat extends Generated::RecordPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RefExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RefExprImpl.qll index 1818238e636c..abc45e0d5c21 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RefExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RefExprImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.RefExpr * be referenced directly. */ module Impl { + /** + * A reference expression. For example: + * ```rust + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` + */ class RefExpr extends Generated::RefExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RefPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RefPatImpl.qll index 812f422b556d..03b1abf5a4f9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RefPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RefPatImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.RefPat * be referenced directly. */ module Impl { + /** + * A reference pattern. For example: + * ```rust + * match x { + * &mut Option::Some(y) => y, + * &Option::None => 0, + * }; + * ``` + */ class RefPat extends Generated::RefPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ReturnExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ReturnExprImpl.qll index 86ee1a1bef72..fd185c01b1df 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ReturnExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ReturnExprImpl.qll @@ -12,5 +12,18 @@ private import codeql.rust.elements.internal.generated.ReturnExpr * be referenced directly. */ module Impl { + /** + * A return expression. For example: + * ```rust + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ```rust + * fn no_value() -> () { + * return; + * } + * ``` + */ class ReturnExpr extends Generated::ReturnExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/SlicePatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/SlicePatImpl.qll index 491d5672ecdd..d905247cc663 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/SlicePatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/SlicePatImpl.qll @@ -12,5 +12,15 @@ private import codeql.rust.elements.internal.generated.SlicePat * be referenced directly. */ module Impl { + /** + * A slice pattern. For example: + * ```rust + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + * ``` + */ class SlicePat extends Generated::SlicePat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StmtImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StmtImpl.qll index 65a235695e11..cb812f3c4ed4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StmtImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StmtImpl.qll @@ -12,5 +12,8 @@ private import codeql.rust.elements.internal.generated.Stmt * be referenced directly. */ module Impl { + /** + * The base class for statements. + */ class Stmt extends Generated::Stmt { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleExprImpl.qll index 0aa76f871641..eead8bd32ef6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleExprImpl.qll @@ -12,5 +12,12 @@ private import codeql.rust.elements.internal.generated.TupleExpr * be referenced directly. */ module Impl { + /** + * A tuple expression. For example: + * ```rust + * (1, "one"); + * (2, "two")[0] = 3; + * ``` + */ class TupleExpr extends Generated::TupleExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TuplePatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TuplePatImpl.qll index 7e6a24e00ebb..93f5b79c8208 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TuplePatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TuplePatImpl.qll @@ -12,5 +12,12 @@ private import codeql.rust.elements.internal.generated.TuplePat * be referenced directly. */ module Impl { + /** + * A tuple pattern. For example: + * ```rust + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` + */ class TuplePat extends Generated::TuplePat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll index 095fd054f21f..1f92ed5a1902 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll @@ -12,5 +12,15 @@ private import codeql.rust.elements.internal.generated.TupleStructPat * be referenced directly. */ module Impl { + /** + * A tuple struct pattern. For example: + * ```rust + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` + */ class TupleStructPat extends Generated::TupleStructPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeRefImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeRefImpl.qll index f35ab7437f9b..bd2629b84842 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeRefImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeRefImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.TypeRef * be referenced directly. */ module Impl { + /** + * The base class for type references. + * ```rust + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` + */ class TypeRef extends Generated::TypeRef { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll index b228aabedad9..03709c54b545 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.UnderscoreExpr * be referenced directly. */ module Impl { + /** + * An underscore expression. For example: + * ```rust + * _ = 42; + * ``` + */ class UnderscoreExpr extends Generated::UnderscoreExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/WildcardPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/WildcardPatImpl.qll index 3baeade332b8..d12e49e1daa9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/WildcardPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/WildcardPatImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.WildcardPat * be referenced directly. */ module Impl { + /** + * A wildcard pattern. For example: + * ```rust + * let _ = 42; + * ``` + */ class WildcardPat extends Generated::WildcardPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/YeetExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/YeetExprImpl.qll index 4d4554ff7ec1..37ddd76f8f8d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/YeetExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/YeetExprImpl.qll @@ -12,5 +12,13 @@ private import codeql.rust.elements.internal.generated.YeetExpr * be referenced directly. */ module Impl { + /** + * A `yeet` expression. For example: + * ```rust + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` + */ class YeetExpr extends Generated::YeetExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/YieldExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/YieldExprImpl.qll index b76e121f9484..573f66266158 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/YieldExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/YieldExprImpl.qll @@ -12,5 +12,14 @@ private import codeql.rust.elements.internal.generated.YieldExpr * be referenced directly. */ module Impl { + /** + * A `yield` expression. For example: + * ```rust + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` + */ class YieldExpr extends Generated::YieldExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayExpr.qll index e728257931af..95ffb4911296 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayExpr.qll @@ -16,6 +16,11 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * An array expression. For example: + * ```rust + * [1, 2, 3]; + * [1; 10]; + * ``` * INTERNAL: Do not reference the `Generated::ArrayExpr` class directly. * Use the subclass `ArrayExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/AsmExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/AsmExpr.qll index 6a4c7e9f43b7..0ab382232d7d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/AsmExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/AsmExpr.qll @@ -16,6 +16,12 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * An inline assembly expression. For example: + * ```rust + * unsafe { + * builtin # asm(_); + * } + * ``` * INTERNAL: Do not reference the `Generated::AsmExpr` class directly. * Use the subclass `AsmExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/AwaitExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/AwaitExpr.qll index a4cec30526f2..baef03315c92 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/AwaitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/AwaitExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * An `await` expression. For example: + * ```rust + * async { + * let x = foo().await; + * x + * } + * ``` * INTERNAL: Do not reference the `Generated::AwaitExpr` class directly. * Use the subclass `AwaitExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/BecomeExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/BecomeExpr.qll index d098a75bd501..7fdd78fcbee9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/BecomeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/BecomeExpr.qll @@ -16,6 +16,16 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A `become` expression. For example: + * ```rust + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } + * ``` * INTERNAL: Do not reference the `Generated::BecomeExpr` class directly. * Use the subclass `BecomeExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/BinaryExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/BinaryExpr.qll index 301aaa99fb6b..68e7d391e396 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/BinaryExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/BinaryExpr.qll @@ -16,6 +16,14 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A binary operation expression. For example: + * ```rust + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` * INTERNAL: Do not reference the `Generated::BinaryExpr` class directly. * Use the subclass `BinaryExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/BlockExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/BlockExpr.qll index 5d6f943d4a00..7627172ee83c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/BlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/BlockExpr.qll @@ -17,6 +17,18 @@ import codeql.rust.elements.StmtList */ module Generated { /** + * A block expression. For example: + * ```rust + * { + * let x = 42; + * } + * ``` + * ```rust + * 'label: { + * let x = 42; + * x + * } + * ``` * INTERNAL: Do not reference the `Generated::BlockExpr` class directly. * Use the subclass `BlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/BoxPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/BoxPat.qll index 2276e79d240e..d741991d0014 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/BoxPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/BoxPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A box pattern. For example: + * ```rust + * match x { + * box Option::Some(y) => y, + * box Option::None => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::BoxPat` class directly. * Use the subclass `BoxPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/BreakExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/BreakExpr.qll index 0ad86db84918..b2a0e92d1331 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/BreakExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/BreakExpr.qll @@ -17,6 +17,21 @@ import codeql.rust.elements.Lifetime */ module Generated { /** + * A break expression. For example: + * ```rust + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ```rust + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` * INTERNAL: Do not reference the `Generated::BreakExpr` class directly. * Use the subclass `BreakExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll index 97f5e2be8739..f7b27e6e2a84 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll @@ -17,6 +17,13 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A function call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` * INTERNAL: Do not reference the `Generated::CallExpr` class directly. * Use the subclass `CallExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CastExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CastExpr.qll index 18d3b85006bd..9ede7cd7f336 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CastExpr.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A cast expression. For example: + * ```rust + * value as u64; + * ``` * INTERNAL: Do not reference the `Generated::CastExpr` class directly. * Use the subclass `CastExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureExpr.qll index c9f5af374864..54a703414710 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureExpr.qll @@ -19,6 +19,16 @@ import codeql.rust.elements.RetType */ module Generated { /** + * A closure expression. For example: + * ```rust + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` * INTERNAL: Do not reference the `Generated::ClosureExpr` class directly. * Use the subclass `ClosureExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll index fe51ed000c23..81e0319919ab 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A const block pattern. For example: + * ```rust + * match x { + * const { 1 + 2 + 3 } => "ok", + * _ => "fail", + * }; + * ``` * INTERNAL: Do not reference the `Generated::ConstBlockPat` class directly. * Use the subclass `ConstBlockPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ContinueExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ContinueExpr.qll index a0de0203edef..9e8df8e22e6b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ContinueExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ContinueExpr.qll @@ -16,6 +16,21 @@ import codeql.rust.elements.Lifetime */ module Generated { /** + * A continue expression. For example: + * ```rust + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ```rust + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` * INTERNAL: Do not reference the `Generated::ContinueExpr` class directly. * Use the subclass `ContinueExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll index 7cefa1c9c20e..f8cec8877515 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * The base class for expressions. * INTERNAL: Do not reference the `Generated::Expr` class directly. * Use the subclass `Expr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ExprStmt.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ExprStmt.qll index 50285c4ec683..796630f83d03 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ExprStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ExprStmt.qll @@ -15,6 +15,12 @@ import codeql.rust.elements.internal.StmtImpl::Impl as StmtImpl */ module Generated { /** + * An expression statement. For example: + * ```rust + * start(); + * finish() + * use std::env; + * ``` * INTERNAL: Do not reference the `Generated::ExprStmt` class directly. * Use the subclass `ExprStmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/FieldExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/FieldExpr.qll index 47574da92b1b..909af4a3b045 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/FieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/FieldExpr.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.NameRef */ module Generated { /** + * A field access expression. For example: + * ```rust + * x.foo + * ``` * INTERNAL: Do not reference the `Generated::FieldExpr` class directly. * Use the subclass `FieldExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Function.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Function.qll index 9e8b1e6e03c3..82bfe1df7dfe 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Function.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Function.qll @@ -25,6 +25,16 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A function declaration. For example + * ```rust + * fn foo(x: u32) -> u64 {(x + 1).into()} + * ``` + * A function declaration within a trait might not have a body: + * ```rust + * trait Trait { + * fn bar(); + * } + * ``` * INTERNAL: Do not reference the `Generated::Function` class directly. * Use the subclass `Function`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArgList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArgList.qll index 450b31d8ff25..ac10d591ec17 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArgList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArgList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.GenericArg */ module Generated { /** + * The base class for generic arguments. + * ```rust + * x.foo::(42); + * ``` * INTERNAL: Do not reference the `Generated::GenericArgList` class directly. * Use the subclass `GenericArgList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/IdentPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/IdentPat.qll index 78fbbee139fb..bf77fbc3c083 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/IdentPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/IdentPat.qll @@ -17,6 +17,19 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A binding pattern. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * y@Option::Some(_) => y, + * Option::None => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::IdentPat` class directly. * Use the subclass `IdentPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/IfExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/IfExpr.qll index 04865d9f6399..386c74d25f9f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/IfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/IfExpr.qll @@ -17,6 +17,19 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * An `if` expression. For example: + * ```rust + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ```rust + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` * INTERNAL: Do not reference the `Generated::IfExpr` class directly. * Use the subclass `IfExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/IndexExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/IndexExpr.qll index 8d0a7f0bddab..51a9cd393e42 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/IndexExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/IndexExpr.qll @@ -16,6 +16,11 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * An index expression. For example: + * ```rust + * list[42]; + * list[42] = 1; + * ``` * INTERNAL: Do not reference the `Generated::IndexExpr` class directly. * Use the subclass `IndexExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Label.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Label.qll index 3605a1bac531..8cb3102efd9b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Label.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Label.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Lifetime */ module Generated { /** + * A label. For example: + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` * INTERNAL: Do not reference the `Generated::Label` class directly. * Use the subclass `Label`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LetExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LetExpr.qll index 2d8a06ec9e06..b53dc1c8c67e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LetExpr.qll @@ -17,6 +17,12 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A `let` expression. For example: + * ```rust + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` * INTERNAL: Do not reference the `Generated::LetExpr` class directly. * Use the subclass `LetExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LetStmt.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LetStmt.qll index 059c98fe645f..3555636dc329 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LetStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LetStmt.qll @@ -19,6 +19,17 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A let statement. For example: + * ```rust + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + * ``` * INTERNAL: Do not reference the `Generated::LetStmt` class directly. * Use the subclass `LetStmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralExpr.qll index 4123cf925f6a..57967d06538e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralExpr.qll @@ -15,6 +15,17 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A literal expression. For example: + * ```rust + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + * ``` * INTERNAL: Do not reference the `Generated::LiteralExpr` class directly. * Use the subclass `LiteralExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralPat.qll index a23242a3a044..84afc44e9e62 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LiteralPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A literal pattern. For example: + * ```rust + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::LiteralPat` class directly. * Use the subclass `LiteralPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LoopExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LoopExpr.qll index ed74a92e1306..eb943bf746aa 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LoopExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LoopExpr.qll @@ -17,6 +17,28 @@ import codeql.rust.elements.Label */ module Generated { /** + * A loop expression. For example: + * ```rust + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ```rust + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` * INTERNAL: Do not reference the `Generated::LoopExpr` class directly. * Use the subclass `LoopExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArm.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArm.qll index d45c62fc18d9..ae078cdfad42 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArm.qll @@ -18,6 +18,19 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A match arm. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::MatchArm` class directly. * Use the subclass `MatchArm`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchExpr.qll index 8767f3f655d2..5b48d8e18544 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchExpr.qll @@ -17,6 +17,19 @@ import codeql.rust.elements.MatchArmList */ module Generated { /** + * A match expression. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * } + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::MatchExpr` class directly. * Use the subclass `MatchExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll index e6fd4b6fe8f5..0cc8f2437065 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll @@ -19,6 +19,11 @@ import codeql.rust.elements.NameRef */ module Generated { /** + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` * INTERNAL: Do not reference the `Generated::MethodCallExpr` class directly. * Use the subclass `MethodCallExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Module.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Module.qll index dc610d0f79d5..b4513c9ae855 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Module.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Module.qll @@ -18,6 +18,15 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A module declaration. For example: + * ```rust + * mod foo; + * ``` + * ```rust + * mod bar { + * pub fn baz() {} + * } + * ``` * INTERNAL: Do not reference the `Generated::Module` class directly. * Use the subclass `Module`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll index 9af7a36ff7df..3c41c47dbdcb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * An `offset_of` expression. For example: + * ```rust + * builtin # offset_of(Struct, field); + * ``` * INTERNAL: Do not reference the `Generated::OffsetOfExpr` class directly. * Use the subclass `OffsetOfExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/OrPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/OrPat.qll index 264f95b326fd..cfa9d9f76150 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/OrPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/OrPat.qll @@ -15,6 +15,12 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * An or pattern. For example: + * ```rust + * match x { + * Option::Some(y) | Option::None => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::OrPat` class directly. * Use the subclass `OrPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll index 5ffda711d9a0..e0725bd0212b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * The base class for patterns. * INTERNAL: Do not reference the `Generated::Pat` class directly. * Use the subclass `Pat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll index 0dbe027c1d4c..2bc8e3dfd6a1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.PathSegment */ module Generated { /** + * A path. For example: + * ```rust + * foo::bar; + * ``` * INTERNAL: Do not reference the `Generated::Path` class directly. * Use the subclass `Path`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PathExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PathExpr.qll index 5363ff3e06b1..effd28fbd025 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PathExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.Path */ module Generated { /** + * A path expression. For example: + * ```rust + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` * INTERNAL: Do not reference the `Generated::PathExpr` class directly. * Use the subclass `PathExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PathPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PathPat.qll index cf988588cc6f..f91949de40e6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PathPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PathPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Path */ module Generated { /** + * A path pattern. For example: + * ```rust + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::PathPat` class directly. * Use the subclass `PathPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PrefixExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PrefixExpr.qll index 00e8a9ce21de..307572a27c89 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PrefixExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PrefixExpr.qll @@ -16,6 +16,12 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A unary operation expression. For example: + * ```rust + * let x = -42 + * let y = !true + * let z = *ptr + * ``` * INTERNAL: Do not reference the `Generated::PrefixExpr` class directly. * Use the subclass `PrefixExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RangeExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RangeExpr.qll index 1276eda8ad51..06595838c222 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RangeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RangeExpr.qll @@ -16,6 +16,15 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A range expression. For example: + * ```rust + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` * INTERNAL: Do not reference the `Generated::RangeExpr` class directly. * Use the subclass `RangeExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RangePat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RangePat.qll index 3c9e6c9fd3e0..2d78268e4248 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RangePat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RangePat.qll @@ -15,6 +15,14 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A range pattern. For example: + * ```rust + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` * INTERNAL: Do not reference the `Generated::RangePat` class directly. * Use the subclass `RangePat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll index 42b7efdd6c4d..5a0cb115feab 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -117,6 +117,7 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for expressions. */ class Expr extends @expr, AstNode { } @@ -171,6 +172,10 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for generic arguments. + * ```rust + * x.foo::(42); + * ``` */ class GenericArgList extends @generic_arg_list, AstNode { override string toString() { result = "GenericArgList" } @@ -219,6 +224,13 @@ module Raw { /** * INTERNAL: Do not use. + * A label. For example: + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` */ class Label extends @label, AstNode { override string toString() { result = "Label" } @@ -255,6 +267,19 @@ module Raw { /** * INTERNAL: Do not use. + * A match arm. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * }; + * ``` */ class MatchArm extends @match_arm, AstNode { override string toString() { result = "MatchArm" } @@ -396,11 +421,16 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for patterns. */ class Pat extends @pat, AstNode { } /** * INTERNAL: Do not use. + * A path. For example: + * ```rust + * foo::bar; + * ``` */ class Path extends @path, AstNode { override string toString() { result = "Path" } @@ -460,6 +490,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field in a record expression. For example `a: 1` in: + * ```rust + * Foo { a: 1, b: 2 }; + * ``` */ class RecordExprField extends @record_expr_field, AstNode { override string toString() { result = "RecordExprField" } @@ -531,6 +565,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field in a record pattern. For example `a: 1` in: + * ```rust + * let Foo { a: 1, b: 2 } = foo; + * ``` */ class RecordPatField extends @record_pat_field, AstNode { override string toString() { result = "RecordPatField" } @@ -645,6 +683,7 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for statements. */ class Stmt extends @stmt, AstNode { } @@ -735,6 +774,12 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for type references. + * ```rust + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` */ class TypeRef extends @type_ref, AstNode { } @@ -869,6 +914,11 @@ module Raw { /** * INTERNAL: Do not use. + * An array expression. For example: + * ```rust + * [1, 2, 3]; + * [1; 10]; + * ``` */ class ArrayExpr extends @array_expr, Expr { override string toString() { result = "ArrayExpr" } @@ -903,6 +953,12 @@ module Raw { /** * INTERNAL: Do not use. + * An inline assembly expression. For example: + * ```rust + * unsafe { + * builtin # asm(_); + * } + * ``` */ class AsmExpr extends @asm_expr, Expr { override string toString() { result = "AsmExpr" } @@ -967,6 +1023,13 @@ module Raw { /** * INTERNAL: Do not use. + * An `await` expression. For example: + * ```rust + * async { + * let x = foo().await; + * x + * } + * ``` */ class AwaitExpr extends @await_expr, Expr { override string toString() { result = "AwaitExpr" } @@ -984,6 +1047,16 @@ module Raw { /** * INTERNAL: Do not use. + * A `become` expression. For example: + * ```rust + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } + * ``` */ class BecomeExpr extends @become_expr, Expr { override string toString() { result = "BecomeExpr" } @@ -1001,6 +1074,14 @@ module Raw { /** * INTERNAL: Do not use. + * A binary operation expression. For example: + * ```rust + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` */ class BinaryExpr extends @binary_expr, Expr { override string toString() { result = "BinaryExpr" } @@ -1028,6 +1109,18 @@ module Raw { /** * INTERNAL: Do not use. + * A block expression. For example: + * ```rust + * { + * let x = 42; + * } + * ``` + * ```rust + * 'label: { + * let x = 42; + * x + * } + * ``` */ class BlockExpr extends @block_expr, Expr { override string toString() { result = "BlockExpr" } @@ -1050,6 +1143,13 @@ module Raw { /** * INTERNAL: Do not use. + * A box pattern. For example: + * ```rust + * match x { + * box Option::Some(y) => y, + * box Option::None => 0, + * }; + * ``` */ class BoxPat extends @box_pat, Pat { override string toString() { result = "BoxPat" } @@ -1062,6 +1162,21 @@ module Raw { /** * INTERNAL: Do not use. + * A break expression. For example: + * ```rust + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ```rust + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` */ class BreakExpr extends @break_expr, Expr { override string toString() { result = "BreakExpr" } @@ -1084,6 +1199,13 @@ module Raw { /** * INTERNAL: Do not use. + * A function call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` */ class CallExpr extends @call_expr, Expr { override string toString() { result = "CallExpr" } @@ -1106,6 +1228,10 @@ module Raw { /** * INTERNAL: Do not use. + * A cast expression. For example: + * ```rust + * value as u64; + * ``` */ class CastExpr extends @cast_expr, Expr { override string toString() { result = "CastExpr" } @@ -1128,6 +1254,16 @@ module Raw { /** * INTERNAL: Do not use. + * A closure expression. For example: + * ```rust + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` */ class ClosureExpr extends @closure_expr, Expr { override string toString() { result = "ClosureExpr" } @@ -1172,6 +1308,13 @@ module Raw { /** * INTERNAL: Do not use. + * A const block pattern. For example: + * ```rust + * match x { + * const { 1 + 2 + 3 } => "ok", + * _ => "fail", + * }; + * ``` */ class ConstBlockPat extends @const_block_pat, Pat { override string toString() { result = "ConstBlockPat" } @@ -1211,6 +1354,21 @@ module Raw { /** * INTERNAL: Do not use. + * A continue expression. For example: + * ```rust + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ```rust + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` */ class ContinueExpr extends @continue_expr, Expr { override string toString() { result = "ContinueExpr" } @@ -1240,6 +1398,12 @@ module Raw { /** * INTERNAL: Do not use. + * An expression statement. For example: + * ```rust + * start(); + * finish() + * use std::env; + * ``` */ class ExprStmt extends @expr_stmt, Stmt { override string toString() { result = "ExprStmt" } @@ -1252,6 +1416,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field access expression. For example: + * ```rust + * x.foo + * ``` */ class FieldExpr extends @field_expr, Expr { override string toString() { result = "FieldExpr" } @@ -1367,6 +1535,19 @@ module Raw { /** * INTERNAL: Do not use. + * A binding pattern. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * y@Option::Some(_) => y, + * Option::None => 0, + * }; + * ``` */ class IdentPat extends @ident_pat, Pat { override string toString() { result = "IdentPat" } @@ -1389,6 +1570,19 @@ module Raw { /** * INTERNAL: Do not use. + * An `if` expression. For example: + * ```rust + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ```rust + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` */ class IfExpr extends @if_expr, Expr { override string toString() { result = "IfExpr" } @@ -1428,6 +1622,11 @@ module Raw { /** * INTERNAL: Do not use. + * An index expression. For example: + * ```rust + * list[42]; + * list[42] = 1; + * ``` */ class IndexExpr extends @index_expr, Expr { override string toString() { result = "IndexExpr" } @@ -1462,6 +1661,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `let` expression. For example: + * ```rust + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` */ class LetExpr extends @let_expr, Expr { override string toString() { result = "LetExpr" } @@ -1484,6 +1689,17 @@ module Raw { /** * INTERNAL: Do not use. + * A let statement. For example: + * ```rust + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + * ``` */ class LetStmt extends @let_stmt, Stmt { override string toString() { result = "LetStmt" } @@ -1550,6 +1766,17 @@ module Raw { /** * INTERNAL: Do not use. + * A literal expression. For example: + * ```rust + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + * ``` */ class LiteralExpr extends @literal_expr, Expr { override string toString() { result = "LiteralExpr" } @@ -1567,6 +1794,13 @@ module Raw { /** * INTERNAL: Do not use. + * A literal pattern. For example: + * ```rust + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` */ class LiteralPat extends @literal_pat, Pat { override string toString() { result = "LiteralPat" } @@ -1579,6 +1813,28 @@ module Raw { /** * INTERNAL: Do not use. + * A loop expression. For example: + * ```rust + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ```rust + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` */ class LoopExpr extends @loop_expr, Expr { override string toString() { result = "LoopExpr" } @@ -1637,6 +1893,19 @@ module Raw { /** * INTERNAL: Do not use. + * A match expression. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * } + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` */ class MatchExpr extends @match_expr, Expr { override string toString() { result = "MatchExpr" } @@ -1659,6 +1928,11 @@ module Raw { /** * INTERNAL: Do not use. + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` */ class MethodCallExpr extends @method_call_expr, Expr { override string toString() { result = "MethodCallExpr" } @@ -1698,6 +1972,10 @@ module Raw { /** * INTERNAL: Do not use. + * An `offset_of` expression. For example: + * ```rust + * builtin # offset_of(Struct, field); + * ``` */ class OffsetOfExpr extends @offset_of_expr, Expr { override string toString() { result = "OffsetOfExpr" } @@ -1720,6 +1998,12 @@ module Raw { /** * INTERNAL: Do not use. + * An or pattern. For example: + * ```rust + * match x { + * Option::Some(y) | Option::None => 0, + * } + * ``` */ class OrPat extends @or_pat, Pat { override string toString() { result = "OrPat" } @@ -1773,6 +2057,13 @@ module Raw { /** * INTERNAL: Do not use. + * A path expression. For example: + * ```rust + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` */ class PathExpr extends @path_expr, Expr { override string toString() { result = "PathExpr" } @@ -1790,6 +2081,13 @@ module Raw { /** * INTERNAL: Do not use. + * A path pattern. For example: + * ```rust + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` */ class PathPat extends @path_pat, Pat { override string toString() { result = "PathPat" } @@ -1814,6 +2112,12 @@ module Raw { /** * INTERNAL: Do not use. + * A unary operation expression. For example: + * ```rust + * let x = -42 + * let y = !true + * let z = *ptr + * ``` */ class PrefixExpr extends @prefix_expr, Expr { override string toString() { result = "PrefixExpr" } @@ -1848,6 +2152,15 @@ module Raw { /** * INTERNAL: Do not use. + * A range expression. For example: + * ```rust + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` */ class RangeExpr extends @range_expr, Expr { override string toString() { result = "RangeExpr" } @@ -1875,6 +2188,14 @@ module Raw { /** * INTERNAL: Do not use. + * A range pattern. For example: + * ```rust + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` */ class RangePat extends @range_pat, Pat { override string toString() { result = "RangePat" } @@ -1897,6 +2218,13 @@ module Raw { /** * INTERNAL: Do not use. + * A record expression. For example: + * ```rust + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` */ class RecordExpr extends @record_expr, Expr { override string toString() { result = "RecordExpr" } @@ -1928,6 +2256,13 @@ module Raw { /** * INTERNAL: Do not use. + * A record pattern. For example: + * ```rust + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` */ class RecordPat extends @record_pat, Pat { override string toString() { result = "RecordPat" } @@ -1945,6 +2280,13 @@ module Raw { /** * INTERNAL: Do not use. + * A reference expression. For example: + * ```rust + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` */ class RefExpr extends @ref_expr, Expr { override string toString() { result = "RefExpr" } @@ -1962,6 +2304,13 @@ module Raw { /** * INTERNAL: Do not use. + * A reference pattern. For example: + * ```rust + * match x { + * &mut Option::Some(y) => y, + * &Option::None => 0, + * }; + * ``` */ class RefPat extends @ref_pat, Pat { override string toString() { result = "RefPat" } @@ -2003,6 +2352,17 @@ module Raw { /** * INTERNAL: Do not use. + * A return expression. For example: + * ```rust + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ```rust + * fn no_value() -> () { + * return; + * } + * ``` */ class ReturnExpr extends @return_expr, Expr { override string toString() { result = "ReturnExpr" } @@ -2020,6 +2380,14 @@ module Raw { /** * INTERNAL: Do not use. + * A slice pattern. For example: + * ```rust + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + * ``` */ class SlicePat extends @slice_pat, Pat { override string toString() { result = "SlicePat" } @@ -2061,6 +2429,11 @@ module Raw { /** * INTERNAL: Do not use. + * A tuple expression. For example: + * ```rust + * (1, "one"); + * (2, "two")[0] = 3; + * ``` */ class TupleExpr extends @tuple_expr, Expr { override string toString() { result = "TupleExpr" } @@ -2090,6 +2463,11 @@ module Raw { /** * INTERNAL: Do not use. + * A tuple pattern. For example: + * ```rust + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` */ class TuplePat extends @tuple_pat, Pat { override string toString() { result = "TuplePat" } @@ -2102,6 +2480,14 @@ module Raw { /** * INTERNAL: Do not use. + * A tuple struct pattern. For example: + * ```rust + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` */ class TupleStructPat extends @tuple_struct_pat, Pat { override string toString() { result = "TupleStructPat" } @@ -2170,6 +2556,10 @@ module Raw { /** * INTERNAL: Do not use. + * An underscore expression. For example: + * ```rust + * _ = 42; + * ``` */ class UnderscoreExpr extends @underscore_expr, Expr { override string toString() { result = "UnderscoreExpr" } @@ -2209,6 +2599,10 @@ module Raw { /** * INTERNAL: Do not use. + * A wildcard pattern. For example: + * ```rust + * let _ = 42; + * ``` */ class WildcardPat extends @wildcard_pat, Pat { override string toString() { result = "WildcardPat" } @@ -2216,6 +2610,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `yeet` expression. For example: + * ```rust + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` */ class YeetExpr extends @yeet_expr, Expr { override string toString() { result = "YeetExpr" } @@ -2233,6 +2633,13 @@ module Raw { /** * INTERNAL: Do not use. + * A `yield` expression. For example: + * ```rust + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` */ class YieldExpr extends @yield_expr, Expr { override string toString() { result = "YieldExpr" } @@ -2368,6 +2775,16 @@ module Raw { /** * INTERNAL: Do not use. + * A function declaration. For example + * ```rust + * fn foo(x: u32) -> u64 {(x + 1).into()} + * ``` + * A function declaration within a trait might not have a body: + * ```rust + * trait Trait { + * fn bar(); + * } + * ``` */ class Function extends @function, AssocItem, ExternItem, Item { override string toString() { result = "Function" } @@ -2543,6 +2960,15 @@ module Raw { /** * INTERNAL: Do not use. + * A module declaration. For example: + * ```rust + * mod foo; + * ``` + * ```rust + * mod bar { + * pub fn baz() {} + * } + * ``` */ class Module extends @module, Item { override string toString() { result = "Module" } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExpr.qll index fdcf3d3ec091..96fc2aa61d05 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.RecordExprFieldList */ module Generated { /** + * A record expression. For example: + * ```rust + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` * INTERNAL: Do not reference the `Generated::RecordExpr` class directly. * Use the subclass `RecordExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprField.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprField.qll index df3750c331ae..ddf9cd248061 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprField.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprField.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.NameRef */ module Generated { /** + * A field in a record expression. For example `a: 1` in: + * ```rust + * Foo { a: 1, b: 2 }; + * ``` * INTERNAL: Do not reference the `Generated::RecordExprField` class directly. * Use the subclass `RecordExprField`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPat.qll index f2b45d1d6765..b4aa66a71a0d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPat.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.RecordPatFieldList */ module Generated { /** + * A record pattern. For example: + * ```rust + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::RecordPat` class directly. * Use the subclass `RecordPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatField.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatField.qll index 9abe55348543..942df1972e40 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatField.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatField.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A field in a record pattern. For example `a: 1` in: + * ```rust + * let Foo { a: 1, b: 2 } = foo; + * ``` * INTERNAL: Do not reference the `Generated::RecordPatField` class directly. * Use the subclass `RecordPatField`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RefExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RefExpr.qll index 470365a9a00d..90572fcf99ee 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RefExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RefExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A reference expression. For example: + * ```rust + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` * INTERNAL: Do not reference the `Generated::RefExpr` class directly. * Use the subclass `RefExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RefPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RefPat.qll index 96c479807edd..c16c87405c20 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RefPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RefPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A reference pattern. For example: + * ```rust + * match x { + * &mut Option::Some(y) => y, + * &Option::None => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::RefPat` class directly. * Use the subclass `RefPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnExpr.qll index 6ff6d5e40c7a..184b14b8fcf0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnExpr.qll @@ -16,6 +16,17 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A return expression. For example: + * ```rust + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ```rust + * fn no_value() -> () { + * return; + * } + * ``` * INTERNAL: Do not reference the `Generated::ReturnExpr` class directly. * Use the subclass `ReturnExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/SlicePat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/SlicePat.qll index e6705076c373..1f54445a6598 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/SlicePat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/SlicePat.qll @@ -15,6 +15,14 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A slice pattern. For example: + * ```rust + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::SlicePat` class directly. * Use the subclass `SlicePat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Stmt.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Stmt.qll index a43f2e7f0b8d..55f06bb567a6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Stmt.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Stmt.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * The base class for statements. * INTERNAL: Do not reference the `Generated::Stmt` class directly. * Use the subclass `Stmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleExpr.qll index c91e23c3732e..0860831446ba 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleExpr.qll @@ -16,6 +16,11 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A tuple expression. For example: + * ```rust + * (1, "one"); + * (2, "two")[0] = 3; + * ``` * INTERNAL: Do not reference the `Generated::TupleExpr` class directly. * Use the subclass `TupleExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TuplePat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TuplePat.qll index 12fd54c40dc4..0e7fc44809e2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TuplePat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TuplePat.qll @@ -15,6 +15,11 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A tuple pattern. For example: + * ```rust + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` * INTERNAL: Do not reference the `Generated::TuplePat` class directly. * Use the subclass `TuplePat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleStructPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleStructPat.qll index 41033c2db1dd..ed4e57d87195 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleStructPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleStructPat.qll @@ -16,6 +16,14 @@ import codeql.rust.elements.Path */ module Generated { /** + * A tuple struct pattern. For example: + * ```rust + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` * INTERNAL: Do not reference the `Generated::TupleStructPat` class directly. * Use the subclass `TupleStructPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeRef.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeRef.qll index 4befe758b094..2eab9874ecc3 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeRef.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * The base class for type references. + * ```rust + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` * INTERNAL: Do not reference the `Generated::TypeRef` class directly. * Use the subclass `TypeRef`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll index 2ed8dde73bae..89cc654eb17c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * An underscore expression. For example: + * ```rust + * _ = 42; + * ``` * INTERNAL: Do not reference the `Generated::UnderscoreExpr` class directly. * Use the subclass `UnderscoreExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/WildcardPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/WildcardPat.qll index d65daf7911a3..e87383562c61 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/WildcardPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/WildcardPat.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A wildcard pattern. For example: + * ```rust + * let _ = 42; + * ``` * INTERNAL: Do not reference the `Generated::WildcardPat` class directly. * Use the subclass `WildcardPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/YeetExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/YeetExpr.qll index 3f2d7194d515..a9bd1e991d55 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/YeetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/YeetExpr.qll @@ -16,6 +16,12 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A `yeet` expression. For example: + * ```rust + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` * INTERNAL: Do not reference the `Generated::YeetExpr` class directly. * Use the subclass `YeetExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/YieldExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/YieldExpr.qll index 0bdfb90563bd..03541b83cfb6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/YieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/YieldExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A `yield` expression. For example: + * ```rust + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` * INTERNAL: Do not reference the `Generated::YieldExpr` class directly. * Use the subclass `YieldExpr`, where the following predicates are available. */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index e69de29bb2d1..1922cf0831f6 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -0,0 +1,53 @@ +ArrayExpr/gen_array_expr.rs e4863b428ea2b5cfd59773f201e58fd905f7363512e54e4fdebd02c297bd85ff e4863b428ea2b5cfd59773f201e58fd905f7363512e54e4fdebd02c297bd85ff +AsmExpr/gen_asm_expr.rs 00b21fd66fe12785174bd0160d0317a6c78ff05dbba73313eb07b56531cf3158 00b21fd66fe12785174bd0160d0317a6c78ff05dbba73313eb07b56531cf3158 +AwaitExpr/gen_await_expr.rs cbfa17a0b84bb0033b1f577c1f2a7ff187506c6211faaf6d90c371d4186b9aa2 cbfa17a0b84bb0033b1f577c1f2a7ff187506c6211faaf6d90c371d4186b9aa2 +BecomeExpr/gen_become_expr.rs ab763211a01a2ca92be1589625465672c762df66fa3d12c9f1376021e497c06c ab763211a01a2ca92be1589625465672c762df66fa3d12c9f1376021e497c06c +BinaryExpr/gen_binary_expr.rs 5ea68396dc2e3ff7fcaf5a5201636dd175dd45be36647b6ae0043c765ce24549 5ea68396dc2e3ff7fcaf5a5201636dd175dd45be36647b6ae0043c765ce24549 +BlockExpr/gen_block_expr.rs 17b06c726e304e0efcfde8e71afd9c657860312be554366894236125cb08719e 17b06c726e304e0efcfde8e71afd9c657860312be554366894236125cb08719e +BoxPat/gen_box_pat.rs 1493e24b732370b577ade38c47db17fa157df19f5390606a67a6040e49b501c0 1493e24b732370b577ade38c47db17fa157df19f5390606a67a6040e49b501c0 +BreakExpr/gen_break_expr.rs 5240475a75b772ea45ab5a9d4f09a8fbba4a9d3e6cd8483fc2d0de29c880eac8 5240475a75b772ea45ab5a9d4f09a8fbba4a9d3e6cd8483fc2d0de29c880eac8 +CallExpr/gen_call_expr.rs 013a7c878996aefb25b94b68eebc4f0b1bb74ccd09e91c491980817a383e2401 013a7c878996aefb25b94b68eebc4f0b1bb74ccd09e91c491980817a383e2401 +CastExpr/gen_cast_expr.rs abd59cc7b92578b56098ac0045cf7de4b15c645cce79e3bdad8d3b6f4657360d abd59cc7b92578b56098ac0045cf7de4b15c645cce79e3bdad8d3b6f4657360d +ClosureExpr/gen_closure_expr.rs 15bd9abdb8aaffabb8bb335f8ebd0571eb5f29115e1dc8d11837aa988702cd80 15bd9abdb8aaffabb8bb335f8ebd0571eb5f29115e1dc8d11837aa988702cd80 +ConstBlockPat/gen_const_block_pat.rs 7e3057cd24d22e752354369cf7e08e9536642812c0947b36aa5d8290a45476fd 7e3057cd24d22e752354369cf7e08e9536642812c0947b36aa5d8290a45476fd +ContinueExpr/gen_continue_expr.rs 63840dcd8440aaf1b96b713b80eb2b56acb1639d3200b3c732b45291a071b5ff 63840dcd8440aaf1b96b713b80eb2b56acb1639d3200b3c732b45291a071b5ff +ExprStmt/gen_expr_stmt.rs 318a0fd72ee8d6da17c5d635ba0724ed2c11c0f7e9b75c939990cd0c7f3929e4 318a0fd72ee8d6da17c5d635ba0724ed2c11c0f7e9b75c939990cd0c7f3929e4 +FieldExpr/gen_field_expr.rs 9a70500d592e0a071b03d974a55558b3bc0df531ff11bce5898feb36e17ffd8b 9a70500d592e0a071b03d974a55558b3bc0df531ff11bce5898feb36e17ffd8b +Function/gen_function.rs ba6ecb9e0d89183295eb02f3c20ebbf5c209f89bd0172c73a3b4a6dacbf3a54c ba6ecb9e0d89183295eb02f3c20ebbf5c209f89bd0172c73a3b4a6dacbf3a54c +GenericArgList/gen_generic_arg_list.rs cfb072d3b48f9dd568c23d4dfefba28766628678f66bbf9a436de9919ead35f5 cfb072d3b48f9dd568c23d4dfefba28766628678f66bbf9a436de9919ead35f5 +IdentPat/gen_ident_pat.rs 87f9201ca47683ff6f12a0c844c062fdedb6d86546794522d358b117ba0fe477 87f9201ca47683ff6f12a0c844c062fdedb6d86546794522d358b117ba0fe477 +IfExpr/gen_if_expr.rs f2f79d4df0f01dc691b5c62c0f9e1815d7ebc978cf83b7559b5eeab0fcc2fc01 f2f79d4df0f01dc691b5c62c0f9e1815d7ebc978cf83b7559b5eeab0fcc2fc01 +IndexExpr/gen_index_expr.rs 22d7f81ba43dc63f1f49e21a2c25ce25a1b8f6e8e95e1a66f518f010a4d73c61 22d7f81ba43dc63f1f49e21a2c25ce25a1b8f6e8e95e1a66f518f010a4d73c61 +Label/gen_label.rs 0584f519f210f621d7ebc0cb8c95ce05db0795d6109c0d16866f8f699a28213c 0584f519f210f621d7ebc0cb8c95ce05db0795d6109c0d16866f8f699a28213c +LetExpr/gen_let_expr.rs 7aebcd7197fd0e6b5b954deb2f6380769c94609c57e34eb86a33eb04e91d4a78 7aebcd7197fd0e6b5b954deb2f6380769c94609c57e34eb86a33eb04e91d4a78 +LetStmt/gen_let_stmt.rs 3f41c9721149ee0bf8f89a58bc419756358a2e267b80d07660354a7fc44ef1eb 3f41c9721149ee0bf8f89a58bc419756358a2e267b80d07660354a7fc44ef1eb +LiteralExpr/gen_literal_expr.rs 2db01ad390e5c0c63a957c043230a462cb4cc25715eea6ede15d43c55d35976d 2db01ad390e5c0c63a957c043230a462cb4cc25715eea6ede15d43c55d35976d +LiteralPat/gen_literal_pat.rs a471b481b6989001817a3988696f445d9a4dea784e543c346536dacbee1e96f3 a471b481b6989001817a3988696f445d9a4dea784e543c346536dacbee1e96f3 +LoopExpr/gen_loop_expr.rs 35deaf35e765db4ae3124a11284266d8f341d1ce7b700030efada0dda8878619 35deaf35e765db4ae3124a11284266d8f341d1ce7b700030efada0dda8878619 +MatchArm/gen_match_arm.rs ac75b4836a103e2755bd47a1ee1b74af6eb8349adc4ebedaaa27b3ea3ae41aa5 ac75b4836a103e2755bd47a1ee1b74af6eb8349adc4ebedaaa27b3ea3ae41aa5 +MatchExpr/gen_match_expr.rs 081c5d4c78cb71ccd13fb37a93d7f525267c51b179f44b5a22ca3297897002a0 081c5d4c78cb71ccd13fb37a93d7f525267c51b179f44b5a22ca3297897002a0 +MethodCallExpr/gen_method_call_expr.rs f2b4679eb1ec095981fe6bd656b632c22bf6bd0da133309da3f7ef5bd1ab4b5d f2b4679eb1ec095981fe6bd656b632c22bf6bd0da133309da3f7ef5bd1ab4b5d +Module/gen_module.rs 815605a604fea1d9276684f8d6738a4e833eacad57ceeb27e2095fc450264fc1 815605a604fea1d9276684f8d6738a4e833eacad57ceeb27e2095fc450264fc1 +OffsetOfExpr/gen_offset_of_expr.rs 8e2077b4d7b85c91c17c3630511bc4f929950e9007261cbf0471c4a064c4b934 8e2077b4d7b85c91c17c3630511bc4f929950e9007261cbf0471c4a064c4b934 +OrPat/gen_or_pat.rs 71feef6e056bfe4cc8c22c9eb54fa3fecef613606769061d0efd059adbbd6f56 71feef6e056bfe4cc8c22c9eb54fa3fecef613606769061d0efd059adbbd6f56 +Path/gen_path.rs e32637d04445d5b9411086f3ad5d8b41de24327f7ad641d1a1a25c1d160121c8 e32637d04445d5b9411086f3ad5d8b41de24327f7ad641d1a1a25c1d160121c8 +PathExpr/gen_path_expr.rs a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a +PathPat/gen_path_pat.rs fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 +PrefixExpr/gen_prefix_expr.rs 2b7c6eb7efe5b1bbf895dde386eca9e1c4dcfa047ca141628580c97ec304ac4a 2b7c6eb7efe5b1bbf895dde386eca9e1c4dcfa047ca141628580c97ec304ac4a +RangeExpr/gen_range_expr.rs 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 +RangePat/gen_range_pat.rs 18b5169c3ab9230c95d86c4897f8343b2176d9602c9ea371c70c1eb0dbf89a28 18b5169c3ab9230c95d86c4897f8343b2176d9602c9ea371c70c1eb0dbf89a28 +RecordExpr/gen_record_expr.rs f8a7db88ae9e2a47588d26a76331cba64014dc6d5e065af28adcd718c8c52727 f8a7db88ae9e2a47588d26a76331cba64014dc6d5e065af28adcd718c8c52727 +RecordExprField/gen_record_expr_field.rs ea34f9fc64a600a5fff6b3388a2f89990bc9381937f49e83ce5f8192a14a0e4f ea34f9fc64a600a5fff6b3388a2f89990bc9381937f49e83ce5f8192a14a0e4f +RecordPat/gen_record_pat.rs a7e8aafb51532785459467e82d175a4cbab7ad5757cd00d74a0b1b673a5f21d9 a7e8aafb51532785459467e82d175a4cbab7ad5757cd00d74a0b1b673a5f21d9 +RecordPatField/gen_record_pat_field.rs f6c31bd08e6021aa4da6e8238561a77208f0ef723c5e217c6fbc16b8aec73a84 f6c31bd08e6021aa4da6e8238561a77208f0ef723c5e217c6fbc16b8aec73a84 +RefExpr/gen_ref_expr.rs 82695467551def4a00c78aa1ea6a1460e9edbef7df2672f13daccb0ee5d6b4c6 82695467551def4a00c78aa1ea6a1460e9edbef7df2672f13daccb0ee5d6b4c6 +RefPat/gen_ref_pat.rs aba7518649d9a37928e59a40d42f76cc0f4735e8daf711a3def6d2f0520e1f54 aba7518649d9a37928e59a40d42f76cc0f4735e8daf711a3def6d2f0520e1f54 +ReturnExpr/gen_return_expr.rs 4f6ef29d7b3c60d6d71d1a6034a0721671f517428ba21897361a92b01009d38f 4f6ef29d7b3c60d6d71d1a6034a0721671f517428ba21897361a92b01009d38f +SlicePat/gen_slice_pat.rs df4a6692f5100aa11dd777561400ce71e37b85f2363b0638c21975a1771b15d5 df4a6692f5100aa11dd777561400ce71e37b85f2363b0638c21975a1771b15d5 +TupleExpr/gen_tuple_expr.rs 8ecd1b6ecc58a0319eed434a423cc6f41bdf1901b1950e6e79735d7f7b2f8374 8ecd1b6ecc58a0319eed434a423cc6f41bdf1901b1950e6e79735d7f7b2f8374 +TuplePat/gen_tuple_pat.rs b1b0c9c5ff1b787f380644691c77807655a4f6441fc7431c90ecf78c54c26148 b1b0c9c5ff1b787f380644691c77807655a4f6441fc7431c90ecf78c54c26148 +TupleStructPat/gen_tuple_struct_pat.rs 601ca8813272d15b4c8fd7402d0d28a42a62be82865eb5e86b985ad31464ca98 601ca8813272d15b4c8fd7402d0d28a42a62be82865eb5e86b985ad31464ca98 +UnderscoreExpr/gen_underscore_expr.rs fe34e99d322bf86c0f5509c9b5fd6e1e8abbdf63dbe7e01687344a41e9aabe52 fe34e99d322bf86c0f5509c9b5fd6e1e8abbdf63dbe7e01687344a41e9aabe52 +WildcardPat/gen_wildcard_pat.rs f1b175eeb3a0fc32bbcfb70a207be33dfde51a7d5198f72b8e08948f0d43e3dc f1b175eeb3a0fc32bbcfb70a207be33dfde51a7d5198f72b8e08948f0d43e3dc +YeetExpr/gen_yeet_expr.rs c243b785a2cbd941bcec23dafc23ffbc64b93cf2843b6ede9783cdb81fed439d c243b785a2cbd941bcec23dafc23ffbc64b93cf2843b6ede9783cdb81fed439d +YieldExpr/gen_yield_expr.rs 20f607719ff90bbcd831fe48a530400d0774394867ae65618cd1671d638f853e 20f607719ff90bbcd831fe48a530400d0774394867ae65618cd1671d638f853e diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index f817726ad169..53818a1fc53e 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -1,2 +1,55 @@ /.generated_tests.list linguist-generated /.gitattributes linguist-generated +/ArrayExpr/gen_array_expr.rs linguist-generated +/AsmExpr/gen_asm_expr.rs linguist-generated +/AwaitExpr/gen_await_expr.rs linguist-generated +/BecomeExpr/gen_become_expr.rs linguist-generated +/BinaryExpr/gen_binary_expr.rs linguist-generated +/BlockExpr/gen_block_expr.rs linguist-generated +/BoxPat/gen_box_pat.rs linguist-generated +/BreakExpr/gen_break_expr.rs linguist-generated +/CallExpr/gen_call_expr.rs linguist-generated +/CastExpr/gen_cast_expr.rs linguist-generated +/ClosureExpr/gen_closure_expr.rs linguist-generated +/ConstBlockPat/gen_const_block_pat.rs linguist-generated +/ContinueExpr/gen_continue_expr.rs linguist-generated +/ExprStmt/gen_expr_stmt.rs linguist-generated +/FieldExpr/gen_field_expr.rs linguist-generated +/Function/gen_function.rs linguist-generated +/GenericArgList/gen_generic_arg_list.rs linguist-generated +/IdentPat/gen_ident_pat.rs linguist-generated +/IfExpr/gen_if_expr.rs linguist-generated +/IndexExpr/gen_index_expr.rs linguist-generated +/Label/gen_label.rs linguist-generated +/LetExpr/gen_let_expr.rs linguist-generated +/LetStmt/gen_let_stmt.rs linguist-generated +/LiteralExpr/gen_literal_expr.rs linguist-generated +/LiteralPat/gen_literal_pat.rs linguist-generated +/LoopExpr/gen_loop_expr.rs linguist-generated +/MatchArm/gen_match_arm.rs linguist-generated +/MatchExpr/gen_match_expr.rs linguist-generated +/MethodCallExpr/gen_method_call_expr.rs linguist-generated +/Module/gen_module.rs linguist-generated +/OffsetOfExpr/gen_offset_of_expr.rs linguist-generated +/OrPat/gen_or_pat.rs linguist-generated +/Path/gen_path.rs linguist-generated +/PathExpr/gen_path_expr.rs linguist-generated +/PathPat/gen_path_pat.rs linguist-generated +/PrefixExpr/gen_prefix_expr.rs linguist-generated +/RangeExpr/gen_range_expr.rs linguist-generated +/RangePat/gen_range_pat.rs linguist-generated +/RecordExpr/gen_record_expr.rs linguist-generated +/RecordExprField/gen_record_expr_field.rs linguist-generated +/RecordPat/gen_record_pat.rs linguist-generated +/RecordPatField/gen_record_pat_field.rs linguist-generated +/RefExpr/gen_ref_expr.rs linguist-generated +/RefPat/gen_ref_pat.rs linguist-generated +/ReturnExpr/gen_return_expr.rs linguist-generated +/SlicePat/gen_slice_pat.rs linguist-generated +/TupleExpr/gen_tuple_expr.rs linguist-generated +/TuplePat/gen_tuple_pat.rs linguist-generated +/TupleStructPat/gen_tuple_struct_pat.rs linguist-generated +/UnderscoreExpr/gen_underscore_expr.rs linguist-generated +/WildcardPat/gen_wildcard_pat.rs linguist-generated +/YeetExpr/gen_yeet_expr.rs linguist-generated +/YieldExpr/gen_yield_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql new file mode 100644 index 000000000000..e0f2223f57bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayExpr x, int getNumberOfAttrs, int getNumberOfExprs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfExprs = x.getNumberOfExprs() +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfExprs:", getNumberOfExprs diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql new file mode 100644 index 000000000000..89113fe91f0b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql new file mode 100644 index 000000000000..f75aef4b1e1e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getExpr(index) diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ArrayExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/gen_array_expr.rs b/rust/ql/test/extractor-tests/generated/ArrayExpr/gen_array_expr.rs new file mode 100644 index 000000000000..48252cde12f9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/gen_array_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen, do not edit + +fn test_array_expr() -> () { + // An array expression. For example: + [1, 2, 3]; + [1; 10]; +} diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql new file mode 100644 index 000000000000..f5662fedfbb1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AsmExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql new file mode 100644 index 000000000000..4455caf1aa5d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AsmExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql new file mode 100644 index 000000000000..375017aab2d8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AsmExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/AsmExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs b/rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs new file mode 100644 index 000000000000..cfd6896e2f84 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +fn test_asm_expr() -> () { + // An inline assembly expression. For example: + unsafe { + builtin # asm(_); + } +} diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql new file mode 100644 index 000000000000..f78d81a3ec4f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AwaitExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql new file mode 100644 index 000000000000..9ac930312b5c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AwaitExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql new file mode 100644 index 000000000000..45e9d40ec736 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AwaitExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/AwaitExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs b/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs new file mode 100644 index 000000000000..6bdc5a1ca2fc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_await_expr() -> () { + // An `await` expression. For example: + async { + let x = foo().await; + x + } +} diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql new file mode 100644 index 000000000000..e297230419c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BecomeExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql new file mode 100644 index 000000000000..aac3e259a326 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BecomeExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql new file mode 100644 index 000000000000..697178d5e489 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BecomeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/BecomeExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs b/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs new file mode 100644 index 000000000000..a7c61540e298 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs @@ -0,0 +1,10 @@ +// generated by codegen, do not edit + +// A `become` expression. For example: +fn fact_a(n: i32, a: i32) -> i32 { + if n == 0 { + a + } else { + become fact_a(n - 1, n * a) + } +} diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql new file mode 100644 index 000000000000..87c00d18e3e6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BinaryExpr x, int getNumberOfAttrs, string hasLhs, string hasOperatorName, string hasRhs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasLhs() then hasLhs = "yes" else hasLhs = "no") and + (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and + if x.hasRhs() then hasRhs = "yes" else hasRhs = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLhs:", hasLhs, "hasOperatorName:", + hasOperatorName, "hasRhs:", hasRhs diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql new file mode 100644 index 000000000000..0d4503c82bde --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BinaryExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql new file mode 100644 index 000000000000..a8b21f014959 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BinaryExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLhs() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql new file mode 100644 index 000000000000..05da704202da --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BinaryExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql new file mode 100644 index 000000000000..8c491b7f575d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BinaryExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getRhs() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/BinaryExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs b/rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs new file mode 100644 index 000000000000..6e5ff4a36dc1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs @@ -0,0 +1,10 @@ +// generated by codegen, do not edit + +fn test_binary_expr() -> () { + // A binary operation expression. For example: + x + y; + x && y; + x <= y; + x = y; + x += y; +} diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql new file mode 100644 index 000000000000..7748f7d14135 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BlockExpr x, int getNumberOfAttrs, string hasLabel, string hasStmtList +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and + if x.hasStmtList() then hasStmtList = "yes" else hasStmtList = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLabel:", hasLabel, "hasStmtList:", hasStmtList diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql new file mode 100644 index 000000000000..b44ebf9d08d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql new file mode 100644 index 000000000000..25f432e2a990 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql new file mode 100644 index 000000000000..493e9ad5d4af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getStmtList() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/BlockExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs b/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs new file mode 100644 index 000000000000..fe8bc6705e27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs @@ -0,0 +1,12 @@ +// generated by codegen, do not edit + +fn test_block_expr() -> () { + // A block expression. For example: + { + let x = 42; + } + 'label: { + let x = 42; + x + } +} diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql new file mode 100644 index 000000000000..cee3b683e66d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BoxPat x, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql new file mode 100644 index 000000000000..d1a4ad6fca81 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BoxPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/BoxPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/BoxPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs b/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs new file mode 100644 index 000000000000..f26d31d72f9c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_box_pat() -> () { + // A box pattern. For example: + match x { + box Option::Some(y) => y, + box Option::None => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql new file mode 100644 index 000000000000..1238e6e42319 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BreakExpr x, int getNumberOfAttrs, string hasExpr, string hasLifetime +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasLifetime:", hasLifetime diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql new file mode 100644 index 000000000000..dca05d9b8902 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BreakExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql new file mode 100644 index 000000000000..0ae64a4d5331 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql new file mode 100644 index 000000000000..c272d79f9cfb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/BreakExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs b/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs new file mode 100644 index 000000000000..cd40541da9c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs @@ -0,0 +1,15 @@ +// generated by codegen, do not edit + +fn test_break_expr() -> () { + // A break expression. For example: + loop { + if not_ready() { + break; + } + } + let x = 'label: loop { + if done() { + break 'label 42; + } + }; +} diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql new file mode 100644 index 000000000000..b44136c4942e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CallExpr x, string hasArgList, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql new file mode 100644 index 000000000000..088f92ec06db --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getArgList() diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql new file mode 100644 index 000000000000..53b8ec257a69 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CallExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql new file mode 100644 index 000000000000..d09819fc1fd8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/CallExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs new file mode 100644 index 000000000000..b2436cc00429 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_call_expr() -> () { + // A function call expression. For example: + foo(42); + foo::(42); + foo[0](42); + foo(1) = 4; +} diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql new file mode 100644 index 000000000000..d7db68cfdf2b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CastExpr x, int getNumberOfAttrs, string hasExpr, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql new file mode 100644 index 000000000000..afb47c82fdbd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CastExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql new file mode 100644 index 000000000000..3d8c47f13546 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CastExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql new file mode 100644 index 000000000000..68b6f5126f43 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CastExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/CastExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/CastExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs b/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs new file mode 100644 index 000000000000..2945c711320a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_cast_expr() -> () { + // A cast expression. For example: + value as u64; +} diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql new file mode 100644 index 000000000000..5fabed2d7da4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql @@ -0,0 +1,17 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + ClosureExpr x, int getNumberOfAttrs, string hasBody, string hasClosureBinder, string hasParamList, + string hasRetType +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasBody() then hasBody = "yes" else hasBody = "no") and + (if x.hasClosureBinder() then hasClosureBinder = "yes" else hasClosureBinder = "no") and + (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and + if x.hasRetType() then hasRetType = "yes" else hasRetType = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, "hasClosureBinder:", + hasClosureBinder, "hasParamList:", hasParamList, "hasRetType:", hasRetType diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql new file mode 100644 index 000000000000..b32da8e541bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql new file mode 100644 index 000000000000..cee8662cc44e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql new file mode 100644 index 000000000000..fc838f8e2542 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getClosureBinder() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql new file mode 100644 index 000000000000..d055aa69de30 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql new file mode 100644 index 000000000000..acafcc710620 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs b/rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs new file mode 100644 index 000000000000..4c0c6067aac6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs @@ -0,0 +1,12 @@ +// generated by codegen, do not edit + +fn test_closure_expr() -> () { + // A closure expression. For example: + |x| x + 1; + move |x: i32| -> i32 { x + 1 }; + async |x: i32, y| x + y; + #[coroutine] + |x| yield x; + #[coroutine] + static |x| yield x; +} diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql new file mode 100644 index 000000000000..058f9bcae1d8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstBlockPat x, string hasBlockExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasBlockExpr() then hasBlockExpr = "yes" else hasBlockExpr = "no" +select x, "hasBlockExpr:", hasBlockExpr diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql new file mode 100644 index 000000000000..e2c0f6440078 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstBlockPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getBlockExpr() diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ConstBlockPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs b/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs new file mode 100644 index 000000000000..2eba97954c7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_const_block_pat() -> () { + // A const block pattern. For example: + match x { + const { 1 + 2 + 3 } => "ok", + _ => "fail", + }; +} diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql new file mode 100644 index 000000000000..9d2e2d5177d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ContinueExpr x, int getNumberOfAttrs, string hasLifetime +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql new file mode 100644 index 000000000000..d6166fe4a29a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ContinueExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql new file mode 100644 index 000000000000..89bc6f68dd38 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ContinueExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ContinueExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs b/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs new file mode 100644 index 000000000000..a50d5ee4139d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs @@ -0,0 +1,15 @@ +// generated by codegen, do not edit + +fn test_continue_expr() -> () { + // A continue expression. For example: + loop { + if not_ready() { + continue; + } + } + 'label: loop { + if not_ready() { + continue 'label; + } + } +} diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql new file mode 100644 index 000000000000..977516d1eea1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExprStmt x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql new file mode 100644 index 000000000000..df142202a02d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExprStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ExprStmt/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ExprStmt/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs b/rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs new file mode 100644 index 000000000000..bf6d4f667f27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +fn test_expr_stmt() -> () { + // An expression statement. For example: + start(); + finish() + use std::env; +} diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql new file mode 100644 index 000000000000..1de84ec34277 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FieldExpr x, int getNumberOfAttrs, string hasExpr, string hasNameRef +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasNameRef:", hasNameRef diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql new file mode 100644 index 000000000000..eeaad96fb6af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FieldExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql new file mode 100644 index 000000000000..e307cf26da08 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql new file mode 100644 index 000000000000..f87d456f2c0b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/FieldExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs b/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs new file mode 100644 index 000000000000..cbef64120887 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_field_expr() -> () { + // A field access expression. For example: + x.foo +} diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.ql b/rust/ql/test/extractor-tests/generated/Function/Function.ql new file mode 100644 index 000000000000..2ab5bea652ac --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function.ql @@ -0,0 +1,23 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Function x, string hasAbi, int getNumberOfAttrs, string hasBody, string hasGenericParamList, + string hasName, string hasParamList, string hasRetType, string hasVisibility, + string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasBody() then hasBody = "yes" else hasBody = "no") and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and + (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "hasAbi:", hasAbi, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, + "hasGenericParamList:", hasGenericParamList, "hasName:", hasName, "hasParamList:", hasParamList, + "hasRetType:", hasRetType, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql new file mode 100644 index 000000000000..a1317ed761f4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getAbi() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql new file mode 100644 index 000000000000..239c6da56c46 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql new file mode 100644 index 000000000000..5b3191cac00b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql new file mode 100644 index 000000000000..410d28c3ef89 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getName.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getName.ql new file mode 100644 index 000000000000..8d1e2fbfe206 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql new file mode 100644 index 000000000000..6d9fed49b7b6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql new file mode 100644 index 000000000000..123640add8bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql new file mode 100644 index 000000000000..1aa04da90e9b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql new file mode 100644 index 000000000000..b4f5bd562743 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Function x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Function/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Function/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Function/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Function/gen_function.rs b/rust/ql/test/extractor-tests/generated/Function/gen_function.rs new file mode 100644 index 000000000000..8b6153205460 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/gen_function.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +// A function declaration. For example +fn foo(x: u32) -> u64 {(x + 1).into()} +// A function declaration within a trait might not have a body: +trait Trait { + fn bar(); +} diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql new file mode 100644 index 000000000000..bd3e8bfb63f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from GenericArgList x, int getNumberOfGenericArgs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfGenericArgs = x.getNumberOfGenericArgs() +select x, "getNumberOfGenericArgs:", getNumberOfGenericArgs diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql new file mode 100644 index 000000000000..cc13c85782a1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from GenericArgList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getGenericArg(index) diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/GenericArgList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/GenericArgList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs b/rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs new file mode 100644 index 000000000000..2088341a9ced --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_generic_arg_list() -> () { + // The base class for generic arguments. + x.foo::(42); +} diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql new file mode 100644 index 000000000000..9b7d6f141a38 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IdentPat x, int getNumberOfAttrs, string hasName, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasName:", hasName, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql new file mode 100644 index 000000000000..8dde5cce1ca4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IdentPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql new file mode 100644 index 000000000000..e96736741f50 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IdentPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql new file mode 100644 index 000000000000..14d979626d4e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IdentPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/IdentPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/IdentPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs b/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs new file mode 100644 index 000000000000..8158e14f2f3e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs @@ -0,0 +1,13 @@ +// generated by codegen, do not edit + +fn test_ident_pat() -> () { + // A binding pattern. For example: + match x { + Option::Some(y) => y, + Option::None => 0, + }; + match x { + y@Option::Some(_) => y, + Option::None => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql new file mode 100644 index 000000000000..e72816279572 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IfExpr x, int getNumberOfAttrs, string hasCondition, string hasElse, string hasThen +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasCondition() then hasCondition = "yes" else hasCondition = "no") and + (if x.hasElse() then hasElse = "yes" else hasElse = "no") and + if x.hasThen() then hasThen = "yes" else hasThen = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasCondition:", hasCondition, "hasElse:", hasElse, + "hasThen:", hasThen diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql new file mode 100644 index 000000000000..46f5bde3e3bb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IfExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql new file mode 100644 index 000000000000..459d6961e5a5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getCondition() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql new file mode 100644 index 000000000000..187637aab212 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getElse() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql new file mode 100644 index 000000000000..35fa09196611 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getThen() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/IfExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs b/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs new file mode 100644 index 000000000000..22de54eb8962 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen, do not edit + +fn test_if_expr() -> () { + // An `if` expression. For example: + if x == 42 { + println!("that's the answer"); + } + let y = if x > 0 { + 1 + } else { + 0 + } +} diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql new file mode 100644 index 000000000000..a4b7139c97e2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IndexExpr x, int getNumberOfAttrs, string hasBase, string hasIndex +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasBase() then hasBase = "yes" else hasBase = "no") and + if x.hasIndex() then hasIndex = "yes" else hasIndex = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasBase:", hasBase, "hasIndex:", hasIndex diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql new file mode 100644 index 000000000000..504f8e56cbe5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IndexExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql new file mode 100644 index 000000000000..b4debab06d72 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IndexExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getBase() diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql new file mode 100644 index 000000000000..f6d5b1e5998b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IndexExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getIndex() diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/IndexExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs b/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs new file mode 100644 index 000000000000..f4f6a75d904c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen, do not edit + +fn test_index_expr() -> () { + // An index expression. For example: + list[42]; + list[42] = 1; +} diff --git a/rust/ql/test/extractor-tests/generated/Label/Label.ql b/rust/ql/test/extractor-tests/generated/Label/Label.ql new file mode 100644 index 000000000000..92f4d44230ee --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Label.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Label x, string hasLifetime +where + toBeTested(x) and + not x.isUnknown() and + if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" +select x, "hasLifetime:", hasLifetime diff --git a/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql b/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql new file mode 100644 index 000000000000..ba555d1209c3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Label x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/Label/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Label/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Label/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Label/gen_label.rs b/rust/ql/test/extractor-tests/generated/Label/gen_label.rs new file mode 100644 index 000000000000..4500ab4626bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/gen_label.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_label() -> () { + // A label. For example: + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; +} diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql new file mode 100644 index 000000000000..1b7648a56684 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetExpr x, int getNumberOfAttrs, string hasExpr, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql new file mode 100644 index 000000000000..24330c4b19b5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql new file mode 100644 index 000000000000..0f9e8088b461 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql new file mode 100644 index 000000000000..bd358b49c046 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LetExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LetExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs b/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs new file mode 100644 index 000000000000..cc9f588d66dd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +fn test_let_expr(maybe_some: Option) -> () { + // A `let` expression. For example: + if let Some(x) = maybe_some { + println!("{}", x); + } +} diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql new file mode 100644 index 000000000000..bd7ce9ad9588 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql @@ -0,0 +1,17 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + LetStmt x, int getNumberOfAttrs, string hasInitializer, string hasLetElse, string hasPat, + string hasTy +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasInitializer() then hasInitializer = "yes" else hasInitializer = "no") and + (if x.hasLetElse() then hasLetElse = "yes" else hasLetElse = "no") and + (if x.hasPat() then hasPat = "yes" else hasPat = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasInitializer:", hasInitializer, "hasLetElse:", + hasLetElse, "hasPat:", hasPat, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql new file mode 100644 index 000000000000..82f563323519 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetStmt x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql new file mode 100644 index 000000000000..cac847aa7265 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getInitializer() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql new file mode 100644 index 000000000000..f29257c0b289 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getLetElse() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql new file mode 100644 index 000000000000..fd10317a2874 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql new file mode 100644 index 000000000000..507c43a5619d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LetStmt/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs b/rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs new file mode 100644 index 000000000000..7117dfaf9b9b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs @@ -0,0 +1,13 @@ +// generated by codegen, do not edit + +fn test_let_stmt() -> () { + // A let statement. For example: + let x = 42; + let x: i32 = 42; + let x: i32; + let x; + let (x, y) = (1, 2); + let Some(x) = std::env::var("FOO") else { + return; + }; +} diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql new file mode 100644 index 000000000000..c33f15d8aff2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralExpr x, int getNumberOfAttrs, string hasTextValue +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasTextValue() then hasTextValue = "yes" else hasTextValue = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTextValue:", hasTextValue diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql new file mode 100644 index 000000000000..a4362a3ea725 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql new file mode 100644 index 000000000000..147110b9333d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTextValue() diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs b/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs new file mode 100644 index 000000000000..f8d33aeaa8cc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen, do not edit + +fn test_literal_expr() -> () { + // A literal expression. For example: + 42; + 42.0; + "Hello, world!"; + b"Hello, world!"; + 'x'; + b'x'; + r"Hello, world!"; + true; +} diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql new file mode 100644 index 000000000000..6052b07a005f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralPat x, string hasLiteral +where + toBeTested(x) and + not x.isUnknown() and + if x.hasLiteral() then hasLiteral = "yes" else hasLiteral = "no" +select x, "hasLiteral:", hasLiteral diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql new file mode 100644 index 000000000000..ca6ff418b1ad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getLiteral() diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LiteralPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs b/rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs new file mode 100644 index 000000000000..26ed7ebcd105 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_literal_pat() -> () { + // A literal pattern. For example: + match x { + 42 => "ok", + _ => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql new file mode 100644 index 000000000000..c627fb16771a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LoopExpr x, int getNumberOfAttrs, string hasLabel, string hasLoopBody +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and + if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql new file mode 100644 index 000000000000..6367edb64216 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LoopExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql new file mode 100644 index 000000000000..9617abd7f346 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LoopExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql new file mode 100644 index 000000000000..bd44b0ac7333 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LoopExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLoopBody() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LoopExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs b/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs new file mode 100644 index 000000000000..33ac9d5ecc60 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs @@ -0,0 +1,20 @@ +// generated by codegen, do not edit + +fn test_loop_expr() -> () { + // A loop expression. For example: + loop { + println!("Hello, world (again)!"); + }; + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + let mut x = 0; + loop { + if x < 10 { + x += 1; + } else { + break; + } + }; +} diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MatchArm/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql new file mode 100644 index 000000000000..9161cdadf73d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArm x, int getNumberOfAttrs, string hasExpr, string hasGuard, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + (if x.hasGuard() then hasGuard = "yes" else hasGuard = "no") and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasGuard:", hasGuard, + "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql new file mode 100644 index 000000000000..d86de1bb46dc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArm x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql new file mode 100644 index 000000000000..b488c8cd7ada --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArm x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql new file mode 100644 index 000000000000..508c72779ed7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArm x +where toBeTested(x) and not x.isUnknown() +select x, x.getGuard() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql new file mode 100644 index 000000000000..ff83947901a0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArm x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs new file mode 100644 index 000000000000..5f5922e8ef4c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs @@ -0,0 +1,13 @@ +// generated by codegen, do not edit + +fn test_match_arm(x: i32) -> i32 { + // A match arm. For example: + match x { + Option::Some(y) => y, + Option::None => 0, + }; + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MatchExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql new file mode 100644 index 000000000000..b29e333d3304 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchExpr x, int getNumberOfAttrs, string hasExpr, string hasMatchArmList +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasMatchArmList() then hasMatchArmList = "yes" else hasMatchArmList = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasMatchArmList:", + hasMatchArmList diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql new file mode 100644 index 000000000000..51c49a770739 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql new file mode 100644 index 000000000000..40dd65afcbcd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql new file mode 100644 index 000000000000..d6dc36bfc919 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getMatchArmList() diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs new file mode 100644 index 000000000000..96138534fd56 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen, do not edit + +fn test_match_expr(x: i32) -> i32 { + // A match expression. For example: + match x { + Option::Some(y) => y, + Option::None => 0, + } + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } +} diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql new file mode 100644 index 000000000000..90176a31d896 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql @@ -0,0 +1,17 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + MethodCallExpr x, string hasArgList, int getNumberOfAttrs, string hasGenericArgList, + string hasNameRef, string hasReceiver +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and + (if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no") and + if x.hasReceiver() then hasReceiver = "yes" else hasReceiver = "no" +select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericArgList:", + hasGenericArgList, "hasNameRef:", hasNameRef, "hasReceiver:", hasReceiver diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql new file mode 100644 index 000000000000..3e6eb43ba1fe --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getArgList() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql new file mode 100644 index 000000000000..5cffc6cd43bd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql new file mode 100644 index 000000000000..d68ec9fa0ca1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericArgList() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql new file mode 100644 index 000000000000..358d9e3daa7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql new file mode 100644 index 000000000000..853315863fbc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getReceiver() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs new file mode 100644 index 000000000000..f8bf728d2570 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen, do not edit + +fn test_method_call_expr() -> () { + // A method call expression. For example: + x.foo(42); + x.foo::(42); +} diff --git a/rust/ql/test/extractor-tests/generated/Module/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Module/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Module/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.ql b/rust/ql/test/extractor-tests/generated/Module/Module.ql new file mode 100644 index 000000000000..d9b358516d1a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Module x, int getNumberOfAttrs, string hasItemList, string hasName, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasItemList() then hasItemList = "yes" else hasItemList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasItemList:", hasItemList, "hasName:", hasName, + "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql new file mode 100644 index 000000000000..1efd9a937c3b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Module x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql new file mode 100644 index 000000000000..0654df37918a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Module x +where toBeTested(x) and not x.isUnknown() +select x, x.getItemList() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getName.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getName.ql new file mode 100644 index 000000000000..dbda0724b1ed --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Module x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql new file mode 100644 index 000000000000..064f520d6a78 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Module x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Module/gen_module.rs b/rust/ql/test/extractor-tests/generated/Module/gen_module.rs new file mode 100644 index 000000000000..61af57a99bff --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/gen_module.rs @@ -0,0 +1,7 @@ +// generated by codegen, do not edit + +// A module declaration. For example: +mod foo; +mod bar { + pub fn baz() {} +} diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql new file mode 100644 index 000000000000..9161ff35a93b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x, int getNumberOfAttrs, int getNumberOfFields, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfFields = x.getNumberOfFields() and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields, "hasTy:", + hasTy diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql new file mode 100644 index 000000000000..c038e83f2f5f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql new file mode 100644 index 000000000000..c5b41700f641 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql new file mode 100644 index 000000000000..4ab524b18c7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs new file mode 100644 index 000000000000..bea18741cec0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_offset_of_expr() -> () { + // An `offset_of` expression. For example: + builtin # offset_of(Struct, field); +} diff --git a/rust/ql/test/extractor-tests/generated/OrPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/OrPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/OrPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql new file mode 100644 index 000000000000..11b3bb7394c3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OrPat x, int getNumberOfPats +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfPats = x.getNumberOfPats() +select x, "getNumberOfPats:", getNumberOfPats diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql new file mode 100644 index 000000000000..468619511dd8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OrPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getPat(index) diff --git a/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs b/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs new file mode 100644 index 000000000000..76dff6b6b920 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +fn test_or_pat() -> () { + // An or pattern. For example: + match x { + Option::Some(y) | Option::None => 0, + } +} diff --git a/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.ql b/rust/ql/test/extractor-tests/generated/Path/Path.ql new file mode 100644 index 000000000000..c5e1ba9d78a2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Path x, string hasQualifier, string hasPart +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasQualifier() then hasQualifier = "yes" else hasQualifier = "no") and + if x.hasPart() then hasPart = "yes" else hasPart = "no" +select x, "hasQualifier:", hasQualifier, "hasPart:", hasPart diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getPart.ql b/rust/ql/test/extractor-tests/generated/Path/Path_getPart.ql new file mode 100644 index 000000000000..402b1354588a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getPart.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Path x +where toBeTested(x) and not x.isUnknown() +select x, x.getPart() diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql new file mode 100644 index 000000000000..7678cffcecad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Path x +where toBeTested(x) and not x.isUnknown() +select x, x.getQualifier() diff --git a/rust/ql/test/extractor-tests/generated/Path/gen_path.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs new file mode 100644 index 000000000000..3b3f054875a9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_path() -> () { + // A path. For example: + foo::bar; +} diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/PathExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/PathExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql new file mode 100644 index 000000000000..4d472add3366 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathExpr x, int getNumberOfAttrs, string hasPath +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasPath() then hasPath = "yes" else hasPath = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql new file mode 100644 index 000000000000..0c0ed2aa7e45 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql new file mode 100644 index 000000000000..a776443137e5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs new file mode 100644 index 000000000000..dfd45ebd73fc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_path_expr() -> () { + // A path expression. For example: + let x = variable; + let x = foo::bar; + let y = ::foo; + let z = ::foo; +} diff --git a/rust/ql/test/extractor-tests/generated/PathPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/PathPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/PathPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql new file mode 100644 index 000000000000..3e6cce8f1512 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathPat x, string hasPath +where + toBeTested(x) and + not x.isUnknown() and + if x.hasPath() then hasPath = "yes" else hasPath = "no" +select x, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.ql b/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.ql new file mode 100644 index 000000000000..820b1028de21 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs b/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs new file mode 100644 index 000000000000..c54aa618ccf1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_path_pat() -> () { + // A path pattern. For example: + match x { + Foo::Bar => "ok", + _ => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/PrefixExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql new file mode 100644 index 000000000000..67d69c5363bb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PrefixExpr x, int getNumberOfAttrs, string hasExpr, string hasOperatorName +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasOperatorName:", + hasOperatorName diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql new file mode 100644 index 000000000000..813cb53ae4fb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PrefixExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql new file mode 100644 index 000000000000..d3e054d5eb8d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PrefixExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql new file mode 100644 index 000000000000..0246ef2465cc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PrefixExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs b/rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs new file mode 100644 index 000000000000..b3101ca64b21 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +fn test_prefix_expr() -> () { + // A unary operation expression. For example: + let x = -42 + let y = !true + let z = *ptr +} diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RangeExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql new file mode 100644 index 000000000000..c664f1d747e5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangeExpr x, int getNumberOfAttrs, string hasEnd, string hasOperatorName, string hasStart +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasEnd() then hasEnd = "yes" else hasEnd = "no") and + (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and + if x.hasStart() then hasStart = "yes" else hasStart = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasEnd:", hasEnd, "hasOperatorName:", + hasOperatorName, "hasStart:", hasStart diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql new file mode 100644 index 000000000000..1c538e88c29e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangeExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql new file mode 100644 index 000000000000..c39a039099d3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getEnd() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql new file mode 100644 index 000000000000..f554a9ecf747 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql new file mode 100644 index 000000000000..d47b9e81b861 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getStart() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs b/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs new file mode 100644 index 000000000000..f51927dd3dce --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs @@ -0,0 +1,11 @@ +// generated by codegen, do not edit + +fn test_range_expr() -> () { + // A range expression. For example: + let x = 1..=10; + let x = 1..10; + let x = 10..; + let x = ..10; + let x = ..=10; + let x = ..; +} diff --git a/rust/ql/test/extractor-tests/generated/RangePat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RangePat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql new file mode 100644 index 000000000000..d9b4bb413488 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangePat x, string hasEnd, string hasOperatorName, string hasStart +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasEnd() then hasEnd = "yes" else hasEnd = "no") and + (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and + if x.hasStart() then hasStart = "yes" else hasStart = "no" +select x, "hasEnd:", hasEnd, "hasOperatorName:", hasOperatorName, "hasStart:", hasStart diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql new file mode 100644 index 000000000000..61a27c775438 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getEnd() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql new file mode 100644 index 000000000000..f2f3052eae35 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql new file mode 100644 index 000000000000..29bbeda81cf1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getStart() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs b/rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs new file mode 100644 index 000000000000..85971069de47 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs @@ -0,0 +1,10 @@ +// generated by codegen, do not edit + +fn test_range_pat() -> () { + // A range pattern. For example: + match x { + ..15 => "too cold", + 16..=25 => "just right", + 26.. => "too hot", + } +} diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql new file mode 100644 index 000000000000..41cd6a41c4b1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExpr x, string hasPath, string hasRecordExprFieldList +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + if x.hasRecordExprFieldList() + then hasRecordExprFieldList = "yes" + else hasRecordExprFieldList = "no" +select x, "hasPath:", hasPath, "hasRecordExprFieldList:", hasRecordExprFieldList diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql new file mode 100644 index 000000000000..ebebf557e691 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql new file mode 100644 index 000000000000..d524805d0012 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getRecordExprFieldList() diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs b/rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs new file mode 100644 index 000000000000..94742ca3bd50 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_record_expr() -> () { + // A record expression. For example: + let first = Foo { a: 1, b: 2 }; + let second = Foo { a: 2, ..first }; + Foo { a: 1, b: 2 }[2] = 10; + Foo { .. } = second; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordExprField/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordExprField/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql new file mode 100644 index 000000000000..6a834cfd5ad6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprField x, int getNumberOfAttrs, string hasExpr, string hasNameRef +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasNameRef:", hasNameRef diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql new file mode 100644 index 000000000000..f667ec4f4792 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprField x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql new file mode 100644 index 000000000000..c05263942292 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprField x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql new file mode 100644 index 000000000000..fd3e3c0da50b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprField x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs b/rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs new file mode 100644 index 000000000000..6311fc03b008 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_record_expr_field() -> () { + // A field in a record expression. For example `a: 1` in: + Foo { a: 1, b: 2 }; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql new file mode 100644 index 000000000000..19bc5ea6e3ae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPat x, string hasPath, string hasRecordPatFieldList +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + if x.hasRecordPatFieldList() then hasRecordPatFieldList = "yes" else hasRecordPatFieldList = "no" +select x, "hasPath:", hasPath, "hasRecordPatFieldList:", hasRecordPatFieldList diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql new file mode 100644 index 000000000000..90685024029a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql new file mode 100644 index 000000000000..4f9cfdf1b5fe --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getRecordPatFieldList() diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs b/rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs new file mode 100644 index 000000000000..87b0fcd5e0dc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_record_pat() -> () { + // A record pattern. For example: + match x { + Foo { a: 1, b: 2 } => "ok", + Foo { .. } => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordPatField/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordPatField/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql new file mode 100644 index 000000000000..dd6bedf98e04 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatField x, int getNumberOfAttrs, string hasNameRef, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no") and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasNameRef:", hasNameRef, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql new file mode 100644 index 000000000000..f079ebc04841 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatField x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql new file mode 100644 index 000000000000..acc577910e5b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatField x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql new file mode 100644 index 000000000000..ad0e6e06cf0f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatField x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs b/rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs new file mode 100644 index 000000000000..4e1e358e3a09 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_record_pat_field() -> () { + // A field in a record pattern. For example `a: 1` in: + let Foo { a: 1, b: 2 } = foo; +} diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RefExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RefExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql new file mode 100644 index 000000000000..7970aed3ebec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql new file mode 100644 index 000000000000..7ef6d44228e4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql new file mode 100644 index 000000000000..b1404db9783a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs b/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs new file mode 100644 index 000000000000..bb2f9c36b708 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_ref_expr() -> () { + // A reference expression. For example: + let ref_const = &foo; + let ref_mut = &mut foo; + let raw_const: &mut i32 = &raw const foo; + let raw_mut: &mut i32 = &raw mut foo; +} diff --git a/rust/ql/test/extractor-tests/generated/RefPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RefPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RefPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql new file mode 100644 index 000000000000..e92585faee49 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefPat x, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql new file mode 100644 index 000000000000..758e4e7895ed --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs b/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs new file mode 100644 index 000000000000..1eeac44753f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_ref_pat() -> () { + // A reference pattern. For example: + match x { + &mut Option::Some(y) => y, + &Option::None => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ReturnExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql new file mode 100644 index 000000000000..aa8c4d886a7b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ReturnExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql new file mode 100644 index 000000000000..23366928f39f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ReturnExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql new file mode 100644 index 000000000000..8f682d7a5b1e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ReturnExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs b/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs new file mode 100644 index 000000000000..16da919ab313 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +// A return expression. For example: +fn some_value() -> i32 { + return 42; +} +fn no_value() -> () { + return; +} diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/SlicePat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/SlicePat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql new file mode 100644 index 000000000000..2b6c51f9da6a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SlicePat x, int getNumberOfPats +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfPats = x.getNumberOfPats() +select x, "getNumberOfPats:", getNumberOfPats diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql new file mode 100644 index 000000000000..37194fd2f1d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SlicePat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getPat(index) diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs b/rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs new file mode 100644 index 000000000000..afdd4206b285 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs @@ -0,0 +1,10 @@ +// generated by codegen, do not edit + +fn test_slice_pat() -> () { + // A slice pattern. For example: + match x { + [1, 2, 3, 4, 5] => "ok", + [1, 2, ..] => "fail", + [x, y, .., z, 7] => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql new file mode 100644 index 000000000000..573d7936d6c7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleExpr x, int getNumberOfAttrs, int getNumberOfFields +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfFields = x.getNumberOfFields() +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql new file mode 100644 index 000000000000..6736dada82b8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql new file mode 100644 index 000000000000..79c25f047d05 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs b/rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs new file mode 100644 index 000000000000..7aa2b235a804 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen, do not edit + +fn test_tuple_expr() -> () { + // A tuple expression. For example: + (1, "one"); + (2, "two")[0] = 3; +} diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TuplePat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TuplePat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql new file mode 100644 index 000000000000..6e65f167985f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TuplePat x, int getNumberOfFields +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfFields = x.getNumberOfFields() +select x, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql new file mode 100644 index 000000000000..5366bc445f1f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TuplePat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs b/rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs new file mode 100644 index 000000000000..9fc2ab60fc60 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs @@ -0,0 +1,7 @@ +// generated by codegen, do not edit + +fn test_tuple_pat() -> () { + // A tuple pattern. For example: + let (x, y) = (1, 2); + let (a, b, .., z) = (1, 2, 3, 4, 5); +} diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TupleStructPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql new file mode 100644 index 000000000000..d12f3427df52 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleStructPat x, int getNumberOfFields, string hasPath +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfFields = x.getNumberOfFields() and + if x.hasPath() then hasPath = "yes" else hasPath = "no" +select x, "getNumberOfFields:", getNumberOfFields, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql new file mode 100644 index 000000000000..b3919608ce87 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleStructPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql new file mode 100644 index 000000000000..bc5318bc1036 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleStructPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs b/rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs new file mode 100644 index 000000000000..0a55ce743f99 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs @@ -0,0 +1,10 @@ +// generated by codegen, do not edit + +fn test_tuple_struct_pat() -> () { + // A tuple struct pattern. For example: + match x { + Tuple("a", 1, 2, 3) => "great", + Tuple(.., 3) => "fine", + Tuple(..) => "fail", + }; +} diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql new file mode 100644 index 000000000000..1dc793e9d6e8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UnderscoreExpr x, int getNumberOfAttrs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() +select x, "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql new file mode 100644 index 000000000000..8b2b16e2904f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UnderscoreExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs new file mode 100644 index 000000000000..62ce1d4500cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_underscore_expr() -> () { + // An underscore expression. For example: + _ = 42; +} diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/WildcardPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/WildcardPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql new file mode 100644 index 000000000000..cac335f3b7fc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WildcardPat x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs b/rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs new file mode 100644 index 000000000000..4d29caca3f07 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_wildcard_pat() -> () { + // A wildcard pattern. For example: + let _ = 42; +} diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/YeetExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql new file mode 100644 index 000000000000..165bd667d3c8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YeetExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql new file mode 100644 index 000000000000..a246607b7794 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YeetExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql new file mode 100644 index 000000000000..edb0e0676a7a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YeetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs b/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs new file mode 100644 index 000000000000..52c8026e7908 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen, do not edit + +fn test_yeet_expr() -> () { + // A `yeet` expression. For example: + if x < size { + do yeet "index out of bounds"; + } +} diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/YieldExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql new file mode 100644 index 000000000000..47f32503bfc1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YieldExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql new file mode 100644 index 000000000000..9c6b01bc228b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YieldExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql new file mode 100644 index 000000000000..bdaa4755e6d3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs b/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs new file mode 100644 index 000000000000..e793107309dc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen, do not edit + +fn test_yield_expr() -> () { + // A `yield` expression. For example: + let one = #[coroutine] + || { + yield 1; + }; +} From e6e0e6eb668df4f8fc23ed124354a4f3b95123b9 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 20 Sep 2024 11:07:24 +0200 Subject: [PATCH 062/162] Rust: accept expected output --- .../generated/ArrayExpr/ArrayExpr.expected | 2 ++ .../generated/ArrayExpr/ArrayExpr_getAttr.expected | 0 .../generated/ArrayExpr/ArrayExpr_getExpr.expected | 5 +++++ .../generated/AsmExpr/AsmExpr.expected | 1 + .../generated/AsmExpr/AsmExpr_getAttr.expected | 0 .../generated/AsmExpr/AsmExpr_getExpr.expected | 1 + .../generated/AwaitExpr/AwaitExpr.expected | 1 + .../generated/AwaitExpr/AwaitExpr_getAttr.expected | 0 .../generated/AwaitExpr/AwaitExpr_getExpr.expected | 1 + .../generated/BecomeExpr/BecomeExpr.expected | 1 + .../BecomeExpr/BecomeExpr_getAttr.expected | 0 .../BecomeExpr/BecomeExpr_getExpr.expected | 1 + .../generated/BinaryExpr/BinaryExpr.expected | 5 +++++ .../BinaryExpr/BinaryExpr_getAttr.expected | 0 .../generated/BinaryExpr/BinaryExpr_getLhs.expected | 5 +++++ .../BinaryExpr/BinaryExpr_getOperatorName.expected | 5 +++++ .../generated/BinaryExpr/BinaryExpr_getRhs.expected | 5 +++++ .../generated/BlockExpr/BlockExpr.expected | 3 +++ .../generated/BlockExpr/BlockExpr_getAttr.expected | 0 .../generated/BlockExpr/BlockExpr_getLabel.expected | 1 + .../BlockExpr/BlockExpr_getStmtList.expected | 3 +++ .../generated/BoxPat/BoxPat.expected | 2 ++ .../generated/BoxPat/BoxPat_getPat.expected | 2 ++ .../generated/BreakExpr/BreakExpr.expected | 2 ++ .../generated/BreakExpr/BreakExpr_getAttr.expected | 0 .../generated/BreakExpr/BreakExpr_getExpr.expected | 1 + .../BreakExpr/BreakExpr_getLifetime.expected | 1 + .../generated/CallExpr/CallExpr.expected | 4 ++++ .../generated/CallExpr/CallExpr_getArgList.expected | 4 ++++ .../generated/CallExpr/CallExpr_getAttr.expected | 0 .../generated/CallExpr/CallExpr_getExpr.expected | 4 ++++ .../generated/CastExpr/CastExpr.expected | 1 + .../generated/CastExpr/CastExpr_getAttr.expected | 0 .../generated/CastExpr/CastExpr_getExpr.expected | 1 + .../generated/CastExpr/CastExpr_getTy.expected | 1 + .../generated/ClosureExpr/ClosureExpr.expected | 5 +++++ .../ClosureExpr/ClosureExpr_getAttr.expected | 2 ++ .../ClosureExpr/ClosureExpr_getBody.expected | 5 +++++ .../ClosureExpr_getClosureBinder.expected | 0 .../ClosureExpr/ClosureExpr_getParamList.expected | 5 +++++ .../ClosureExpr/ClosureExpr_getRetType.expected | 1 + .../generated/ConstBlockPat/ConstBlockPat.expected | 1 + .../ConstBlockPat_getBlockExpr.expected | 1 + .../generated/ContinueExpr/ContinueExpr.expected | 2 ++ .../ContinueExpr/ContinueExpr_getAttr.expected | 0 .../ContinueExpr/ContinueExpr_getLifetime.expected | 1 + .../generated/ExprStmt/ExprStmt.expected | 2 ++ .../generated/ExprStmt/ExprStmt_getExpr.expected | 2 ++ .../generated/FieldExpr/FieldExpr.expected | 1 + .../generated/FieldExpr/FieldExpr_getAttr.expected | 0 .../generated/FieldExpr/FieldExpr_getExpr.expected | 1 + .../FieldExpr/FieldExpr_getNameRef.expected | 1 + .../generated/Function/Function.expected | 2 ++ .../generated/Function/Function_getAbi.expected | 0 .../generated/Function/Function_getAttr.expected | 0 .../generated/Function/Function_getBody.expected | 1 + .../Function/Function_getGenericParamList.expected | 0 .../generated/Function/Function_getName.expected | 2 ++ .../Function/Function_getParamList.expected | 2 ++ .../generated/Function/Function_getRetType.expected | 1 + .../Function/Function_getVisibility.expected | 0 .../Function/Function_getWhereClause.expected | 0 .../GenericArgList/GenericArgList.expected | 1 + .../GenericArgList_getGenericArg.expected | 2 ++ .../generated/IdentPat/IdentPat.expected | 2 ++ .../generated/IdentPat/IdentPat_getAttr.expected | 0 .../generated/IdentPat/IdentPat_getName.expected | 2 ++ .../generated/IdentPat/IdentPat_getPat.expected | 1 + .../generated/IfExpr/IfExpr.expected | 2 ++ .../generated/IfExpr/IfExpr_getAttr.expected | 0 .../generated/IfExpr/IfExpr_getCondition.expected | 2 ++ .../generated/IfExpr/IfExpr_getElse.expected | 1 + .../generated/IfExpr/IfExpr_getThen.expected | 2 ++ .../generated/IndexExpr/IndexExpr.expected | 2 ++ .../generated/IndexExpr/IndexExpr_getAttr.expected | 0 .../generated/IndexExpr/IndexExpr_getBase.expected | 2 ++ .../generated/IndexExpr/IndexExpr_getIndex.expected | 2 ++ .../extractor-tests/generated/Label/Label.expected | 1 + .../generated/Label/Label_getLifetime.expected | 1 + .../generated/LetExpr/LetExpr.expected | 1 + .../generated/LetExpr/LetExpr_getAttr.expected | 0 .../generated/LetExpr/LetExpr_getExpr.expected | 1 + .../generated/LetExpr/LetExpr_getPat.expected | 1 + .../generated/LetStmt/LetStmt.expected | 6 ++++++ .../generated/LetStmt/LetStmt_getAttr.expected | 0 .../LetStmt/LetStmt_getInitializer.expected | 4 ++++ .../generated/LetStmt/LetStmt_getLetElse.expected | 1 + .../generated/LetStmt/LetStmt_getPat.expected | 6 ++++++ .../generated/LetStmt/LetStmt_getTy.expected | 2 ++ .../generated/LiteralExpr/LiteralExpr.expected | 8 ++++++++ .../LiteralExpr/LiteralExpr_getAttr.expected | 0 .../LiteralExpr/LiteralExpr_getTextValue.expected | 8 ++++++++ .../generated/LiteralPat/LiteralPat.expected | 1 + .../LiteralPat/LiteralPat_getLiteral.expected | 1 + .../generated/LoopExpr/LoopExpr.expected | 3 +++ .../generated/LoopExpr/LoopExpr_getAttr.expected | 0 .../generated/LoopExpr/LoopExpr_getLabel.expected | 1 + .../LoopExpr/LoopExpr_getLoopBody.expected | 3 +++ .../generated/MatchArm/MatchArm.expected | 4 ++++ .../generated/MatchArm/MatchArm_getAttr.expected | 0 .../generated/MatchArm/MatchArm_getExpr.expected | 4 ++++ .../generated/MatchArm/MatchArm_getGuard.expected | 1 + .../generated/MatchArm/MatchArm_getPat.expected | 4 ++++ .../generated/MatchExpr/MatchExpr.expected | 2 ++ .../generated/MatchExpr/MatchExpr_getAttr.expected | 0 .../generated/MatchExpr/MatchExpr_getExpr.expected | 2 ++ .../MatchExpr/MatchExpr_getMatchArmList.expected | 2 ++ .../MethodCallExpr/MethodCallExpr.expected | 2 ++ .../MethodCallExpr_getArgList.expected | 2 ++ .../MethodCallExpr/MethodCallExpr_getAttr.expected | 0 .../MethodCallExpr_getGenericArgList.expected | 1 + .../MethodCallExpr_getNameRef.expected | 2 ++ .../MethodCallExpr_getReceiver.expected | 2 ++ .../generated/Module/Module.expected | 4 ++++ .../generated/Module/Module_getAttr.expected | 0 .../generated/Module/Module_getItemList.expected | 1 + .../generated/Module/Module_getName.expected | 4 ++++ .../generated/Module/Module_getVisibility.expected | 0 .../generated/OffsetOfExpr/OffsetOfExpr.expected | 1 + .../OffsetOfExpr/OffsetOfExpr_getAttr.expected | 0 .../OffsetOfExpr/OffsetOfExpr_getField.expected | 1 + .../OffsetOfExpr/OffsetOfExpr_getTy.expected | 1 + .../extractor-tests/generated/OrPat/OrPat.expected | 1 + .../generated/OrPat/OrPat_getPat.expected | 2 ++ .../extractor-tests/generated/Path/Path.expected | 2 ++ .../generated/Path/Path_getPart.expected | 2 ++ .../generated/Path/Path_getQualifier.expected | 1 + .../generated/PathExpr/PathExpr.expected | 4 ++++ .../generated/PathExpr/PathExpr_getAttr.expected | 0 .../generated/PathExpr/PathExpr_getPath.expected | 4 ++++ .../generated/PathPat/PathPat.expected | 1 + .../generated/PathPat/PathPat_getPath.expected | 1 + .../generated/PrefixExpr/PrefixExpr.expected | 3 +++ .../PrefixExpr/PrefixExpr_getAttr.expected | 0 .../PrefixExpr/PrefixExpr_getExpr.expected | 3 +++ .../PrefixExpr/PrefixExpr_getOperatorName.expected | 3 +++ .../generated/RangeExpr/RangeExpr.expected | 6 ++++++ .../generated/RangeExpr/RangeExpr_getAttr.expected | 0 .../generated/RangeExpr/RangeExpr_getEnd.expected | 4 ++++ .../RangeExpr/RangeExpr_getOperatorName.expected | 6 ++++++ .../generated/RangeExpr/RangeExpr_getStart.expected | 3 +++ .../generated/RangePat/RangePat.expected | 3 +++ .../generated/RangePat/RangePat_getEnd.expected | 2 ++ .../RangePat/RangePat_getOperatorName.expected | 3 +++ .../generated/RangePat/RangePat_getStart.expected | 2 ++ .../generated/RecordExpr/RecordExpr.expected | 4 ++++ .../RecordExpr/RecordExpr_getPath.expected | 4 ++++ .../RecordExpr_getRecordExprFieldList.expected | 4 ++++ .../RecordExprField/RecordExprField.expected | 2 ++ .../RecordExprField_getAttr.expected | 0 .../RecordExprField_getExpr.expected | 2 ++ .../RecordExprField_getNameRef.expected | 2 ++ .../generated/RecordPat/RecordPat.expected | 2 ++ .../generated/RecordPat/RecordPat_getPath.expected | 2 ++ .../RecordPat_getRecordPatFieldList.expected | 2 ++ .../RecordPatField/RecordPatField.expected | 2 ++ .../RecordPatField/RecordPatField_getAttr.expected | 0 .../RecordPatField_getNameRef.expected | 2 ++ .../RecordPatField/RecordPatField_getPat.expected | 2 ++ .../generated/RefExpr/RefExpr.expected | 4 ++++ .../generated/RefExpr/RefExpr_getAttr.expected | 0 .../generated/RefExpr/RefExpr_getExpr.expected | 4 ++++ .../generated/RefPat/RefPat.expected | 2 ++ .../generated/RefPat/RefPat_getPat.expected | 2 ++ .../generated/ReturnExpr/ReturnExpr.expected | 2 ++ .../ReturnExpr/ReturnExpr_getAttr.expected | 0 .../ReturnExpr/ReturnExpr_getExpr.expected | 1 + .../generated/SlicePat/SlicePat.expected | 3 +++ .../generated/SlicePat/SlicePat_getPat.expected | 13 +++++++++++++ .../generated/TupleExpr/TupleExpr.expected | 2 ++ .../generated/TupleExpr/TupleExpr_getAttr.expected | 0 .../generated/TupleExpr/TupleExpr_getField.expected | 4 ++++ .../generated/TuplePat/TuplePat.expected | 2 ++ .../generated/TuplePat/TuplePat_getField.expected | 6 ++++++ .../TupleStructPat/TupleStructPat.expected | 3 +++ .../TupleStructPat/TupleStructPat_getField.expected | 7 +++++++ .../TupleStructPat/TupleStructPat_getPath.expected | 3 +++ .../UnderscoreExpr/UnderscoreExpr.expected | 1 + .../UnderscoreExpr/UnderscoreExpr_getAttr.expected | 0 .../generated/WildcardPat/WildcardPat.expected | 1 + .../generated/YeetExpr/YeetExpr.expected | 1 + .../generated/YeetExpr/YeetExpr_getAttr.expected | 0 .../generated/YeetExpr/YeetExpr_getExpr.expected | 1 + .../generated/YieldExpr/YieldExpr.expected | 1 + .../generated/YieldExpr/YieldExpr_getAttr.expected | 0 .../generated/YieldExpr/YieldExpr_getExpr.expected | 1 + 186 files changed, 361 insertions(+) create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getAbi.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected create mode 100644 rust/ql/test/extractor-tests/generated/Label/Label.expected create mode 100644 rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module.expected create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path.expected create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected new file mode 100644 index 000000000000..549f43fc9892 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected @@ -0,0 +1,2 @@ +| gen_array_expr.rs:5:5:5:13 | ArrayExpr | getNumberOfAttrs: | 0 | getNumberOfExprs: | 3 | +| gen_array_expr.rs:6:5:6:11 | ArrayExpr | getNumberOfAttrs: | 0 | getNumberOfExprs: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.expected new file mode 100644 index 000000000000..d306ccb9af6b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.expected @@ -0,0 +1,5 @@ +| gen_array_expr.rs:5:5:5:13 | ArrayExpr | 0 | gen_array_expr.rs:5:6:5:6 | LiteralExpr | +| gen_array_expr.rs:5:5:5:13 | ArrayExpr | 1 | gen_array_expr.rs:5:9:5:9 | LiteralExpr | +| gen_array_expr.rs:5:5:5:13 | ArrayExpr | 2 | gen_array_expr.rs:5:12:5:12 | LiteralExpr | +| gen_array_expr.rs:6:5:6:11 | ArrayExpr | 0 | gen_array_expr.rs:6:6:6:6 | LiteralExpr | +| gen_array_expr.rs:6:5:6:11 | ArrayExpr | 1 | gen_array_expr.rs:6:9:6:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected new file mode 100644 index 000000000000..19464c21fd6a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected @@ -0,0 +1 @@ +| gen_asm_expr.rs:6:9:6:24 | AsmExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.expected new file mode 100644 index 000000000000..7a4af543f311 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_asm_expr.rs:6:9:6:24 | AsmExpr | gen_asm_expr.rs:6:23:6:23 | UnderscoreExpr | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected new file mode 100644 index 000000000000..2ed01b9058e1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected @@ -0,0 +1 @@ +| gen_await_expr.rs:6:17:6:27 | AwaitExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected new file mode 100644 index 000000000000..c34a6012f4c3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_await_expr.rs:6:17:6:27 | AwaitExpr | gen_await_expr.rs:6:17:6:21 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected new file mode 100644 index 000000000000..75840ec81fed --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected @@ -0,0 +1 @@ +| gen_become_expr.rs:8:10:8:36 | BecomeExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected new file mode 100644 index 000000000000..8992c4868ca2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_become_expr.rs:8:10:8:36 | BecomeExpr | gen_become_expr.rs:8:17:8:36 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected new file mode 100644 index 000000000000..0c0061be3efc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected new file mode 100644 index 000000000000..2eb8f6ef572d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | gen_binary_expr.rs:5:5:5:5 | PathExpr | +| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | gen_binary_expr.rs:6:5:6:5 | PathExpr | +| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | gen_binary_expr.rs:7:5:7:5 | PathExpr | +| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | gen_binary_expr.rs:8:5:8:5 | PathExpr | +| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | gen_binary_expr.rs:9:5:9:5 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected new file mode 100644 index 000000000000..9f9e191f660a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | + | +| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | && | +| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | <= | +| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | = | +| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected new file mode 100644 index 000000000000..868bf4490b9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | gen_binary_expr.rs:5:9:5:9 | PathExpr | +| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | gen_binary_expr.rs:6:10:6:10 | PathExpr | +| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | gen_binary_expr.rs:7:10:7:10 | PathExpr | +| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | gen_binary_expr.rs:8:9:8:9 | PathExpr | +| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | gen_binary_expr.rs:9:10:9:10 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected new file mode 100644 index 000000000000..6308944a23e8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | getNumberOfAttrs: | 0 | hasLabel: | no | hasStmtList: | yes | +| gen_block_expr.rs:5:5:7:5 | BlockExpr | getNumberOfAttrs: | 0 | hasLabel: | no | hasStmtList: | yes | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | getNumberOfAttrs: | 0 | hasLabel: | yes | hasStmtList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected new file mode 100644 index 000000000000..3a935228e051 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_block_expr.rs:8:5:11:5 | BlockExpr | gen_block_expr.rs:8:5:8:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected new file mode 100644 index 000000000000..21eb195289a2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | gen_block_expr.rs:3:28:12:1 | StmtList | +| gen_block_expr.rs:5:5:7:5 | BlockExpr | gen_block_expr.rs:5:5:7:5 | StmtList | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | gen_block_expr.rs:8:13:11:5 | StmtList | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected new file mode 100644 index 000000000000..95c8bdebd47a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected @@ -0,0 +1,2 @@ +| gen_box_pat.rs:6:9:6:27 | BoxPat | hasPat: | yes | +| gen_box_pat.rs:7:9:7:24 | BoxPat | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected new file mode 100644 index 000000000000..cac8ee05d3c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected @@ -0,0 +1,2 @@ +| gen_box_pat.rs:6:9:6:27 | BoxPat | gen_box_pat.rs:6:13:6:27 | TupleStructPat | +| gen_box_pat.rs:7:9:7:24 | BoxPat | gen_box_pat.rs:7:13:7:24 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected new file mode 100644 index 000000000000..5bcf55883232 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected @@ -0,0 +1,2 @@ +| gen_break_expr.rs:7:13:7:17 | BreakExpr | getNumberOfAttrs: | 0 | hasExpr: | no | hasLifetime: | no | +| gen_break_expr.rs:12:13:12:27 | BreakExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected new file mode 100644 index 000000000000..16dfc8124590 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected new file mode 100644 index 000000000000..ebee95c1ac94 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected @@ -0,0 +1 @@ +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:19:12:24 | Lifetime | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected new file mode 100644 index 000000000000..5414108064cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:6:5:6:23 | CallExpr | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:7:5:7:14 | CallExpr | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:8:5:8:10 | CallExpr | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected new file mode 100644 index 000000000000..a42cc13bf39c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | gen_call_expr.rs:5:8:5:11 | ArgList | +| gen_call_expr.rs:6:5:6:23 | CallExpr | gen_call_expr.rs:6:20:6:23 | ArgList | +| gen_call_expr.rs:7:5:7:14 | CallExpr | gen_call_expr.rs:7:11:7:14 | ArgList | +| gen_call_expr.rs:8:5:8:10 | CallExpr | gen_call_expr.rs:8:8:8:10 | ArgList | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.expected new file mode 100644 index 000000000000..d6c070576c66 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getExpr.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | gen_call_expr.rs:5:5:5:7 | PathExpr | +| gen_call_expr.rs:6:5:6:23 | CallExpr | gen_call_expr.rs:6:5:6:19 | PathExpr | +| gen_call_expr.rs:7:5:7:14 | CallExpr | gen_call_expr.rs:7:5:7:10 | IndexExpr | +| gen_call_expr.rs:8:5:8:10 | CallExpr | gen_call_expr.rs:8:5:8:7 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected new file mode 100644 index 000000000000..6050eb022593 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -0,0 +1 @@ +| gen_cast_expr.rs:5:5:5:16 | CastExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasTy: | yes | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected new file mode 100644 index 000000000000..e45a936afbde --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_cast_expr.rs:5:5:5:16 | CastExpr | gen_cast_expr.rs:5:5:5:9 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.expected new file mode 100644 index 000000000000..29cc49cc3b9f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTy.expected @@ -0,0 +1 @@ +| gen_cast_expr.rs:5:5:5:16 | CastExpr | gen_cast_expr.rs:5:14:5:16 | PathType | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected new file mode 100644 index 000000000000..c6a8ba5ece4b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected @@ -0,0 +1,5 @@ +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | hasParamList: | yes | hasRetType: | no | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | hasParamList: | yes | hasRetType: | yes | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | hasParamList: | yes | hasRetType: | no | +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | hasParamList: | yes | hasRetType: | no | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | hasParamList: | yes | hasRetType: | no | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected new file mode 100644 index 000000000000..f1859d594d18 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected @@ -0,0 +1,2 @@ +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | 0 | gen_closure_expr.rs:8:6:8:17 | Attr | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | 0 | gen_closure_expr.rs:10:6:10:17 | Attr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected new file mode 100644 index 000000000000..3b16f320ced0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected @@ -0,0 +1,5 @@ +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | gen_closure_expr.rs:5:9:5:13 | BinaryExpr | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | gen_closure_expr.rs:6:26:6:34 | BlockExpr | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | gen_closure_expr.rs:7:23:7:27 | BinaryExpr | +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | gen_closure_expr.rs:9:9:9:15 | YieldExpr | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | gen_closure_expr.rs:11:17:11:23 | YieldExpr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected new file mode 100644 index 000000000000..d0e6aaeac064 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected @@ -0,0 +1,5 @@ +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | gen_closure_expr.rs:5:5:5:7 | ParamList | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | gen_closure_expr.rs:6:10:6:17 | ParamList | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | gen_closure_expr.rs:7:11:7:21 | ParamList | +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | gen_closure_expr.rs:9:5:9:7 | ParamList | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | gen_closure_expr.rs:11:13:11:15 | ParamList | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected new file mode 100644 index 000000000000..e018209cb53f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected @@ -0,0 +1 @@ +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | gen_closure_expr.rs:6:19:6:24 | RetType | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected new file mode 100644 index 000000000000..5b6220f2b9c9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected @@ -0,0 +1 @@ +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | hasBlockExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected new file mode 100644 index 000000000000..58a885a48578 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected @@ -0,0 +1 @@ +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | gen_const_block_pat.rs:6:15:6:27 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected new file mode 100644 index 000000000000..ab921873d620 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected @@ -0,0 +1,2 @@ +| gen_continue_expr.rs:7:13:7:20 | ContinueExpr | getNumberOfAttrs: | 0 | hasLifetime: | no | +| gen_continue_expr.rs:12:13:12:27 | ContinueExpr | getNumberOfAttrs: | 0 | hasLifetime: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected new file mode 100644 index 000000000000..525d2bb55a8e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected @@ -0,0 +1 @@ +| gen_continue_expr.rs:12:13:12:27 | ContinueExpr | gen_continue_expr.rs:12:22:12:27 | Lifetime | diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected new file mode 100644 index 000000000000..96760932ea05 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected @@ -0,0 +1,2 @@ +| gen_expr_stmt.rs:5:5:5:12 | ExprStmt | hasExpr: | yes | +| gen_expr_stmt.rs:6:5:6:12 | ExprStmt | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected new file mode 100644 index 000000000000..71219fa8ac91 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected @@ -0,0 +1,2 @@ +| gen_expr_stmt.rs:5:5:5:12 | ExprStmt | gen_expr_stmt.rs:5:5:5:11 | CallExpr | +| gen_expr_stmt.rs:6:5:6:12 | ExprStmt | gen_expr_stmt.rs:6:5:6:12 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected new file mode 100644 index 000000000000..22dcb3c92e11 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected @@ -0,0 +1 @@ +| gen_field_expr.rs:5:5:5:9 | FieldExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.expected new file mode 100644 index 000000000000..c8184671bd2b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_field_expr.rs:5:5:5:9 | FieldExpr | gen_field_expr.rs:5:5:5:5 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.expected new file mode 100644 index 000000000000..4855c264b2c7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.expected @@ -0,0 +1 @@ +| gen_field_expr.rs:5:5:5:9 | FieldExpr | gen_field_expr.rs:5:7:5:9 | NameRef | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.expected b/rust/ql/test/extractor-tests/generated/Function/Function.expected new file mode 100644 index 000000000000..fd765f9b5785 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function.expected @@ -0,0 +1,2 @@ +| gen_function.rs:3:1:4:38 | foo | hasAbi: | no | getNumberOfAttrs: | 0 | hasBody: | yes | hasGenericParamList: | no | hasName: | yes | hasParamList: | yes | hasRetType: | yes | hasVisibility: | no | hasWhereClause: | no | +| gen_function.rs:7:5:7:13 | bar | hasAbi: | no | getNumberOfAttrs: | 0 | hasBody: | no | hasGenericParamList: | no | hasName: | yes | hasParamList: | yes | hasRetType: | no | hasVisibility: | no | hasWhereClause: | no | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected new file mode 100644 index 000000000000..996e8c1a27c3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected @@ -0,0 +1 @@ +| gen_function.rs:3:1:4:38 | foo | gen_function.rs:4:23:4:38 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getName.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getName.expected new file mode 100644 index 000000000000..c21fa43f4aae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getName.expected @@ -0,0 +1,2 @@ +| gen_function.rs:3:1:4:38 | foo | gen_function.rs:4:4:4:6 | Name | +| gen_function.rs:7:5:7:13 | bar | gen_function.rs:7:8:7:10 | Name | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected new file mode 100644 index 000000000000..baa2734e86ac --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected @@ -0,0 +1,2 @@ +| gen_function.rs:3:1:4:38 | foo | gen_function.rs:4:7:4:14 | ParamList | +| gen_function.rs:7:5:7:13 | bar | gen_function.rs:7:11:7:12 | ParamList | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected new file mode 100644 index 000000000000..7a5338705600 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected @@ -0,0 +1 @@ +| gen_function.rs:3:1:4:38 | foo | gen_function.rs:4:16:4:21 | RetType | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected new file mode 100644 index 000000000000..370ee8ce4d66 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected @@ -0,0 +1 @@ +| gen_generic_arg_list.rs:5:10:5:21 | GenericArgList | getNumberOfGenericArgs: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected new file mode 100644 index 000000000000..b72d3035ed14 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected @@ -0,0 +1,2 @@ +| gen_generic_arg_list.rs:5:10:5:21 | GenericArgList | 0 | gen_generic_arg_list.rs:5:13:5:15 | TypeArg | +| gen_generic_arg_list.rs:5:10:5:21 | GenericArgList | 1 | gen_generic_arg_list.rs:5:18:5:20 | TypeArg | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected new file mode 100644 index 000000000000..53a4c59d3986 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected @@ -0,0 +1,2 @@ +| gen_ident_pat.rs:6:22:6:22 | IdentPat | getNumberOfAttrs: | 0 | hasName: | yes | hasPat: | no | +| gen_ident_pat.rs:10:9:10:25 | IdentPat | getNumberOfAttrs: | 0 | hasName: | yes | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected new file mode 100644 index 000000000000..2a49521ead99 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected @@ -0,0 +1,2 @@ +| gen_ident_pat.rs:6:22:6:22 | IdentPat | gen_ident_pat.rs:6:22:6:22 | Name | +| gen_ident_pat.rs:10:9:10:25 | IdentPat | gen_ident_pat.rs:10:9:10:9 | Name | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected new file mode 100644 index 000000000000..705456753b9c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected @@ -0,0 +1 @@ +| gen_ident_pat.rs:10:9:10:25 | IdentPat | gen_ident_pat.rs:10:11:10:25 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected new file mode 100644 index 000000000000..a0e0ea15594f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -0,0 +1,2 @@ +| gen_if_expr.rs:5:5:7:5 | IfExpr | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | no | hasThen: | yes | +| gen_if_expr.rs:8:13:12:5 | IfExpr | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | yes | hasThen: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected new file mode 100644 index 000000000000..4a777a6f762f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected @@ -0,0 +1,2 @@ +| gen_if_expr.rs:5:5:7:5 | IfExpr | gen_if_expr.rs:5:8:5:14 | BinaryExpr | +| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:8:16:8:20 | BinaryExpr | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected new file mode 100644 index 000000000000..a857dbe2099a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected @@ -0,0 +1 @@ +| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:10:12:12:5 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected new file mode 100644 index 000000000000..0916c3f33916 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected @@ -0,0 +1,2 @@ +| gen_if_expr.rs:5:5:7:5 | IfExpr | gen_if_expr.rs:5:16:7:5 | BlockExpr | +| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:8:22:10:5 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected new file mode 100644 index 000000000000..c113934115d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -0,0 +1,2 @@ +| gen_index_expr.rs:5:5:5:12 | IndexExpr | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected new file mode 100644 index 000000000000..a3126f84df9a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected @@ -0,0 +1,2 @@ +| gen_index_expr.rs:5:5:5:12 | IndexExpr | gen_index_expr.rs:5:5:5:8 | PathExpr | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | gen_index_expr.rs:6:5:6:8 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected new file mode 100644 index 000000000000..4d6a82c33b3a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected @@ -0,0 +1,2 @@ +| gen_index_expr.rs:5:5:5:12 | IndexExpr | gen_index_expr.rs:5:10:5:11 | LiteralExpr | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | gen_index_expr.rs:6:10:6:11 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/Label/Label.expected b/rust/ql/test/extractor-tests/generated/Label/Label.expected new file mode 100644 index 000000000000..5cea4ef72221 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Label.expected @@ -0,0 +1 @@ +| gen_label.rs:5:5:5:11 | Label | hasLifetime: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected b/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected new file mode 100644 index 000000000000..9c78f23307d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected @@ -0,0 +1 @@ +| gen_label.rs:5:5:5:11 | Label | gen_label.rs:5:5:5:10 | Lifetime | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected new file mode 100644 index 000000000000..26a968ef35b3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected @@ -0,0 +1 @@ +| gen_let_expr.rs:5:8:5:31 | LetExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.expected new file mode 100644 index 000000000000..66fab8ec8099 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_let_expr.rs:5:8:5:31 | LetExpr | gen_let_expr.rs:5:22:5:31 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected new file mode 100644 index 000000000000..287200e610ff --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected @@ -0,0 +1 @@ +| gen_let_expr.rs:5:8:5:31 | LetExpr | gen_let_expr.rs:5:12:5:18 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected new file mode 100644 index 000000000000..7c05e07e2f3e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected @@ -0,0 +1,6 @@ +| gen_let_stmt.rs:5:5:5:15 | LetStmt | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTy: | no | +| gen_let_stmt.rs:6:5:6:20 | LetStmt | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTy: | yes | +| gen_let_stmt.rs:7:5:7:15 | LetStmt | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTy: | yes | +| gen_let_stmt.rs:8:5:8:10 | LetStmt | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTy: | no | +| gen_let_stmt.rs:9:5:9:24 | LetStmt | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTy: | no | +| gen_let_stmt.rs:10:5:12:6 | LetStmt | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | yes | hasPat: | yes | hasTy: | no | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected new file mode 100644 index 000000000000..ab4558a5e9cc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected @@ -0,0 +1,4 @@ +| gen_let_stmt.rs:5:5:5:15 | LetStmt | gen_let_stmt.rs:5:13:5:14 | LiteralExpr | +| gen_let_stmt.rs:6:5:6:20 | LetStmt | gen_let_stmt.rs:6:18:6:19 | LiteralExpr | +| gen_let_stmt.rs:9:5:9:24 | LetStmt | gen_let_stmt.rs:9:18:9:23 | TupleExpr | +| gen_let_stmt.rs:10:5:12:6 | LetStmt | gen_let_stmt.rs:10:19:10:38 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected new file mode 100644 index 000000000000..8078ec669660 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected @@ -0,0 +1 @@ +| gen_let_stmt.rs:10:5:12:6 | LetStmt | gen_let_stmt.rs:10:40:12:5 | LetElse | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected new file mode 100644 index 000000000000..37462e8cfb64 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected @@ -0,0 +1,6 @@ +| gen_let_stmt.rs:5:5:5:15 | LetStmt | gen_let_stmt.rs:5:9:5:9 | IdentPat | +| gen_let_stmt.rs:6:5:6:20 | LetStmt | gen_let_stmt.rs:6:9:6:9 | IdentPat | +| gen_let_stmt.rs:7:5:7:15 | LetStmt | gen_let_stmt.rs:7:9:7:9 | IdentPat | +| gen_let_stmt.rs:8:5:8:10 | LetStmt | gen_let_stmt.rs:8:9:8:9 | IdentPat | +| gen_let_stmt.rs:9:5:9:24 | LetStmt | gen_let_stmt.rs:9:9:9:14 | TuplePat | +| gen_let_stmt.rs:10:5:12:6 | LetStmt | gen_let_stmt.rs:10:9:10:15 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.expected new file mode 100644 index 000000000000..1cf6d1d2a513 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTy.expected @@ -0,0 +1,2 @@ +| gen_let_stmt.rs:6:5:6:20 | LetStmt | gen_let_stmt.rs:6:12:6:14 | PathType | +| gen_let_stmt.rs:7:5:7:15 | LetStmt | gen_let_stmt.rs:7:12:7:14 | PathType | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected new file mode 100644 index 000000000000..0fd63ea703d1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected @@ -0,0 +1,8 @@ +| gen_literal_expr.rs:5:5:5:6 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:6:5:6:8 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:7:5:7:19 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:8:5:8:20 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:9:5:9:7 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:10:5:10:8 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:11:5:11:20 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:12:5:12:8 | LiteralExpr | getNumberOfAttrs: | 0 | hasTextValue: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected new file mode 100644 index 000000000000..7d0b003bf9ac --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected @@ -0,0 +1,8 @@ +| gen_literal_expr.rs:5:5:5:6 | LiteralExpr | 42 | +| gen_literal_expr.rs:6:5:6:8 | LiteralExpr | 42.0 | +| gen_literal_expr.rs:7:5:7:19 | LiteralExpr | "Hello, world!" | +| gen_literal_expr.rs:8:5:8:20 | LiteralExpr | b"Hello, world!" | +| gen_literal_expr.rs:9:5:9:7 | LiteralExpr | 'x' | +| gen_literal_expr.rs:10:5:10:8 | LiteralExpr | b'x' | +| gen_literal_expr.rs:11:5:11:20 | LiteralExpr | r"Hello, world!" | +| gen_literal_expr.rs:12:5:12:8 | LiteralExpr | true | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected new file mode 100644 index 000000000000..b7ac2ced75f8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected @@ -0,0 +1 @@ +| gen_literal_pat.rs:6:9:6:10 | LiteralPat | hasLiteral: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected new file mode 100644 index 000000000000..e6aa00a6dc93 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected @@ -0,0 +1 @@ +| gen_literal_pat.rs:6:9:6:10 | LiteralPat | gen_literal_pat.rs:6:9:6:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected new file mode 100644 index 000000000000..aae22652d645 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected @@ -0,0 +1,3 @@ +| gen_loop_expr.rs:5:5:7:5 | LoopExpr | getNumberOfAttrs: | 0 | hasLabel: | no | hasLoopBody: | yes | +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | getNumberOfAttrs: | 0 | hasLabel: | yes | hasLoopBody: | yes | +| gen_loop_expr.rs:13:5:19:5 | LoopExpr | getNumberOfAttrs: | 0 | hasLabel: | no | hasLoopBody: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected new file mode 100644 index 000000000000..98a657f09832 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | gen_loop_expr.rs:8:5:8:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected new file mode 100644 index 000000000000..358fd7625b57 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected @@ -0,0 +1,3 @@ +| gen_loop_expr.rs:5:5:7:5 | LoopExpr | gen_loop_expr.rs:5:10:7:5 | BlockExpr | +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | gen_loop_expr.rs:8:18:11:5 | BlockExpr | +| gen_loop_expr.rs:13:5:19:5 | LoopExpr | gen_loop_expr.rs:13:10:19:5 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected new file mode 100644 index 000000000000..b685f8823628 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -0,0 +1,4 @@ +| gen_match_arm.rs:6:9:6:29 | MatchArm | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | no | hasPat: | yes | +| gen_match_arm.rs:7:9:7:26 | MatchArm | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | no | hasPat: | yes | +| gen_match_arm.rs:10:9:10:35 | MatchArm | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | yes | hasPat: | yes | +| gen_match_arm.rs:11:9:11:15 | MatchArm | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | no | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected new file mode 100644 index 000000000000..82984cc9385e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected @@ -0,0 +1,4 @@ +| gen_match_arm.rs:6:9:6:29 | MatchArm | gen_match_arm.rs:6:28:6:28 | PathExpr | +| gen_match_arm.rs:7:9:7:26 | MatchArm | gen_match_arm.rs:7:25:7:25 | LiteralExpr | +| gen_match_arm.rs:10:9:10:35 | MatchArm | gen_match_arm.rs:10:30:10:34 | BinaryExpr | +| gen_match_arm.rs:11:9:11:15 | MatchArm | gen_match_arm.rs:11:14:11:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected new file mode 100644 index 000000000000..4e5da9874740 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected @@ -0,0 +1 @@ +| gen_match_arm.rs:10:9:10:35 | MatchArm | gen_match_arm.rs:10:17:10:25 | MatchGuard | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected new file mode 100644 index 000000000000..41f79ed16c9e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected @@ -0,0 +1,4 @@ +| gen_match_arm.rs:6:9:6:29 | MatchArm | gen_match_arm.rs:6:9:6:23 | TupleStructPat | +| gen_match_arm.rs:7:9:7:26 | MatchArm | gen_match_arm.rs:7:9:7:20 | PathPat | +| gen_match_arm.rs:10:9:10:35 | MatchArm | gen_match_arm.rs:10:9:10:15 | TupleStructPat | +| gen_match_arm.rs:11:9:11:15 | MatchArm | gen_match_arm.rs:11:9:11:9 | WildcardPat | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected new file mode 100644 index 000000000000..4591d8a57c36 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected @@ -0,0 +1,2 @@ +| gen_match_expr.rs:5:5:8:5 | MatchExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasMatchArmList: | yes | +| gen_match_expr.rs:9:5:12:5 | MatchExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasMatchArmList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.expected new file mode 100644 index 000000000000..631592c910d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.expected @@ -0,0 +1,2 @@ +| gen_match_expr.rs:5:5:8:5 | MatchExpr | gen_match_expr.rs:5:11:5:11 | PathExpr | +| gen_match_expr.rs:9:5:12:5 | MatchExpr | gen_match_expr.rs:9:11:9:11 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected new file mode 100644 index 000000000000..db83ecb1c535 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected @@ -0,0 +1,2 @@ +| gen_match_expr.rs:5:5:8:5 | MatchExpr | gen_match_expr.rs:5:13:8:5 | MatchArmList | +| gen_match_expr.rs:9:5:12:5 | MatchExpr | gen_match_expr.rs:9:13:12:5 | MatchArmList | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected new file mode 100644 index 000000000000..453da55dbbca --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | hasArgList: | yes | getNumberOfAttrs: | 0 | hasGenericArgList: | no | hasNameRef: | yes | hasReceiver: | yes | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | hasArgList: | yes | getNumberOfAttrs: | 0 | hasGenericArgList: | yes | hasNameRef: | yes | hasReceiver: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected new file mode 100644 index 000000000000..2ad859d74e46 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | gen_method_call_expr.rs:5:10:5:13 | ArgList | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | gen_method_call_expr.rs:6:22:6:25 | ArgList | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected new file mode 100644 index 000000000000..8f63b756ae44 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected @@ -0,0 +1 @@ +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | gen_method_call_expr.rs:6:10:6:21 | GenericArgList | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.expected new file mode 100644 index 000000000000..ac9aa15ebec6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | gen_method_call_expr.rs:5:7:5:9 | NameRef | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | gen_method_call_expr.rs:6:7:6:9 | NameRef | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected new file mode 100644 index 000000000000..16cc94b89925 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | gen_method_call_expr.rs:5:5:5:5 | PathExpr | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | gen_method_call_expr.rs:6:5:6:5 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected new file mode 100644 index 000000000000..eceff2ab4f4b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module.expected @@ -0,0 +1,4 @@ +| gen_module.rs:3:1:4:8 | Module | getNumberOfAttrs: | 0 | hasItemList: | no | hasName: | yes | hasVisibility: | no | +| gen_module.rs:5:1:7:1 | Module | getNumberOfAttrs: | 0 | hasItemList: | yes | hasName: | yes | hasVisibility: | no | +| lib.rs:2:1:2:15 | Module | getNumberOfAttrs: | 0 | hasItemList: | no | hasName: | yes | hasVisibility: | no | +| lib.rs:3:1:3:8 | Module | getNumberOfAttrs: | 0 | hasItemList: | no | hasName: | yes | hasVisibility: | no | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected new file mode 100644 index 000000000000..04fd8d4a81a0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected @@ -0,0 +1 @@ +| gen_module.rs:5:1:7:1 | Module | gen_module.rs:5:9:7:1 | ItemList | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getName.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getName.expected new file mode 100644 index 000000000000..eefe68515f02 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getName.expected @@ -0,0 +1,4 @@ +| gen_module.rs:3:1:4:8 | Module | gen_module.rs:4:5:4:7 | Name | +| gen_module.rs:5:1:7:1 | Module | gen_module.rs:5:5:5:7 | Name | +| lib.rs:2:1:2:15 | Module | lib.rs:2:5:2:14 | Name | +| lib.rs:3:1:3:8 | Module | lib.rs:3:5:3:7 | Name | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected new file mode 100644 index 000000000000..1e53040c6cb2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected @@ -0,0 +1 @@ +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 1 | hasTy: | yes | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected new file mode 100644 index 000000000000..f98fbf4969f1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected @@ -0,0 +1 @@ +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | 0 | gen_offset_of_expr.rs:5:33:5:37 | NameRef | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.expected new file mode 100644 index 000000000000..c7d0f2ee6afc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.expected @@ -0,0 +1 @@ +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | gen_offset_of_expr.rs:5:25:5:30 | PathType | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected new file mode 100644 index 000000000000..786a00180935 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected @@ -0,0 +1 @@ +| gen_or_pat.rs:6:9:6:38 | OrPat | getNumberOfPats: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected new file mode 100644 index 000000000000..a701548b2345 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected @@ -0,0 +1,2 @@ +| gen_or_pat.rs:6:9:6:38 | OrPat | 0 | gen_or_pat.rs:6:9:6:23 | TupleStructPat | +| gen_or_pat.rs:6:9:6:38 | OrPat | 1 | gen_or_pat.rs:6:27:6:38 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.expected b/rust/ql/test/extractor-tests/generated/Path/Path.expected new file mode 100644 index 000000000000..9c26bcd9c365 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path.expected @@ -0,0 +1,2 @@ +| gen_path.rs:5:5:5:7 | Path | hasQualifier: | no | hasPart: | yes | +| gen_path.rs:5:5:5:12 | Path | hasQualifier: | yes | hasPart: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected new file mode 100644 index 000000000000..5d56b2fb3f77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected @@ -0,0 +1,2 @@ +| gen_path.rs:5:5:5:7 | Path | gen_path.rs:5:5:5:7 | PathSegment | +| gen_path.rs:5:5:5:12 | Path | gen_path.rs:5:10:5:12 | PathSegment | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected new file mode 100644 index 000000000000..3d9554c43cd9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected @@ -0,0 +1 @@ +| gen_path.rs:5:5:5:12 | Path | gen_path.rs:5:5:5:7 | Path | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected new file mode 100644 index 000000000000..d6613c8fc3a3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:5:13:5:20 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:6:13:6:20 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:7:13:7:20 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:8:13:8:35 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected new file mode 100644 index 000000000000..8dd98e1fb0d7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:5:13:5:20 | PathExpr | gen_path_expr.rs:5:13:5:20 | Path | +| gen_path_expr.rs:6:13:6:20 | PathExpr | gen_path_expr.rs:6:13:6:20 | Path | +| gen_path_expr.rs:7:13:7:20 | PathExpr | gen_path_expr.rs:7:13:7:20 | Path | +| gen_path_expr.rs:8:13:8:35 | PathExpr | gen_path_expr.rs:8:13:8:35 | Path | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected new file mode 100644 index 000000000000..54845a7565c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | PathPat | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected new file mode 100644 index 000000000000..11c280c85bb3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | PathPat | gen_path_pat.rs:6:9:6:16 | Path | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected new file mode 100644 index 000000000000..74b997454980 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected @@ -0,0 +1,3 @@ +| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected new file mode 100644 index 000000000000..8ba21b74a778 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected @@ -0,0 +1,3 @@ +| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | gen_prefix_expr.rs:5:14:5:15 | LiteralExpr | +| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | gen_prefix_expr.rs:6:14:6:17 | LiteralExpr | +| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | gen_prefix_expr.rs:7:14:7:16 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected new file mode 100644 index 000000000000..a9b0fe4f73c8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected @@ -0,0 +1,3 @@ +| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | - | +| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | ! | +| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | * | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected new file mode 100644 index 000000000000..6f222c18f03b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected @@ -0,0 +1,6 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | +| gen_range_expr.rs:10:13:10:14 | RangeExpr | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | no | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected new file mode 100644 index 000000000000..f596145bfc9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected @@ -0,0 +1,4 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | LiteralExpr | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | LiteralExpr | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected new file mode 100644 index 000000000000..b0d778eb7bb2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected @@ -0,0 +1,6 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | ..= | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | .. | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | .. | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | .. | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | ..= | +| gen_range_expr.rs:10:13:10:14 | RangeExpr | .. | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected new file mode 100644 index 000000000000..f88c18b39c2d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected @@ -0,0 +1,3 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | LiteralExpr | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected new file mode 100644 index 000000000000..ec32f2a5a1c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected @@ -0,0 +1,3 @@ +| gen_range_pat.rs:6:9:6:12 | RangePat | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | +| gen_range_pat.rs:7:9:7:15 | RangePat | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | +| gen_range_pat.rs:8:9:8:12 | RangePat | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected new file mode 100644 index 000000000000..591b8d9093e1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected @@ -0,0 +1,2 @@ +| gen_range_pat.rs:6:9:6:12 | RangePat | gen_range_pat.rs:6:11:6:12 | LiteralPat | +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:14:7:15 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected new file mode 100644 index 000000000000..537608104c7b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected @@ -0,0 +1,3 @@ +| gen_range_pat.rs:6:9:6:12 | RangePat | .. | +| gen_range_pat.rs:7:9:7:15 | RangePat | ..= | +| gen_range_pat.rs:8:9:8:12 | RangePat | .. | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected new file mode 100644 index 000000000000..ef6a8ea21216 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected @@ -0,0 +1,2 @@ +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:10 | LiteralPat | +| gen_range_pat.rs:8:9:8:12 | RangePat | gen_range_pat.rs:8:9:8:10 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected new file mode 100644 index 000000000000..d30c4ef70e5d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected @@ -0,0 +1,4 @@ +| gen_record_expr.rs:5:17:5:34 | RecordExpr | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:6:18:6:38 | RecordExpr | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:8:5:8:14 | RecordExpr | hasPath: | yes | hasRecordExprFieldList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected new file mode 100644 index 000000000000..d027792d93ad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected @@ -0,0 +1,4 @@ +| gen_record_expr.rs:5:17:5:34 | RecordExpr | gen_record_expr.rs:5:17:5:19 | Path | +| gen_record_expr.rs:6:18:6:38 | RecordExpr | gen_record_expr.rs:6:18:6:20 | Path | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | gen_record_expr.rs:7:5:7:7 | Path | +| gen_record_expr.rs:8:5:8:14 | RecordExpr | gen_record_expr.rs:8:5:8:7 | Path | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.expected new file mode 100644 index 000000000000..d00bf3935d3e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.expected @@ -0,0 +1,4 @@ +| gen_record_expr.rs:5:17:5:34 | RecordExpr | gen_record_expr.rs:5:21:5:34 | RecordExprFieldList | +| gen_record_expr.rs:6:18:6:38 | RecordExpr | gen_record_expr.rs:6:22:6:38 | RecordExprFieldList | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | gen_record_expr.rs:7:9:7:22 | RecordExprFieldList | +| gen_record_expr.rs:8:5:8:14 | RecordExpr | gen_record_expr.rs:8:9:8:14 | RecordExprFieldList | diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected new file mode 100644 index 000000000000..79ed38759180 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected @@ -0,0 +1,2 @@ +| gen_record_expr_field.rs:5:11:5:14 | RecordExprField | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes | +| gen_record_expr_field.rs:5:17:5:20 | RecordExprField | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.expected b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.expected b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.expected new file mode 100644 index 000000000000..af596067440d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.expected @@ -0,0 +1,2 @@ +| gen_record_expr_field.rs:5:11:5:14 | RecordExprField | gen_record_expr_field.rs:5:14:5:14 | LiteralExpr | +| gen_record_expr_field.rs:5:17:5:20 | RecordExprField | gen_record_expr_field.rs:5:20:5:20 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.expected b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.expected new file mode 100644 index 000000000000..14096d8b7cec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.expected @@ -0,0 +1,2 @@ +| gen_record_expr_field.rs:5:11:5:14 | RecordExprField | gen_record_expr_field.rs:5:11:5:11 | NameRef | +| gen_record_expr_field.rs:5:17:5:20 | RecordExprField | gen_record_expr_field.rs:5:17:5:17 | NameRef | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected new file mode 100644 index 000000000000..62cd3eb3c37d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | RecordPat | hasPath: | yes | hasRecordPatFieldList: | yes | +| gen_record_pat.rs:7:9:7:18 | RecordPat | hasPath: | yes | hasRecordPatFieldList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected new file mode 100644 index 000000000000..a365bfa83d0f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | RecordPat | gen_record_pat.rs:6:9:6:11 | Path | +| gen_record_pat.rs:7:9:7:18 | RecordPat | gen_record_pat.rs:7:9:7:11 | Path | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.expected new file mode 100644 index 000000000000..86ba10ed9a3c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | RecordPat | gen_record_pat.rs:6:13:6:26 | RecordPatFieldList | +| gen_record_pat.rs:7:9:7:18 | RecordPat | gen_record_pat.rs:7:13:7:18 | RecordPatFieldList | diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected new file mode 100644 index 000000000000..431d7cb28556 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected @@ -0,0 +1,2 @@ +| gen_record_pat_field.rs:5:15:5:18 | RecordPatField | getNumberOfAttrs: | 0 | hasNameRef: | yes | hasPat: | yes | +| gen_record_pat_field.rs:5:21:5:24 | RecordPatField | getNumberOfAttrs: | 0 | hasNameRef: | yes | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.expected b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.expected b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.expected new file mode 100644 index 000000000000..cfc6515d79df --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.expected @@ -0,0 +1,2 @@ +| gen_record_pat_field.rs:5:15:5:18 | RecordPatField | gen_record_pat_field.rs:5:15:5:15 | NameRef | +| gen_record_pat_field.rs:5:21:5:24 | RecordPatField | gen_record_pat_field.rs:5:21:5:21 | NameRef | diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.expected b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.expected new file mode 100644 index 000000000000..a3ac24ec52be --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.expected @@ -0,0 +1,2 @@ +| gen_record_pat_field.rs:5:15:5:18 | RecordPatField | gen_record_pat_field.rs:5:18:5:18 | LiteralPat | +| gen_record_pat_field.rs:5:21:5:24 | RecordPatField | gen_record_pat_field.rs:5:24:5:24 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected new file mode 100644 index 000000000000..b5f629c6a5c7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected @@ -0,0 +1,4 @@ +| gen_ref_expr.rs:5:25:5:28 | RefExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_ref_expr.rs:6:23:6:30 | RefExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_ref_expr.rs:7:35:7:48 | RefExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_ref_expr.rs:8:33:8:44 | RefExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected new file mode 100644 index 000000000000..1c1f0cff2c06 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected @@ -0,0 +1,4 @@ +| gen_ref_expr.rs:5:25:5:28 | RefExpr | gen_ref_expr.rs:5:26:5:28 | PathExpr | +| gen_ref_expr.rs:6:23:6:30 | RefExpr | gen_ref_expr.rs:6:28:6:30 | PathExpr | +| gen_ref_expr.rs:7:35:7:48 | RefExpr | gen_ref_expr.rs:7:46:7:48 | PathExpr | +| gen_ref_expr.rs:8:33:8:44 | RefExpr | gen_ref_expr.rs:8:42:8:44 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected new file mode 100644 index 000000000000..2cef03b7f5d7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected @@ -0,0 +1,2 @@ +| gen_ref_pat.rs:6:9:6:28 | RefPat | hasPat: | yes | +| gen_ref_pat.rs:7:9:7:21 | RefPat | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected new file mode 100644 index 000000000000..891c3c8216e6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected @@ -0,0 +1,2 @@ +| gen_ref_pat.rs:6:9:6:28 | RefPat | gen_ref_pat.rs:6:14:6:28 | TupleStructPat | +| gen_ref_pat.rs:7:9:7:21 | RefPat | gen_ref_pat.rs:7:10:7:21 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected new file mode 100644 index 000000000000..dbf54e0f49bd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected @@ -0,0 +1,2 @@ +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_return_expr.rs:8:5:8:10 | ReturnExpr | getNumberOfAttrs: | 0 | hasExpr: | no | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected new file mode 100644 index 000000000000..4247069ccc25 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected new file mode 100644 index 000000000000..0821ea233238 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected @@ -0,0 +1,3 @@ +| gen_slice_pat.rs:6:9:6:23 | SlicePat | getNumberOfPats: | 5 | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | getNumberOfPats: | 3 | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | getNumberOfPats: | 5 | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected new file mode 100644 index 000000000000..7c5355875f33 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected @@ -0,0 +1,13 @@ +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 0 | gen_slice_pat.rs:6:10:6:10 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 1 | gen_slice_pat.rs:6:13:6:13 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 2 | gen_slice_pat.rs:6:16:6:16 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 3 | gen_slice_pat.rs:6:19:6:19 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 4 | gen_slice_pat.rs:6:22:6:22 | LiteralPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 0 | gen_slice_pat.rs:7:10:7:10 | LiteralPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 1 | gen_slice_pat.rs:7:13:7:13 | LiteralPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 2 | gen_slice_pat.rs:7:16:7:17 | RestPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:10:8:10 | IdentPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:13:8:13 | IdentPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 2 | gen_slice_pat.rs:8:16:8:17 | RestPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 3 | gen_slice_pat.rs:8:20:8:20 | IdentPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 4 | gen_slice_pat.rs:8:23:8:23 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected new file mode 100644 index 000000000000..2bd4e57c30ed --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected @@ -0,0 +1,2 @@ +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected new file mode 100644 index 000000000000..936d2a39bb27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected @@ -0,0 +1,4 @@ +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | LiteralExpr | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | LiteralExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | LiteralExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected new file mode 100644 index 000000000000..d6522bb7bf11 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected @@ -0,0 +1,2 @@ +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | getNumberOfFields: | 2 | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | getNumberOfFields: | 4 | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected new file mode 100644 index 000000000000..8f42a4e1393e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected @@ -0,0 +1,6 @@ +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 0 | gen_tuple_pat.rs:5:10:5:10 | IdentPat | +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 1 | gen_tuple_pat.rs:5:13:5:13 | IdentPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 0 | gen_tuple_pat.rs:6:10:6:10 | IdentPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 1 | gen_tuple_pat.rs:6:13:6:13 | IdentPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | gen_tuple_pat.rs:6:16:6:17 | RestPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 3 | gen_tuple_pat.rs:6:21:6:21 | IdentPat | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected new file mode 100644 index 000000000000..a0d12cc8509b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected @@ -0,0 +1,3 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | getNumberOfFields: | 4 | hasPath: | yes | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | getNumberOfFields: | 2 | hasPath: | yes | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | getNumberOfFields: | 1 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected new file mode 100644 index 000000000000..7a009a0818b7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected @@ -0,0 +1,7 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | LiteralPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | LiteralPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | LiteralPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | LiteralPat | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:7:15:7:16 | RestPat | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:7:19:7:19 | LiteralPat | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:8:15:8:16 | RestPat | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected new file mode 100644 index 000000000000..e51529b2708f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected @@ -0,0 +1,3 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | gen_tuple_struct_pat.rs:6:9:6:13 | Path | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | gen_tuple_struct_pat.rs:7:9:7:13 | Path | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | gen_tuple_struct_pat.rs:8:9:8:13 | Path | diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected new file mode 100644 index 000000000000..3b2effb788e1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected @@ -0,0 +1 @@ +| gen_underscore_expr.rs:5:5:5:5 | UnderscoreExpr | getNumberOfAttrs: | 0 | diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected new file mode 100644 index 000000000000..ceb155671b7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected @@ -0,0 +1 @@ +| gen_wildcard_pat.rs:5:9:5:9 | WildcardPat | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected new file mode 100644 index 000000000000..3bce2660fe35 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected new file mode 100644 index 000000000000..074c6fbff74c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected new file mode 100644 index 000000000000..5045b11d25d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected new file mode 100644 index 000000000000..87b88ef24196 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | LiteralExpr | From 2ee61f9aaa68f9046c460bd8f81caba8d2cc6695 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 19 Sep 2024 22:26:53 +0200 Subject: [PATCH 063/162] Rust: add placeholder QLdoc annotations --- rust/schema/annotations.py | 920 +++++++++++++++++++++++++++++++++++++ 1 file changed, 920 insertions(+) diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 64b02390264e..349be3938512 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -819,3 +819,923 @@ class _: }; ``` """ +@annotate(Abi) +class _: + """ + A Abi. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ArgList) +class _: + """ + A ArgList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ArrayType) +class _: + """ + A ArrayType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(AssocItem) +class _: + """ + A AssocItem. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(AssocItemList) +class _: + """ + A AssocItemList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(AssocTypeArg) +class _: + """ + A AssocTypeArg. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Attr) +class _: + """ + A Attr. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ClosureBinder) +class _: + """ + A ClosureBinder. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Const) +class _: + """ + A Const. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ConstArg) +class _: + """ + A ConstArg. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ConstParam) +class _: + """ + A ConstParam. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(DynTraitType) +class _: + """ + A DynTraitType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Enum) +class _: + """ + A Enum. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ExternBlock) +class _: + """ + A ExternBlock. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ExternCrate) +class _: + """ + A ExternCrate. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ExternItem) +class _: + """ + A ExternItem. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ExternItemList) +class _: + """ + A ExternItemList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(FieldList) +class _: + """ + A FieldList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(FnPtrType) +class _: + """ + A FnPtrType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ForExpr) +class _: + """ + A ForExpr. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ForType) +class _: + """ + A ForType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(FormatArgsArg) +class _: + """ + A FormatArgsArg. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(FormatArgsExpr) +class _: + """ + A FormatArgsExpr. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(GenericArg) +class _: + """ + A GenericArg. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(GenericParam) +class _: + """ + A GenericParam. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(GenericParamList) +class _: + """ + A GenericParamList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Impl) +class _: + """ + A Impl. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ImplTraitType) +class _: + """ + A ImplTraitType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(InferType) +class _: + """ + A InferType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Item) +class _: + """ + A Item. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ItemList) +class _: + """ + A ItemList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(LetElse) +class _: + """ + A LetElse. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Lifetime) +class _: + """ + A Lifetime. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(LifetimeArg) +class _: + """ + A LifetimeArg. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(LifetimeParam) +class _: + """ + A LifetimeParam. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MacroCall) +class _: + """ + A MacroCall. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MacroDef) +class _: + """ + A MacroDef. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MacroExpr) +class _: + """ + A MacroExpr. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MacroPat) +class _: + """ + A MacroPat. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MacroRules) +class _: + """ + A MacroRules. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MacroType) +class _: + """ + A MacroType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MatchArmList) +class _: + """ + A MatchArmList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(MatchGuard) +class _: + """ + A MatchGuard. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Meta) +class _: + """ + A Meta. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Name) +class _: + """ + A Name. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(NameRef) +class _: + """ + A NameRef. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(NeverType) +class _: + """ + A NeverType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Param) +class _: + """ + A Param. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ParamList) +class _: + """ + A ParamList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ParenExpr) +class _: + """ + A ParenExpr. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ParenPat) +class _: + """ + A ParenPat. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ParenType) +class _: + """ + A ParenType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(PathSegment) +class _: + """ + A PathSegment. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(PathType) +class _: + """ + A PathType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(PtrType) +class _: + """ + A PtrType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RecordExprFieldList) +class _: + """ + A RecordExprFieldList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RecordField) +class _: + """ + A RecordField. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RecordFieldList) +class _: + """ + A RecordFieldList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RecordPatFieldList) +class _: + """ + A RecordPatFieldList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RefType) +class _: + """ + A RefType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Rename) +class _: + """ + A Rename. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RestPat) +class _: + """ + A RestPat. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(RetType) +class _: + """ + A RetType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(ReturnTypeSyntax) +class _: + """ + A ReturnTypeSyntax. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(SelfParam) +class _: + """ + A SelfParam. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(SliceType) +class _: + """ + A SliceType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(SourceFile) +class _: + """ + A SourceFile. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Static) +class _: + """ + A Static. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(StmtList) +class _: + """ + A StmtList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Struct) +class _: + """ + A Struct. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TokenTree) +class _: + """ + A TokenTree. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Trait) +class _: + """ + A Trait. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TraitAlias) +class _: + """ + A TraitAlias. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TryExpr) +class _: + """ + A TryExpr. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TupleField) +class _: + """ + A TupleField. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TupleFieldList) +class _: + """ + A TupleFieldList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TupleType) +class _: + """ + A TupleType. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TypeAlias) +class _: + """ + A TypeAlias. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TypeArg) +class _: + """ + A TypeArg. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TypeBound) +class _: + """ + A TypeBound. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TypeBoundList) +class _: + """ + A TypeBoundList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(TypeParam) +class _: + """ + A TypeParam. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Union) +class _: + """ + A Union. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Use) +class _: + """ + A Use. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(UseTree) +class _: + """ + A UseTree. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(UseTreeList) +class _: + """ + A UseTreeList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Variant) +class _: + """ + A Variant. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(VariantList) +class _: + """ + A VariantList. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(Visibility) +class _: + """ + A Visibility. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(WhereClause) +class _: + """ + A WhereClause. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(WherePred) +class _: + """ + A WherePred. For example: + ```rust + todo!() + ``` + """ + pass + +@annotate(WhileExpr) +class _: + """ + A WhileExpr. For example: + ```rust + todo!() + ``` + """ + pass + From db06ad2ac3316fdd4194438b20e3b704ff2b0a59 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 20 Sep 2024 11:09:41 +0200 Subject: [PATCH 064/162] Rust: codegen --- rust/ql/.generated.list | 942 +++++++++++------- rust/ql/.gitattributes | 388 ++++++-- rust/ql/lib/codeql/rust/elements/Abi.qll | 6 + rust/ql/lib/codeql/rust/elements/ArgList.qll | 6 + .../ql/lib/codeql/rust/elements/ArrayType.qll | 6 + .../ql/lib/codeql/rust/elements/AssocItem.qll | 6 + .../codeql/rust/elements/AssocItemList.qll | 6 + .../lib/codeql/rust/elements/AssocTypeArg.qll | 6 + rust/ql/lib/codeql/rust/elements/Attr.qll | 6 + .../codeql/rust/elements/ClosureBinder.qll | 6 + rust/ql/lib/codeql/rust/elements/Const.qll | 6 + rust/ql/lib/codeql/rust/elements/ConstArg.qll | 6 + .../lib/codeql/rust/elements/ConstParam.qll | 6 + .../lib/codeql/rust/elements/DynTraitType.qll | 6 + rust/ql/lib/codeql/rust/elements/Enum.qll | 6 + .../lib/codeql/rust/elements/ExternBlock.qll | 6 + .../lib/codeql/rust/elements/ExternCrate.qll | 6 + .../lib/codeql/rust/elements/ExternItem.qll | 6 + .../codeql/rust/elements/ExternItemList.qll | 6 + .../ql/lib/codeql/rust/elements/FieldList.qll | 6 + .../ql/lib/codeql/rust/elements/FnPtrType.qll | 6 + rust/ql/lib/codeql/rust/elements/ForExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/ForType.qll | 6 + .../codeql/rust/elements/FormatArgsArg.qll | 6 + .../codeql/rust/elements/FormatArgsExpr.qll | 6 + .../lib/codeql/rust/elements/GenericArg.qll | 6 + .../lib/codeql/rust/elements/GenericParam.qll | 6 + .../codeql/rust/elements/GenericParamList.qll | 6 + rust/ql/lib/codeql/rust/elements/Impl.qll | 6 + .../codeql/rust/elements/ImplTraitType.qll | 6 + .../ql/lib/codeql/rust/elements/InferType.qll | 6 + rust/ql/lib/codeql/rust/elements/Item.qll | 6 + rust/ql/lib/codeql/rust/elements/ItemList.qll | 6 + rust/ql/lib/codeql/rust/elements/LetElse.qll | 6 + rust/ql/lib/codeql/rust/elements/Lifetime.qll | 6 + .../lib/codeql/rust/elements/LifetimeArg.qll | 6 + .../codeql/rust/elements/LifetimeParam.qll | 6 + .../ql/lib/codeql/rust/elements/MacroCall.qll | 6 + rust/ql/lib/codeql/rust/elements/MacroDef.qll | 6 + .../ql/lib/codeql/rust/elements/MacroExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/MacroPat.qll | 6 + .../lib/codeql/rust/elements/MacroRules.qll | 6 + .../ql/lib/codeql/rust/elements/MacroType.qll | 6 + .../lib/codeql/rust/elements/MatchArmList.qll | 6 + .../lib/codeql/rust/elements/MatchGuard.qll | 6 + rust/ql/lib/codeql/rust/elements/Meta.qll | 6 + rust/ql/lib/codeql/rust/elements/Name.qll | 6 + rust/ql/lib/codeql/rust/elements/NameRef.qll | 6 + .../ql/lib/codeql/rust/elements/NeverType.qll | 6 + rust/ql/lib/codeql/rust/elements/Param.qll | 6 + .../ql/lib/codeql/rust/elements/ParamList.qll | 6 + .../ql/lib/codeql/rust/elements/ParenExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/ParenPat.qll | 6 + .../ql/lib/codeql/rust/elements/ParenType.qll | 6 + .../lib/codeql/rust/elements/PathSegment.qll | 6 + rust/ql/lib/codeql/rust/elements/PathType.qll | 6 + rust/ql/lib/codeql/rust/elements/PtrType.qll | 6 + .../rust/elements/RecordExprFieldList.qll | 6 + .../lib/codeql/rust/elements/RecordField.qll | 6 + .../codeql/rust/elements/RecordFieldList.qll | 6 + .../rust/elements/RecordPatFieldList.qll | 6 + rust/ql/lib/codeql/rust/elements/RefType.qll | 6 + rust/ql/lib/codeql/rust/elements/Rename.qll | 6 + rust/ql/lib/codeql/rust/elements/RestPat.qll | 6 + rust/ql/lib/codeql/rust/elements/RetType.qll | 6 + .../codeql/rust/elements/ReturnTypeSyntax.qll | 6 + .../ql/lib/codeql/rust/elements/SelfParam.qll | 6 + .../ql/lib/codeql/rust/elements/SliceType.qll | 6 + .../lib/codeql/rust/elements/SourceFile.qll | 6 + rust/ql/lib/codeql/rust/elements/Static.qll | 6 + rust/ql/lib/codeql/rust/elements/StmtList.qll | 6 + rust/ql/lib/codeql/rust/elements/Struct.qll | 6 + .../ql/lib/codeql/rust/elements/TokenTree.qll | 6 + rust/ql/lib/codeql/rust/elements/Trait.qll | 6 + .../lib/codeql/rust/elements/TraitAlias.qll | 6 + rust/ql/lib/codeql/rust/elements/TryExpr.qll | 6 + .../lib/codeql/rust/elements/TupleField.qll | 6 + .../codeql/rust/elements/TupleFieldList.qll | 6 + .../ql/lib/codeql/rust/elements/TupleType.qll | 6 + .../ql/lib/codeql/rust/elements/TypeAlias.qll | 6 + rust/ql/lib/codeql/rust/elements/TypeArg.qll | 6 + .../ql/lib/codeql/rust/elements/TypeBound.qll | 6 + .../codeql/rust/elements/TypeBoundList.qll | 6 + .../ql/lib/codeql/rust/elements/TypeParam.qll | 6 + rust/ql/lib/codeql/rust/elements/Union.qll | 6 + rust/ql/lib/codeql/rust/elements/Use.qll | 6 + rust/ql/lib/codeql/rust/elements/UseTree.qll | 6 + .../lib/codeql/rust/elements/UseTreeList.qll | 6 + rust/ql/lib/codeql/rust/elements/Variant.qll | 6 + .../lib/codeql/rust/elements/VariantList.qll | 6 + .../lib/codeql/rust/elements/Visibility.qll | 6 + .../lib/codeql/rust/elements/WhereClause.qll | 6 + .../ql/lib/codeql/rust/elements/WherePred.qll | 6 + .../ql/lib/codeql/rust/elements/WhileExpr.qll | 6 + .../codeql/rust/elements/internal/AbiImpl.qll | 6 + .../rust/elements/internal/ArgListImpl.qll | 6 + .../rust/elements/internal/ArrayTypeImpl.qll | 6 + .../rust/elements/internal/AssocItemImpl.qll | 6 + .../elements/internal/AssocItemListImpl.qll | 6 + .../elements/internal/AssocTypeArgImpl.qll | 6 + .../rust/elements/internal/AttrImpl.qll | 6 + .../elements/internal/ClosureBinderImpl.qll | 6 + .../rust/elements/internal/ConstArgImpl.qll | 6 + .../rust/elements/internal/ConstImpl.qll | 6 + .../rust/elements/internal/ConstParamImpl.qll | 6 + .../elements/internal/DynTraitTypeImpl.qll | 6 + .../rust/elements/internal/EnumImpl.qll | 6 + .../elements/internal/ExternBlockImpl.qll | 6 + .../elements/internal/ExternCrateImpl.qll | 6 + .../rust/elements/internal/ExternItemImpl.qll | 6 + .../elements/internal/ExternItemListImpl.qll | 6 + .../rust/elements/internal/FieldListImpl.qll | 6 + .../rust/elements/internal/FnPtrTypeImpl.qll | 6 + .../rust/elements/internal/ForExprImpl.qll | 6 + .../rust/elements/internal/ForTypeImpl.qll | 6 + .../elements/internal/FormatArgsArgImpl.qll | 6 + .../elements/internal/FormatArgsExprImpl.qll | 6 + .../rust/elements/internal/GenericArgImpl.qll | 6 + .../elements/internal/GenericParamImpl.qll | 6 + .../internal/GenericParamListImpl.qll | 6 + .../rust/elements/internal/ImplImpl.qll | 6 + .../elements/internal/ImplTraitTypeImpl.qll | 6 + .../rust/elements/internal/InferTypeImpl.qll | 6 + .../rust/elements/internal/ItemImpl.qll | 6 + .../rust/elements/internal/ItemListImpl.qll | 6 + .../rust/elements/internal/LetElseImpl.qll | 6 + .../elements/internal/LifetimeArgImpl.qll | 6 + .../rust/elements/internal/LifetimeImpl.qll | 6 + .../elements/internal/LifetimeParamImpl.qll | 6 + .../rust/elements/internal/MacroCallImpl.qll | 6 + .../rust/elements/internal/MacroDefImpl.qll | 6 + .../rust/elements/internal/MacroExprImpl.qll | 6 + .../rust/elements/internal/MacroPatImpl.qll | 6 + .../rust/elements/internal/MacroRulesImpl.qll | 6 + .../rust/elements/internal/MacroTypeImpl.qll | 6 + .../elements/internal/MatchArmListImpl.qll | 6 + .../rust/elements/internal/MatchGuardImpl.qll | 6 + .../rust/elements/internal/MetaImpl.qll | 6 + .../rust/elements/internal/NameImpl.qll | 6 + .../rust/elements/internal/NameRefImpl.qll | 6 + .../rust/elements/internal/NeverTypeImpl.qll | 6 + .../rust/elements/internal/ParamImpl.qll | 6 + .../rust/elements/internal/ParamListImpl.qll | 6 + .../rust/elements/internal/ParenExprImpl.qll | 6 + .../rust/elements/internal/ParenPatImpl.qll | 6 + .../rust/elements/internal/ParenTypeImpl.qll | 6 + .../elements/internal/PathSegmentImpl.qll | 6 + .../rust/elements/internal/PathTypeImpl.qll | 6 + .../rust/elements/internal/PtrTypeImpl.qll | 6 + .../internal/RecordExprFieldListImpl.qll | 6 + .../elements/internal/RecordFieldImpl.qll | 6 + .../elements/internal/RecordFieldListImpl.qll | 6 + .../internal/RecordPatFieldListImpl.qll | 6 + .../rust/elements/internal/RefTypeImpl.qll | 6 + .../rust/elements/internal/RenameImpl.qll | 6 + .../rust/elements/internal/RestPatImpl.qll | 6 + .../rust/elements/internal/RetTypeImpl.qll | 6 + .../internal/ReturnTypeSyntaxImpl.qll | 6 + .../rust/elements/internal/SelfParamImpl.qll | 6 + .../rust/elements/internal/SliceTypeImpl.qll | 6 + .../rust/elements/internal/SourceFileImpl.qll | 6 + .../rust/elements/internal/StaticImpl.qll | 6 + .../rust/elements/internal/StmtListImpl.qll | 6 + .../rust/elements/internal/StructImpl.qll | 6 + .../rust/elements/internal/TokenTreeImpl.qll | 6 + .../rust/elements/internal/TraitAliasImpl.qll | 6 + .../rust/elements/internal/TraitImpl.qll | 6 + .../rust/elements/internal/TryExprImpl.qll | 6 + .../rust/elements/internal/TupleFieldImpl.qll | 6 + .../elements/internal/TupleFieldListImpl.qll | 6 + .../rust/elements/internal/TupleTypeImpl.qll | 6 + .../rust/elements/internal/TypeAliasImpl.qll | 6 + .../rust/elements/internal/TypeArgImpl.qll | 6 + .../rust/elements/internal/TypeBoundImpl.qll | 6 + .../elements/internal/TypeBoundListImpl.qll | 6 + .../rust/elements/internal/TypeParamImpl.qll | 6 + .../rust/elements/internal/UnionImpl.qll | 6 + .../codeql/rust/elements/internal/UseImpl.qll | 6 + .../rust/elements/internal/UseTreeImpl.qll | 6 + .../elements/internal/UseTreeListImpl.qll | 6 + .../rust/elements/internal/VariantImpl.qll | 6 + .../elements/internal/VariantListImpl.qll | 6 + .../rust/elements/internal/VisibilityImpl.qll | 6 + .../elements/internal/WhereClauseImpl.qll | 6 + .../rust/elements/internal/WherePredImpl.qll | 6 + .../rust/elements/internal/WhileExprImpl.qll | 6 + .../rust/elements/internal/generated/Abi.qll | 4 + .../elements/internal/generated/ArgList.qll | 4 + .../elements/internal/generated/ArrayType.qll | 4 + .../elements/internal/generated/AssocItem.qll | 4 + .../internal/generated/AssocItemList.qll | 4 + .../internal/generated/AssocTypeArg.qll | 4 + .../rust/elements/internal/generated/Attr.qll | 4 + .../internal/generated/ClosureBinder.qll | 4 + .../elements/internal/generated/Const.qll | 4 + .../elements/internal/generated/ConstArg.qll | 4 + .../internal/generated/ConstParam.qll | 4 + .../internal/generated/DynTraitType.qll | 4 + .../rust/elements/internal/generated/Enum.qll | 4 + .../internal/generated/ExternBlock.qll | 4 + .../internal/generated/ExternCrate.qll | 4 + .../internal/generated/ExternItem.qll | 4 + .../internal/generated/ExternItemList.qll | 4 + .../elements/internal/generated/FieldList.qll | 4 + .../elements/internal/generated/FnPtrType.qll | 4 + .../elements/internal/generated/ForExpr.qll | 4 + .../elements/internal/generated/ForType.qll | 4 + .../internal/generated/FormatArgsArg.qll | 4 + .../internal/generated/FormatArgsExpr.qll | 4 + .../internal/generated/GenericArg.qll | 4 + .../internal/generated/GenericParam.qll | 4 + .../internal/generated/GenericParamList.qll | 4 + .../rust/elements/internal/generated/Impl.qll | 4 + .../internal/generated/ImplTraitType.qll | 4 + .../elements/internal/generated/InferType.qll | 4 + .../rust/elements/internal/generated/Item.qll | 4 + .../elements/internal/generated/ItemList.qll | 4 + .../elements/internal/generated/LetElse.qll | 4 + .../elements/internal/generated/Lifetime.qll | 4 + .../internal/generated/LifetimeArg.qll | 4 + .../internal/generated/LifetimeParam.qll | 4 + .../elements/internal/generated/MacroCall.qll | 4 + .../elements/internal/generated/MacroDef.qll | 4 + .../elements/internal/generated/MacroExpr.qll | 4 + .../elements/internal/generated/MacroPat.qll | 4 + .../internal/generated/MacroRules.qll | 4 + .../elements/internal/generated/MacroType.qll | 4 + .../internal/generated/MatchArmList.qll | 4 + .../internal/generated/MatchGuard.qll | 4 + .../rust/elements/internal/generated/Meta.qll | 4 + .../rust/elements/internal/generated/Name.qll | 4 + .../elements/internal/generated/NameRef.qll | 4 + .../elements/internal/generated/NeverType.qll | 4 + .../elements/internal/generated/Param.qll | 4 + .../elements/internal/generated/ParamList.qll | 4 + .../elements/internal/generated/ParenExpr.qll | 4 + .../elements/internal/generated/ParenPat.qll | 4 + .../elements/internal/generated/ParenType.qll | 4 + .../internal/generated/PathSegment.qll | 4 + .../elements/internal/generated/PathType.qll | 4 + .../elements/internal/generated/PtrType.qll | 4 + .../rust/elements/internal/generated/Raw.qll | 368 +++++++ .../generated/RecordExprFieldList.qll | 4 + .../internal/generated/RecordField.qll | 4 + .../internal/generated/RecordFieldList.qll | 4 + .../internal/generated/RecordPatFieldList.qll | 4 + .../elements/internal/generated/RefType.qll | 4 + .../elements/internal/generated/Rename.qll | 4 + .../elements/internal/generated/RestPat.qll | 4 + .../elements/internal/generated/RetType.qll | 4 + .../internal/generated/ReturnTypeSyntax.qll | 4 + .../elements/internal/generated/SelfParam.qll | 4 + .../elements/internal/generated/SliceType.qll | 4 + .../internal/generated/SourceFile.qll | 4 + .../elements/internal/generated/Static.qll | 4 + .../elements/internal/generated/StmtList.qll | 4 + .../elements/internal/generated/Struct.qll | 4 + .../elements/internal/generated/TokenTree.qll | 4 + .../elements/internal/generated/Trait.qll | 4 + .../internal/generated/TraitAlias.qll | 4 + .../elements/internal/generated/TryExpr.qll | 4 + .../internal/generated/TupleField.qll | 4 + .../internal/generated/TupleFieldList.qll | 4 + .../elements/internal/generated/TupleType.qll | 4 + .../elements/internal/generated/TypeAlias.qll | 4 + .../elements/internal/generated/TypeArg.qll | 4 + .../elements/internal/generated/TypeBound.qll | 4 + .../internal/generated/TypeBoundList.qll | 4 + .../elements/internal/generated/TypeParam.qll | 4 + .../elements/internal/generated/Union.qll | 4 + .../rust/elements/internal/generated/Use.qll | 4 + .../elements/internal/generated/UseTree.qll | 4 + .../internal/generated/UseTreeList.qll | 4 + .../elements/internal/generated/Variant.qll | 4 + .../internal/generated/VariantList.qll | 4 + .../internal/generated/Visibility.qll | 4 + .../internal/generated/WhereClause.qll | 4 + .../elements/internal/generated/WherePred.qll | 4 + .../elements/internal/generated/WhileExpr.qll | 4 + .../generated/.generated_tests.list | 86 ++ .../extractor-tests/generated/.gitattributes | 86 ++ .../test/extractor-tests/generated/Abi/Abi.ql | 10 + .../generated/Abi/Abi_getAbiString.ql | 7 + .../generated/Abi/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Abi/gen_abi.rs | 6 + .../generated/ArgList/ArgList.ql | 10 + .../generated/ArgList/ArgList_getArg.ql | 7 + .../generated/ArgList/MISSING_SOURCE.txt | 4 - .../generated/ArgList/gen_arg_list.rs | 6 + .../generated/ArrayType/ArrayType.ql | 11 + .../ArrayType/ArrayType_getConstArg.ql | 7 + .../generated/ArrayType/ArrayType_getTy.ql | 7 + .../generated/ArrayType/MISSING_SOURCE.txt | 4 - .../generated/ArrayType/gen_array_type.rs | 6 + .../generated/AssocItemList/AssocItemList.ql | 11 + .../AssocItemList_getAssocItem.ql | 7 + .../AssocItemList/AssocItemList_getAttr.ql | 7 + .../AssocItemList/MISSING_SOURCE.txt | 4 - .../AssocItemList/gen_assoc_item_list.rs | 6 + .../generated/AssocTypeArg/AssocTypeArg.ql | 22 + .../AssocTypeArg/AssocTypeArg_getConstArg.ql | 7 + .../AssocTypeArg_getGenericArgList.ql | 7 + .../AssocTypeArg/AssocTypeArg_getNameRef.ql | 7 + .../AssocTypeArg/AssocTypeArg_getParamList.ql | 7 + .../AssocTypeArg/AssocTypeArg_getRetType.ql | 7 + .../AssocTypeArg_getReturnTypeSyntax.ql | 7 + .../AssocTypeArg/AssocTypeArg_getTy.ql | 7 + .../AssocTypeArg_getTypeBoundList.ql | 7 + .../generated/AssocTypeArg/MISSING_SOURCE.txt | 4 - .../AssocTypeArg/gen_assoc_type_arg.rs | 6 + .../extractor-tests/generated/Attr/Attr.ql | 10 + .../generated/Attr/Attr_getMeta.ql | 7 + .../generated/Attr/MISSING_SOURCE.txt | 4 - .../generated/Attr/gen_attr.rs | 6 + .../generated/ClosureBinder/ClosureBinder.ql | 10 + .../ClosureBinder_getGenericParamList.ql | 7 + .../ClosureBinder/MISSING_SOURCE.txt | 4 - .../ClosureBinder/gen_closure_binder.rs | 6 + .../extractor-tests/generated/Const/Const.ql | 16 + .../generated/Const/Const_getAttr.ql | 7 + .../generated/Const/Const_getBody.ql | 7 + .../generated/Const/Const_getName.ql | 7 + .../generated/Const/Const_getTy.ql | 7 + .../generated/Const/Const_getVisibility.ql | 7 + .../generated/Const/MISSING_SOURCE.txt | 4 - .../generated/Const/gen_const.rs | 6 + .../generated/ConstArg/ConstArg.ql | 10 + .../generated/ConstArg/ConstArg_getExpr.ql | 7 + .../generated/ConstArg/MISSING_SOURCE.txt | 4 - .../generated/ConstArg/gen_const_arg.rs | 6 + .../generated/ConstParam/ConstParam.ql | 14 + .../ConstParam/ConstParam_getAttr.ql | 7 + .../ConstParam/ConstParam_getDefaultVal.ql | 7 + .../ConstParam/ConstParam_getName.ql | 7 + .../generated/ConstParam/ConstParam_getTy.ql | 7 + .../generated/ConstParam/MISSING_SOURCE.txt | 4 - .../generated/ConstParam/gen_const_param.rs | 6 + .../generated/DynTraitType/DynTraitType.ql | 10 + .../DynTraitType_getTypeBoundList.ql | 7 + .../generated/DynTraitType/MISSING_SOURCE.txt | 4 - .../DynTraitType/gen_dyn_trait_type.rs | 6 + .../extractor-tests/generated/Enum/Enum.ql | 19 + .../generated/Enum/Enum_getAttr.ql | 7 + .../Enum/Enum_getGenericParamList.ql | 7 + .../generated/Enum/Enum_getName.ql | 7 + .../generated/Enum/Enum_getVariantList.ql | 7 + .../generated/Enum/Enum_getVisibility.ql | 7 + .../generated/Enum/Enum_getWhereClause.ql | 7 + .../generated/Enum/MISSING_SOURCE.txt | 4 - .../generated/Enum/gen_enum.rs | 6 + .../generated/ExternBlock/ExternBlock.ql | 13 + .../ExternBlock/ExternBlock_getAbi.ql | 7 + .../ExternBlock/ExternBlock_getAttr.ql | 7 + .../ExternBlock_getExternItemList.ql | 7 + .../generated/ExternBlock/MISSING_SOURCE.txt | 4 - .../generated/ExternBlock/gen_extern_block.rs | 6 + .../generated/ExternCrate/ExternCrate.ql | 14 + .../ExternCrate/ExternCrate_getAttr.ql | 7 + .../ExternCrate/ExternCrate_getNameRef.ql | 7 + .../ExternCrate/ExternCrate_getRename.ql | 7 + .../ExternCrate/ExternCrate_getVisibility.ql | 7 + .../generated/ExternCrate/MISSING_SOURCE.txt | 4 - .../generated/ExternCrate/gen_extern_crate.rs | 6 + .../ExternItemList/ExternItemList.ql | 11 + .../ExternItemList/ExternItemList_getAttr.ql | 7 + .../ExternItemList_getExternItem.ql | 7 + .../ExternItemList/MISSING_SOURCE.txt | 4 - .../ExternItemList/gen_extern_item_list.rs | 6 + .../generated/FnPtrType/FnPtrType.ql | 12 + .../generated/FnPtrType/FnPtrType_getAbi.ql | 7 + .../FnPtrType/FnPtrType_getParamList.ql | 7 + .../FnPtrType/FnPtrType_getRetType.ql | 7 + .../generated/FnPtrType/MISSING_SOURCE.txt | 4 - .../generated/FnPtrType/gen_fn_ptr_type.rs | 6 + .../generated/ForExpr/ForExpr.ql | 17 + .../generated/ForExpr/ForExpr_getAttr.ql | 7 + .../generated/ForExpr/ForExpr_getIterable.ql | 7 + .../generated/ForExpr/ForExpr_getLabel.ql | 7 + .../generated/ForExpr/ForExpr_getLoopBody.ql | 7 + .../generated/ForExpr/ForExpr_getPat.ql | 7 + .../generated/ForExpr/MISSING_SOURCE.txt | 4 - .../generated/ForExpr/gen_for_expr.rs | 6 + .../generated/ForType/ForType.ql | 11 + .../ForType/ForType_getGenericParamList.ql | 7 + .../generated/ForType/ForType_getTy.ql | 7 + .../generated/ForType/MISSING_SOURCE.txt | 4 - .../generated/ForType/gen_for_type.rs | 6 + .../generated/FormatArgsArg/FormatArgsArg.ql | 11 + .../FormatArgsArg/FormatArgsArg_getExpr.ql | 7 + .../FormatArgsArg/FormatArgsArg_getName.ql | 7 + .../FormatArgsArg/MISSING_SOURCE.txt | 4 - .../FormatArgsArg/gen_format_args_arg.rs | 6 + .../FormatArgsExpr/FormatArgsExpr.ql | 13 + .../FormatArgsExpr/FormatArgsExpr_getArg.ql | 7 + .../FormatArgsExpr/FormatArgsExpr_getAttr.ql | 7 + .../FormatArgsExpr_getTemplate.ql | 7 + .../FormatArgsExpr/MISSING_SOURCE.txt | 4 - .../FormatArgsExpr/gen_format_args_expr.rs | 6 + .../GenericParamList/GenericParamList.ql | 10 + .../GenericParamList_getGenericParam.ql | 7 + .../GenericParamList/MISSING_SOURCE.txt | 4 - .../gen_generic_param_list.rs | 6 + .../extractor-tests/generated/Impl/Impl.ql | 20 + .../generated/Impl/Impl_getAssocItemList.ql | 7 + .../generated/Impl/Impl_getAttr.ql | 7 + .../Impl/Impl_getGenericParamList.ql | 7 + .../generated/Impl/Impl_getSelfTy.ql | 7 + .../generated/Impl/Impl_getTrait.ql | 7 + .../generated/Impl/Impl_getVisibility.ql | 7 + .../generated/Impl/Impl_getWhereClause.ql | 7 + .../generated/Impl/MISSING_SOURCE.txt | 4 - .../generated/Impl/gen_impl.rs | 6 + .../generated/ImplTraitType/ImplTraitType.ql | 10 + .../ImplTraitType_getTypeBoundList.ql | 7 + .../ImplTraitType/MISSING_SOURCE.txt | 4 - .../ImplTraitType/gen_impl_trait_type.rs | 6 + .../generated/InferType/InferType.ql | 7 + .../generated/InferType/MISSING_SOURCE.txt | 4 - .../generated/InferType/gen_infer_type.rs | 6 + .../generated/ItemList/ItemList.ql | 11 + .../generated/ItemList/ItemList_getAttr.ql | 7 + .../generated/ItemList/ItemList_getItem.ql | 7 + .../generated/ItemList/MISSING_SOURCE.txt | 4 - .../generated/ItemList/gen_item_list.rs | 6 + .../generated/LetElse/LetElse.ql | 10 + .../generated/LetElse/LetElse_getBlockExpr.ql | 7 + .../generated/LetElse/MISSING_SOURCE.txt | 4 - .../generated/LetElse/gen_let_else.rs | 6 + .../generated/Lifetime/Lifetime.ql | 10 + .../generated/Lifetime/Lifetime_getText.ql | 7 + .../generated/Lifetime/MISSING_SOURCE.txt | 4 - .../generated/Lifetime/gen_lifetime.rs | 6 + .../generated/LifetimeArg/LifetimeArg.ql | 10 + .../LifetimeArg/LifetimeArg_getLifetime.ql | 7 + .../generated/LifetimeArg/MISSING_SOURCE.txt | 4 - .../generated/LifetimeArg/gen_lifetime_arg.rs | 6 + .../generated/LifetimeParam/LifetimeParam.ql | 13 + .../LifetimeParam/LifetimeParam_getAttr.ql | 7 + .../LifetimeParam_getLifetime.ql | 7 + .../LifetimeParam_getTypeBoundList.ql | 7 + .../LifetimeParam/MISSING_SOURCE.txt | 4 - .../LifetimeParam/gen_lifetime_param.rs | 6 + .../generated/MacroCall/MISSING_SOURCE.txt | 4 - .../generated/MacroCall/MacroCall.ql | 12 + .../generated/MacroCall/MacroCall_getAttr.ql | 7 + .../generated/MacroCall/MacroCall_getPath.ql | 7 + .../MacroCall/MacroCall_getTokenTree.ql | 7 + .../generated/MacroCall/gen_macro_call.rs | 6 + .../generated/MacroDef/MISSING_SOURCE.txt | 4 - .../generated/MacroDef/MacroDef.ql | 17 + .../generated/MacroDef/MacroDef_getArgs.ql | 7 + .../generated/MacroDef/MacroDef_getAttr.ql | 7 + .../generated/MacroDef/MacroDef_getBody.ql | 7 + .../generated/MacroDef/MacroDef_getName.ql | 7 + .../MacroDef/MacroDef_getVisibility.ql | 7 + .../generated/MacroDef/gen_macro_def.rs | 6 + .../generated/MacroExpr/MISSING_SOURCE.txt | 4 - .../generated/MacroExpr/MacroExpr.ql | 10 + .../MacroExpr/MacroExpr_getMacroCall.ql | 7 + .../generated/MacroExpr/gen_macro_expr.rs | 6 + .../generated/MacroPat/MISSING_SOURCE.txt | 4 - .../generated/MacroPat/MacroPat.ql | 10 + .../MacroPat/MacroPat_getMacroCall.ql | 7 + .../generated/MacroPat/gen_macro_pat.rs | 6 + .../generated/MacroRules/MISSING_SOURCE.txt | 4 - .../generated/MacroRules/MacroRules.ql | 14 + .../MacroRules/MacroRules_getAttr.ql | 7 + .../MacroRules/MacroRules_getName.ql | 7 + .../MacroRules/MacroRules_getTokenTree.ql | 7 + .../MacroRules/MacroRules_getVisibility.ql | 7 + .../generated/MacroRules/gen_macro_rules.rs | 6 + .../generated/MacroType/MISSING_SOURCE.txt | 4 - .../generated/MacroType/MacroType.ql | 10 + .../MacroType/MacroType_getMacroCall.ql | 7 + .../generated/MacroType/gen_macro_type.rs | 6 + .../generated/MatchArmList/MISSING_SOURCE.txt | 4 - .../generated/MatchArmList/MatchArmList.ql | 11 + .../MatchArmList/MatchArmList_getArm.ql | 7 + .../MatchArmList/MatchArmList_getAttr.ql | 7 + .../MatchArmList/gen_match_arm_list.rs | 6 + .../generated/MatchGuard/MISSING_SOURCE.txt | 4 - .../generated/MatchGuard/MatchGuard.ql | 10 + .../MatchGuard/MatchGuard_getCondition.ql | 7 + .../generated/MatchGuard/gen_match_guard.rs | 6 + .../generated/Meta/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Meta/Meta.ql | 12 + .../generated/Meta/Meta_getExpr.ql | 7 + .../generated/Meta/Meta_getPath.ql | 7 + .../generated/Meta/Meta_getTokenTree.ql | 7 + .../generated/Meta/gen_meta.rs | 6 + .../generated/Name/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Name/Name.ql | 10 + .../generated/Name/Name_getText.ql | 7 + .../generated/Name/gen_name.rs | 6 + .../generated/NameRef/MISSING_SOURCE.txt | 4 - .../generated/NameRef/NameRef.ql | 10 + .../generated/NameRef/NameRef_getText.ql | 7 + .../generated/NameRef/gen_name_ref.rs | 6 + .../generated/NeverType/MISSING_SOURCE.txt | 4 - .../generated/NeverType/NeverType.ql | 7 + .../generated/NeverType/gen_never_type.rs | 6 + .../generated/Param/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Param/Param.ql | 12 + .../generated/Param/Param_getAttr.ql | 7 + .../generated/Param/Param_getPat.ql | 7 + .../generated/Param/Param_getTy.ql | 7 + .../generated/Param/gen_param.rs | 6 + .../generated/ParamList/MISSING_SOURCE.txt | 4 - .../generated/ParamList/ParamList.ql | 11 + .../generated/ParamList/ParamList_getParam.ql | 7 + .../ParamList/ParamList_getSelfParam.ql | 7 + .../generated/ParamList/gen_param_list.rs | 6 + .../generated/ParenExpr/MISSING_SOURCE.txt | 4 - .../generated/ParenExpr/ParenExpr.ql | 11 + .../generated/ParenExpr/ParenExpr_getAttr.ql | 7 + .../generated/ParenExpr/ParenExpr_getExpr.ql | 7 + .../generated/ParenExpr/gen_paren_expr.rs | 6 + .../generated/ParenPat/MISSING_SOURCE.txt | 4 - .../generated/ParenPat/ParenPat.ql | 10 + .../generated/ParenPat/ParenPat_getPat.ql | 7 + .../generated/ParenPat/gen_paren_pat.rs | 6 + .../generated/ParenType/MISSING_SOURCE.txt | 4 - .../generated/ParenType/ParenType.ql | 10 + .../generated/ParenType/ParenType_getTy.ql | 7 + .../generated/ParenType/gen_paren_type.rs | 6 + .../generated/PathSegment/MISSING_SOURCE.txt | 4 - .../generated/PathSegment/PathSegment.ql | 20 + .../PathSegment_getGenericArgList.ql | 7 + .../PathSegment/PathSegment_getNameRef.ql | 7 + .../PathSegment/PathSegment_getParamList.ql | 7 + .../PathSegment/PathSegment_getPathType.ql | 7 + .../PathSegment/PathSegment_getRetType.ql | 7 + .../PathSegment_getReturnTypeSyntax.ql | 7 + .../PathSegment/PathSegment_getTy.ql | 7 + .../generated/PathSegment/gen_path_segment.rs | 6 + .../generated/PathType/MISSING_SOURCE.txt | 4 - .../generated/PathType/PathType.ql | 10 + .../generated/PathType/PathType_getPath.ql | 7 + .../generated/PathType/gen_path_type.rs | 6 + .../generated/PtrType/MISSING_SOURCE.txt | 4 - .../generated/PtrType/PtrType.ql | 10 + .../generated/PtrType/PtrType_getTy.ql | 7 + .../generated/PtrType/gen_ptr_type.rs | 6 + .../RecordExprFieldList/MISSING_SOURCE.txt | 4 - .../RecordExprFieldList.ql | 13 + .../RecordExprFieldList_getAttr.ql | 7 + .../RecordExprFieldList_getField.ql | 7 + .../RecordExprFieldList_getSpread.ql | 7 + .../gen_record_expr_field_list.rs | 6 + .../generated/RecordField/MISSING_SOURCE.txt | 4 - .../generated/RecordField/RecordField.ql | 14 + .../RecordField/RecordField_getAttr.ql | 7 + .../RecordField/RecordField_getName.ql | 7 + .../RecordField/RecordField_getTy.ql | 7 + .../RecordField/RecordField_getVisibility.ql | 7 + .../generated/RecordField/gen_record_field.rs | 6 + .../RecordFieldList/MISSING_SOURCE.txt | 4 - .../RecordFieldList/RecordFieldList.ql | 10 + .../RecordFieldList_getField.ql | 7 + .../RecordFieldList/gen_record_field_list.rs | 6 + .../RecordPatFieldList/MISSING_SOURCE.txt | 4 - .../RecordPatFieldList/RecordPatFieldList.ql | 11 + .../RecordPatFieldList_getField.ql | 7 + .../RecordPatFieldList_getRestPat.ql | 7 + .../gen_record_pat_field_list.rs | 6 + .../generated/RefType/MISSING_SOURCE.txt | 4 - .../generated/RefType/RefType.ql | 11 + .../generated/RefType/RefType_getLifetime.ql | 7 + .../generated/RefType/RefType_getTy.ql | 7 + .../generated/RefType/gen_ref_type.rs | 6 + .../generated/Rename/MISSING_SOURCE.txt | 4 - .../generated/Rename/Rename.ql | 10 + .../generated/Rename/Rename_getName.ql | 7 + .../generated/Rename/gen_rename.rs | 6 + .../generated/RestPat/MISSING_SOURCE.txt | 4 - .../generated/RestPat/RestPat.ql | 10 + .../generated/RestPat/RestPat_getAttr.ql | 7 + .../generated/RestPat/gen_rest_pat.rs | 6 + .../generated/RetType/MISSING_SOURCE.txt | 4 - .../generated/RetType/RetType.ql | 10 + .../generated/RetType/RetType_getTy.ql | 7 + .../generated/RetType/gen_ret_type.rs | 6 + .../ReturnTypeSyntax/MISSING_SOURCE.txt | 4 - .../ReturnTypeSyntax/ReturnTypeSyntax.ql | 7 + .../gen_return_type_syntax.rs | 6 + .../generated/SelfParam/MISSING_SOURCE.txt | 4 - .../generated/SelfParam/SelfParam.ql | 14 + .../generated/SelfParam/SelfParam_getAttr.ql | 7 + .../SelfParam/SelfParam_getLifetime.ql | 7 + .../generated/SelfParam/SelfParam_getName.ql | 7 + .../generated/SelfParam/SelfParam_getTy.ql | 7 + .../generated/SelfParam/gen_self_param.rs | 6 + .../generated/SliceType/MISSING_SOURCE.txt | 4 - .../generated/SliceType/SliceType.ql | 10 + .../generated/SliceType/SliceType_getTy.ql | 7 + .../generated/SliceType/gen_slice_type.rs | 6 + .../generated/SourceFile/MISSING_SOURCE.txt | 4 - .../generated/SourceFile/SourceFile.ql | 11 + .../SourceFile/SourceFile_getAttr.ql | 7 + .../SourceFile/SourceFile_getItem.ql | 7 + .../generated/SourceFile/gen_source_file.rs | 6 + .../generated/Static/MISSING_SOURCE.txt | 4 - .../generated/Static/Static.ql | 16 + .../generated/Static/Static_getAttr.ql | 7 + .../generated/Static/Static_getBody.ql | 7 + .../generated/Static/Static_getName.ql | 7 + .../generated/Static/Static_getTy.ql | 7 + .../generated/Static/Static_getVisibility.ql | 7 + .../generated/Static/gen_static.rs | 6 + .../generated/StmtList/MISSING_SOURCE.txt | 4 - .../generated/StmtList/StmtList.ql | 13 + .../generated/StmtList/StmtList_getAttr.ql | 7 + .../StmtList/StmtList_getStatement.ql | 7 + .../StmtList/StmtList_getTailExpr.ql | 7 + .../generated/StmtList/gen_stmt_list.rs | 6 + .../generated/Struct/MISSING_SOURCE.txt | 4 - .../generated/Struct/Struct.ql | 19 + .../generated/Struct/Struct_getAttr.ql | 7 + .../generated/Struct/Struct_getFieldList.ql | 7 + .../Struct/Struct_getGenericParamList.ql | 7 + .../generated/Struct/Struct_getName.ql | 7 + .../generated/Struct/Struct_getVisibility.ql | 7 + .../generated/Struct/Struct_getWhereClause.ql | 7 + .../generated/Struct/gen_struct.rs | 6 + .../generated/TokenTree/MISSING_SOURCE.txt | 4 - .../generated/TokenTree/TokenTree.ql | 7 + .../generated/TokenTree/gen_token_tree.rs | 6 + .../generated/Trait/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Trait/Trait.ql | 20 + .../generated/Trait/Trait_getAssocItemList.ql | 7 + .../generated/Trait/Trait_getAttr.ql | 7 + .../Trait/Trait_getGenericParamList.ql | 7 + .../generated/Trait/Trait_getName.ql | 7 + .../generated/Trait/Trait_getTypeBoundList.ql | 7 + .../generated/Trait/Trait_getVisibility.ql | 7 + .../generated/Trait/Trait_getWhereClause.ql | 7 + .../generated/Trait/gen_trait.rs | 6 + .../generated/TraitAlias/MISSING_SOURCE.txt | 4 - .../generated/TraitAlias/TraitAlias.ql | 19 + .../TraitAlias/TraitAlias_getAttr.ql | 7 + .../TraitAlias_getGenericParamList.ql | 7 + .../TraitAlias/TraitAlias_getName.ql | 7 + .../TraitAlias/TraitAlias_getTypeBoundList.ql | 7 + .../TraitAlias/TraitAlias_getVisibility.ql | 7 + .../TraitAlias/TraitAlias_getWhereClause.ql | 7 + .../generated/TraitAlias/gen_trait_alias.rs | 6 + .../generated/TryExpr/MISSING_SOURCE.txt | 4 - .../generated/TryExpr/TryExpr.ql | 11 + .../generated/TryExpr/TryExpr_getAttr.ql | 7 + .../generated/TryExpr/TryExpr_getExpr.ql | 7 + .../generated/TryExpr/gen_try_expr.rs | 6 + .../generated/TupleField/MISSING_SOURCE.txt | 4 - .../generated/TupleField/TupleField.ql | 12 + .../TupleField/TupleField_getAttr.ql | 7 + .../generated/TupleField/TupleField_getTy.ql | 7 + .../TupleField/TupleField_getVisibility.ql | 7 + .../generated/TupleField/gen_tuple_field.rs | 6 + .../TupleFieldList/MISSING_SOURCE.txt | 4 - .../TupleFieldList/TupleFieldList.ql | 10 + .../TupleFieldList/TupleFieldList_getField.ql | 7 + .../TupleFieldList/gen_tuple_field_list.rs | 6 + .../generated/TupleType/MISSING_SOURCE.txt | 4 - .../generated/TupleType/TupleType.ql | 10 + .../generated/TupleType/TupleType_getField.ql | 7 + .../generated/TupleType/gen_tuple_type.rs | 6 + .../generated/TypeAlias/MISSING_SOURCE.txt | 4 - .../generated/TypeAlias/TypeAlias.ql | 20 + .../generated/TypeAlias/TypeAlias_getAttr.ql | 7 + .../TypeAlias_getGenericParamList.ql | 7 + .../generated/TypeAlias/TypeAlias_getName.ql | 7 + .../generated/TypeAlias/TypeAlias_getTy.ql | 7 + .../TypeAlias/TypeAlias_getTypeBoundList.ql | 7 + .../TypeAlias/TypeAlias_getVisibility.ql | 7 + .../TypeAlias/TypeAlias_getWhereClause.ql | 7 + .../generated/TypeAlias/gen_type_alias.rs | 6 + .../generated/TypeArg/MISSING_SOURCE.txt | 4 - .../generated/TypeArg/TypeArg.ql | 10 + .../generated/TypeArg/TypeArg_getTy.ql | 7 + .../generated/TypeArg/gen_type_arg.rs | 6 + .../generated/TypeBound/MISSING_SOURCE.txt | 4 - .../generated/TypeBound/TypeBound.ql | 12 + .../TypeBound_getGenericParamList.ql | 7 + .../TypeBound/TypeBound_getLifetime.ql | 7 + .../generated/TypeBound/TypeBound_getTy.ql | 7 + .../generated/TypeBound/gen_type_bound.rs | 6 + .../TypeBoundList/MISSING_SOURCE.txt | 4 - .../generated/TypeBoundList/TypeBoundList.ql | 10 + .../TypeBoundList/TypeBoundList_getBound.ql | 7 + .../TypeBoundList/gen_type_bound_list.rs | 6 + .../generated/TypeParam/MISSING_SOURCE.txt | 4 - .../generated/TypeParam/TypeParam.ql | 15 + .../generated/TypeParam/TypeParam_getAttr.ql | 7 + .../TypeParam/TypeParam_getDefaultType.ql | 7 + .../generated/TypeParam/TypeParam_getName.ql | 7 + .../TypeParam/TypeParam_getTypeBoundList.ql | 7 + .../generated/TypeParam/gen_type_param.rs | 6 + .../generated/Union/MISSING_SOURCE.txt | 4 - .../extractor-tests/generated/Union/Union.ql | 19 + .../generated/Union/Union_getAttr.ql | 7 + .../Union/Union_getGenericParamList.ql | 7 + .../generated/Union/Union_getName.ql | 7 + .../Union/Union_getRecordFieldList.ql | 7 + .../generated/Union/Union_getVisibility.ql | 7 + .../generated/Union/Union_getWhereClause.ql | 7 + .../generated/Union/gen_union.rs | 6 + .../generated/Use/MISSING_SOURCE.txt | 4 - .../test/extractor-tests/generated/Use/Use.ql | 13 + .../generated/Use/Use_getAttr.ql | 7 + .../generated/Use/Use_getUseTree.ql | 7 + .../generated/Use/Use_getVisibility.ql | 7 + .../extractor-tests/generated/Use/gen_use.rs | 6 + .../generated/UseTree/MISSING_SOURCE.txt | 4 - .../generated/UseTree/UseTree.ql | 12 + .../generated/UseTree/UseTree_getPath.ql | 7 + .../generated/UseTree/UseTree_getRename.ql | 7 + .../UseTree/UseTree_getUseTreeList.ql | 7 + .../generated/UseTree/gen_use_tree.rs | 6 + .../generated/UseTreeList/MISSING_SOURCE.txt | 4 - .../generated/UseTreeList/UseTreeList.ql | 10 + .../UseTreeList/UseTreeList_getUseTree.ql | 7 + .../UseTreeList/gen_use_tree_list.rs | 6 + .../generated/Variant/MISSING_SOURCE.txt | 4 - .../generated/Variant/Variant.ql | 17 + .../generated/Variant/Variant_getAttr.ql | 7 + .../generated/Variant/Variant_getExpr.ql | 7 + .../generated/Variant/Variant_getFieldList.ql | 7 + .../generated/Variant/Variant_getName.ql | 7 + .../Variant/Variant_getVisibility.ql | 7 + .../generated/Variant/gen_variant.rs | 6 + .../generated/VariantList/MISSING_SOURCE.txt | 4 - .../generated/VariantList/VariantList.ql | 10 + .../VariantList/VariantList_getVariant.ql | 7 + .../generated/VariantList/gen_variant_list.rs | 6 + .../generated/Visibility/MISSING_SOURCE.txt | 4 - .../generated/Visibility/Visibility.ql | 10 + .../Visibility/Visibility_getPath.ql | 7 + .../generated/Visibility/gen_visibility.rs | 6 + .../generated/WhereClause/MISSING_SOURCE.txt | 4 - .../generated/WhereClause/WhereClause.ql | 10 + .../WhereClause/WhereClause_getPredicate.ql | 7 + .../generated/WhereClause/gen_where_clause.rs | 6 + .../generated/WherePred/MISSING_SOURCE.txt | 4 - .../generated/WherePred/WherePred.ql | 15 + .../WherePred_getGenericParamList.ql | 7 + .../WherePred/WherePred_getLifetime.ql | 7 + .../generated/WherePred/WherePred_getTy.ql | 7 + .../WherePred/WherePred_getTypeBoundList.ql | 7 + .../generated/WherePred/gen_where_pred.rs | 6 + .../generated/WhileExpr/MISSING_SOURCE.txt | 4 - .../generated/WhileExpr/WhileExpr.ql | 14 + .../generated/WhileExpr/WhileExpr_getAttr.ql | 7 + .../WhileExpr/WhileExpr_getCondition.ql | 7 + .../generated/WhileExpr/WhileExpr_getLabel.ql | 7 + .../WhileExpr/WhileExpr_getLoopBody.ql | 7 + .../generated/WhileExpr/gen_while_expr.rs | 6 + 755 files changed, 5969 insertions(+), 793 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/Abi/Abi.ql create mode 100644 rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Abi/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Abi/gen_abi.rs create mode 100644 rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ArgList/gen_arg_list.rs create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.ql create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/gen_array_type.rs create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/gen_assoc_item_list.rs create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/gen_assoc_type_arg.rs create mode 100644 rust/ql/test/extractor-tests/generated/Attr/Attr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Attr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Attr/gen_attr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ClosureBinder/gen_closure_binder.rs create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const.ql create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Const/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Const/gen_const.rs create mode 100644 rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ConstArg/gen_const_arg.rs create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/gen_const_param.rs create mode 100644 rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.ql create mode 100644 rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/DynTraitType/gen_dyn_trait_type.rs create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum.ql create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Enum/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Enum/gen_enum.rs create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/gen_extern_block.rs create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/gen_extern_crate.rs create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/gen_extern_item_list.rs create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.ql create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql delete mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/gen_fn_ptr_type.rs create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/gen_for_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ForType/ForType.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ForType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ForType/gen_for_type.rs create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.ql delete mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/gen_format_args_arg.rs create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql delete mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/gen_format_args_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql delete mode 100644 rust/ql/test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/GenericParamList/gen_generic_param_list.rs create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Impl/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Impl/gen_impl.rs create mode 100644 rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql create mode 100644 rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ImplTraitType/gen_impl_trait_type.rs create mode 100644 rust/ql/test/extractor-tests/generated/InferType/InferType.ql delete mode 100644 rust/ql/test/extractor-tests/generated/InferType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/InferType/gen_infer_type.rs create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql delete mode 100644 rust/ql/test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/gen_item_list.rs create mode 100644 rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LetElse/gen_let_else.rs create mode 100644 rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql create mode 100644 rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql delete mode 100644 rust/ql/test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Lifetime/gen_lifetime.rs create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeArg/gen_lifetime_arg.rs create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql delete mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/gen_lifetime_param.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/gen_macro_call.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/gen_macro_def.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroExpr/gen_macro_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroPat/gen_macro_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/gen_macro_rules.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MacroType/MacroType.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.ql create mode 100644 rust/ql/test/extractor-tests/generated/MacroType/gen_macro_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/gen_match_arm_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchGuard/gen_match_guard.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Meta/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta.ql create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/Meta/gen_meta.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Name/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Name/Name.ql create mode 100644 rust/ql/test/extractor-tests/generated/Name/Name_getText.ql create mode 100644 rust/ql/test/extractor-tests/generated/Name/gen_name.rs delete mode 100644 rust/ql/test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql create mode 100644 rust/ql/test/extractor-tests/generated/NameRef/gen_name_ref.rs delete mode 100644 rust/ql/test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/NeverType/NeverType.ql create mode 100644 rust/ql/test/extractor-tests/generated/NeverType/gen_never_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Param/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param.ql create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/Param/gen_param.rs delete mode 100644 rust/ql/test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/gen_param_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/gen_paren_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenPat/gen_paren_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ParenType/ParenType.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/ParenType/gen_paren_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs delete mode 100644 rust/ql/test/extractor-tests/generated/PathType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PathType/PathType.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathType/gen_path_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PtrType/PtrType.ql create mode 100644 rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/PtrType/gen_ptr_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/gen_record_expr_field_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/gen_record_field.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldList/gen_record_field_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/gen_record_pat_field_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RefType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RefType/RefType.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefType/gen_ref_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Rename/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Rename/Rename.ql create mode 100644 rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Rename/gen_rename.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RestPat/gen_rest_pat.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RetType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RetType/RetType.ql create mode 100644 rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/RetType/gen_ret_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql create mode 100644 rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/gen_return_type_syntax.rs delete mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs delete mode 100644 rust/ql/test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/SliceType/SliceType.ql create mode 100644 rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/SliceType/gen_slice_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/gen_source_file.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Static/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static.ql create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Static/gen_static.rs delete mode 100644 rust/ql/test/extractor-tests/generated/StmtList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/gen_stmt_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Struct/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql create mode 100644 rust/ql/test/extractor-tests/generated/Struct/gen_struct.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/TokenTree/gen_token_tree.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Trait/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql create mode 100644 rust/ql/test/extractor-tests/generated/Trait/gen_trait.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/gen_trait_alias.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/gen_try_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TupleType/TupleType.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleType/gen_tuple_type.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/gen_type_alias.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeArg/gen_type_arg.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/gen_type_bound.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeBoundList/gen_type_bound_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/gen_type_param.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Union/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql create mode 100644 rust/ql/test/extractor-tests/generated/Union/gen_union.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Use/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use.ql create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Use/gen_use.rs delete mode 100644 rust/ql/test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/gen_use_tree.rs delete mode 100644 rust/ql/test/extractor-tests/generated/UseTreeList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql create mode 100644 rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql create mode 100644 rust/ql/test/extractor-tests/generated/UseTreeList/gen_use_tree_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Variant/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant.ql create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Variant/gen_variant.rs delete mode 100644 rust/ql/test/extractor-tests/generated/VariantList/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql create mode 100644 rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql create mode 100644 rust/ql/test/extractor-tests/generated/VariantList/gen_variant_list.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql create mode 100644 rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/Visibility/gen_visibility.rs delete mode 100644 rust/ql/test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhereClause/gen_where_clause.rs delete mode 100644 rust/ql/test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.ql create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/gen_where_pred.rs delete mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/gen_while_expr.rs diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index a84793702397..0d4ebbc8fe3b 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,13 +1,13 @@ -lib/codeql/rust/elements/Abi.qll 322ff44609ee5febf82279342caf3e6b6e4decf43e680a81b7f7dcdf94c6b495 2dc061be4ef2e07fa5e7c566f089479b78b70b77fb5467cf342797c9430a67a4 -lib/codeql/rust/elements/ArgList.qll e744d6cfc97d377b333538fced346b288e32f5609989b2c8e96c6e6a7d5b7ea6 7b134dcf9bc630409d27dfbce2a8302f4ea25590e55064999c99ef3629b3bd64 +lib/codeql/rust/elements/Abi.qll 4c973d28b6d628f5959d1f1cc793704572fd0acaae9a97dfce82ff9d73f73476 250f68350180af080f904cd34cb2af481c5c688dc93edf7365fd0ae99855e893 +lib/codeql/rust/elements/ArgList.qll 661f5100f5d3ef8351452d9058b663a2a5c720eea8cf11bedd628969741486a2 28e424aac01a90fb58cd6f9f83c7e4cf379eea39e636bc0ba07efc818be71c71 lib/codeql/rust/elements/ArrayExpr.qll a3e6e122632f4011644ec31b37f88b32fe3f2b7e388e7e878a6883309937049f 12ccb5873d95c433da5606fd371d182ef2f71b78d0c53c2d6dec10fa45852bdc -lib/codeql/rust/elements/ArrayType.qll 908aed01b9dd98e276f2331ce118ca032ed99b0a2512d69536c276ea8abd0927 345c3d46a42cbbdee921182ce36a0cf8618ae0b4448cb24cc64aa5c9fe049ca7 +lib/codeql/rust/elements/ArrayType.qll affd43d308200d60d08e8924cdbb2a17a827ebaa62a296e07bb9ce97451e3c4c 80589a7f79bf2ac293a027faf2589b3027a6c4a286533f2ffccad259a306a8cb lib/codeql/rust/elements/AsmExpr.qll 2f1c78e92b56d66a559543b2103d8f880dd4fa4c6907346f668b3714cf2355e9 12e174fc469c067c957f6c1a5969ab56a71a07c537ca930a564cce81c7ab4481 -lib/codeql/rust/elements/AssocItem.qll c6609cffdd0feb8f5d5bd032aaefaccb4954bc4857147c3fa8da3df9533c3f89 c3aeaa01b37d46a69c182713e26e7be048665d965ed263198b992a1c4f78b9bd -lib/codeql/rust/elements/AssocItemList.qll 6ae9a697b5197c893db9b6bab8bdc7d9ecadc60558d9a776fdc20c7741a9932a 07598595241401ea70b5dee3da27940adbe0b69a539e488c9931b38e7a4b61a2 -lib/codeql/rust/elements/AssocTypeArg.qll 977285121a7a9e1883f4e78f644c3ad09c85657ca2092c48ac4e08fc4b1d2b54 e671900cbe16f10a0a131f12c10e454c28c9a09980f1073dadee905a1e832253 +lib/codeql/rust/elements/AssocItem.qll 5e514287bbe353d1d637991e7af836e5659ad66922df99af68ab61399e7f8f9a 3733af54938271161ee2720c32ac43228d519b5c46b7cea1e4bbe3dc634f8857 +lib/codeql/rust/elements/AssocItemList.qll 1eed81b9936157f106a98d737a90b95836874c0adb47997871b7d372b3d31c1d 9189da6f7fd601f88efa441a5c65ea00d3cdd30e36b6b65cc0b7a4059b61c834 +lib/codeql/rust/elements/AssocTypeArg.qll 4740b296f596f58ed8d2788f55ffc1557ea22329b17b9374c885c4fd395d6eff 0191ca01b917d611ecd25f8171bbacd88335cf6a447f2f9da84dda816a170a65 lib/codeql/rust/elements/AstNode.qll 5ee6355afb1cafd6dfe408b8c21836a1ba2aeb709fb618802aa09f9342646084 dee708f19c1b333cbd9609819db3dfdb48a0c90d26266c380f31357b1e2d6141 -lib/codeql/rust/elements/Attr.qll 3c81c8b8ead6a9f08c29557206c0305aee833d8a6592585b55e9ca79270627d5 44eb7b008600b3e069dd0d92a57e8a22ce07ca3dd012a7ed4185bed56de57525 +lib/codeql/rust/elements/Attr.qll 53887a49513b95e38344b57d824a7474331467561f1edf38d5ca608d8cefa0cd 2e9eeb32ba6cc186691897979e30d32bc6eaff523e37064ee84cf09ded5afe17 lib/codeql/rust/elements/AwaitExpr.qll d8b37c01f7d27f0ec40d92a533a8f09a06af7ece1ae832b4ea8f2450c1762511 92cdb7ff0efddf26bed2b7b2729fddd197e26c1a11c8fec0c747aab642710c21 lib/codeql/rust/elements/BecomeExpr.qll 7a3cfc4894feb6be1cde664f675b18936434e68ccea52e55314c33d01491e34f 49666eca509b30d44bb02702bda67239c76bf8d9f231022c9cf6ecca123f8616 lib/codeql/rust/elements/BinaryExpr.qll 394522da3bc3a716fc7bc40c3560143ca840f5d210cfcba2a752c3026dd0f725 fbbd6fb79bf16a7d9820613654c584cd7ff3e7a29988f3920b6cfbe746acfd8d @@ -16,161 +16,161 @@ lib/codeql/rust/elements/BoxPat.qll 1b2c3fff171aa6aa238c9460b122f26c79e04577cea6 lib/codeql/rust/elements/BreakExpr.qll 0b0e1c3bb027acb8a3144cac4bd5043ec4af2160a186c9ef41e1d4f8d9c605e3 caaf17700c95b35fa5806fa6b21e4d89b7bd53e32b884780c7f1ff46702b978a lib/codeql/rust/elements/CallExpr.qll 6760ef2753fcaa9f02860bfeadfd1b1603d0d5b35f5dd72b33a474c206f51a29 55afe003eb51ef28b382af368429930d858d291bb7d76d71149eee1c805731f1 lib/codeql/rust/elements/CastExpr.qll ba281bde130f43c486c4ad889539b77fba9e41afdf7980e50b6a8696a1ec7527 61257003d395896ec60729d0bc01da36697615bb725d07141255fbb5c44e50a0 -lib/codeql/rust/elements/ClosureBinder.qll 5b2d33fc693c08e678e6897329cab21667fbf6a917677eeaea75b16069e42118 9b224af67ca2f4a5161dda5d73926f1e96f051e1e3c17fe1ad44cd4837255bb9 +lib/codeql/rust/elements/ClosureBinder.qll 977df800f97cc9b03fffb5e5e1fc6acd08a2938e04cb6ad91108784a15b0d510 f6fad4127226fe1dff2f16416d8a7fde5d8ab4a88f30e443ac5e5ff618de3e05 lib/codeql/rust/elements/ClosureExpr.qll 8f06357ae134e42c073eef994c83c04b8cf294fe33b286dbd75c0e705ce29d05 9d9e282d965fed723965376801d4afa49444d1d9be9b093d02e276729a2cf7ad -lib/codeql/rust/elements/Const.qll 594d7752b0ec94b0da6e79447a58792c7a755e67b18edac1dcb51308a067b23b 43eb0b88746ce303485a08761fa0da8448da45a3a49207708956b7d228b6b6e4 -lib/codeql/rust/elements/ConstArg.qll 55b1697280cd21f80f9fba946eb377f5188475e003e09667b414f76c6423835b b261890b6756df3d8292a467a483f8ccc124e26ba6a82fbc88470c7a90cea19e +lib/codeql/rust/elements/Const.qll 2843a870e2abdf5b63fbea13f8a9ec4981b74369adec2ed3ce00a7d6f5a6fee3 c0bdb467cce63dcd3c65b21ef0836d8bf4e6c8d7d70049df8581fd35fdd03083 +lib/codeql/rust/elements/ConstArg.qll f37b34417503bbd2f3ce09b3211d8fa71f6a954970c2738c73be6c55f204e58e 15ef5e189b67cfdfe4d16909e0b411ac8fdd4ef187c328bdede03a1a5e416b54 lib/codeql/rust/elements/ConstBlockPat.qll a25f42b84dbeb33e10955735ef53b8bb7e3258522d6d1a9068f19adaf1af89d9 eeb816d2b54db77a1e7bb70e90b68d040a0cd44e9d44455a223311c3615c5e6e -lib/codeql/rust/elements/ConstParam.qll 7728c64ad0f7b23ab8b3ba20e30a8108069a98b3584a14a3829abfd126ef3345 0617a5134b50437e96b4d83539951e022ab0720cbaaff50321da7d9aaabaedfa +lib/codeql/rust/elements/ConstParam.qll bda26c61f531b4a6bbe8c95c414f5431b75bbc3d9b559fc6dc21d60b32f993f9 dc82bcba1a513d1d9e0072ec252b78a17ff7217b2064290b1791b24f72a99221 lib/codeql/rust/elements/ContinueExpr.qll 9f27c5d5c819ad0ebc5bd10967ba8d33a9dc95b9aae278fcfb1fcf9216bda79c 0dc061445a6b89854fdce92aaf022fdc76b724511a50bb777496ce75c9ecb262 -lib/codeql/rust/elements/DynTraitType.qll 6c050745216ed0b91299c3620fb3bec16c6e111197857c7d0971beca58964f93 df3a45f933d7e2df6cf28129a92a566c721103e35ab7439e0fecf8381f034046 +lib/codeql/rust/elements/DynTraitType.qll 5d249ac6b61916dad08be29631de77405928f0f38da499c66c1c412347945860 2adc38d1afd039b48c56d934e521e4a41589f761b988587bc55781104d6bd996 lib/codeql/rust/elements/Element.qll 0b62d139fef54ed2cf2e2334806aa9bfbc036c9c2085d558f15a42cc3fa84c48 24b999b93df79383ef27ede46e38da752868c88a07fe35fcff5d526684ba7294 -lib/codeql/rust/elements/Enum.qll 2011275d3ba5ee38ac84bb918bbbcf17bac77563b8cd85ffc36632db91929ef0 beec7cdf716d367d56867664f352bd54b6dec1a8286f7f535c7177084869b876 +lib/codeql/rust/elements/Enum.qll 2f122b042519d55e221fceac72fce24b30d4caf1947b25e9b68ee4a2095deb11 83a47445145e4fda8c3631db602a42dbb7a431f259eddf5c09dccd86f6abdd0e lib/codeql/rust/elements/Expr.qll e5d65e805ccf440d64d331e55df4c4144ab8c8f63f367382494714087659ffe8 2bbc1e5d3a65f413ec33d9822fa451fbdbe32349158db58cc0bfcfafb0e21bda lib/codeql/rust/elements/ExprStmt.qll ea950ac5cbe8d8004bd674b5aeaf1f0b33d5b5910a41f2d4bca07f8ea36d1066 d882208b17fd3d2c8da07b1b84cb40d4c15938dc67c3d8404e36de57da84428c -lib/codeql/rust/elements/ExternBlock.qll 815d0cdf459d57e38b1281cb288e4595824caa2e7c860ba3c988c209ba8e5362 6d6e0eb80545d08afbe0bad2472889611010534259bbe9628d8b7b781e1bd581 -lib/codeql/rust/elements/ExternCrate.qll b8b163815ab45307c732809c4813784c93ce97b97e7b0478f2404e25e6e41179 4647c3895a5ed7039c3d8317399e23c3420ad5e3193d9a70441abd3c8dd4361a -lib/codeql/rust/elements/ExternItem.qll 41e79b67937795b6eca3dadaf3b668358f7de0b56077a2f4cc99b37ba3f79df2 adfa255c5e201a42377b0e591e09b8747fe2641f510129750b804fd5bdd110e9 -lib/codeql/rust/elements/ExternItemList.qll e90fe2d5805d81802ada7300a309c2b0e190223d2203420970ae9df40c97559f 2d628d08244a1fab9c703fb9eec0b96737681d001ffa5e78b27425de983762b6 +lib/codeql/rust/elements/ExternBlock.qll 23d7ca86ad0366cfb0c5300a6e205f1fe59eebcb1b18dd5b6ea7fdba3830ca68 c718eed50d4d55b67e9cfcebee018b8e6f9b783f2b2f0e21c5785ead0f11f5b6 +lib/codeql/rust/elements/ExternCrate.qll 54e93a9ec560d72dc0f0269b42b237f21abbf37023492e657f048764d70b0734 fc5bb6f255f5293fd4f56cd14d5ce0ae781abff28c1f984101c38e15f82405df +lib/codeql/rust/elements/ExternItem.qll c39bbae40fa569d3d84a10045d7eeced3db85e6cb7147f7a7065c5b484f890a1 bc56d6db3d05dbc552927d004328fbe399960711c920ef6b47f6faaa1a541183 +lib/codeql/rust/elements/ExternItemList.qll bc96f188970e8dc0cd1e77dea3e49b715edf6392539add5744cb1b396064a3b0 d1270d50448b36947372e86337a3efb5ed416c77aac709f6421d4d2f06999a7a lib/codeql/rust/elements/FieldExpr.qll 8102cd659f9059cf6af2a22033cfcd2aae9c35204b86f7d219a05f1f8de54b3b f818169dddf5102095ae1410583615f80031376a08b5307d0c464e79953c3975 -lib/codeql/rust/elements/FieldList.qll 521b88b7df0cc559240ba53abeb63c9e6e306ebda90544b4d38968c1b2f9226d 130f057c42ca924a1b97bda82a77c13a679aa8fd580a18b4344cc7ad03a0ccfb -lib/codeql/rust/elements/FnPtrType.qll 1be7ca0325d7601b876bb3face80f2d8bb53d36d4c892500d95897e51c46568d 643426781d89a2b0288aaa280d97e0b580ae62d5d2d77934490f7cc56b554f16 -lib/codeql/rust/elements/ForExpr.qll c5d48fb35d0797b05a567fc6c769651cb9d32f327a66432870d21a7e56fe84f9 dd6f86a1fb462d764d77d5474fcfb9e8e43041b0b5d1928a0c9ca575b807d617 -lib/codeql/rust/elements/ForType.qll 7eb52c4fb8463423d1fb5d2e306dbc3585cf0a65a4dd20cfcb76db59fbc00496 25d043cf7c90a5920af9638c99317c7fcf711eb99912ed28057660f212f6a778 -lib/codeql/rust/elements/FormatArgsArg.qll 5f4635101ef3a7de0ce27dc3ce0e9ddbfff92bac6266c2dfe1bc0949a9fa7f35 dde33150ce905f18e96db9e5d5cdd15fbf7f9aff78f91a5c18b183d1e4f925e3 -lib/codeql/rust/elements/FormatArgsExpr.qll e0f54d22bfec9fb8cf1b90627a419c47042c8e4bed90ebf2a040be0f95ee1f7f 02d9ae076dc8d5791bb6cd5200dec2ca888aa6f68c867cc0f918dfa3d5033bf6 +lib/codeql/rust/elements/FieldList.qll bd243adc4696c60f636055a1c2da28039fe2028476c9247eb6a68003b849b757 ab63cdf410afd1e515f873b49f46bb5c2bf27e6c78fd206ccbdba064c4c0a4b2 +lib/codeql/rust/elements/FnPtrType.qll c4a90dc660cf620972dc23b95494f5caf9f050eabd4bdb52fdc061f8797ba9a1 f8defc91582fa503607664668f9e2e6c2cd8b320c7c449610f21e52e332a129f +lib/codeql/rust/elements/ForExpr.qll 312804d53dd9236a2f2a15c9d6ec348b46e139a54eb5893e7e12487725df7444 fa5e20099b1179033bc209bad3548e3d1d4019c7fe0e455cec8ca1a9d48692ab +lib/codeql/rust/elements/ForType.qll 0036bed8749358c356d78c4a0eef40d73e2796284293cde5604ae70ddd6d0470 4edcaf8f7c67d42ebe3ebb1be6a7643758717d4fe88f5f648b6a1c5ff4ee4de7 +lib/codeql/rust/elements/FormatArgsArg.qll 5bc9b4cd1bac7131165836e93838c45452a08ea6011741cbddace3cbf9c69440 f825140e98dc9800d5c045402186793c7b21511448e2f6bf6402d1e06305219c +lib/codeql/rust/elements/FormatArgsExpr.qll f2ffad5a1105b29a8437c8ed6cf918cfcf4d65ac164bbf1be0585c3b673ca749 3ba20dc312a0a994bb43b37b2db72cbd4e06061b97918fa0e84ce355070ffbeb lib/codeql/rust/elements/Function.qll 736c53408f8674c88c352cd1f08f7c77e51551c68ef802f2e1c1aaf3d44fa8e9 6b52dbea081a5e799f1a2cedd57be5485bc8e018ded7249a1852343053d849a6 -lib/codeql/rust/elements/GenericArg.qll 1b45a5f91e4a3124cab7123657608bf9fa2985ebb8272d1f227696d36df77464 5954d7feda97ea092dfa5eb615d00fdb6f863507a96610db13dcb590713091c1 +lib/codeql/rust/elements/GenericArg.qll 5f11ce0e3c5f08de84db61f56ba1b984652455ba6b95a8b8a5b5a235913d4072 756b6a73d66fde45bdcc65ce2362a5b1391af2927e6d54b6550b3ecd5fd11e75 lib/codeql/rust/elements/GenericArgList.qll dcf274db517b0e8f19e4545d77f86cdd4066ff2805e68c808d0bb5750b49f569 1055a82929e850264e501b367ef4d314a3e6bb8943ec95f4284d157fb4d0092f -lib/codeql/rust/elements/GenericParam.qll 7810d9e153c088b751beba5f0d1cc264bf72874dbdcb2cb0212002d610ab0928 4615742f478a7423b9c8b0a1967923e2532e3b2fa013c8bc2dcf5d25ae8e6d65 -lib/codeql/rust/elements/GenericParamList.qll e85142f953f232b3c9fad15df39cb1246d21d27f8400a60483d1744c51cc2f49 407ee992651a074846028bfaa66649c6b785fca6456b47425ba4ca8bcac6dd5c +lib/codeql/rust/elements/GenericParam.qll b58448b808d6dfa05db9574f54c22ce51f0b1d78784263c75a95d6bfc787067d 4afbab71fe717d7d7d3e2f60ea8c3d97bcb29b17b4efb79eabfe8f070edcb9bb +lib/codeql/rust/elements/GenericParamList.qll 91d6f8cab06d7a3c53cfc714698a04c867867536705f03ed37b135e9e87f78c8 d1d88c31f712ca7ea83b6bf61466710069f2fbdfa40499321686e2867b99b35f lib/codeql/rust/elements/IdentPat.qll ad5f202316d4eeee3ca81ea445728f4ad7eb6bb7d81232bc958c22a93d064bf2 7ce2772e391e593d8fd23b2b44e26d0d7e780327ec973fcc9dce52a75fda0e36 lib/codeql/rust/elements/IfExpr.qll 277cda4e962ec19a70bef282945de9064d1652e788901d4d0b15c6e228663c36 6fd342afbbbc6335e23aa9d179c14ef5dacfe7d14420f3a75655cf6d1030183e -lib/codeql/rust/elements/Impl.qll f12c5804c16ec58091d2faa58f5dc6295a78ef72068845f64d151f445dd26ad8 184cfe4516a8857cfb7b30e4ed42ce8b10dd50a0a7cd7e4ac3fd53a4bc5cc2ca -lib/codeql/rust/elements/ImplTraitType.qll 727c0caa362310397df340d00d0c1807dcefb8d8f4cb1205ba8469dd4ec27e83 e18d9096450aaac743cdc42b19a6496ef00805f44089c3691e8afccbb8f29959 +lib/codeql/rust/elements/Impl.qll 9593c47af4fa08afb19c52aab7d0bac6740fed7ec60201f47e7bc46f13bfb329 4ec840401563ab6136b99491b881c9a10108240de972b19ec64227e1e7d73e65 +lib/codeql/rust/elements/ImplTraitType.qll f7241044f6666a509cfbc01bf6df3db5360e67dd0f9baba4a323566701359203 350636d0b1c7a77e006170cbfa9108c259dd5831b0f242da76c10be3ecc32870 lib/codeql/rust/elements/IndexExpr.qll 0e2e9f018d06ae72be0fc4ddbc019a9aacd8a06f42b4c4431760bd149e7f2290 2bcfd557abd53a48e48de7915c4f2089107c62dfb3e732a904848248dfd3727b -lib/codeql/rust/elements/InferType.qll b4f4b3a309b08f743f35210fb847d99ab478202adc5b473eb6aa6b267a669f79 1edb680976456cd1237b31b776579d8efe44e80b040a0e810908d1733a10c3bf -lib/codeql/rust/elements/Item.qll d822fafd28c573b4fe1b42838ed58cea04ce0f417cb7704148a097531f86841c d15d24bdd2564f284e8e5a15c9e88036444394909a270ca0d449ce6126ef44dd -lib/codeql/rust/elements/ItemList.qll 621661f43ef2a0955f101b3cad3687fc2b5a6a13ccf54b5395f81ab0c870d97c 02c23b9b6debeb84632b1c09eea9fc21ba6b5ee37109524a596e23aa394157e1 +lib/codeql/rust/elements/InferType.qll c71184ae6aa181be94e299882503350e057493e17f1133a1e96162a0e5cbd1ef f0f19b611708df45a6ff811f8066c8042a8e1ac9b7bd94910514547ea430d3d5 +lib/codeql/rust/elements/Item.qll 5c9148ff0eaeb4404c2d8156e7df0ef5753fd44ead972da05a49659ddaa25480 78446f788617e40525d4d4b489848e75f2143a90e18d40974c3bff7b1e7c825c +lib/codeql/rust/elements/ItemList.qll c33e46a9ee45ccb194a0fe5b30a6ad3bcecb0f51486c94e0191a943710a17a7d 5a69c4e7712b4529681c4406d23dc1b6b9e5b3c03552688c55addab271912ed5 lib/codeql/rust/elements/Label.qll a31d41db351af7f99a55b26cdbbc7f13b4e96b660a74e2f1cc90c17ee8df8d73 689f87cb056c8a2aefe1a0bfc2486a32feb44eb3175803c61961a6aeee53d66e -lib/codeql/rust/elements/LetElse.qll 4574e2a8abfd2670b20f6ad88473a70bedddc2725ad033630b6942388f769978 97b2ebf3e0d1b41a8333f09a919437ec47ca0585e35e006aff1cf929998cbd48 +lib/codeql/rust/elements/LetElse.qll 85d16cb9cb2162493a9bacfe4b9e6a3b325d9466175b6d1a8e649bdf2191b864 c268d0878e9f82e8ede930b3825745c39ab8cd4db818eb9be6dc5ca49bee7579 lib/codeql/rust/elements/LetExpr.qll 435f233890799a9f52972a023e381bc6fe2e0b3df1e696dc98b21682a3c1d88e b34da72dd222a381e098f160551ec614ebb98eb46af35c6e1d337e173d8ec4b9 lib/codeql/rust/elements/LetStmt.qll e589d750ff87c25e28e15dab61e1a3555a45ced42158b05c991c6f5873abd86a 383484181b825cd7bc20e014fc4d5888f66e1f257502e1893f3d55aed2cdef3d -lib/codeql/rust/elements/Lifetime.qll 301c0e27d7af2a9806d4b3a51017e6b5ed32608b21506253edf6363edeeeb6eb 866876f34b8955b17f334aab2f70d5daad09aa72fdc598d1c24d533825aca4ef -lib/codeql/rust/elements/LifetimeArg.qll b32eca7690196f868a6f13a403f0a82fc015ec0061f8004438e2914ed4fef99e b76ef565c1cc811b9a674f761bb28229f7ba59af8e7ed44738ab928a07c00f32 -lib/codeql/rust/elements/LifetimeParam.qll ca52a21220761530fae5bc655147d4450f07576d6cf6c17ae9424a6002b99cfd 88bb222864816b06318575bc7053da8972247657392f9bd65edcd1f7fb40648c +lib/codeql/rust/elements/Lifetime.qll 048b81704723fab0ad9011f2c26a61e4a37b901c9f8372a6a74a04bdd85e273d 1d1e47c37c74ed092aa89ed4d38f49de3ee8bd9677669a33488fadda9ff733d1 +lib/codeql/rust/elements/LifetimeArg.qll 58a3c02b5ae720a48533332fb1808fbcc993cd1dfdb717894ba95a4c1ce3de4d 07da9323f89b92da86efa3f44a0f96c4c9738b3a28a136c4523243be79365396 +lib/codeql/rust/elements/LifetimeParam.qll db9f2c7bb32d49808993b400875e79560ac546736f106983398e32c9fdac51ca 0cb2ceaac7b0459f149fcce5ed708c9445fae7e340ec0e63744987a4fc852ef4 lib/codeql/rust/elements/LiteralExpr.qll 40b67404b7c2b81e5afabc53a2a93e0a503f687bb31a2b4bfa4e07b2d764eb8d 67ab1be2286e769fba7a50ca16748e3c141760ccaefaebae99faa71f523a43d5 lib/codeql/rust/elements/LiteralPat.qll daffb5f380a47543669c8cc92628b0e0de478c3ac82685802c63e8d75a206bed adfe9796598cf6ca4a9170c89ffd871e117f1cea6dd7dd80ecbbb947327a1a5d lib/codeql/rust/elements/Locatable.qll 2855efa4a469b54e0ca85daa89309a8b991cded6f3f10db361010831ba1e11d3 00c3406d14603f90abea11bf074eaf2c0b623a30e29cf6afc3a247cb58b92f0f lib/codeql/rust/elements/LoopExpr.qll 58ade0bc4a01a1cc361363682fde3ea56f4c5fbb4b28f5723ceff52ebaf897d7 fa299162c742bcf3b2211dc20821b312e3c133350c288a050eb26e6f8b5a5c78 -lib/codeql/rust/elements/MacroCall.qll 11302a676f6801ea415d143aa8e55051a45ff40d01780989685b1783e8312a52 b486f1b8282f3fd60e93803437765cb75516f02ce3dcdd7a4ec1278bafee2c05 -lib/codeql/rust/elements/MacroDef.qll a8a2df4bd0b498812844a17bc8397d9996b2075795e532498e79530f652e7f71 995ce0aec88db5b907e55462a29eaad5df5a1a78c339dcddd21ab4b3cdff34f3 -lib/codeql/rust/elements/MacroExpr.qll 3caf5f53f537fe745ff21eca903dc1a8094a8b525f3ab2401a03d8c2f6282d44 a5ddf8e05b3773bd845a3e82c22aa3164aa096ba780260b76d1e9ce30f8c218d -lib/codeql/rust/elements/MacroPat.qll 46535f173a99a4cf576ca9d56f609628bab7d8642e4d43f1f6486dc27e4d8732 8fba3149baf8ebe9412f5e9aff2dfc60ce44021c6fda955c31079e665382a681 -lib/codeql/rust/elements/MacroRules.qll 9b65c2da9615838db92f3a19cdabea55d533c1bc93221449ea0dc002ff2cf9f0 74da2a5699f86333ee48253f4bb1ab03828909b0eff50d57cd9c4ee4b3109d04 -lib/codeql/rust/elements/MacroType.qll 9ea2f5d87ed3b1c629a2351504fb1e4ec9ac45c00e3f8ec14f8214e0410f5978 90096afa3116352244658bd67639fd1d9929ad2a1fb4ae89bdf0e9a531ab54eb +lib/codeql/rust/elements/MacroCall.qll 16933db15c6c0dbb717ef442f751ad8f63c444f36a12f8d56b8a05a3e5f71d1b ac05cbf50e4b06f39f58817cddbeac6f804c2d1e4f60956a960d63d495e7183d +lib/codeql/rust/elements/MacroDef.qll acb39275a1a3257084314a46ad4d8477946130f57e401c70c5949ad6aafc5c5f 6a8a8db12a3ec345fede51ca36e8c6acbdce58c5144388bb94f0706416fa152a +lib/codeql/rust/elements/MacroExpr.qll ea9fed13f610bab1a2c4541c994510e0cb806530b60beef0d0c36b23e3b620f0 ad11a6bbd3a229ad97a16049cc6b0f3c8740f9f75ea61bbf4eebb072db9b12d2 +lib/codeql/rust/elements/MacroPat.qll dbf193b4fb544ac0b5a7dcfc31a6652de7239b6e643ff15b05868b2c142e940c 19b45c0a1eb1198e450c05d564b5d4aa0d6da29e7db84b9521eadf901e20a932 +lib/codeql/rust/elements/MacroRules.qll a94535506798077043b9c1470992ac4310bf67bcce5f722080886d1b3e6d90d1 bd8e08a7171991abc85100b45267631e66d1b332caf1e5882cd17caee5cf18a3 +lib/codeql/rust/elements/MacroType.qll e5a153643e49a6be41483ad944550a030e0500764947b4e328cef6fa08c4fbd4 a42332c0a9c5cf7317fc49f3e1049e7751004fcc3efa056bbe058a8bfa2ef0cb lib/codeql/rust/elements/MatchArm.qll c39fd6cc0da24b1ff8d1e42835bcfee7695ad13580e3c7c50acd7c881b1cd894 62a31d2bd125e6aaebefc406e541a641271d3c497a377959f94dd4735b2bfbf8 -lib/codeql/rust/elements/MatchArmList.qll c1528b48d956a8fcbf70bc9a5c7ddbe13c741c7f59a2938c4a9bff052e0476c2 ed0dad75585cab71d5d4d49790b6c68eee78aa8a9bebefdf3e197bbf6a75452e +lib/codeql/rust/elements/MatchArmList.qll e6c48fd7419d88e996b82eb45e4aa2686dfd079b283b02be7710192fb2cb93a0 0ec63a0ca56f5f7f80093fd3e77b198b74c6289e67be55dc6a4deb610753c7bd lib/codeql/rust/elements/MatchExpr.qll e9ef1664f020823b6f4bb72d906a9dc0c1ee6432d4a9a13f7dbdbab2b2b1ee4d 38d71e5c487abcb5682293c573343be66e499a6e131bb630604c120d34b7777b -lib/codeql/rust/elements/MatchGuard.qll 89bbd82f98e0ea6e7345656f2c8c496c63571651605632a29048c16b95f44251 f82e00902cb0d40ec0a9bee01b376f64d37db9436c3beb54f9d803bb5a6671dc -lib/codeql/rust/elements/Meta.qll c9c3d5d8116e0e5ae56fbab028326f84a85b08f929ff20629ae4fdfbc52dc7f6 f85f763274564c54996561fcc45ff64ee8761c54834e3d5ee2dbcbf1e1fb906a +lib/codeql/rust/elements/MatchGuard.qll 20754ab2009a7d40b50feece496ff7f38650586d79190ed2a372308594693694 471f8f118317efcf112f4ddfd60125ca2a9d9b3b08e6ee331c430961de7885ff +lib/codeql/rust/elements/Meta.qll 9fa3216c86fa55ed5c0c4671708110a6ffc7c0f5d6cda8dda31aaff17f87534d c44ee2754dd71776ffd0a8a7d6c1ae8737c47e998e6bdb8efab5283625807cf4 lib/codeql/rust/elements/MethodCallExpr.qll 0a5cab9f21741f6a38956e6de4f6beb143db5d85ee590f9908dab3da300a6b72 df21eba9cf2823a7b06eb6672dd8249225e7c16d5b6c1c37c1f2a175d9513272 lib/codeql/rust/elements/Missing.qll 70e6ac9790314752849c9888443c98223ccfc93a193998b7ce350b2c6ebe8ea4 e2f0623511acaa76b091f748d417714137a8b94f1f2bdbbd177f1c682c786dad lib/codeql/rust/elements/Module.qll 0bc85019177709256f8078d9de2a36f62f848d476225bff7bba1e35f249875c7 3fbb70e0c417a644dd0cada2c364c6e6876cfa16f37960e219c87e49c966c94e -lib/codeql/rust/elements/Name.qll 02e9014297ceabe390dedbef555328c80b227972395447b11830ee14d6910576 8ada21fc70bf25e22fd826977cdcdee663ddefb951f341c2337490b7e8301efe -lib/codeql/rust/elements/NameRef.qll 6e7df9bf072a847623ad4e29b0d93eb40c81f87e6884a3a71ba1694389cabbd7 d7444a0bd177335c3469bd43fdabb7103372c06f145d29ba4258904f8e0ee1c3 -lib/codeql/rust/elements/NeverType.qll 1bc700f522e9563c1cb651492ae37996217d6d0fb3a8c9aac474e65c0498d7c3 417957c37d93551d291030962add29520b8bf4b7ba806ec0a7d78ed699d4d6c8 +lib/codeql/rust/elements/Name.qll 3d7ed16c232912e30e5a075f5087ad344a8f76dcc27bc8f71a80c133802b89d7 036dc3ba0c20eb0907ef6dcc532214aa5de8e0de0fa819eca1fce0355b3741a3 +lib/codeql/rust/elements/NameRef.qll f11e33cdbefb3efdd8db6cd1eee593948a16ef5dd13e781c167ebd5e35b22e8c acda02258d55a6ecda0bd92eecf1778e0737a46e861a41c7dfd3203acc0eb4e9 +lib/codeql/rust/elements/NeverType.qll 669823dd60bba0cebac614f9dbad9dc9228405d76e62092e265df57fdd2e04e2 8fe32975ef80d86fb8b218f56962f0a89911008a8d6989e245c3e0362f2c747f lib/codeql/rust/elements/OffsetOfExpr.qll 8f6dd1fe0aad1642e58f5e97620306e4b36cdf01324fead1e2a92e8e60951c41 b192f7a5fae3049a6cac3b7a225a0e590f744e6c5ff6346ffdd1699f83bf718f lib/codeql/rust/elements/OrPat.qll 408b71f51edbfc79bf93b86fb058d01fa79caf2ebfeef37b50ae1da886c71b68 4a3f2b00db33fe26ee0859e35261016312cb491e23c46746cdd6d8bb1f6c88ef -lib/codeql/rust/elements/Param.qll 0b7f5ab881456be2ec2649b9ffcdf49d51c68c3c7105158418bce81b9e3b5e47 dcfbb663dedd54028ac353bad0ab9c0f4d248854b55aeab049f014a8f11078b9 -lib/codeql/rust/elements/ParamList.qll e3531c564025ceae12aae5052aa973b9526759b11e3728a486b307957cdcb4b9 e681004ba2cf954d497d1d053a111c065fc1249df7ab8261939139631e63c720 -lib/codeql/rust/elements/ParenExpr.qll 0bbcbde9fdb475fb3283cdface0ef56c63a61af94e75afeace91af2a920b1945 097309cf4630d2ace72e6438d54170d2c555f860d3aabbf3a12d1465dbc7ee4a -lib/codeql/rust/elements/ParenPat.qll a67e472bca21b732081ca8ab3d0b5baa9edb626211f92a4c2cd92d5430b2d4f9 35eb182f9280cfcfff3ea56a5e0d9ab09aa8854cf4c505951d00dbc70de4a045 -lib/codeql/rust/elements/ParenType.qll beaa3b2a2eee3fc65e35bc64170652b4028f729d86a4f71101084b4604cb9509 22d45d5bd3491f6b86f7afe667a635c8dc1c2655e6c3682d38e33247e73ea9ba +lib/codeql/rust/elements/Param.qll 3108a710214977218421b220d1330793173d6b6b91708b641e3d1275f80faedb 4bb2b80d0a9a4d86f980440851d59ca6fffea681e5518f5d605c521191efd7b4 +lib/codeql/rust/elements/ParamList.qll 33a22ba7de565db4009d3f56eecd5ef809c28d9dce9bbac3fb71b528baae4f70 004375e227d87f76f930322ad3eac274f9b691bf58785ae69977fa319f3dba7e +lib/codeql/rust/elements/ParenExpr.qll b635f0e5d300cd9cf3651cfcefd58316c21727295bbfd44b1f5672f9e3de67b6 d81c0034d4ea7ca5829f9b00e0a634ba5b557a6296d99f0b5344b11e1ba705a1 +lib/codeql/rust/elements/ParenPat.qll 40d033de6c85ad042223e0da80479adebab35494396ab652da85d3497e435c5a 8f2febe5d5cefcb076d201ae9607d403b9cfe8169d2f4b71d13868e0af43dc25 +lib/codeql/rust/elements/ParenType.qll e1f5695b143c97b98ccdb460a5cf872461cfc13b83a4f005f26c288dc0afae10 1164f8efae7f255925411bddb33939fab0bf1c07955a16fef173b3f4675d09ae lib/codeql/rust/elements/Pat.qll 56211c5cb4709e7c12a2bfd2da5e413a451672d99e23a8386c08ad0b999fd45c b1b1893a13a75c4f0390f7e2a14ee98a46f067cfdc991a8d43adc82497d20aff lib/codeql/rust/elements/Path.qll 0655adfe84b08c286022a0307511a781bc1bfc943c12bc50600ebffb9d00e4b0 48e55afee9d019b7c62bfb02110c626c570ecbf683258cf23786807966f0b6fc lib/codeql/rust/elements/PathExpr.qll 99aa8af9deb9e276eb262b1fbd1a19f1c816cafac605aedb173ecb245c3c3cbd 306c837388ba60a5a89d2a546453527c62006696e15c043ed04d1ba27345815b lib/codeql/rust/elements/PathPat.qll 6897e69bcb24b56d39ede796cf5767988dcd5741e02333fa8495dd7c814f771a 2a011fb92f17e4b4ff713e6d29f591054dfede22a9aaa006e67fca2c23ab76bf -lib/codeql/rust/elements/PathSegment.qll a2d6105814c489969eec82c4cab714182020260dd5a2a1423123465e880680ef 127b41326b1baddf972a7a55d0ac138d07b78cff69090ab36e6fcbd4e9b03301 -lib/codeql/rust/elements/PathType.qll 111acad0faa584cb0ed55714c5724a203badea644f31c8997682b2c02523fa11 479e3e719d32116016840e518c71df794145162670143782c67ed4a9191cfdae +lib/codeql/rust/elements/PathSegment.qll 536a8fe172db367e5f1dc678a014e2350eadfc379242d2b5451725e826ab1448 1a3a237f56c1d9ccdce6832ec6417fed25cd3e29ba836363cc6085e2125de4c5 +lib/codeql/rust/elements/PathType.qll a7bd3b05dc2c0e96c91c5485db508a1f5bb8fe3a01486be6815ae9dabb163add b11e996b6c0cc21a3d8d1ddc23c37e4d54a78e84a9278b3ceca1e94cb7321532 lib/codeql/rust/elements/PrefixExpr.qll 63975ca70b011ce5fbe67338493f21e7da45e1c6c508c76b122dcdfc557fb72a b3863e8722774edfff4c0cffc2bcc8235055f1ef68cf164bc0fb9316d3a8ed2a -lib/codeql/rust/elements/PtrType.qll 37bd4c591084af79566a83d1c295b83bcb7092e9da1baf66648973c080dc6683 545d88a398ab33096781c75df64f513c16e3c527b2c19466b05f07cb723b0b4f +lib/codeql/rust/elements/PtrType.qll b137f47a53e41b3b30c7d80dbdd6724bf15f99530ca40cc264a04af5f07aa878 b2ffdf739bfb7564d942fe54409834a59511c0b305b6d5b2219a8ee0ef594332 lib/codeql/rust/elements/RangeExpr.qll 43785bea08a6a537010db1138e68ae92eed7e481744188dfb3bad119425ff740 5e81cfbdf4617372a73d662a248a0b380c1f40988a5daefb7f00057cae10d3d4 lib/codeql/rust/elements/RangePat.qll b5c0cfc84b8a767d58593fa7102dcf4be3ff8b02ba2f5360c384fa8af4aac830 cc28399dd99630bfa50c54e641a3833abe6643137d010a0a25749d1d70e8c911 lib/codeql/rust/elements/RecordExpr.qll eb402960c5c6a14d0a0ffebd61a352b59b5d1cc1c2531cacd54754310a812d77 415c93384e63cf38003dde987715554ebf45fc32ba03bc5fd78b8d2501812de1 lib/codeql/rust/elements/RecordExprField.qll edac04146849e2aeca27e7bbb896c21aa2e2b15736b1e8a06ac51ab01433b3ac 7c062bd6d5dd5b1d972450fb0b3272cd9b45f94ccd668c3bd4347e2dce3279ed -lib/codeql/rust/elements/RecordExprFieldList.qll 71f140d9fb765ec07ddad8979f0b90181e3a38ccdcc0526c54ff2f779f22c096 6f9bbdaf67c1bf4cc6452c452903c4f1bb477d95e7db488b70bbf9d35557daa6 -lib/codeql/rust/elements/RecordField.qll 1316edde13918662e8a8ca744e1d33fb91d85eaad6377d479e8e58cc40db7cbd f75d8e40748b69d0e34ae5939d1d8c287bde0840c271fe767a2b6df8f1f0211b -lib/codeql/rust/elements/RecordFieldList.qll f0c404eacf9d84541c1e5927c9cc950bb5737b0140e3dc8faec3958ac36d8494 105280c2dcc2282773c003426dc4d0caab69af6c8a4f0c84d6bf9647175782ec +lib/codeql/rust/elements/RecordExprFieldList.qll 672c3854cb84090c8a2e9311c43448016dc2614ecbf86dbe404156304674e38f 01ae0ffca0bf640c61120e36fcf2c560555f4aabbd49ddce6f5c1a3561dbfc31 +lib/codeql/rust/elements/RecordField.qll 9c462033cc889756876cb3d2a07e4f0d9a67064cf188cdd68e08ab21e5edc459 437254bbf6537f1a575ae344c2e23ffad7138776db8f7ebf90026c13886a2638 +lib/codeql/rust/elements/RecordFieldList.qll cebab3fba41221e61cda801070a7f414b62b4fbcf2206e35462c0da35ad75c3f db092d47eea871d61541b9711d7139a99394e0ed83901a8ae60f03dfa8ed722f lib/codeql/rust/elements/RecordPat.qll a210d700e710107100fedad1098fb789056a0c0b8dbc11de2b242877e692ec20 3efa12d7bfa0da7c09a42b2b43c50ff3985c55676db7f3be2c771765d81f9a10 lib/codeql/rust/elements/RecordPatField.qll 7487461887e82bcf224b02628dfc64457121ab17e731e2dc7aa7e731ab16c02f f2018e55722245eb4273fb067242aaa503c43f91671a55b3a4bb51fe7bc0a03c -lib/codeql/rust/elements/RecordPatFieldList.qll 0ac388e3087c8f8ec74cfb1a7894c67ebbe2e3d6849732e1ccbd54474fbbb6b0 544256e97a8ba62bfa2abfd07d605b8d0f06f9523880d15bb6ac3356493bc310 +lib/codeql/rust/elements/RecordPatFieldList.qll c3198c997f389ce95db377ca40ac69a1448f120093f37ab1c92a5a3f1f6aa0d4 9db36d274f1ec77c442ae7e38f940a65c9a92f1541f66140188b226965851535 lib/codeql/rust/elements/RefExpr.qll 91a0d3a86002289dc01ffbe8daca13e34e92e522fbb508241a9d51faf1d4a9d2 b6e63d8e6f8956d2501706d129a6f5f24b410ea6539839757c76ba950c410582 lib/codeql/rust/elements/RefPat.qll fe076bdccb454111b38f360837d180274ba8a003b4cffe910b5197cd74188089 2604c8bb2b0b47091d5fc4aa276de46fe3561e346bd98f291c3783cef402ba06 -lib/codeql/rust/elements/RefType.qll 91cabfdb6698fb4940065313c7c95a43438d23fdfea3050838b98d589f3d91e0 cd4b6b13242cf0725b46138f2a2425df7e2badecd9c2e23b640d48c520dc64f1 -lib/codeql/rust/elements/Rename.qll 72fa505670ddcbbda8df58654e28804c48c24f37dea5b1370601fe6d0855ee90 9dee2aa1afc38eb8115f5fda5194089792245f5f0bae64be49fbdfdd9d29f912 -lib/codeql/rust/elements/RestPat.qll 0ba0d4a16637e11a21f6a1924ca1852b51bd28dbb76b3bd9f016532b51ba65dc f12c231eca1458e8d2c86e08918e6deeea449ad6d149dd89f744799976e6bb30 -lib/codeql/rust/elements/RetType.qll cb606a93759058672a080b08cf742c1a6223050783da34e8ccd63763d028434a 741e8a4a947426271eab320f9b964bdc15380500697349d49d305eda9418d347 +lib/codeql/rust/elements/RefType.qll 5dc6012188d5baf36cd7bf0ebc127e28e98862a3f91ea4df2f9b9c962f3a395d ddb06ebe7fb92ad7bbe86cf182270e8494b74edf91b8c841aaf7ba932e5092ac +lib/codeql/rust/elements/Rename.qll 55fa06145f2160304caac0a5ce4cf6a496e41adfd66f44b3c0a1d23229ed8ce0 80262f0abf61749cdf0d5701637db359960f5404ad1dbfdd90f5048d2e7c315d +lib/codeql/rust/elements/RestPat.qll a898a2c396f974a52424efbc8168174416ac6ed30f90d57c81646d2c08455794 db635ead3fa236e45bbd9955c714ff0abb1e57e1ce80d99dc5bb13438475adbf +lib/codeql/rust/elements/RetType.qll 36ea39240a56c504d94d5487ea9679563eef3dfe0e23bf42d992d1ab2b883518 2fe5b6f62a634c6aa30a1ecd620f3446c167669cf1285c8ef8dd5e5a6ef5fc71 lib/codeql/rust/elements/ReturnExpr.qll b87187cff55bc33c8c18558c9b88617179183d1341b322c1cab35ba07167bbdb 892f3a9df2187e745c869e67f33c228ee42754bc9e4f8f4c1718472eb8f8c80f -lib/codeql/rust/elements/ReturnTypeSyntax.qll 8ee6a20cc7ba4f01926b889722970976747de47a6766cdd6f350db7fdf9b40e8 f8a855d11b1bb4270917367bcdd64f0ee671ed779ee83ca8223cbc218f09c7b7 -lib/codeql/rust/elements/SelfParam.qll 57715a45985005d0639edb613a7faca28544f6304657147c8da2e9c6de2bc899 18766e2455e976993e3b1ebd3416a433bf0eec50e6df6e5a745c4e7ead87c13a +lib/codeql/rust/elements/ReturnTypeSyntax.qll 0aa9125f5ea8864ecf1e4ff6e85f060f1b11fdd603448816145fea1b290f0232 3911819548ad1cf493199aac2ed15652c8e48b532a1e92153388b062191c1e6e +lib/codeql/rust/elements/SelfParam.qll 5c9629e1cd837f5d84bdd79a1aef9cca6fb0acb1fb18671d4a4d28c23a74551a 41eb92527cf4379a2df54a0c9fabc368cb6f9b8d1ac73bd2ab3f13214573e764 lib/codeql/rust/elements/SlicePat.qll f48f13bb13378cc68f935d5b09175c316f3e81f50ef6a3ac5fdbfbfb473d6fc1 4c8df0b092274f37028e287a949f1a287f7505b7c2c36ee8d5f47fb8365d278a -lib/codeql/rust/elements/SliceType.qll c2925eebc41d0f803e19da384282028c476168ccef7a1cc45f69e2cf57260699 064c51bec431a4e8667cf561e0766469902566767252a6dd61a8719fc22621df -lib/codeql/rust/elements/SourceFile.qll 73573ddd3882bcf42f23c582eddffafc31f30a96366db79b9a095215e40ac12b 10e7a199bf8ceb77b06cdf21526d11856ef09d2c472cc4342299b08d72017a55 -lib/codeql/rust/elements/Static.qll 269c38356b5503a88d3c1366b584bfae998400447043a409eb4fe0e5d2bc73b5 21404ceb9fe49003d0563ed3315091d3dc28fb996928136a9b31b9446fc8b61a +lib/codeql/rust/elements/SliceType.qll 7e49dba57826c7bb72a88f9e802febdb09adfc49804f6205dc88f2a307fd1f30 6c3ee430f812f1d9fbb1fb1fdd2c47130a4bde7fccf17f09404b8cbc8104678a +lib/codeql/rust/elements/SourceFile.qll 5916d550385d618bd3b3d4835fbd3040485822220af8ce52ee1adb649b3d8594 0b79766216649e948fa59de467d64fa752de4666c28e0e503e88740ae27a2aef +lib/codeql/rust/elements/Static.qll 1e25940c774538de9b1aea877e20e34b672d6a3ed3b56a741195995f051c5acd 94f09d08b35decc6990c0cab23354f84aa8ef271ea1a77a233c9fcd6ab14c643 lib/codeql/rust/elements/Stmt.qll 532b12973037301246daf7d8c0177f734202f43d9261c7a4ca6f5080eea8ca64 b838643c4f2b4623d2c816cddad0e68ca3e11f2879ab7beaece46f489ec4b1f3 -lib/codeql/rust/elements/StmtList.qll 93011b77781f85c95109f64d127e8af37bd9c3bae9715fa67a06d1e8afd50eb2 b9ebeb924d0c802475dc70dc0820e59fa9d409bb628d7cdbe598f4367a8d575b -lib/codeql/rust/elements/Struct.qll f91908f8e9215720e669c55c97fea0661240cf2da0218630e559aefff106e112 a760d21937dd233d2a7cfbf7a6c830e2e41d897337c011213fc819b0d8f2b818 -lib/codeql/rust/elements/TokenTree.qll 131b62731515e9bb5bf551aa53b311f436e4d3ca9df01a0db1206d5c3ce0e924 1c0cf19dfd03823716cad8ebd57c8246e6636fa501a48acc811f54e5738bd037 -lib/codeql/rust/elements/Trait.qll 5bbd2afcc25c6f1abf0268d653f1833179b3404491f85106fd169cefad8a5cb0 2572ae760fe70fa72d8c7b937a18c9830b1c664186c914e04b6fa5eeef95ff7a -lib/codeql/rust/elements/TraitAlias.qll 749609802fcfaebd754b093de6970f42ecb39053ca2683d44f7f6e2e20b85792 530b45723b60405578d0ddbdd550096d5de60eaad293393fc4e50078bb92c5fc -lib/codeql/rust/elements/TryExpr.qll 7a3104c8f02badc431dda4776514f6cd12884b2c7ab316eecbe63a687eb9cc5e 1bfb023569081ecbb9362a0ebb6e53901ed8985e95ab8dbd0e8a2458dcbcaedc +lib/codeql/rust/elements/StmtList.qll 6f990782d5a5307d6d8a3256eb510aedfdaf7bd0e45f3dff35388842ab487b8c b412a27dea0c67307ab79104d45c5b4848c3191cc983e8b0d8dfa739a1b65d9c +lib/codeql/rust/elements/Struct.qll 96b7020c7670d5ea7effa6e390d3a163dba05ca5206cfdd1284f4a41e5664c6a 3fea0d13b8da0f210f3ad9004189efc3c56bcc90e67d6ef7817c6767f6aff273 +lib/codeql/rust/elements/TokenTree.qll 68e579812960d855a8a7a370ce55566a0df5adc62b7e6ba19d775fff961ea67b af2520f272e937c898c51693c1157a61caac9c25826918981803b12b5a9cb246 +lib/codeql/rust/elements/Trait.qll 6522741fb9f1fce1fe570c078e8c8a064d3bd4520c95cd5bb2d1eb1bb8a24861 be8dbf5418fd05f2dc9d72379ae6b78cb2469b0c0f8092e176c5937a46788e79 +lib/codeql/rust/elements/TraitAlias.qll cb2af66ca1da20122b800097dbaaa904e5b6e753571fcfd6821e779be273d742 da8666db52609a5d04b847dfcecf753644f813597d58a4aa1a7e2d35ede96ef8 +lib/codeql/rust/elements/TryExpr.qll d2c5eb215f1b46a86b82e7d99fe1dcfb2b4cb42811f331e54cc602b40a10a0eb 8c207264924428e969060f4cb903b37e27f8ff74e45be7d13a2ead44a572b36a lib/codeql/rust/elements/TupleExpr.qll 561486554f0c397bc37c87894c56507771174bfb25f19b3bf258a94f67573e56 d523246820853ff0a7c6b5f9dbe73d42513cadd6d6b76ea7e64147140ac93c15 -lib/codeql/rust/elements/TupleField.qll 93ff5685ace01f11bf737b9a21d4fbb42e71a3b88acc3bae9bd075fbdb18f3c5 1bd5a3009a93b219166ffee911283d9bb7fe807072a33ed37b47d3a7674424cb -lib/codeql/rust/elements/TupleFieldList.qll 608f6f159f0496a908f9e18acd0423df80d4e33dc450a7c207de259cfb50a427 ecb6b3352d23057540e18da7c96e7b5511958b493cec420092661a5bf4683d57 +lib/codeql/rust/elements/TupleField.qll e58d024fc41519b559eef36cf6081d03a786b05357e4322e7046092131ea508f cad861b23fb4cdf2fbe90595de0e4776f1db9b69c3f3825221e475bc92895351 +lib/codeql/rust/elements/TupleFieldList.qll 73397eef1cf8c18286b8f5bb12fbdc9bb75eee3b7bd64d149892952b79e498a3 13ac90f466ab22e5750af9e44aff9605b9e16f8350b4eaecff6a99e83d154e25 lib/codeql/rust/elements/TuplePat.qll 028cdea43868b0fdd2fc4c31ff25b6bbb40813e8aaccf72186051a280db7632e 38c56187971671e6a9dd0c6ccccb2ee4470aa82852110c6b89884496eb4abc64 lib/codeql/rust/elements/TupleStructPat.qll 16a3f10992db62cc6630dc962a2a0d243c41b8aca064d6cb6c82a2f4e6987a12 c2b4c14567ee2dd65e0b643c9d18dfe5098fb3bd4ed45dcc825065bfa7c7c02d -lib/codeql/rust/elements/TupleType.qll faff8c142538cd817689e7609991a583c80f666c62308af40f7a12d4bd24a9b0 0c43bb9f452e2b0649ec8f347521adeec8a399b50783eb6686654b0091c815d9 -lib/codeql/rust/elements/TypeAlias.qll 87d1fdd688278a79239d78358dab0b5e4e3de0c79b33df47b99808709ed661e0 c3543b2d655b9d3adaa06a4c4cbcdb52223fbb5ebe6f5ae17c41ccfdd0173d83 -lib/codeql/rust/elements/TypeArg.qll 6101b94ff56746fafb706c7adaf58fae51ee3cf59e0d8949ac5d14f0a833f081 c6595d8a9e708b6880e71085757d51898c37685ca49253764a12de076b839d68 -lib/codeql/rust/elements/TypeBound.qll 25ae1ac5df3cd5ce15ba1031958ffaffd7c535199383618052ef9415c8273f02 a11a17bff537dcea17cc8fc85d8a1aecc01429971d19e2b3d2e30570cf66936b -lib/codeql/rust/elements/TypeBoundList.qll b16ccaa927ff011c2cfda79d720874b734010cf4b2d73d5903b50a9e594ac618 a00003fada90852454bef3ee13ba38036ce5ce703f3efb3d4a47ae7bda51278c -lib/codeql/rust/elements/TypeParam.qll 1e1850af760f4dca2edee590a28083e82adbc876b37d407d42d19f3f91a9174e d50e77afddaf9192cca674086b496405507d14e272b953332b1c87295eb11c41 +lib/codeql/rust/elements/TupleType.qll b5c798f7c9b08c8a6cc0a57fc5c36d714e70d5e955a9e87b6b309c18365d7596 ebea533ab126392344d080da1bc9efabcabb5397e93c9d213ffc71a61bb8d47c +lib/codeql/rust/elements/TypeAlias.qll 64780697f5869266345d040fdaee05c62b8670b9b5c6369692f9a9dc646986fc afcc7617d0e2e16d92d2a53c3e6661fd184bf5cf21b154f121dbf4d3b7ab30e6 +lib/codeql/rust/elements/TypeArg.qll 39aea9a9f0b74e8b90e957dbc3ce593cbdb1d2e0d9320428ce2e9cbfcb772e53 f1f2612633de9f534faf76c368b6154a8dc20feb9297262fcb10a8f192aa2e02 +lib/codeql/rust/elements/TypeBound.qll 3549a2ded6dbe401a49690c7b7c1d629d55dae2347380ee0e0632d3b64f200e7 e407603af5bc1ba2704a457eaa7fffd8c52cb13b3ccfc9ef477ad120ff8e98a1 +lib/codeql/rust/elements/TypeBoundList.qll a0b95aa95485a0e23b9198ca492ea3fa075fb0dc9fb40ba997aff35d70c51d3b 51de36a56cd2921758260c62cebeb96e703d10b226ca505c874ae54c5a981348 +lib/codeql/rust/elements/TypeParam.qll e06ed282dd55dc68970265706a22499c8ec4ea8c3459d11e20549eeb5504e2b7 479826e69d2a9189f66962b17f55c62df89e297623f38287eb296ec78487a1a6 lib/codeql/rust/elements/TypeRef.qll b180dc4fe85d0eb3032ed3a63aea54ca0b667a6a00f2fa0505fa742bd89d6927 b0210ee96929ca0f335955f76d2a0c06ce32201b8bb45d8424aece786ed6dae5 lib/codeql/rust/elements/UnderscoreExpr.qll 233661b82b87c8cda16d8f2e17965658c3dc6b69efb23cb8eb9c4f50c68521e0 8edff8e80aac2ecf83a6b58f310cab688cbaeea0a0e68a298b644e565960cc74 lib/codeql/rust/elements/Unextracted.qll 12e60c79ef5b94d72b579b19970622e7b73822ebc13fbcfedfe953527ab1ac36 ec015db2eb12c3c82693ddc71d32d9ab9ef7a958e741e2510681bb707ceca23e lib/codeql/rust/elements/Unimplemented.qll bf624d28163e5c99accda16c0c99f938bec4a3b1b920a463e86fc8529ff5ff02 013bc7777298d250338f835cd494b5a8accea2d6a4f9561851f283ac129a446b -lib/codeql/rust/elements/Union.qll f01ce120830eb53e0d88492d92564312bcf04ad436a10fb74e35fbdccd16265f ad51279fc8ca4141b691bd6b8f67f5d44e8df65f94568362930bf517000e85e1 -lib/codeql/rust/elements/Use.qll 2ccbe4d86f0f97a9501fdc4a7011b13c2a3ab8e1dae4f8c1fba3d8268aa8f5e9 4d5a2b54de9cd3b7e78f67006f98a9a8facaf99973be1cb3a41538291568a9b5 -lib/codeql/rust/elements/UseTree.qll 9ec06bb5cee8f13914bb436dfbceef492ebe2d9e418b1d2840053b9f395d6ccf 6c3c44b327999a33354a92eda9f39139eef17caa0d66e2c885200d16f3514ef2 -lib/codeql/rust/elements/UseTreeList.qll 3565bafac972718c7f4e9a4dfdf425b1a8fe287aa388d304554b6fc92041a33b 1a7633793396e8b4f7f6ad938bc884c7042f6de502d8aa5e4a00f82861e92b64 -lib/codeql/rust/elements/Variant.qll dea7dd466b1d13367b95d88b1c620b4d9b93013b650a4f8b9d8822e285a26265 a815cad992799817a2271f3f38f8400a79927b36c345ccddee545f695af1563e -lib/codeql/rust/elements/VariantList.qll 58f71425def05356ace4b0aaf74af3002fb8b95ae750eb559addc68fef0e2ea4 56db2366a1c604ad9e48f337169541a01289d4cfb9a3a7b55fd33af2eef67a08 -lib/codeql/rust/elements/Visibility.qll 787dd6a8eda02e41210210cf5c2282bdfb9bc3349e32532ecace66b8e6baca07 b3600d5ad4c05b10ee64ac767a1b647d653a8e79bd217991da09e93e9753a5b3 -lib/codeql/rust/elements/WhereClause.qll 82436d4fb7f1981b06ab5cd3fa18525278236876c2af5eb5c8ced5bd1ed2fc2e 4ecdab4660648909d890edab0d6f9821ccb50d20c7b92eb7f0a8df112396bd8f -lib/codeql/rust/elements/WherePred.qll 1ea4f0b6023a2048472d767dbb095751fed01037245cbdfaa660c2060876b551 c0374dc5cb3d16c0a3e789044ac5b47635cc84a149f554324e2e628a5a76c795 -lib/codeql/rust/elements/WhileExpr.qll a40ac60e328f4dbd09eba101026ea8d3b33656e97462818c98616896f8e67adc 9864b147fddfb118fb00b6bbfede2fc2563db326b14df28c425e38c239333986 +lib/codeql/rust/elements/Union.qll 92ffb1abc03889b9b71dae9491d4595e443c80b472474644f4e2d80215d4420a 8ad87a33f56583c3ebd19083d8e177da91dcc4dacd5e9140a48f01750c6b1cdb +lib/codeql/rust/elements/Use.qll e27d30ece0456a73732dfd867dfc5abdf48a50de56e7dafcab444b688610af72 7efe59c04dd2f10b4a25b8a17beb51362be0a93d73e5a9e1251cf133cf1227c3 +lib/codeql/rust/elements/UseTree.qll 16b6e42146dc4c2e9d8cc6bc143933d675d1a4c9a56b309f390f4bf5df99b25d 9f8dd7d621dd15f6f1ccec676b08da02773673cbb3a3570781c16167c6e08ef4 +lib/codeql/rust/elements/UseTreeList.qll 768c4ec25e8807bba65619f566b22fa5c0946c36e96c88cfdee04c2875b44554 6433c8d9acd4e346cadd5fef01d79dd35bb6245115bdceb5322c0511106030b0 +lib/codeql/rust/elements/Variant.qll b0770c3ce0a82dcb2e238024b1db4ee2b76271f5a3d94f03bdaee71a25218da1 af242bd8651b653d931bf4cd3c234bdb58c8516eb4576edc03a929232946c38e +lib/codeql/rust/elements/VariantList.qll 07adfe5750b2d5b50c8629f36feba24edd84f75698a80339d4cee20f4e95829d 7d322e60c84ea45f8c8b509226da7ae3c0125bcda42a98a94e3e6a9855cab79e +lib/codeql/rust/elements/Visibility.qll d2cf0727efaf8df6b3808cb4a6b2e26d18e42db766d92e97ad3ef046d91cb9e5 8947a1e2d48b532c6455ddf143fa5b1dff28c40da1f1c6a72769fc9db7ecbaf6 +lib/codeql/rust/elements/WhereClause.qll da51212766700e40713fff968078a0172a4f73eebc5425d8e0d60b03c2fe59fa 0ec036aea729b8f4af0eb8118911dce715e2eb4640ae7b5e40a007a48da03899 +lib/codeql/rust/elements/WherePred.qll 4815cd8f2a536c895e1f6831bef2ee6b9ea42c4fea12df1f164de1c965795bc1 3b46806767d81218d2e21656afe39c957c364ff7067c9af3ae8bacbf7f93858b +lib/codeql/rust/elements/WhileExpr.qll 9c12c26f953163c70020669327bd8c931493ef7fb4b75e6711202c0bab1d2697 2e2c96425bcd4414c65d9069a71a5123a3a10dd1449cafc121ac08f91ea49728 lib/codeql/rust/elements/WildcardPat.qll 4f941afc5f9f8d319719312399a8f787c75a0dbb709ec7cf488f019339635aab a9140a86da752f9126e586ddb9424b23b3fb4841a5420bac48108c38bb218930 lib/codeql/rust/elements/YeetExpr.qll 4172bf70de31cab17639da6eed4a12a7afcefd7aa9182216c3811c822d3d6b17 88223aab1bef696f508e0605615d6b83e1eaef755314e6a651ae977edd3757c3 lib/codeql/rust/elements/YieldExpr.qll de2dc096a077f6c57bba9d1c2b2dcdbecce501333753b866d77c3ffbe06aa516 1f3e8949689c09ed356ff4777394fe39f2ed2b1e6c381fd391790da4f5d5c76a lib/codeql/rust/elements/internal/AbiConstructor.qll 4484538db49d7c1d31c139f0f21879fceb48d00416e24499a1d4b1337b4141ac 460818e397f2a1a8f2e5466d9551698b0e569d4640fcb87de6c4268a519b3da1 -lib/codeql/rust/elements/internal/AbiImpl.qll 9dc7a7fcfc6ded40f8bf9a1e242eaba1cac5f223bfd306d422604f0485a2df5b 9e4316b613d11f34a15f1d662d6574cc71eece4692a60d92201e636a9ec97f18 +lib/codeql/rust/elements/internal/AbiImpl.qll 01439712ecadc9dc8da6f74d2e19cee13c77f8e1e25699055da675b2c88cb02d dcc9395ef8abd1af3805f3e7fcbc2d7ce30affbce654b6f5e559924768db403c lib/codeql/rust/elements/internal/ArgListConstructor.qll a73685c8792ae23a2d628e7357658efb3f6e34006ff6e9661863ef116ec0b015 0bee572a046e8dfc031b1216d729843991519d94ae66280f5e795d20aea07a22 -lib/codeql/rust/elements/internal/ArgListImpl.qll 604b71b8fe35ebdefeff01aea16103e27f2ec62d6a477dfd2891522155d70db2 7b4e7189a16a2b4689c6958dc00eac25fbd15a43ca6bed6fb90e4f71829fa361 +lib/codeql/rust/elements/internal/ArgListImpl.qll 19664651c06b46530f0ae5745ccb3233afc97b9152e053761d641de6e9c62d38 40af167e571f5c255f264b3be7cc7f5ff42ec109661ca03dcee94e92f8facfc6 lib/codeql/rust/elements/internal/ArrayExprConstructor.qll f4ac4efefe5fe4fe1e666f35b1ee92d2243d977b3f3308151c89f61582203c09 4167ae58ec869f7dbd8467093c4a53afd7c1efcf1cc865efa62b4eb484bd7ff8 lib/codeql/rust/elements/internal/ArrayExprImpl.qll 205db9816ec56409db1a0c3987e3a64b8e88b9942055d4bcf84a5fd5943efded 094c954c2861fa7dea69247c9c16ddc6c8699dcd3201a993c72229450bed1490 lib/codeql/rust/elements/internal/ArrayTypeConstructor.qll 9e92e6c40df992b4d71ae0e80392e81499604c7586a671b89d31d2d98060380e 76a1915a88f50ffa60bf129237bae2d66cf26d2a9018aca8ccb343929e847531 -lib/codeql/rust/elements/internal/ArrayTypeImpl.qll aca3bd1b98bc924eaf145c48e5134cc2867ff2a5aa480fd8d98df6c3bca69847 199681b92757ef1302ce941649661f1a53d8afb98b68d54cb9d724692a289f6e +lib/codeql/rust/elements/internal/ArrayTypeImpl.qll e22d4f4eb21ba1ea44dd53e0c80aa60ec3a42818c1fc2d512c92dc496a6e2cb3 1b4a7347dbb9310ace1e9e3d08c3ba53c1dc441539cebcb4a78f64a58097bc0a lib/codeql/rust/elements/internal/AsmExprConstructor.qll 36c68023b58beec30af9f05d9d902a4c49faa0206b5528d6aad494a91da07941 4d91b7d30def03e634b92c0d7b99b47c3aadd75f4499f425b80355bc775ea5b6 lib/codeql/rust/elements/internal/AsmExprImpl.qll c34419c96378e2ae2ebb17d16f9efb4c97d3558919c252be9203aee223ac30a2 1d99c8fa35fabf931e564383c06c95fb39201fd588b759d28aef2fda7ed2c247 -lib/codeql/rust/elements/internal/AssocItemImpl.qll 77463fc2a0675063d79169d5e8f7cfc17d978067248dbfe8307a2d7891aa1122 ccb5c62f76a556fbd0c851e325109de19e007ab841cf88911c2d7049680c3cd1 +lib/codeql/rust/elements/internal/AssocItemImpl.qll f462dacb8e60db8d8ffae44307c990370210c57b66721fd072c34b5ae76d3cc9 7fdb8faff0f310c1cb2bdd52f18368c8d78873467800c41ab3d1989f3196d845 lib/codeql/rust/elements/internal/AssocItemListConstructor.qll 1977164a68d52707ddee2f16e4d5a3de07280864510648750016010baec61637 bb750f1a016b42a32583b423655279e967be5def66f6b68c5018ec1e022e25e1 -lib/codeql/rust/elements/internal/AssocItemListImpl.qll 426d360e1fe939b411fe458ceb7d78171957a747c4227a126bdfcdc56825e666 99f76d71da72133f9ff154c7c71cbff02d566437cbe8ccbae964fa91c02e8cdc +lib/codeql/rust/elements/internal/AssocItemListImpl.qll 0b07ae91f9ec7bc72f6d25dfdef3e64a43bcbda90b98b13cb90020d311c31b3d 1600194504ecc29ae10029fc5347bd76a40fa0d61dc6edccc6e66bbbba1b8fbe lib/codeql/rust/elements/internal/AssocTypeArgConstructor.qll 58b4ac5a532e55d71f77a5af8eadaf7ba53a8715c398f48285dac1db3a6c87a3 f0d889f32d9ea7bd633b495df014e39af24454608253200c05721022948bd856 -lib/codeql/rust/elements/internal/AssocTypeArgImpl.qll 385fa23ee3378935b17bffd82a626cf8023af8941d55e06bbc3f52120608a5e0 9804b7a395a6672c30438044de7b7ec8766e26616b427968dc1868d9dc80fdb5 +lib/codeql/rust/elements/internal/AssocTypeArgImpl.qll 429f12a1a53c81634fc35331bb31cbab0321e5343d3d1170c77a59385cad0213 e6139425973e78b0ea932446165a643e2836cd4706ec9375e08652ccb6a8de68 lib/codeql/rust/elements/internal/AstNodeImpl.qll 76446505990a4018cad1e70b1e8f3b819a18fa77b3411789fa8853dc9d439580 234e2a6a20abbf146807f7136dcb44ffeab5ca891b192a816a36222562805e66 lib/codeql/rust/elements/internal/AttrConstructor.qll de1dd30692635810277430291ba3889a456344dbd25938d9f8289ab22506d5cd 57b62b2b07dee4a9daeed241e0b4514ba36fd5ec0abb089869a4d5b2c79d6e72 -lib/codeql/rust/elements/internal/AttrImpl.qll 1232481cd7cad3be3018e8083ebd82adabdf89df187613a648ca1a6020fb8af9 1b1eb8115b9fd9a449686e7ddbabefed3b9b14f15677c651a52efbf13f385db1 +lib/codeql/rust/elements/internal/AttrImpl.qll 486d307f74a48e6475fe014b07d5e0e13bbdf493ea80823e77e39747edf470d7 0847aa78d0e075aedbe46c10935969046bde4a7ab842da9d184739eb99a777c2 lib/codeql/rust/elements/internal/AwaitExprConstructor.qll 44ff1653e73d5b9f6885c0a200b45175bb8f2ceb8942c0816520976c74f1fc77 11e6f4a1e1462a59e2652925c8bd6663e0346c311c0b60ebe80daa3b55b268b0 lib/codeql/rust/elements/internal/AwaitExprImpl.qll 97eb9abc0f30ead9385f31c87b461e6f1bbfbeaac17810838bb94543bfca181f 66357ffc8c106aae565524d7110e9f50f2b3f573b1508c1d1b02db02af4cc52e lib/codeql/rust/elements/internal/BecomeExprConstructor.qll ba073aaa256cb8827a0307c3128d50f62b11aac0b1f324e48c95f30351a9b942 3a787ded505c3158fa4f4923f66e8ecdcb7b5f86f27f64c5412dc32dca031f18 @@ -188,82 +188,82 @@ lib/codeql/rust/elements/internal/CallExprImpl.qll 7e48610680ba6f2876a1a005ab074 lib/codeql/rust/elements/internal/CastExprConstructor.qll f3d6e10c4731f38a384675aeab3fba47d17b9e15648293787092bb3247ed808d d738a7751dbadb70aa1dcffcf8af7fa61d4cf8029798369a7e8620013afff4ed lib/codeql/rust/elements/internal/CastExprImpl.qll 3c57b75f01efc70013ba3f05bd79fe2747fe1d1de47b84ff73b06ad38b4f1093 da813adc3390d23ec0643e37226a58e8afdb78e889380ad265d7531a344b841c lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll 6e376ab9d40308e95bcdaf1cc892472c92099d477720192cd382d2c4e0d9c8a1 60a0efe50203ad5bb97bdfc06d602182edcc48ac9670f2d27a9675bd9fd8e19f -lib/codeql/rust/elements/internal/ClosureBinderImpl.qll 86de0c037bde046caee2d98f77778b12891a03963da78799d6978e4edb525e96 c4d31fc1d925d8a90c107a68eacb676dee1f5a4fa8aef8d232832e661fc92305 +lib/codeql/rust/elements/internal/ClosureBinderImpl.qll 58c6b17d34d678802ce3484f556482f3f6e3c3ff9a4be0e845bc2077818ab6fb 467261e12cba46f324364f5366bdb0034bf3c922b08307d39441ea5181e3f5f8 lib/codeql/rust/elements/internal/ClosureExprConstructor.qll a348229d2b25c7ebd43b58461830b7915e92d31ae83436ec831e0c4873f6218a 70a1d2ac33db3ac4da5826b0e8628f2f29a8f9cdfd8e4fd0e488d90ce0031a38 lib/codeql/rust/elements/internal/ClosureExprImpl.qll 5ae3d211273b3effc3bff9f06bcef480f8264084e0509e69b8ff29bc29f47b05 ff562bc8d15ecb76ada3111c7c74dd990a0e80f41a32477f5f2f7db9e8f71102 lib/codeql/rust/elements/internal/ConstArgConstructor.qll f63021dc1ca2276786da3a981d06c18d7a360b5e75c08bca5d1afece4f7c4a83 487a870cbf5ed6554d671a8e159edd9261d853eba2d28ce2bd459759f47f11f2 -lib/codeql/rust/elements/internal/ConstArgImpl.qll 55ced0d4099d123deb9dbe88d57bb548d74c329c5d6488ff37d0b77c20b14b12 e99494d09a0007db0b9814a3ee3b77912e0d90f87f7c5476c2eec50ca87041c2 +lib/codeql/rust/elements/internal/ConstArgImpl.qll 234fe6533c208a1731cdb423aa3a28909bd7e042dbc28bbedfd4f62e42b6f21e c576a49006f7a10483041fc07f2f0d089710ac61840be61a2e71140db709f9c6 lib/codeql/rust/elements/internal/ConstBlockPatConstructor.qll ddb4a0045635d477e87360ecafec0ba90ddcffc6e62996eb6e7edd5a5d65b860 442061d0497a615b3f008b990f5e3c4f045110f76500eff81a7f44ffd1319acf lib/codeql/rust/elements/internal/ConstBlockPatImpl.qll 2082a3244c21e03b6dadfba9b3f97a00981324e10d1465d3a51cf3c921eb89e4 889e347834d8c6e90dfef9714af073b3b2193f6830f1c8356cee9c6573b3ecb4 lib/codeql/rust/elements/internal/ConstConstructor.qll 72a31fd9b8b3fd910e35af1b2b30fa54cc4d9e14e7eabdb94b4cd2af95b2df38 3edc0a82a7b446fdfd3e71947801f3c7cac010b2a217b8accb69980387bdd67a -lib/codeql/rust/elements/internal/ConstImpl.qll 850f68856be529df21c98c2d2bd8aae20f165dce0e8549ddf4fefaf974f64e64 86e513d4be1e2688e52f20ef79340228ceeaaa42adedf429bf1a13e45454c69b +lib/codeql/rust/elements/internal/ConstImpl.qll 7aac2b441a41f21b7d788e3eb042554f49969f67bcaae34531c6767c37996caf d6b2bf107696dcb1838131a40043f0787eb683e0d9beecd0b7bcdcd8d876734d lib/codeql/rust/elements/internal/ConstParamConstructor.qll f6645f952aac87c7e00e5e9661275312a1df47172088b4de6b5a253d5c4ed048 eda737470a7b89cf6a02715c9147d074041d6d00fd50d5b2d70266add6e4b571 -lib/codeql/rust/elements/internal/ConstParamImpl.qll 9bc4a79a98b990dada2d281a00ab6b76ac203c256116414e423e2d2184bba6d0 e7319f3b552ba903092a9e46d3c9d621b916d13a7364ef2a32cc6ce2cf63bb0d +lib/codeql/rust/elements/internal/ConstParamImpl.qll 909d85d857dfb973cd8e148744d3a88506d113d193d35ab0243be745d004ad45 c9e18170c5b4e4d5fca9f175bb139a248055b608ceafdd90c7182d06d67c3cba lib/codeql/rust/elements/internal/ContinueExprConstructor.qll cd93f1b35ccdb031d7e8deba92f6a76187f6009c454f3ea07e89ba459de57ca6 6f658e7d580c4c9068b01d6dd6f72888b8800860668a6653f8c3b27dc9996935 lib/codeql/rust/elements/internal/ContinueExprImpl.qll 976890d17681315d2297b600a58c655ccc7c4db44cf587d7b5c359303f309acf 1ecae04df07ee20dcea4f00a9af33c108a0e15ed2ccf8b936804ad88ed66f883 lib/codeql/rust/elements/internal/DynTraitTypeConstructor.qll 2bfd81fdf116b76f4a62b47bed5f0a730c04ce79747ecd1d3b683b8de22ff4aa 375c57350c432351396b92f28fded1e95a8002e3a1b31f3b66039f9b3d9bdea9 -lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll c8cd31bcd5ef0cb6212fa87d1e03d44fbb97721d8a94583cbf0265b7e8918be3 74f55ff9a8d97f1218f62ad1a636ae7605b5643e3f69f3c58a429873f4b37f2e +lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll 8ccf27db0b898f518874ae094e5c97206384ad2fd3f82f81a5ecaad953278f71 e28ab56b8814a804e23afa790ca0f9a2665195b0b316d6cc52936e76ce5c0011 lib/codeql/rust/elements/internal/EnumConstructor.qll eca1a13937faacb1db50e4cf69d175f992f2204a5aaed9144bb6f3cb63814ac5 1bafba78b2729fdb052a25a1ba3f4f70871564aa4df632b4a1d467858a437924 -lib/codeql/rust/elements/internal/EnumImpl.qll 9f5292cd1be251a2833a11be902b664a45a4b798c0d1c164058ff0753e17763f cf24a430ea5e8a197a6c084a7d938d4d1513df5fe22272f1d25a7e4ffd94473a +lib/codeql/rust/elements/internal/EnumImpl.qll c4dfa97b0c656957390417ab09c81b29b67fbff1b7b14976d65625ebea6b2c11 940303d4d4cec130f1981d309f8eaea6803c14a41174bbe9a87dd12ce4975945 lib/codeql/rust/elements/internal/ExprImpl.qll ab20ee174e2e786f34af6e5dedf3ec071bb89fc266b3e91df6377f72aa38d3f2 f68192700f449bf1c229cfbaabd5353c7c559941c915d5a0c88752cf9844194b lib/codeql/rust/elements/internal/ExprStmtConstructor.qll dd6bb06a7d48c12f630aafd611621cc50ce0f3e7d9abba5484a695f90879264b dc8b6ec8acc314e041ae71868803630c5d4cab488c72c1ea929bb756e1847c52 lib/codeql/rust/elements/internal/ExprStmtImpl.qll b6791b2152812597f2147d7bab1835e6e96ccb6eb2dacb124aaf4a53dee54d83 bae6bfd615ee551c926df3654b9d235bf3428abe1ab479e5b08da6c8188a9075 lib/codeql/rust/elements/internal/ExternBlockConstructor.qll 884bafd1cb5a6ce9f54a7a6b9ba1c8814f38e3baf69a2ff8cfc8b02163204b9d ee26e070fcbfd730bbfaf0502d5ed54110c25f84e7b65948c8638a314b67ea5d -lib/codeql/rust/elements/internal/ExternBlockImpl.qll 6a75af33b235efc8fde1b40afc187fb8d731d738f3a654160ca88b4f35840a6c 153f5cc8ee93566919686afd17dd372bd4c968189f62c41d0291cb4810654d8c +lib/codeql/rust/elements/internal/ExternBlockImpl.qll 6c7e89b5e9113d014b6835e86c4653d4b34e05d565ab0264c0593aac463389a4 f0f06a8657bac7e5e5e8edaf0dfe83a6c3e323aed2e112e3df6f882306732c5f lib/codeql/rust/elements/internal/ExternCrateConstructor.qll edd4d69ca7e36bd8389a96eac4ce04d9dd3857b0470b9f24319312469b0f8654 c80f4968e675f4b29e92a2fd8783f800823cc855ad193fee64869d5ba244d949 -lib/codeql/rust/elements/internal/ExternCrateImpl.qll 8d5bdabc0550d48a12d937dd78ea3c393a72d236a8a736122dbfe7d98f760ea0 3258e2ac6f7fdd4b3643387566abc67836a1f4fda03c994ba47f254a085ebfbb -lib/codeql/rust/elements/internal/ExternItemImpl.qll c83d31fb59f7692338f4988f258c9404201543baf04a015f276f5b1523942108 535786da1d57aa375913f13926ec2a28b26aaec00ccd2a0dee5fb107b0af5cc5 +lib/codeql/rust/elements/internal/ExternCrateImpl.qll ade4df9d3f87daf6534b8e79ffb43317e01ea5bd634ed54996f3ebe3c6aea667 68c2bff3c92dbb522e76089d7ad8bd61c54fcd094f3966fe867b0a3d46330375 +lib/codeql/rust/elements/internal/ExternItemImpl.qll 577c8ac387c47746e3b45f943374c7ab641e8ad119e8591c31f219a5f08d3a29 bba88b974d1c03c78e0caf3d8f4118426d2aa8bd6ffd6f59a3da8ff1524a173f lib/codeql/rust/elements/internal/ExternItemListConstructor.qll 9e4f6a036707c848c0553119272fd2b11c1740dd9910a626a9a0cf68a55b249b efde86b18bd419154fb5b6d28790a14ea989b317d84b5c1ddbdfb29c6924fd86 -lib/codeql/rust/elements/internal/ExternItemListImpl.qll 97f43aa548ce8c1da9b0b60509f8ed2ea5b99194b541460dc836351a62917db2 21865267852bfeff98ff439816f0cbd0711c974606a132d128648e477bffb98d +lib/codeql/rust/elements/internal/ExternItemListImpl.qll e89d0cf938f6e137ba1ce7907a923b1ab2be7be2fdd642c3b7a722f11b9199f8 85906d3ce89e5abc301cc96ea5104d53e90af3f5f22f8d54ec437687096e39d8 lib/codeql/rust/elements/internal/FieldExprConstructor.qll b3be2c4ccaf2c8a1283f3d5349d7f4f49f87b35e310ef33491023c5ab6f3abc5 645d0d4073b032f6b7284fc36a10a6ec85596fb95c68f30c09504f2c5a6f789f lib/codeql/rust/elements/internal/FieldExprImpl.qll bae3828bdee6fa3b36219e831cecc2a09fd3c40c4a945f8a19fb5d8765c6f302 be4b89e39013a380bc172ac46e496f14ebdebb1d93e1b7ffb3bab98e08db3f6f -lib/codeql/rust/elements/internal/FieldListImpl.qll 421c9939413f0ac258d0b02eadce508bb0af85e3ab23d7807d948dc17855df74 2d337c3daf02987f5f4daf519eda42371b04646a79a60d9ff520107fc79c9afa +lib/codeql/rust/elements/internal/FieldListImpl.qll 02a09d1d146030c68cead4614f4eef75854f19e55ed1eda60b34c4858a8d4a88 9b9f5e77546434c771d2f785119577ec46569a18473daa4169fb84a097369493 lib/codeql/rust/elements/internal/FnPtrTypeConstructor.qll 494c53ee599039c02145f91394d8dfe7635b32d03f9fcde5efcc99ced437fec8 992462b1b6b9e64b6201f3c6c232ca524f126efcb562c9f0c176677bb559f33c -lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll c84bbcf6dd357437f581e757ea38c1b51597d930af3158cdb433b93fcb8f82a9 9fd9f8caedeb34a1a0653105dd19f1b9f2e680a6a4d39a87e529386b6dfb1dfe +lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll 5d70f71e08341dfa851fc53a47cf362786b57f44244a636e2fbbad3d1c41371e 51d6a1b1132204129bb8ee9d2b72c6d13ce4b3ec8b185d3732d2e64d3f80e807 lib/codeql/rust/elements/internal/ForExprConstructor.qll d79b88dac19256300b758ba0f37ce3f07e9f848d6ae0c1fdb87bd348e760aa3e 62123b11858293429aa609ea77d2f45cb8c8eebae80a1d81da6f3ad7d1dbc19b -lib/codeql/rust/elements/internal/ForExprImpl.qll 22d3691767e39078c55fc9b04e03efbda396d3b7a3546e5d12bfeb3e3ddae596 67c9985110b33c1fc0f60a374c22074fc6504d64fe9f08e1f31ed8fdfff4496c +lib/codeql/rust/elements/internal/ForExprImpl.qll 88fc37b7030d3bfca6071f275c4eac6760ad7dea9a01135cee2079170efeb9d5 cd7216c460f8382498dfb0d61d65d83a9aa608b6a9b6657ccd552b82b55ffc5a lib/codeql/rust/elements/internal/ForTypeConstructor.qll 32c40b78aded314b5f51af904bfbd5ae4f1f0ea65854dd6249983cc26b8601bc 729069d58fac648a4b212b0068fb6bca348443b502c38978f171a7539b24333f -lib/codeql/rust/elements/internal/ForTypeImpl.qll faea4adbf9f0ed112ee31a6fcc0863e798faa6cc360f7a155351de7404640ff2 9d392417fd89df25fe0b409297cc62216e8925fa0eddbca4d52d89da2d27a8e0 +lib/codeql/rust/elements/internal/ForTypeImpl.qll b515639844778d0fbe51e6161a2ec19201b0ba15156a91cdfecc93523081fd61 ab0c09ee415e55db6abcc07493a5d880c5ae0974f0cb760194e40b68a961676b lib/codeql/rust/elements/internal/FormatArgsArgConstructor.qll 8bd9b4e035ef8adeb3ac510dd68043934c0140facb933be1f240096d01cdfa11 74e9d3bbd8882ae59a7e88935d468e0a90a6529a4e2af6a3d83e93944470f0ee -lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll b45f1f41331db8f64c6ad8c5146fd205b6dee4e893c30f209bad915d0210a4ee 2cf2cdd07298e40ff2559565a06ef14b8cba7d5c3bc5bcaa543edc35ce084e3b +lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll 601f7715e9a65bcfa7cea1979fa30d694b5bea29650d799d7dd3080b8eea58e9 ecb0800cdb8c0f93277982dad295ac6a5332e42eff4fb5c8ff19f903b9857003 lib/codeql/rust/elements/internal/FormatArgsExprConstructor.qll ce29ff5a839b885b1ab7a02d6a381ae474ab1be3e6ee7dcfd7595bdf28e4b558 63bf957426871905a51ea319662a59e38104c197a1024360aca364dc145b11e8 -lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll 8149089bb0768cdd610e3ef1d82a9f091256e2b02bd0e7235de7d4b1c6dc3564 feeda8df1258b547c8555e18dcef4370cdc82554c9661c204817a2171dde4377 +lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll bdb992ebc6be59311b486f40325b39f52a69921cfc66a731085cb184da00050f 6336e7770f9cb700f1b3914fd940c3423ab4e971b34ed8fcc79da80c1f1cdba3 lib/codeql/rust/elements/internal/FunctionConstructor.qll b50aea579938d03745dfbd8b5fa8498f7f83b967369f63d6875510e09ab7f5d2 19cca32aeaecaf9debc27329e8c39ecec69464bb1d89d7b09908a1d73a8d92a2 -lib/codeql/rust/elements/internal/GenericArgImpl.qll ae15f5c58d34903bca90d1fef153c2f74c9f1810651a9dfe20eae58a3d1e44fe dff3231fb1a2693de2e051224bcc60b8a6dc82a3a827129b7f48e42fa0ae19a8 +lib/codeql/rust/elements/internal/GenericArgImpl.qll 6b1b804c357425c223f926e560a688e81506f5a35b95485cecf704e88cc009ee cc1ccf6a23dadc397e82664f3911d4b385d4c8ca80b1ee16d5275d9c936148dd lib/codeql/rust/elements/internal/GenericArgListConstructor.qll 46859bb3eb09d77987a18642d65ba2e13471a4dc9c0a83a192fddc82e37c335c 2c7d54c876269a88d3461b05745e73b06532b1616cae9b614ac94b28735d8fc4 lib/codeql/rust/elements/internal/GenericArgListImpl.qll 1a39ba7080147abccaaba451852c9c124fb6177f2ebd64e38ee74014444a34e1 80df3150c961936037ac02b46ef5f775c3f82e66490afbca00a016cb9eee798a -lib/codeql/rust/elements/internal/GenericParamImpl.qll ac0a1524ab2a190af5cb6940a97d9f4d3b234e0e055d2efc54da3192b772c215 0c8727ac009069d7e192f6068b69abca51fb276629bf9bbfdaf534e7f406e959 +lib/codeql/rust/elements/internal/GenericParamImpl.qll f435f80d7f275803c1311d362467f4a367deb5a2c0245b17a9e12468a2c3ce2f 8e8fcc29f510efa03ce194ad3a1e2ae3fbd7f8e04ab5a4a2d1db03e95f388446 lib/codeql/rust/elements/internal/GenericParamListConstructor.qll 7221146d1724e0add3a8e70e0e46670142589eb7143425e1871ac4358a8c8bdb 2fbb7576444d6b2da6164245e2660d592d276ae2c1ca9f2bda5656b1c5c0a73a -lib/codeql/rust/elements/internal/GenericParamListImpl.qll 39666ec454d49c64a326e822f4bea9c75e4758e9f3069295d1d08af9ad0a0db4 eb40f0901ba35d460388669dca564b441714b3d662a0af1d3048336f74cb5bc5 +lib/codeql/rust/elements/internal/GenericParamListImpl.qll 524aa0949df6d4d2cb9bee6226650f63a6f181d7644933fa265673b281074885 27b0210e5eaa2040bc8a093e35e1394befb6994b25369544738d0447ef269a9c lib/codeql/rust/elements/internal/IdentPatConstructor.qll 09792f5a070996b65f095dc6b1b9e0fb096a56648eed26c0643c59f82377cab0 0bb1a9fcdc62b5197aef3dd6e0ea4d679dde10d5be54b57b5209727ba66e078b lib/codeql/rust/elements/internal/IdentPatImpl.qll 10b2758419b48d34013d0e1ea55006a72ea351e5298c9cde4d988f510d4094eb 63bdb210d7bcab42888b4f44688966a33951061573b0a9a734b5b262cbfa2cd8 lib/codeql/rust/elements/internal/IfExprConstructor.qll 03088b54c8fa623f93a5b5a7eb896f680e8b0e9025488157a02c48aaebc6ad56 906f916c3690d0721a31dd31b302dcdcec4233bb507683007d82cf10793a648f lib/codeql/rust/elements/internal/IfExprImpl.qll 3f1496ad8622e83aeffc9269e8f3d1dfd5da1672e98bcd98cd2e67ead659fee3 9cd037ff01af557be51f792e36d5f1b62c838f0f988c8bfba38124f430416345 lib/codeql/rust/elements/internal/ImplConstructor.qll 24edccca59f70d812d1458b412a45310ddc096d095332f6e3258903c54c1bb44 7eb673b3ab33a0873ee5ce189105425066b376821cce0fc9eb8ace22995f0bc7 -lib/codeql/rust/elements/internal/ImplImpl.qll bd01d2d678a7a1a3c0ba99741374b243774f8dc7b113f2886c022efb915a48d6 0190b27f870cbdc35bb207ee7d048d3b15aed67d8c24989d94d05fe84358c391 +lib/codeql/rust/elements/internal/ImplImpl.qll 33a57be871fe3ab08467a65f2e2e9fb7df9f096c98e9f86d8a755eaf6da6e446 f01d0e9bfccf3926ae9720d3d660ba97e1c094f318bfb252449b2d387176f6a9 lib/codeql/rust/elements/internal/ImplTraitTypeConstructor.qll b47501280b026a4e9c21ace21d9ae59f4d126a3a1e03a6088ca38cd676cc4f6d 3b0b325ab0139b290a81355559227050ba3096a58f9ff01c4c0f5c5fb5beb6ee -lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll dfeee70f08cd0a1e22a120eebf4dfd3603f0129803f67fd552c067d82a622199 edab585496996f3d6280d9935f4d01ced37e40200438276839d68e840bd2c6ea +lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll 9826a676525c98c30019f62f3c5943b4f62f278ed738dcc023d15f82f36a9d32 da369a61b95685c29fce3c07082d2a58ab633d526d094fa9eaefa82f564609f6 lib/codeql/rust/elements/internal/IndexExprConstructor.qll 99bdc3d793c4dbd993860da60abe2b7c604345d645e86916462bc55a6939a5d1 3fe9d7da725956903707806aadbecac8d5b3874e8bed63c9bab54fff630e75dd lib/codeql/rust/elements/internal/IndexExprImpl.qll 7914bace26dadf2c1752b65afad2ed226165507e20f3dba7949696103f3d586e 708a9f7eff1cbfcf93841ee009dc01354f4ea3d2e1e00608924e670070410e20 lib/codeql/rust/elements/internal/InferTypeConstructor.qll fb8f2aec6cd1e681cd84a7bd574459e19b9b2a152009290e2eac550f012a06b7 e2b1694f00a4e6a82b13d08d7bb95c98a73792370c1155263d696e60d39b2c3b -lib/codeql/rust/elements/internal/InferTypeImpl.qll 0fe181340f580066fbd6781e9ab5cb6f43715da1f0bc804d54e485f80a0f43be 0867c58fb59ce9f1179f2612c205629eeba564236a90e2a8b2a6cc85cac5b369 -lib/codeql/rust/elements/internal/ItemImpl.qll a9e02ddc6763e01e738d8b9c9d7782b8a303bd26fd7a4518260c9bbfd4584e18 02c94d8abbcff3160fb05fdf709cc3116db71fe11cd77e1025835404e4f20724 +lib/codeql/rust/elements/internal/InferTypeImpl.qll 9d0bf471a7e0c2671aae52cebadc763ed13e6a62451bf22da3061d7781d8f0bf 4e9e218862e48700523d882eb64d24135289216653cf92195f74eb8a35f50d7c +lib/codeql/rust/elements/internal/ItemImpl.qll 3eaa97dcbdb8870acaebc1e11a37a5cfdfa200751461e54d3a52ca48b90ba9bd 41fbd1110b0e24f4d5a3deee0a51c02d206178111a361a1e94501ca1ab70d7f7 lib/codeql/rust/elements/internal/ItemListConstructor.qll 08af3bd12536941c3dd4a43c81cc861be24325e242e2593c087a3ce632674291 2fa166159c409d2aaffa73a30babb40829a6de580bd40894d909ee6152801082 -lib/codeql/rust/elements/internal/ItemListImpl.qll 95f83c6d0594fc2c23278103d651d18e42f465eb8c4a858c1dd41717c01828c3 c55a84d9ba98de6c9852bde10c283ed05c2ed8b8650fe8f42c2104adfbb9afd7 +lib/codeql/rust/elements/internal/ItemListImpl.qll fb27417bb3ee17a739ae966dd7c6f382bc2a1de3e7efdfe1586d76a257c0b573 dee7ded650df8ef46b2ac9d472718536fd76dffee86bc208b5a6144060221886 lib/codeql/rust/elements/internal/LabelConstructor.qll 1f814c94251e664bfa1b1a606aef995382e40e78d4f953350ec951ee0bc8bd34 3157fb8c7c6bd365a739f217ad73ba1e0b65ccd59b922e5ab034e3449915b36c lib/codeql/rust/elements/internal/LabelImpl.qll e1934c3f01e6c9a2517001285bc8e36166757a50ff63be09f9000171c04130f7 4f93e722af890b5241bf55674b29ac5cb134cfefb47eba983503dbd4212abb20 lib/codeql/rust/elements/internal/LetElseConstructor.qll b2b5d68e5701379a0870aa6278078e09f06aa18ddd14045fc6ae62e90827ece7 7359e70bea8a78bcaf6e6ecc8cc37c5135ae31415b74645594456cc8daa82118 -lib/codeql/rust/elements/internal/LetElseImpl.qll 5cc447b2adc97b2f01e182ca80973cda141ed7075a528b22d81b0227bd3f3505 ac19fe01a7df5bc381b92a7ab9567317351a27c22f96fea267dc4738d0a992c1 +lib/codeql/rust/elements/internal/LetElseImpl.qll 1c801275993b809e80a847736f080a9b650710ef8862797504495d62904a3a71 b79d4760d8e333893e984e45f21eb463dce7f2a49ebd0708321c8653aa8c20cb lib/codeql/rust/elements/internal/LetExprConstructor.qll 66f27cbdafb2b72b31d99645ec5ed72f4b762a7d6f5d292d7639dd8b86272972 7da048f4d7f677919c41d5c87ead301eacc12ece634d30b30a8ae1fab580ff30 lib/codeql/rust/elements/internal/LetExprImpl.qll d9e2f8a2f4c7cf3b80178012b5f38b029064a52e705301b99c7477ec1d9fe479 1a059d383a5988b32ade329d2ac809f3a830eb9c54020e3271861aa9ef136ab8 lib/codeql/rust/elements/internal/LetStmtConstructor.qll 7ee0d67bebd6d3b9c7560137c165675d17b231318c084952ba4a2226d61e501f 84199ba755bb6c00579eee245b2bca41da478ca813b202b05abaa1246dcf13d8 lib/codeql/rust/elements/internal/LetStmtImpl.qll 2f3f387a78d1751652bd22dc0ea6cb39f0e186847b6f0dafd74d0f89e2db495a 2ab5a17f588e385f614c8a104a17a91859389227635bd239694a799643727ffc lib/codeql/rust/elements/internal/LifetimeArgConstructor.qll 270f7de475814d42e242e5bfe45d7365a675e62c10257110286e6a16ce026454 643d644b60bfe9943507a77011e5360231ac520fbc2f48e4064b80454b96c19b -lib/codeql/rust/elements/internal/LifetimeArgImpl.qll 50ae74ad177f562b83f7a1bad953c049eaa1b8e47f62e1f84b413d4f9d4f107f 5653a3a250513f7ef1c883b8fa40b9befe9eecd6294bf3b05135dd54fa593659 +lib/codeql/rust/elements/internal/LifetimeArgImpl.qll 2d31b328c07b8922e2c448137d577af429150245170d26fe4a9220cba1a26bfe 18c5f5747ff4be87820c78cadd899d57e1d52c5cd6ae3f4e56ee2f5d3164bd41 lib/codeql/rust/elements/internal/LifetimeConstructor.qll 2babe40165547ac53f69296bb966201e8634d6d46bc413a174f52575e874d8cd ef419ae0e1b334d8b03cdb96bc1696787b8e76de5d1a08716e2ff5bd7d6dc60d -lib/codeql/rust/elements/internal/LifetimeImpl.qll 761fc6dca34b935717a90d8e81e139f0094012dbe1526a0ddf74d401d36be633 fd8332d9591988516fd30509c30a594d04aef69f5a9807fc24c8306ca5b4c4bc +lib/codeql/rust/elements/internal/LifetimeImpl.qll 14ec1a4fa0c84fa9e75ea0babebae9c666909239806ed21325c32e47e11c8806 891168f29d4e06a927ec01ef8fd21ff6e0a0a3deadcf1481c99c74bf2ef20536 lib/codeql/rust/elements/internal/LifetimeParamConstructor.qll 530c59a701d814ebc5e12dc35e3bfb84ed6ee9b5be7a0956ea7ada65f75ff100 ff6507e5d82690e0eec675956813afabbbcfb89626b2dbfffe3da34baeff278c -lib/codeql/rust/elements/internal/LifetimeParamImpl.qll b8f64a0980d78d2e43f6ef3953e02aec3e32170964c9221c72ef1e6ea84163fb f3003c0168599a6033a568eab690a8215a1ab4e5ac24281f9d18b53bcbd05fb2 +lib/codeql/rust/elements/internal/LifetimeParamImpl.qll 8909288801bff8d3e87096dff4b45f434a4c064a9d69d8943a0b30970e011ef9 6d8f80eca24112b5eb659fe5d5fca4fd91c3df20ecab1085dfee9176091237b8 lib/codeql/rust/elements/internal/LiteralExprConstructor.qll 8ea3569bd50704ce7d57be790d2dfd38f4c40cb0b12e0dd60d6830e8145a686f 88d07ad3298003f314f74bd8e3d64a3094de32080ad42a7e6741c416c3856095 lib/codeql/rust/elements/internal/LiteralExprImpl.qll 0a8c8b398ed2f7f3dce5969b98fa61d65bbb690df035b7149a90926b692fab47 26ff1638781af837c454c3cf14d87d1e404c7b47f2582ad520925183c8c769e8 lib/codeql/rust/elements/internal/LiteralPatConstructor.qll b660cb428a0cba0b713fc7b07d5d2921de4a2f65a805535fb6387684c40620de 2dbc9fbc56e9de53d24265d6b13738ef5b9ced33cc3c4c1c270e04dc2fc1330f @@ -271,27 +271,27 @@ lib/codeql/rust/elements/internal/LiteralPatImpl.qll af74456649e3949bf27e91f2127 lib/codeql/rust/elements/internal/LoopExprConstructor.qll 45f3f8f7441fcab6adc58831421679ee07bac68ac0417f3cbc90c97426cc805b f7ab3361b4a11e898126378ea277d76949466946762cd6cb5e9e9b4bb9860420 lib/codeql/rust/elements/internal/LoopExprImpl.qll 068b98978296b22ae59bf9e941e7e2683f4fee0f6c1affbda1fa42c93f015114 e40e384aeff61099d102a681e5dca1aabc6dd6694731f8570d6358e0197368b0 lib/codeql/rust/elements/internal/MacroCallConstructor.qll 707fee4fba1fd632cd00128f493e8919eaaea552ad653af4c1b7a138e362907d b49e7e36bf9306199f2326af042740ff858871b5c79f6aeddf3d5037044dbf1f -lib/codeql/rust/elements/internal/MacroCallImpl.qll 4eda536e5a22dc9df12759a291df59c19e0bbd1b5cff70687f94cd747ada13af 6ec8404164514006316f2db4b54edd56f16245e9195888699af7e0d01548cc66 +lib/codeql/rust/elements/internal/MacroCallImpl.qll 7732221a0d8677f32695be3e6263f6e5f8857225cf98cc31eb91592e175df260 7c4e15e092abbf3a6070141669f2614909eb0accaaee0da6f70495de6087337b lib/codeql/rust/elements/internal/MacroDefConstructor.qll 382a3bdf46905d112ee491620cc94f87d584d72f49e01eb1483f749e4709c055 eb61b90d8d8d655c2b00ff576ae20c8da9709eeef754212bc64d8e1558ad05ce -lib/codeql/rust/elements/internal/MacroDefImpl.qll 5b2d1e42de4cee3b495db7fddafdf058bae34067131b04e6501d5fb844ee9b5f 146973a0fb0b78f3d75b41143bb0f7343a333f2603e795de668e52cf74f31d10 +lib/codeql/rust/elements/internal/MacroDefImpl.qll f26e787ffd43e8cb079db01eba04412dbf32c338938acf1bc09a2f094bbdfdfe 044f43bc94fe4b6df22afae32e9f039d1d0d9e85ad9f24b6388be71211c37ce5 lib/codeql/rust/elements/internal/MacroExprConstructor.qll b12edb21ea189a1b28d96309c69c3d08e08837621af22edd67ff9416c097d2df d35bc98e7b7b5451930214c0d93dce33a2c7b5b74f36bf99f113f53db1f19c14 -lib/codeql/rust/elements/internal/MacroExprImpl.qll 0dc73fcb9fc0449b71d2efcdc69f6d400f88e6ba0ec7f8c46c1499790c6904cc e6e4a6c2265e4c74ac72de8579d07c3ec9b4fbd57a4bcc24f379cd825f548236 +lib/codeql/rust/elements/internal/MacroExprImpl.qll 92dd9f658a85ae407e055f090385f451084de59190d8a00c7e1fba453c3eced4 89d544634fecdbead2ff06a26fc8132e127dab07f38b9322fa14dc55657b9f1a lib/codeql/rust/elements/internal/MacroPatConstructor.qll 24744c1bbe21c1d249a04205fb09795ae38ed106ba1423e86ccbc5e62359eaa2 4fac3f731a1ffd87c1230d561c5236bd28dcde0d1ce0dcd7d7a84ba393669d4a -lib/codeql/rust/elements/internal/MacroPatImpl.qll 5b7640d5e0b7cfe2d5259077cce6acbce0e4817327a70405b22aa90eb728aebc 105d468977306219d6ca9181ad00592033f9ef371d199164572f2049f769680e +lib/codeql/rust/elements/internal/MacroPatImpl.qll 7470e2d88c38c7300a64986f058ba92bb22b4945438e2e0e268f180c4f267b71 c1507df74fc4c92887f3e0a4f857f54b61f174ffae5b1af6fb70f466175d658b lib/codeql/rust/elements/internal/MacroRulesConstructor.qll dc04726ad59915ec980501c4cd3b3d2ad774f454ddbf138ff5808eba6bd63dea 8d6bf20feb850c47d1176237027ef131f18c5cbb095f6ab8b3ec58cea9bce856 -lib/codeql/rust/elements/internal/MacroRulesImpl.qll 85e4ca6bf0a9feb0a259471e367abad44667d13013710d5b3b13bf17f2e91516 88dc2b5a0e237d9466e3999102e2f2aa26f5229a003c410f7c569259bb63d882 +lib/codeql/rust/elements/internal/MacroRulesImpl.qll 10c03adfb63ee7a4348ff5cffc6ef5300a531b048f28811a51e940b053e69f68 2498bd64aeaea9849c086abeaa6c248e4ce41b4436155f4bd4840965976d5d54 lib/codeql/rust/elements/internal/MacroTypeConstructor.qll 0a23573a6f69b38f3d7470050b16197601d67bdd5a4b1a43a155b0b99ccdf6b5 19b623962e8e1f73e55e3ed9712d2a3fe84b9510b99062173902feb2458ec12a -lib/codeql/rust/elements/internal/MacroTypeImpl.qll 9705f2bc1222a601ed5f9c7febfc5ee0da4c8db98824c23c541683bd74461f9f 573e35686f6d27faa577d1090ba24fe2dc4baf84edc3ab6f361a63598ee0a850 +lib/codeql/rust/elements/internal/MacroTypeImpl.qll b8711279f09f521b05bb67568c089271b7913f863ee64dfdeec2c502de2cbdc8 51bd9d3a2fb2065bce7b193b485e225ca5c8ba2029e60cab427d43a90baf0880 lib/codeql/rust/elements/internal/MatchArmConstructor.qll b41c1d5822d54127ce376ef62c6a5fa60e11697319fc7d9c9c54fd313d784a93 96cca80e5684e5893c0e9c0dff365ef8ad9e15ff648c9969ba42d91f95abea05 lib/codeql/rust/elements/internal/MatchArmImpl.qll 065dff16fc70b51924eb4db57be121283f4b5651105320901558bc93bfdf2641 37f4f6ecd23c5170ee5cb0041625c19a8d3245d56f6f1587a2e588eb86baecf9 lib/codeql/rust/elements/internal/MatchArmListConstructor.qll 8bc5ac978fe1158ef70d0ac06bdad9e02aadd657decb64abcc4ea03f6715a87a 4604ab0e524d0de6e19c16711b713f2090c95a8708909816a2b046f1bd83fe24 -lib/codeql/rust/elements/internal/MatchArmListImpl.qll c52142add563ff0cf3d12a70d7182ef00d3ab3b7a76bf899e6ae3de41fa2b4bf d67cf90c95b3a766acfdf408bcbc3d468ad70fb0c84ec9e2693b77598e2ff0bf +lib/codeql/rust/elements/internal/MatchArmListImpl.qll 896c6f1650e7ceb60d0b3d90e2b95fe7f8dc529203ddfec58edb063fa9b2871f a668fed1eb68806abfb021913786168d124de47b25da470e7b57f56bf8556891 lib/codeql/rust/elements/internal/MatchExprConstructor.qll 0355ca543a0f9ad56697bc2e1e2511fa3f233bc1f6344d9e1c2369106901c696 78622807a1c4bff61b751c715639510146c7a713e0c4f63246e9a2cf302f4875 lib/codeql/rust/elements/internal/MatchExprImpl.qll 2f933805bbe6f2676501c1c72ce1dbcffb0acff34883fa7b423b1a20eaf58afb 56f1c727f327717afc48c1dc505241d56c46e84094395ca32a33824cf64ebdce lib/codeql/rust/elements/internal/MatchGuardConstructor.qll d4cae02d2902fe8d3cb6b9c2796137863f41f55840f6623935a1c99df43f28d8 0c89f2ca71a2fd5a3f365291e784cb779e34ba0542d9285515e1856424cec60d -lib/codeql/rust/elements/internal/MatchGuardImpl.qll 361c96dae2fc099eea6b670306bce1558fecba1a4be9f0746bfa8aa3b660e838 4cc6f0fed420efdeb9965443be58c48b6fb7525ed964bf11912f70a26c18ff9a +lib/codeql/rust/elements/internal/MatchGuardImpl.qll 77453be572769507e6515e622e6c874a875464c2ade8bcd89ef447bdc4649062 86cdf08b0ac5ff9a865ab52eae535d8c4e7d341bc79d422e123af5b8f593ad22 lib/codeql/rust/elements/internal/MetaConstructor.qll 49ab9aafdcab7785fc5fc9fb8f7c5bb0ae76cf85d0d259c4b3ac4b0eccbbeb56 bc11aef22661077e398b6ca75e3701fd8d0ac94a0e96dc556a6f6de4089d8b8c -lib/codeql/rust/elements/internal/MetaImpl.qll 59bf4038b0320bef8adffa89365957aa62833e7fb890c40d8ba9924fb60ab503 751c99270f0c94960ba530d1a38093230efeb4d36f599694bfb02e8fe4817bf5 +lib/codeql/rust/elements/internal/MetaImpl.qll c0768335e8b290d33474fac7d12b994c659c3020dcc488314e6b732000837584 ae56040758f407238008a952a29cf336b3e87115b0ab4bfde15b0d0f90d13b88 lib/codeql/rust/elements/internal/MethodCallExprConstructor.qll a1b3c4587f0ae60d206980b1d9e6881d998f29d2b592a73421d6a44124c70c20 8d4eaa3eb54653fac17f7d95e9cc833fe1398d27c02b2388cd9af8724a560ded lib/codeql/rust/elements/internal/MethodCallExprImpl.qll 85bb150fa738c4206913cf8de15d3b0525e47c1a2cf5de77ac1978194f4b6333 a565680745b8c1374c17c6a0a9b1b4c8058b4f44ea934e36a919d2eb454b289d lib/codeql/rust/elements/internal/MissingConstructor.qll aab0b7f2846f14a5914661a18c7c9eae71b9bde2162a3c5e5e8a8ecafa20e854 8f30b00b5b7918a7500786cc749b61695158b5b3cc8e9f2277b6b6bf0f7850a0 @@ -299,25 +299,25 @@ lib/codeql/rust/elements/internal/MissingImpl.qll e81caa383797dfe837cf101fb78d23 lib/codeql/rust/elements/internal/ModuleConstructor.qll 31cc83c9d8f25ac07375d19e568f05c068e1f5aa205ff3d9ac31c2510e6f8468 8a70f3f1c18ff87f17e6baf2f05ccaed55c70469288192fc39ef0bb5531b8c0e lib/codeql/rust/elements/internal/ModuleImpl.qll bbff32cadbad54bdb613df8c1ac6da8cd2a80d0576361b843f1529e6c63b1938 7342473026561b8e4923625a083ba52c31d3b6797f9061accd1a712598244410 lib/codeql/rust/elements/internal/NameConstructor.qll a760134c6d4fc785746e1a5dc042a6bf25b8adaa3947a6897c31e50fd91dd5fd 1359f903d57112bcc1f62a609febb288301bfa810e569aa12e1045fd48b5b5c9 -lib/codeql/rust/elements/internal/NameImpl.qll a16fbc2f8f015e82698f0d0ae0ebe137b27ee9263bfc6ed3c31d7dcfc861829a c52e6bdfd09ca8aab012545eba0c6f95e09038fc360c3f0728caecc8098c86e9 +lib/codeql/rust/elements/internal/NameImpl.qll 1cf9c1aa3bfa6c41b9faf737bfb7e756285aea151c487fbc2be852c47b12e55f a8ccffeb36a55bd224aa98745bfdff86c7bb2bd64bf0ace93088b0bc2376a138 lib/codeql/rust/elements/internal/NameRefConstructor.qll 5ff6eacc614fd41f98b54cbb4960a07a1471cf4ea291758d33e54a48fd5d1bc4 c538d65414a24dfdbeb49cfd997588227559ba038f0b55d14bb5d89ed1a016f2 -lib/codeql/rust/elements/internal/NameRefImpl.qll 55a41f67cd4af010a956c937c5407ef9068134ebd61cd6e24bb911cb373eb7d9 c63b62e5e6d19a4687499ce6c4ce8290b18862a933c7b376b88e88a155860a5e +lib/codeql/rust/elements/internal/NameRefImpl.qll 6700cc8817e53bee89307a278486cd68d68140ef3f5b18a5ab8035d5a1a9c13a d8f0ce1cab406836c645ab51216af00e6e7922e390efe5252b1ed0697f6e1acc lib/codeql/rust/elements/internal/NeverTypeConstructor.qll 6a86bff9d885eddf39a159698710def40d693ccfd0888aefd090a283cb59ae95 9c51d6569f267dde5597067a8470d19d7714304399de4f730e7b85ca21feee20 -lib/codeql/rust/elements/internal/NeverTypeImpl.qll 26959da017a517d8aa899abe3e331aa86e994a25cd66e914aab1c998832e3223 ba541a7eb97a5b912e9f3ccf2589a685f856562e9a5dc12c87d2caa88ebe36d0 +lib/codeql/rust/elements/internal/NeverTypeImpl.qll 8c7464cb76f9d081dab318d743817d87ecd69672f382d27323ade94c82e8e0f6 55351661214854bbf7faed6c7d17d598459d4e88eaba130a9b3a9f43f6665c37 lib/codeql/rust/elements/internal/OffsetOfExprConstructor.qll 616e146562adb3ac0fba4d6f55dd6ce60518ed377c0856f1f09ba49593e7bfab 80518ce90fc6d08011d6f5fc2a543958067739e1b0a6a5f2ed90fc9b1db078f0 lib/codeql/rust/elements/internal/OffsetOfExprImpl.qll e52d4596068cc54719438121f7d5afcaab04e0c70168ac5e4df1a3a0969817a6 6ab37e659d79e02fb2685d6802ae124157bf14b6f790b31688f437c87f40f52c lib/codeql/rust/elements/internal/OrPatConstructor.qll 4ef583e07298487c0c4c6d7c76ffcc04b1e5fe58aba0c1da3e2c8446a9e0c92b 980a6bd176ae5e5b11c134569910c5468ba91f480982d846e222d031a6a05f1a lib/codeql/rust/elements/internal/OrPatImpl.qll 0dbc461115f62306e679f69c4354550bc3425d4291aec0124ad8f7a55c779d51 d32ebaa5a3002e87b35949cb624b20377155869ad33aec873326f60f2f0b666d lib/codeql/rust/elements/internal/ParamConstructor.qll b98a2d8969f289fdcc8c0fb11cbd19a3b0c71be038c4a74f5988295a2bae52f0 77d81b31064167945b79b19d9697b57ca24462c3a7cc19e462c4693ce87db532 -lib/codeql/rust/elements/internal/ParamImpl.qll 7c97099f6ea0ede0ac630e0d21f98450426a5cd1d1ba1c04008da63b26215436 ba0b610558b49d12e72bbda616a6b06bb8a896d14826722186b614b5850f51a3 +lib/codeql/rust/elements/internal/ParamImpl.qll 8a5101559f5d636b60ab80237057944b537823ce054d760c3dbd58b2acf05a46 e7a08cefeb6a290a975899045b7b19a9624f5a2b0946cba0866b1854cc0c0fb0 lib/codeql/rust/elements/internal/ParamListConstructor.qll 3123142ab3cab46fb53d7f3eff6ba2d3ff7a45b78839a53dc1979a9c6a54920e 165f3d777ea257cfcf142cc4ba9a0ebcd1902eb99842b8a6657c87087f3df6fe -lib/codeql/rust/elements/internal/ParamListImpl.qll 67024fc7251811eada96f9e286dffe4ce4ff8c8b66a003a3f7aea57130a01cd5 229cce05711012555d3a62897ad3bb1a5f06be8f17de1f008dc1a8459b241a07 +lib/codeql/rust/elements/internal/ParamListImpl.qll 0ed6e9affe1dc0144641502292c2ddd51958fe3d503419caf15198176e3a4174 92d053cc5fdf40a2d98acb665083b5da15403d7da205779a97a4ee66fac0add4 lib/codeql/rust/elements/internal/ParenExprConstructor.qll 104b67dc3fd53ab52e2a42ffde37f3a3a50647aa7bf35df9ba9528e9670da210 d1f5937756e87a477710c61698d141cdad0ccce8b07ecb51bab00330a1ca9835 -lib/codeql/rust/elements/internal/ParenExprImpl.qll 3a83e0b3eb724eed2de2e22fe5025cfe1411b1aa428d3f7c9626c897309c4204 4f085bf8d572a137262ef768a0d9d38f0cb15bd8200aa1f691db68e11a89ed0d +lib/codeql/rust/elements/internal/ParenExprImpl.qll 185e7c0f8f377f62a7ccf1c0d168caf500afd0654b82d47569bfcb97e368a26d 25a41998ce0ff3490d677676bf02fea1861d6c01db99a02fc940cc37ae580db6 lib/codeql/rust/elements/internal/ParenPatConstructor.qll 9aea3c3b677755177d85c63e20234c234f530a16db20ab699de05ca3f1b59787 29f24aed0d880629a53b30550467ade09a0a778dbf88891769c1e11b0b239f98 -lib/codeql/rust/elements/internal/ParenPatImpl.qll 72e2400b80908267962f20bc2e50ee8f14fe2e8dd1d78535b6d6fed447caaa36 e1a183b837a0497fdaa4e4b9e14442adfd47443242c04a92f785bc0a3e7f9ef8 +lib/codeql/rust/elements/internal/ParenPatImpl.qll 39c45b3736c4d0329af7a1eec28a8470c3f244efd58a6ba62af482a0e9b4a842 d8aa9e6f8987666cd51cb65f81700d3b4584d3dc7d070836e52a9bc64e572d9e lib/codeql/rust/elements/internal/ParenTypeConstructor.qll d62e656a4a3c8ffd4eb87d49585a7a3bfb5dbe3826fbcbd11cb87b46f34c19ae febf6535965afa0f6eac4d2b08730f5a07bbb36a7434abe0a7663d7264961a3f -lib/codeql/rust/elements/internal/ParenTypeImpl.qll 47964e1578c116bf0d762eedbac14ffe1f4b6cc724d391fda4b03ffdf37607a0 146915450f466cf0111af30eda4159d2ee3feaa19d8ba884badcae1e279c43f0 +lib/codeql/rust/elements/internal/ParenTypeImpl.qll 6f7b4fade4ac0af69bf9766ee7d73da3da1742ba8a7c12d2a067b71c7f96d849 f065ea466111a5abca33d97b9878ef2fcc221f286fc65bec87f3a9c2fd5d57fc lib/codeql/rust/elements/internal/PatImpl.qll 37c9b1da7aa625117644e2cd74ec0b174f69a38cf66926add01786a05d5ad2ad 143685a0b4873fa0b73b204285dca956e59b32d527bfac6cc336326d244994b7 lib/codeql/rust/elements/internal/PathConstructor.qll 5c6354c28faf9f28f3efee8e19bdb82773adcf4b0c1a38788b06af25bcb6bc4a 3e2aeef7b6b9cda7f7f45a6c8119c98803aa644cf6a492cf0fce318eba40fe8f lib/codeql/rust/elements/internal/PathExprConstructor.qll cf6e0a338a8ed2d1042bdee4c2c49be5827e8c572d8c56e828db265d39e59ae3 36a3d1b7c5cc2cf527616be787b32071b9e2a6613a4f6b3f82e2a3b0e02a516f @@ -326,13 +326,13 @@ lib/codeql/rust/elements/internal/PathImpl.qll 67ccef5792c0d17d800b910cbda3651aa lib/codeql/rust/elements/internal/PathPatConstructor.qll 966c4ea22218ef71e000d7ce8dd5b570c39ad96b9239a3aa8a38292e2a9f36d2 8a1f348e9257ffc6e6bedcd70389b8e7ec2a3ed6e7b3733744ddfab284826e57 lib/codeql/rust/elements/internal/PathPatImpl.qll 6ab5b5959cfd94e74f60422cbdbd764a5f51ff541db428938c36ba3a512d1d6b 47585157460e8384047de307b0b05deaab758d0f07fd0183d874f7bb9d8bda4b lib/codeql/rust/elements/internal/PathSegmentConstructor.qll 2d9639e42035dc7e73b7d6ddb8a977beadc6b4492dee4292b2f85b4409344441 c337fc3b9ef56366428772563e3f25f711474d16e860d3e89c1395a95d9e83e7 -lib/codeql/rust/elements/internal/PathSegmentImpl.qll 188e96a2939aa5529fede1984d2ec652fbda2715298a4b75a1c3b6fc198e43fb bbb932c32ead04defbeca3de9c1513425ddbc36dd8b8e710d9b96d31931b68b1 +lib/codeql/rust/elements/internal/PathSegmentImpl.qll f8679dc63f0d71d412c3e1ce7666b050e276229a32ebd79769d90e7201fe27c4 d0a73488338a46fbaf626a00360b385d431da86d8fbc8e313414e1e571e5e7a3 lib/codeql/rust/elements/internal/PathTypeConstructor.qll 8949742c7ab7fcfa3a3f6469e87355a6888931ab9ac7a6a07d2bd51e3fdf8283 fb1a402e94e9a1f33b7757338d7e95b107933339615a4fe86de33e41206dd94a -lib/codeql/rust/elements/internal/PathTypeImpl.qll 00776695c062a01034a639c81dcfe9309c9293a7639eb79103d1bb8e978b7a86 7d7a6fd02edcff2a7f6ea843c97efc74a3484622bf9b25c5b9ed21bc8bdf251f +lib/codeql/rust/elements/internal/PathTypeImpl.qll 0e3b85df054d1194505796e457ee31a8dac2a2a77284c077cbf1a3bfc179294e c198d4fdf8d1d55f1cf57685a9ad2adf88cc2d6d4f84bafa1e9f039192761399 lib/codeql/rust/elements/internal/PrefixExprConstructor.qll 90c50b0df2d4b4cbf5e2b7d67a9d243a1af9bfff660b7a70d8b9c7859c28bca7 1a1b5ea1f06ed8d41a658c872e8e1915c241a7c799c691df81b9a7b55d8f2f1e lib/codeql/rust/elements/internal/PrefixExprImpl.qll f3c6a88cead13fb88f5be170123e9d5fc0819e6626602c42d38e756ef5a46213 e5cd78e6a77484e164334befd533d52e4de00c0c3b30dd2fa03f412f669cf369 lib/codeql/rust/elements/internal/PtrTypeConstructor.qll ee3c4326ea3f198d2537a914dd6eb51d0cf247310f037e13e87632fbd6cfb50a 3814218b5271f3c6c45b52082cca2a3250a2573abced43fe53e1b4145374afe3 -lib/codeql/rust/elements/internal/PtrTypeImpl.qll 1bb1b033919ef5c9984e9ff467ad9f25fa40c7a91935763fd491e83dbfea81c9 b45341d062ce3eea54cb9002e7f7f93b54b6019973d6c5a3e65610acaeb86584 +lib/codeql/rust/elements/internal/PtrTypeImpl.qll ff4283ffab39b4a3c0e55e7d655dfdb846171cde0907bf1f893c86b35d2c1135 e54d3a6fb0b5a1484f00fd5a4631455902bab80642c3bb076e538ddcc29a85a4 lib/codeql/rust/elements/internal/RangeExprConstructor.qll a0aa90a1c38c5deea56475399016afae2a00a858b961fbbab8ddeb3bc6a08103 0ddf1bcf28aafc56d7334e6138fb268f9b36a429e4cbdd982cd8384e0644076b lib/codeql/rust/elements/internal/RangeExprImpl.qll a6ff92a27e44c2184f5c2d8483de1d0d4a77eb7a5154ff93a8f3a9fc8b63e561 d53d44bc1c1ae426f208595002adcddb88643e1027bbee7445095ca09e433331 lib/codeql/rust/elements/internal/RangePatConstructor.qll fe4345cb41d970ab64196ca37eccb26e5b9cf85fab4253cacfd2b31de03bd070 1d09d5ec8203d76aed2dfb7e7f14c0c07d6559c8f589e11860fff8a2c682c1a6 @@ -341,79 +341,79 @@ lib/codeql/rust/elements/internal/RecordExprConstructor.qll 742198bd8223902b5625 lib/codeql/rust/elements/internal/RecordExprFieldConstructor.qll 11620bc4e2dc7b3903be764cd9510a8e002892722b502876cf3467994aa7a63c e42e50747dd9453a44705b2d6a05e7a4a8c6debed988a0335a774a547d8f7157 lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll 8af196cbaeeb7997e933fde9ddba50ec099df51f66e03501f00157f238505fe7 29ae10546577a354b0439876ce5deb5ab13455028f02c01fe3903b11eaee35e2 lib/codeql/rust/elements/internal/RecordExprFieldListConstructor.qll 3a0d6ec872792c400d3a0a5ed1c5051b248a597a4b17ada1a078ea5d972b6721 52bae8222e7aa5bc89b73bec3fd1c3c1de0fe11bf30ccf5668454f63fbfc9b83 -lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll 34b1274862d771477b474a01525ec6328a9d5a2f2b69c56988c90533d94027a6 8683af4afd5b3063ba5aa842463c506a81bc570a49d005f245dea8b8dc831ac3 +lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll 1210c23c0495f5d1a72409afc8c559f8da2b8c71340ff2944af9d1f684d0a856 fea96b053cad4135ab09b1c070a4c9f26507dd890a62c30772cf3e2358686640 lib/codeql/rust/elements/internal/RecordExprImpl.qll 233b3f7ee8dbd1e5431bea5436c6b7ee38e631c041111dcf53e45c6c4c08a6cf 9537497edb739c535d75ce80122f597ad93241bff5399b1dae17a7bfff1c15cd lib/codeql/rust/elements/internal/RecordFieldConstructor.qll 9fc05f5101e48a45a028c479b35ec3d2f1a3cc33f0938667fcb813c5a4ab9526 98791dcf7f3209524f6132f9c26980e499cbcf94c1559e95c67544732245f05b -lib/codeql/rust/elements/internal/RecordFieldImpl.qll 2c40da630d03e007bfc59bd4445efbcf4f741d0703accfe5eb1c64f7ce0ea160 466434091028554820d4f88571f1cacf7df98e77a6952c73782208d035cdb64c +lib/codeql/rust/elements/internal/RecordFieldImpl.qll 2612dae3c95c9064420a3494872213f7fd7a3e1133243f4adea8a30808a209ae 143b75bb539a1bfea16e1c764a1f549522ef9c8d6d5de3fef377bbf67ba42075 lib/codeql/rust/elements/internal/RecordFieldListConstructor.qll 9f1d916f3784092dcbff7224451c8f4f0daf6f8293a466b0a30ec9b92cd41358 8aafe377714a134287362c4b96439c1c6baa5a31c2c36a544bd5f73e9213477a -lib/codeql/rust/elements/internal/RecordFieldListImpl.qll c4e0928eb68e028ad7e03e3227b27a87e50d15bbb863fac303681918f645500c ae057b73fb5fd7f845f8fab802f26ad73492d9e5a565d73346c90288f0635ecd +lib/codeql/rust/elements/internal/RecordFieldListImpl.qll 1fa89578a1e27a7d6dd84c1cabbff08b38a3160ea0864c7be660984cf96fda1e 9fa6a775f0609f557548168424f02d068abb3978ba20a716c21619e904bd99f3 lib/codeql/rust/elements/internal/RecordPatConstructor.qll a5507e0db7cb297c74faa9d571e613799d7b3327584e4696d1d5c219d1ea84ba aa5c8042a88e99dca09a6ea7775bd6963825a3c2dd5d61f118dbbc57a336c4a1 lib/codeql/rust/elements/internal/RecordPatFieldConstructor.qll 6e1880ed05401b39c1e5e1a4eedb0a8a18c857aeb79c44c812cdc879eb3af1f4 1f7a5a2d4df22f7d7479fe348665d8a1411de47f8cc5b95b30ba4c3490ed8f61 lib/codeql/rust/elements/internal/RecordPatFieldImpl.qll 04bc31b857c8250096d9d1bf3fad1e556a28d83bb3f3b48a3f049048d1e6785f 5853105e55650d05a4b196f17b89baf12b898df0a010e4f88289ce01d16a0379 lib/codeql/rust/elements/internal/RecordPatFieldListConstructor.qll b8f0ef9b75ffe6be6ce7e601d528f0a1b871123c63e39cead3fd13b8bd4f54b7 166f07c708ab8b3de6bfaf193bac93081b2aacad046aa86de7441085dd20a8c5 -lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll 7b7096f1b64c481f00147b19a016db9a2338be232e977aa37a705f297b2ebebf bfbf15b1be611b66aa59cf166a592d3c3e3540f81cf169f6fec5c33f2fb6fde3 +lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll 2d1dd9910480eb65c59fcef2e1576ce639be85c35d90e4bce721ce22ec742ba3 1e788a2d7d00e9f96dbf7e93d3a18d5bfb4d7749194ff8e9810e9053fa88a94b lib/codeql/rust/elements/internal/RecordPatImpl.qll 3c7086be84e336c069f4c7b538c7ad32a7728e7fbf42e4dc7f04c4c99d393c0d 8020215f38639965398c62ddb36c3560579d63928e71e0d773b254e121a68cc3 lib/codeql/rust/elements/internal/RefExprConstructor.qll 9ad08c0f3d980a56a2af8857cb84db589941d20ab3ae5c8ece004ccaccaaf950 4cac3ace31b7ed77a72e989fce9cdbae2247f03c28a3f0c50d67385d02c7f193 lib/codeql/rust/elements/internal/RefExprImpl.qll 56ed831a3b30ed375e7369b0a60b9b7635a1b00f058364a6b15078031a85af5f ca7e772b409514363e49d56a174ae9bd2e076755cbd09c4e7e5b732d09acdb25 lib/codeql/rust/elements/internal/RefPatConstructor.qll d8b88c2c468b08072f6f853306eb61eb88ee1e6c5cfb63958f115a64a9715bb3 0c1d6a8af6a66912698acce47e89d4e3239e67f89c228a36a141f9c685c36394 lib/codeql/rust/elements/internal/RefPatImpl.qll 3e06e8130d412b47267497097cffc9f4b930b9e54bc90465ab5ac620fbe52048 b8ac844ec99f30605ce476f89ced4fb1159d2df0df43c631f60b3c868e0e1fd7 lib/codeql/rust/elements/internal/RefTypeConstructor.qll e1952aa69586b440f878400a52d09b2d12d5a29dbe9651360344631cb9493cd4 e4ae45e89472dfd4547d647c75e1635cf065a7d221ed60ed34554f265c0c5405 -lib/codeql/rust/elements/internal/RefTypeImpl.qll b8781f1d1f4f1f76086a7206dc249b2f7866925f8f9fb68068aee8629e209adf 3282fe28629779f3defd83b0e439512828a8fef8d099afff0d17b34a56eed576 +lib/codeql/rust/elements/internal/RefTypeImpl.qll f72b760a8a26be21170435da2cb2981638513617fd82742f45f38bc437d9f2c4 f32df49f0b6df85ca5fc4393ccd341ac4304b4947a282ccea48468a26837ef3d lib/codeql/rust/elements/internal/RenameConstructor.qll 65fa2e938978d154701e6cac05b56320b176ee014ef5c20a7b66f3e94fd5c4a7 dfc0ff4606b8e1c14003cc93a0811f4d62ec993b07ff3c1aa0776746577ed103 -lib/codeql/rust/elements/internal/RenameImpl.qll 58918eeb6980c22ec0390045fed24d20a504265545d3e0b1db63d0850849f65b 21eaf4a618d5201e3ca594ad04ca71682a5cf31f5fa2ba616deb3f975e2f1421 +lib/codeql/rust/elements/internal/RenameImpl.qll 4f5943fbda4ec772203e651ed4b7dd1fb072219ddc0cb208c0a0951af5e72bd6 b9854cdcf02e70ee372330a4e0bfdb03012bc81af79dd12af2a567fd7fc4672b lib/codeql/rust/elements/internal/RestPatConstructor.qll 45430925ddf08fba70ede44c7f413ddb41b3113c149b7efc276e0c2bf72507b4 25c678898d72446e7a975bb8b7f2fde51e55b59dbd42f2cca997c833b1a995f1 -lib/codeql/rust/elements/internal/RestPatImpl.qll 80426dcb1e70079b6179527c9305ccb255270511a8c48b4be84b00ecd42e6c0a 94bf29a823cbffac5486a9bc4082a2f5a08ceabea3d3f27bd8d3be99d2058fb5 +lib/codeql/rust/elements/internal/RestPatImpl.qll 1b83464367e5fdc28b0b3946ae74c67c64d30b286c39268b4118337539250e51 83a03308cba4cb3344d48f0a0730b1d3e41a73f16f729d39dc2bae6d3f57f232 lib/codeql/rust/elements/internal/RetTypeConstructor.qll a96d803c6e4b40be49cfed0853a3e04ae917c47351e5c880fcab06eddf1af9cc d06a0a191cb14c270c0441ffc3d289263808170dcbe05e01847a35ac9d61dfb3 -lib/codeql/rust/elements/internal/RetTypeImpl.qll 907a3cfe03b65ff36dcd357caccb72a9d3c18ea5c25d7cb8e3502dfdef6583cd 3c622c4860c2feacd10331125e9765e07e57e62706035ad2aca2a97b916c257a +lib/codeql/rust/elements/internal/RetTypeImpl.qll 0e96f1075ccade28ce5664ab0f5c2e98984ae1d0ed708bc02e40e882672d9e2f 350725d16bcb1e8911bfdd87d9dd21be73ec66d23c2a35827c8c8525c48dc885 lib/codeql/rust/elements/internal/ReturnExprConstructor.qll 57be5afbe20aa8db6e63c1f2871914c19c186730ad7dccaa424038c6305730d5 4d3c4f2e9b38a4b54ff26a0032455cdcca3d35fec201b6c932072a9e31fbb4fe lib/codeql/rust/elements/internal/ReturnExprImpl.qll eef4960a8c27eaa0540d048fe88893cfe9a6ac377a770cc23d72ebe05d5782f1 b7f35650d80f2f8b4893f0091fea74646341af406b6248f75c477112aca96dea lib/codeql/rust/elements/internal/ReturnTypeSyntaxConstructor.qll 8994672e504d1674e5773157d0ad8a0dc3aad3d64ef295e7722e647e78e36c11 abe7df754721f4ff7f3e3bb22d275976b2e9a1ef51436a461fe52ebd2d29cff1 -lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll 1a9bc60d92d845f5b82c1b826d479394a96707c798ba0e1dc57113bd4c443980 1967d10995463346f6c25651d31f1b9dde45d5b2f9c46b9d2ccc090ae1a6b6bc +lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll d47a3dcfcc2b02a6a9eaeefe9a7a4be2074ecd2019da129dda0f218bc3fbd94b 87198db7c0620ed49369da160f09287015e0cd1718784e1ba28ec3ec5a0bb4a8 lib/codeql/rust/elements/internal/SelfParamConstructor.qll a63af1d1ccde6013c09e0397f1247f5ab3efd97f3410dd1b6c15e1fb6cd96e54 0d8977653c074d5010c78144327f8b6c4da07f09d21e5cc3342082cd50107a81 -lib/codeql/rust/elements/internal/SelfParamImpl.qll 0c69ad2ea3dada21c207bdd2e0059d13bb6a11a68226262f10257ca01c6cbe30 4b18864e576069651eba6df6dce609a7a75991900da9ca3693f112d39f29585c +lib/codeql/rust/elements/internal/SelfParamImpl.qll 5408738c40f070e0cea83a6a38d638ac7a134b5a055ecf0cccc035af58ff9b36 604922319ecf9a9405fdd0fe953169162ee2c8cca36349b49163a2895c53ed40 lib/codeql/rust/elements/internal/SlicePatConstructor.qll 19216ec9e87ca98784d78b29b8b06ea9ac428e2faa468f0717d1c0d0a8e7351c 458e5be76aa51aec579566be39486525ec9d4c73d248cb228da74892e2a56c08 lib/codeql/rust/elements/internal/SlicePatImpl.qll c6176095360e3b23382557242d2d3ff0b5e0f01f8b1c438452518e9c36ff3c70 644ab41a59a619947f69f75e2d0807245d4ddefc247efaeab63b99b4f08c1cc1 lib/codeql/rust/elements/internal/SliceTypeConstructor.qll 643e7a2ae261e8f62de8bc2886efddcc096e0c7e8159c0b9e87b24d0509e10d0 719545abb0ccf6e8a203ec9c9f75109c5ab0593c838e2f90e388858680ec62f7 -lib/codeql/rust/elements/internal/SliceTypeImpl.qll 0ea170d7ebd3655637fe2c8e40a51f5209b0c20b6f3d987477f0fff138f16c2a f253a681c9db9ea75085421091bd336f3e222ca84910eeae992242c160305e03 +lib/codeql/rust/elements/internal/SliceTypeImpl.qll a753aa9823b0288d3e8085faedb3a6bb750e98845a11a28b69796aa453c09c8e 343f5d4638b52e6eb0082000e1b147fe36173dcbfc035263819480b430c55127 lib/codeql/rust/elements/internal/SourceFileConstructor.qll 1dc559887ea7798774528b5505c8601c61030c17480f7ffca49b68b76fcc0321 75a635b88622e3110b16795bd12ca6fc4af176c92d6e441518d60aa47255edc1 -lib/codeql/rust/elements/internal/SourceFileImpl.qll a23017bc5c4c88446cd31bb2e9cef7068bed0413129a6b81767cded64c1c7e64 8f4bb769e590469e936bee0d6811ba41e566d4eb76f8aa2ba57f77b376f1254b +lib/codeql/rust/elements/internal/SourceFileImpl.qll 0f844062989b363045f16488297f617d592cd90762befb7403f246d0b94a29c2 f38cabe8c34049f4454136bf7281aaef92d411dc41e686856b2058298b6cebc0 lib/codeql/rust/elements/internal/StaticConstructor.qll 6dd7ee3fd16466c407de35b439074b56341fc97a9c36846b725c2eb43fd4a643 5bf5b0e78d0e9eb294a57b91075de6e4b86a9e6335f546c83ec11ab4c51e5679 -lib/codeql/rust/elements/internal/StaticImpl.qll ad41f8d031d53b4e69704ce3e816f61ea70104ae5d0b905552f5ab0e7d44e70c 5b547decc6a8c4d0476e48b07492fa872196bc9decb89f222b664c8a1692f7e2 +lib/codeql/rust/elements/internal/StaticImpl.qll 91b9b9d360c431f13cfa8761cfb1717c5eb7bceb6ccba3ccc8a7eef0a3606f80 21f508efb26d944c2883db954e766f4acf9033cea69c9ca9e418492fa4630f13 lib/codeql/rust/elements/internal/StmtImpl.qll ea99d261f32592ff368cc3a1960864989897c92944f1675549e0753964cb562f 9117b4cdfad56f8fa3bc5d921c2146b4ff0658e8914ac51bf48eb3e68599dd6b lib/codeql/rust/elements/internal/StmtListConstructor.qll 435d59019e17a6279110a23d3d5dfbc1d1e16fc358a93a1d688484d22a754866 23fcb60a5cbb66174e459bc10bd7c28ed532fd1ab46f10b9f0c8a6291d3e343f -lib/codeql/rust/elements/internal/StmtListImpl.qll 8ba7e9751a851f22b74aed8e6663f235b71769dd6e32495c9b0df8458a808f88 ad4d0128407eecf094ed7890a68851972262efc5d315fc31cc66e695875dd38f +lib/codeql/rust/elements/internal/StmtListImpl.qll fc16097d08124bcc39c998b07023710e0152baed165fb134cac2ee27e22a9f7a a4eceb42720593d8d0ce031016465de0bb61d40f31b2cc2718626ef8348ac900 lib/codeql/rust/elements/internal/StructConstructor.qll 52921ea6e70421fd08884dc061d0c2dfbbb8dd83d98f1f3c70572cfe57b2a173 dcb3ea8e45ee875525c645fe5d08e6db9013b86bd351c77df4590d0c1439ab9f -lib/codeql/rust/elements/internal/StructImpl.qll 947c4107bc1b11db8290a4a9e796560580923439a7232d9f1ba1f89008b21480 3f8d325b1b2b0efff8aba4921e32a4df654fb58fcc8bfcba1c99858087cacd00 +lib/codeql/rust/elements/internal/StructImpl.qll 7e3b58c3038ad7a3315cae34a34f99380e36d33cf3fb4437de6f6dcfed2ad579 1cfcb3bb5381349a2a4074a9e53927f5c540f2b251b187ad28da300968dfc649 lib/codeql/rust/elements/internal/TokenTreeConstructor.qll 0be1f838b04ff944560aa477cbe4ab1ad0b3f4ae982de84773faac5902fcae45 254b387adc2e1e3c355651ab958785d0b8babbc0030194234698a1219e9497b3 -lib/codeql/rust/elements/internal/TokenTreeImpl.qll b57f16802422489e9be95f925a3510cedc2109ce85f142dd8df22100c6de303a 2021c8a85ab199b73fa6680036fff750ec0c3e1c4f31a185213a8f874f0200cb +lib/codeql/rust/elements/internal/TokenTreeImpl.qll c61574f2b551db24640258117e0c8653196ba91392ce81da71a3a528ee07b1ad 489a1c8f550725e28871ae99c41d03b719c3099b8f73ae7422f497430f616267 lib/codeql/rust/elements/internal/TraitAliasConstructor.qll d2f159cac53b9d65ec8176b8c8ccb944541cd35c64f0d1ceabb32cd975c000bf 6564981793de762af2775cc729e25054ea788648509d151cbfdbdf99fc9ed364 -lib/codeql/rust/elements/internal/TraitAliasImpl.qll 6109325f8caf53f58a76e6eb8b212bce4fb4192c03fa6405c2aca218b52bb407 011634fe660d90f4187e33b3784f269a2dc27d71c736c20be0245c5bf16d04f9 +lib/codeql/rust/elements/internal/TraitAliasImpl.qll f338dba5388973ec0c5928d4c60664737f75a93d0c7db5fb34053bc41c107641 f2e437469e4ba1d8dd321bc670978e7eed76508e728d1e08e52ddcf52a461d3a lib/codeql/rust/elements/internal/TraitConstructor.qll 1f790e63c32f1a22ae1b039ca585b5fe6ffef6339c1e2bf8bca108febb433035 535cebd676001bfbbb724d8006fa2da94e585951b8fd54c7dc092732214615b5 -lib/codeql/rust/elements/internal/TraitImpl.qll 3a540288020ec7b87a77cd96bf8b0aa173b128d61b65edbbe9c4187f366a6d89 a1d669a3956cf7a5eaa74bcaf4dd9dd966673446a5c08001536d76270c3f7ee4 +lib/codeql/rust/elements/internal/TraitImpl.qll bd7f1cb81db69b32a8f540d6281af335fe4a4bc8b3667fb4464734d602359bb3 315f9107b1f74c51f99ec98a6af3d2a06bd11c81946990224002359db557c93f lib/codeql/rust/elements/internal/TryExprConstructor.qll 98e3077ebc4d76f687488b344f532b698512af215b66f0a74b5cea8ed180836c b95603c10c262911eeffdf4ccba14849e8443916b360e287963d5f2582d8e434 -lib/codeql/rust/elements/internal/TryExprImpl.qll dee6d67ab6f065f8391f68d05e4f6ae50a2faaf7325040ecd4f4998acb9cbfab 9387b7fd773036db97dde4aa699e1ce0e451cf9e3110e3728fce8a376f873cb5 +lib/codeql/rust/elements/internal/TryExprImpl.qll 00635685db339557cfb89fad0bfc134e53efc6d88c68cce400b72c2dd428ef9f 43559b46e45c009f985b58896b542881b81a3e6b82a6f51b784e8a712ae3da2b lib/codeql/rust/elements/internal/TupleExprConstructor.qll 71c38786723225d3d90399b8a085b2b2664c62256654db9e1288fadd56745b9d 639ad70b49ebadc027127fbdc9de14e5180169a4285908233bc38ccac6f14110 lib/codeql/rust/elements/internal/TupleExprImpl.qll 23a0e4367fbcfcec3e2cf4a429f329a222b399c6729dd60f7ea42550273a6132 615f3b4897fdcbfddcf5c58e6edd64bf6e395923af89cc4e2a336099168bb6ad lib/codeql/rust/elements/internal/TupleFieldConstructor.qll 89d3cf2540235044ed5a89706cfbdebc5cdf9180fd5b6d3376c79a1b2c0430c0 16861fe089aac8e42a5a90d81dd48d5015391d0a06c78ca02bd876d65378699f -lib/codeql/rust/elements/internal/TupleFieldImpl.qll d19737bb02e86705a20501acd730775c666b2bcc9e8d0cbada3c8a9781d08dd8 94729e3b264de6e77b68c067284055f6f255eff6e39fe45956ef680914a7090c +lib/codeql/rust/elements/internal/TupleFieldImpl.qll f86d5df1598b9276bf2d6cb21a1daec8b27cef7a98db2b2ce91e4e0f9b3870ec b6db10ba5f6351bc1874daf47047ba74ada8b0011f355a44b6d529a1e9003657 lib/codeql/rust/elements/internal/TupleFieldListConstructor.qll 4335ba2061b6e4968db9ec05c0b4d3e6a564db89a2df69e036f317672a7900b1 0b8dded875dbf696cf588e8c21acc27332a2ff66ced7bfabdfc1ad621991f888 -lib/codeql/rust/elements/internal/TupleFieldListImpl.qll eed8fd8801361bbe6d37f472f05804a4194771d469bf586e3dd050b6143087dc bee1d26a424ee262e61d7939cd8c7a6d7f6f930dde6c54a48c21852bf4a6c540 +lib/codeql/rust/elements/internal/TupleFieldListImpl.qll ec17ddfe1d03210b7737f9c96b9d4003a91e504f3174e4b0eeba8a429eda2d6e ef6fb91c0d6b14b4d6bea6e516d5425d51d490956075ef314c72da59bfff5621 lib/codeql/rust/elements/internal/TuplePatConstructor.qll 2a5e83ad5b8713a732e610128aeddf14e9b344402d6cf30ff0b43aa39e838418 6d467f7141307523994f03ed7b8e8b1a5bcf860963c9934b90e54582ea38096a lib/codeql/rust/elements/internal/TuplePatImpl.qll 4adb38f0f8dae4ff285b9f5843efb92af419719a7549e0ff62dc56969bd3c852 3f622130771d7731ed053175a83b289bab1d1f5931526c4854923dbcec7e43f1 lib/codeql/rust/elements/internal/TupleStructPatConstructor.qll 9d68f67a17a5cec0e78907a53eccfa7696be5b0571da4b486c8184274e56344a 3ffa29f546cd6c644be4fecc7415477a3a4dc00d69b8764be9119abe4c6d8b9e lib/codeql/rust/elements/internal/TupleStructPatImpl.qll 896f001d82938bd018516a2b59ba5ad76350edb6b9747ed2ef5b96760aa16388 0552f9c0361d14be9896cbcfda17d8884d03a82c4f23c511a8de77fe71cfbb9f lib/codeql/rust/elements/internal/TupleTypeConstructor.qll 88eaec829cd4dcc6a152c7a335b1d365702ef410e46d9c04806fe53f06325b23 044fd0aca067bae82eb8ac448b7bcc66bc736e7e0ab8b770ee126381888fac3d -lib/codeql/rust/elements/internal/TupleTypeImpl.qll e05ca0beac96ba091083c9c73c458f2458b055c0e4f0a4a376066399d43145ce da55303ba9d00d7a4cac4b032836a9fbd4aec1473f1289ecb86ac31c5b5aaf8b +lib/codeql/rust/elements/internal/TupleTypeImpl.qll 4d570a1d6c3d69d8f62f125c71f67dd90e982801905716d50292f2e652156948 1dcefae60448b21f85d46d252e314d67a9f2a90171e56351e08e2bc0a4077fb8 lib/codeql/rust/elements/internal/TypeAliasConstructor.qll 048caa79eb7d400971e3e6d7e580867cbee4bd6b9d291aafac423aa96c321e76 d1d1e33a789ae6fa1a96af4d23d6376b9d82e14e3cbb777963e2d2cb8b22f66d -lib/codeql/rust/elements/internal/TypeAliasImpl.qll 333415cffc80e5500304e9fdabb83e9fe72dc3fa5e3081fb56f7fdddbb7aa43a 81bee811d15991e8277eaa6bc5794a8abb8031bc7f64462bd55418daace8c38d +lib/codeql/rust/elements/internal/TypeAliasImpl.qll 43af0e8e3df8bca5b4bd48ad870cb619283710ec5b86085d85874a67cac3cb6e 75f1f8ba2bd722d55a84178cf338d34f7c57a156f8cc014bd2b29ee4da5ea9e2 lib/codeql/rust/elements/internal/TypeArgConstructor.qll 51d621e170fdf5f91497f8cc8c1764ce8a59fde5a2b9ecfad17ce826a96c56c4 a5bbb329bde456a40ffa84a325a4be1271dbde842c1573d1beb7056c8fb0f681 -lib/codeql/rust/elements/internal/TypeArgImpl.qll f02f11d36de498c6e6db2c40a49e5013d8bc1cad93a7f093423c8770350786d5 e08dc45dd93c052f4cd38485c002b057ec5af8c634e800eb7dcafc963a1da369 +lib/codeql/rust/elements/internal/TypeArgImpl.qll c2b4aa45fb33c0e19e79584ec4245f9f1c19b4ec49ba7e7b03ea04a8a2be8c11 6b0be233709d67e1928bb519dd4492a7278d075289cae76a856182d56691f018 lib/codeql/rust/elements/internal/TypeBoundConstructor.qll ba99616e65cf2811187016ff23e5b0005cfd0f1123622e908ff8b560aaa5847f fde78432b55b31cf68a3acb7093256217df37539f942c4441d1b1e7bf9271d89 -lib/codeql/rust/elements/internal/TypeBoundImpl.qll 82f30a9bfc4714b458739a38e91b10ca5c814bbadf56ca1ac81893b0e1e03ff1 a9ced8f3076bbfc2a38cf42b71f208bbd1c192d8d4a2bd206ba8e71ebc4deb71 +lib/codeql/rust/elements/internal/TypeBoundImpl.qll 4d6763884968be0dee85cd1a6a18e1406178a3cf3bc905be2813cf4953b428ac 1e2dd309a9153ab60962b2584b9a2f16b68a75bd7168815642dcadf480da292e lib/codeql/rust/elements/internal/TypeBoundListConstructor.qll 4b634b3a4ca8909ce8c0d172d9258168c5271435474089902456c2e3e47ae1c5 3af74623ced55b3263c096810a685517d36b75229431b81f3bb8101294940025 -lib/codeql/rust/elements/internal/TypeBoundListImpl.qll db2c83f1b79cca056c6489ae523c1dc6b2433700da6dce39fddabdf7fb217dec cae68f45cf7c364a19d4bbf1bb8bb2eb3984b99425901b44c7f444a8652fbdcc +lib/codeql/rust/elements/internal/TypeBoundListImpl.qll 23557f993a1de15a3b08652f53fd99dea8b3af4b8a65d7331e99f50735a7942c 8d91dbad037268ec37907ef6c2b0e927f648551afb57f706ed4d79d6aad5f5d6 lib/codeql/rust/elements/internal/TypeParamConstructor.qll a6e57cccd6b54fa68742d7b8ce70678a79ac133ea8c1bfa89d60b5f74ad07e05 0e5f45d250d736aaf40387be22e55288543bdb55bbb20ecb43f2f056e8be8b09 -lib/codeql/rust/elements/internal/TypeParamImpl.qll b88bd98abf477c87e6e219a97ab0191f4fc8e6c84c0dd1416fba543e6fc86a9f d22d269320c7672a68aa3e5d2d754a8eb732a8d1a28d676e86e6309df72a434f +lib/codeql/rust/elements/internal/TypeParamImpl.qll 9e7169e8254e2d9d13b11a17cbe04e874f72fb67a75c3585e70eddec71ba5c7f b8c862b2cd53bc211caea23261d9832613418aae51f63ef08922d300c2d1f4f2 lib/codeql/rust/elements/internal/TypeRefImpl.qll cfc08bdcc8e7e588f533c7e64c0c08d317d63cdb50f4cba4b4b3e589b37b0fea b46ee7de9b5e9894807004e1bedf39e7d25912ed79de6ac5adfb37a43aa4804b lib/codeql/rust/elements/internal/UnderscoreExprConstructor.qll 8dc27831adb49c1a47b9f8997d6065e82b4e48e41e3c35bd8d35255cea459905 6c5a5272d37f83f1c1b17475f8adb7d867e95025d201320e20a32dab1f69f7bf lib/codeql/rust/elements/internal/UnderscoreExprImpl.qll 4277b23a09a4ba5e53ca2cfbb20eba6a5f66039b6268da79410e0be30332fedd b9ed79468157a7e751f78aa7597165672cbc38191d5f85ecc15cfdaff388a26a @@ -421,41 +421,41 @@ lib/codeql/rust/elements/internal/UnextractedImpl.qll 5c23df7e448184d76ccab2c227 lib/codeql/rust/elements/internal/UnimplementedConstructor.qll 70b0489fdc75fed389de8203947ed9c8eabb91373a1264eb2c8018ddbb2d9baa 0f2592c1697a2f2f913014ecd73b0e3ff1ec5b038ba1c3a22e7939bf8759e664 lib/codeql/rust/elements/internal/UnimplementedImpl.qll 06771abc088e0a8fc24032c9d2633618e8e40343ef8757a68cc0a70f1617165a 5738f626f1f4f573fdf7dcd5bd57a0948d290ed89342b9160e95ef3c84044f9a lib/codeql/rust/elements/internal/UnionConstructor.qll d650551a1b3ef29c5a770bdad626269cf539ed0c675af954bc847d2c6111f3f6 aca9064ad653a126ab4f03703e96b274587c852dc5e7ff3fea0fec4d45993f10 -lib/codeql/rust/elements/internal/UnionImpl.qll 73177e3594986c5c908f282fc9c7c83a6af1200acaca5099f49c93cfae03a9f9 cbe1ef8fef39814926beeeeb1c8cdef0b7c761d80daef02868a1aeba55c95874 +lib/codeql/rust/elements/internal/UnionImpl.qll f1765a7a37fb29eff98d67d166c35df4921eafc8cb61c11c7848185535f0497b 9f041f6ee82bd3cda2ddea0ee58d7a996123b1713b9d127f764eb74a9387f685 lib/codeql/rust/elements/internal/UseConstructor.qll a4f790795e18abc29a50d6fbaa0db64cba781e3259a42cbf0468c24ac66b63e7 2fa288f073ac094a838c11f091def2c790b347b6a1b79407c11b10c73d6bff57 -lib/codeql/rust/elements/internal/UseImpl.qll 1ae372d892d66f00dda66df4b266454c6fadc50e83aad8f891006e4d7d56602e d3f2acd4e8a17d457af3c1431a738d4de299d50493ed91ac832d3a6de654c481 +lib/codeql/rust/elements/internal/UseImpl.qll ba779517c3c928ab6e794360b6344829e84ec6da5e1de1b03b4eaf8bdae58ce9 0f4ead9eecb584eb9827502276ffe8cb1da0d2fa4b8f660d2afc26ac4e0fba86 lib/codeql/rust/elements/internal/UseTreeConstructor.qll 3e6e834100fcc7249f8a20f8bd9debe09b705fcf5a0e655537e71ac1c6f7956b cdbc84b8f1b009be1e4a7aaba7f5237823cea62c86b38f1794aad97e3dfcf64b -lib/codeql/rust/elements/internal/UseTreeImpl.qll 37ad5186e1026f948ac00ababc0326c7ac48619413597498d24e03037a522894 a795578b41af1b5b387f298d05f00d62ef92a7ac010271ed85211f129e49d4d2 +lib/codeql/rust/elements/internal/UseTreeImpl.qll 25e286538c048cc7ee07f4b5a8b77bc8b5a215fb206f4ab20163bd81dec0b90f fe44969d441c0c34bea1b0c25cdf35f25ea667c6e2da9ea067d230f484492715 lib/codeql/rust/elements/internal/UseTreeListConstructor.qll 973577da5d7b58eb245f108bd1ae2fecc5645f2795421dedf7687b067a233003 f41e5e3ffcb2a387e5c37f56c0b271e8dc20428b6ff4c63e1ee42fcfa4e67d0a -lib/codeql/rust/elements/internal/UseTreeListImpl.qll e069d94d36d15cf1a58c5612257168578a3e64a633cf0a8031de392086903b66 c5a7b5d1066662f9f35de31f24121efe6abc824dd7b0db500633b2cd78b5cebd +lib/codeql/rust/elements/internal/UseTreeListImpl.qll 6cac5242f1219df0fe9b3c139db8cc075a2fde618614ca56de2c856130a8ebaa d2ec917055a45f4d07d4ea6dff14298925ae323b165a5bcb6e906f7aad463f82 lib/codeql/rust/elements/internal/VariantConstructor.qll 0297d4a9a9b32448d6d6063d308c8d0e7a067d028b9ec97de10a1d659ee2cfdd 6a4bee28b340e97d06b262120fd39ab21717233a5bcc142ba542cb1b456eb952 -lib/codeql/rust/elements/internal/VariantImpl.qll 50db84a1160667a4441a55ec9687d4ff659db3ad8c2abeda4e96ec9c138c39e6 0c5159bf4a873e053eed48c3ee2f5a0ae5aaf5e0f5531cda0e0114e50e07c75b +lib/codeql/rust/elements/internal/VariantImpl.qll f5204121f15407ffc0926128239f317cbb9277ee456217940c15d48ba80abd49 4de0a8895d9c08f86fa139007ed009a3a5e1101b9edb40c73c58a4059c318802 lib/codeql/rust/elements/internal/VariantListConstructor.qll c841fb345eb46ea3978a0ed7a689f8955efc9178044b140b74d98a6bcd0c926a c9e52d112abdba2b60013fa01a944c8770766bf7368f9878e6b13daaa4eed446 -lib/codeql/rust/elements/internal/VariantListImpl.qll 6bdb6b0ecf77300338546e49b115e09fbff0affd506afb1db6fdd3afbbf43a6b 7698705f4744e005b726aa42ae100d7bb6d63f301791f4f134024abf4ce29620 +lib/codeql/rust/elements/internal/VariantListImpl.qll 858f3668f53d8b6aacb2715a59509969fe9fd24c5a2ff0b5ceed8a2441cd9cf7 f2a57b6232247687f529be8e4d2d3d0d4d108221d8a6eb45a69a1bcc0cdc51de lib/codeql/rust/elements/internal/VisibilityConstructor.qll 1fd30663d87945f08d15cfaca54f586a658f26b7a98ea45ac73a35d36d4f65d0 6ddaf11742cc8fbbe03af2aa578394041ae077911e62d2fa6c885ae0543ba53a -lib/codeql/rust/elements/internal/VisibilityImpl.qll 8d111648aa4a0acfef1edb27a556a3269ed9bd0c3c8bed57e3a11d25a1158c51 08df8ef2943036be57735eeff96c9d5bd31db6fa859591f373308f18e35779b5 +lib/codeql/rust/elements/internal/VisibilityImpl.qll 767cf2421d615be1cf93b60b6887e3ede0b6932e13d87a547eb513d7da497454 2bd064c1210dec0c22bd96ee348c76e2f0a515ba4450b22f085f256010579491 lib/codeql/rust/elements/internal/WhereClauseConstructor.qll 6d6f0f0376cf45fac37ea0c7c4345d08718d2a3d6d913e591de1de9e640317c9 ff690f3d4391e5f1fae6e9014365810105e8befe9d6b52a82625994319af9ffd -lib/codeql/rust/elements/internal/WhereClauseImpl.qll 5941ad385d54818426a821c49a774adc1e0eda5b25dcd03524f59b060192073d 61836db855454fb4a589cb9731ed9fc971fd961bd78165ae73f35e49ec092a83 +lib/codeql/rust/elements/internal/WhereClauseImpl.qll 59d33533e641ce3851e493de3053acb5e21ece8d2a82b7b14fc01f83b82485ad a68a79ad4cdccc62145d0f5fffaf9a096391843589d0d1d27983facefce380d9 lib/codeql/rust/elements/internal/WherePredConstructor.qll f331c37085792a01159e8c218e9ef827e80e99b7c3d5978b6489808f05bd11f8 179cad3e4c5aaaf27755891694ef3569322fcf34c5290e6af49e5b5e3f8aa732 -lib/codeql/rust/elements/internal/WherePredImpl.qll 9e1042908a067abcb3812a4254edb9a0a33ae5d7df7c6e788ada6fd1ad9ee218 618b7530caaa6acd24f732713d66f06ed2cb732edcb6cb6e9e4f94581c1aa510 +lib/codeql/rust/elements/internal/WherePredImpl.qll aad95f448ca051d5dcd462429fa1ca95dcec6df2e70b6f64a480bd6839307581 411a66a5d866aa8cb4911c5106849adb103a063e1b90a9ecc5d16db3022bb1f8 lib/codeql/rust/elements/internal/WhileExprConstructor.qll 01eb17d834584b3cba0098d367324d137aacfc60860752d9053ec414180897e7 e5e0999fb48a48ba9b3e09f87d8f44f43cc3d8a276059d9f67e7714a1852b8a5 -lib/codeql/rust/elements/internal/WhileExprImpl.qll c44fb9d80d1592de199fb077e800cd238992550bf79067fe67bb2ef4ceb3d45a da48b1f09c940ed35f7516d29c5eee0d3aef1bb8a6ecade8b4aaa7a734f10bdb +lib/codeql/rust/elements/internal/WhileExprImpl.qll 5e716498402be3a1a8ed3594e13a03938bb793ac80f2a648bc93c0d746028d8b efcee38fe5e984a690c33f8bfdc78c677c2b0cdc5902525e2196a68fdabb6823 lib/codeql/rust/elements/internal/WildcardPatConstructor.qll 5980c4e5724f88a8cb91365fc2b65a72a47183d01a37f3ff11dcd2021e612dd9 c015e94953e02dc405f8cdc1f24f7cae6b7c1134d69878e99c6858143fc7ab34 lib/codeql/rust/elements/internal/WildcardPatImpl.qll 01e5fac111cce3bb139fc290dbdb2a80e7369a90952178228efeb025915d40b7 875e91fb1354ab8d94d5fa426b63714c70904f53d7bab15158fcbc290c62a0f1 lib/codeql/rust/elements/internal/YeetExprConstructor.qll 7763e1717d3672156587250a093dd21680ad88c8224a815b472e1c9bba18f976 70dd1fd50824902362554c8c6075468060d0abbe3b3335957be335057512a417 lib/codeql/rust/elements/internal/YeetExprImpl.qll e8924147c3ebe0c32d04c5b33edfd82ae965c32479acfd4429eeab525cf42efb b2debcfa42df901f254c58705a5009825ec153464c9ab4b323aa439e5924e59e lib/codeql/rust/elements/internal/YieldExprConstructor.qll 8cbfa6405acb151ee31ccc7c89336948a597d783e8890e5c3e53853850871712 966f685eb6b9063bc359213323d3ff760b536158ecd17608e7618a3e9adf475f lib/codeql/rust/elements/internal/YieldExprImpl.qll af184649a348ddd0be16dee9daae307240bf123ace09243950342e9d71ededd9 17df90f67dd51623e8a5715b344ccd8740c8fc415af092469f801b99caacb70d -lib/codeql/rust/elements/internal/generated/Abi.qll 7939df86f8f52b5c153dd317c26893fb539f98f55ec5bce6269b4ac35858b03b cba6a0e7b621720d153c9e3c768c70a6704b99d1b27df7f05fcf7faf49374044 -lib/codeql/rust/elements/internal/generated/ArgList.qll c1abda8f4b6405d29e42029b504781202280fd7b0a38fb243c5832d5cf1b772d 9b6fecac7304ea27bf138e273fbd15e3efe8c8a17c2beaa0ea75c954719f5cb4 +lib/codeql/rust/elements/internal/generated/Abi.qll 87e1ea6b2a8ebf60e1c69176632740e4e27fc56c3f173939b098ba376562b5fa 94b2121e71c4ec94d53a79f972c05a8484ef0d80ed638f53031e7cf4dc5343d5 +lib/codeql/rust/elements/internal/generated/ArgList.qll 1b75b2d7dcf524eb468a0268af6293e9d17832d6bedf3feec49a535824339b57 2bcaf464454bdfdda45fbd24d063f0f1df0eb69f684197b37105adc8f72cd1ea lib/codeql/rust/elements/internal/generated/ArrayExpr.qll 2ca97b602a707fe2c566002d8709792bb166ae52fdb7da28d7c4b8e0d66dd4bc 1cae1ef017171ec9a1ca28b4f2993b1ee26d22b51b3b04816d9b4e89fdff1fb3 -lib/codeql/rust/elements/internal/generated/ArrayType.qll 022eab237cff44d4473362315b6d77d6cf2d1565c171845745d70f6046cdb3db b1560c189bfeae92df8247ae0c4c69794701439d9300da1e68953be68848e27d +lib/codeql/rust/elements/internal/generated/ArrayType.qll 225ac477f67865d72b2a2e17420f5e52c25452a3c14f7ff367f873a859f97783 0030e3bf296dd5b69ea912fc85dc7120b060780033083127257cdca792dc3f4b lib/codeql/rust/elements/internal/generated/AsmExpr.qll b5fef59589c02c17857a4a7f5c7b5efb747a1e98710167efa5c2e88cffd7bcbb b43b297a3b4894e8dd92ef3a23b76f2684c303d41e6030398e69b7754ebea9cd -lib/codeql/rust/elements/internal/generated/AssocItem.qll f0d132b27a27956882b75a7509663fe9992570fe3b6c4636a63cce4c9cdaf2f7 a3849ce1c8f665f90c919c8c4b2c4ec429e33ad2034635828c25b045d2749c3c -lib/codeql/rust/elements/internal/generated/AssocItemList.qll 4d13c3c32887452ac38297a55a70196def9f64d952be52057e47f9d24b418eba 0777e766f5d05a26fd2810b817d55859e44fcaae18c1a195e57e5f671d46c8a8 -lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll 213a8c099e8abbb299068562f6a603d59b3470a126dcee7cae425cc5559ce6d4 d9b3976982310eef48976174acc2def14cb4de4525af18753c96fedec3f4b366 +lib/codeql/rust/elements/internal/generated/AssocItem.qll aa7c06e001b67e4a59476fa7299e09f8da16c93f91aff0ec9812c64386e7c023 0032b45e34e6aba9c4b3d319b108efa0de8ad679b5f254a1ec7c606877ff5e95 +lib/codeql/rust/elements/internal/generated/AssocItemList.qll d1ccbc5cb8bd41895d954101046a7810c4dcd402b981e2b4d78ecdae994ecdb3 50a5b5b5073c8926efdaf0a9a3d9d86f03ef850f94503629392a0a762b20cb9b +lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll 2a5bff8856c2c87f571629236218d23a7eb10fcc8e8e03f4f6957707972a96f8 1ceb581c640a9b0e9540655aebe7280101f33a6a8ff09d81f7d94ebb4d85c480 lib/codeql/rust/elements/internal/generated/AstNode.qll 1cbfae6a732a1de54b56669ee69d875b0e1d15e58d9aa621df9337c59db5619d 37e16a0c70ae69c5dc1b6df241b9acca96a6326d6cca15456699c44a81c93666 -lib/codeql/rust/elements/internal/generated/Attr.qll be2280024194e1866470fd2fc04092ed5b1a2da08c018a5dd7c081f5a1842089 9149d1ae2fa107738168157f686abda25901905e895f0a356767a8674614d89e +lib/codeql/rust/elements/internal/generated/Attr.qll 2e7983b2c462750065ed58cc10c62e42012ddf0dd32f5439df7c6d6bf8ff349d e8270d33a50f088a83a2dfaa5b0a63ec775a6c97c8bf3a9383ce7a1ba8fe8fa3 lib/codeql/rust/elements/internal/generated/AwaitExpr.qll 1d71af702a1f397fb231fae3e0642b3deeba0cd5a43c1d8fabdff29cac979340 e0bfa007bdecc5a09a266d449d723ae35f5a24fbdfc11e4e48aeea3ec0c5147c lib/codeql/rust/elements/internal/generated/BecomeExpr.qll 7a211b785a4a2f961242d1d73fd031d381aad809f7b600ce7f7f864518bb7242 17a0388680007871748cfdc6621f700a7c2817b9601e1bd817fb48561e7c63ad lib/codeql/rust/elements/internal/generated/BinaryExpr.qll 64e9bd9c571edd6e5f3e7662b956b1d87fa0354ce6fe95da9caf25ac16b66c68 3fca09fdbe879db2ca3293618896a462e96376a2963d15cce3d5b1baac552fcb @@ -464,161 +464,176 @@ lib/codeql/rust/elements/internal/generated/BoxPat.qll ec946a3e671ab7417e04b0207 lib/codeql/rust/elements/internal/generated/BreakExpr.qll a5e9576bde3d9dca3b1321a4f5348306b6b5593e9fa39769df00645d80b68f6c 25f190aaa10ab71315947d544c5ef8eedb701a0e665e282031062006c6d3d175 lib/codeql/rust/elements/internal/generated/CallExpr.qll c2700dbd9c33dcc14de10dc72ff49abafdf0952257864d4435cf8ac46849a2ee 7932f725f97ffbe1b050c2622a61a0d56f18c9264a3293466cba9915313495b5 lib/codeql/rust/elements/internal/generated/CastExpr.qll d6fbf02e9e202254666082a9116634d0eb933177866ac4c0a57b5e9c4bb4b383 477f67773492e3b82695461d56327c9db05a7d1a67e8d192406265f2ce369670 -lib/codeql/rust/elements/internal/generated/ClosureBinder.qll 27439d34951bd0ec33233fc7eeaf41161953c68220bd3388cd3bd1a8f8c32900 0b12dca7defc36fd5b62518d2013ea10a211c004b0601dc9fd05ba7d5231804b +lib/codeql/rust/elements/internal/generated/ClosureBinder.qll 94c0dcdd4cd87d115659d496c88a98354bc7d4ddc0fa27028003bf7688b99987 d59d713b426dbbdb775df9092d176eea031dac1f14e468810f2fc8591399cd19 lib/codeql/rust/elements/internal/generated/ClosureExpr.qll f9047451cb8b53f8b77e1c01f7ef485d5b5a92999e0591c6702062050052fa2f 2252be8b3022c587a8c6ad93b64d856263be7bfe2938c1d063e7cad845dd38e2 -lib/codeql/rust/elements/internal/generated/Const.qll 192d4ca56780f564235eb34c23b5d6b0609bda74bed3e36494cd2fd5707caa1b 819b8f5d9f4739bdbe9fd3edcbadac6fa513f88e9e3d0b16beb975a5bcf022a7 -lib/codeql/rust/elements/internal/generated/ConstArg.qll 1838ad9d6ad0727fe95041dea6d1596baca5456effdf0865d32e433e9ed43fc8 68c2bdece406c1c2f6c38ee4237f2fbb026bd2cdbe99c301a20278a958908c22 +lib/codeql/rust/elements/internal/generated/Const.qll 0dbea9732880a4583166714d077276ec2b5665fa9772ea4284ee7b3f3d567923 38efc474b76f0b13695e9d9b39d016200c251fd9db48d4a1ab27dcb38946ca72 +lib/codeql/rust/elements/internal/generated/ConstArg.qll e2451cac6ee464f5b64883d60d534996fcff061a520517ac792116238a11e185 1dd6d4b073b0970448a52bbe2468cd160dfe108971dbf9ae9305900bd22ef146 lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll e90cf24d7f995595111f2b48bd3775d064bc968c24074c122141aa0f058dcb83 a44f6e14da8cc760a0aae947c20ec47fff488da1e9a8dfab58b7dbc42c296fec -lib/codeql/rust/elements/internal/generated/ConstParam.qll fd701710329f49b344328b16c86860effffd9fb993f7c4d968e618fab1b56262 2a65ccdc056437576fb83ac20fe583fed6b4b17aca6b2bd125d009a154ba42c3 +lib/codeql/rust/elements/internal/generated/ConstParam.qll cc34626ea28b8bf4dbf2c2dd312b778e43a9725722039a8ba393ddd7267a951a e3c2983a794b4d623191db97616c3167b80aa847317685960919e03aac0d044b lib/codeql/rust/elements/internal/generated/ContinueExpr.qll e2010feb14fb6edeb83a991d9357e50edb770172ddfde2e8670b0d3e68169f28 48d09d661e1443002f6d22b8710e22c9c36d9daa9cde09c6366a61e960d717cb -lib/codeql/rust/elements/internal/generated/DynTraitType.qll 5ae11052fbc7a40e5bfb9e6b5254d4d6a0107ee4b3b9da6603f3aaf4f8ab5b8a 262b3f1976a69b34adb3adaca1c71dd37eeeefbf10fe6389b894c8713d3fb28d +lib/codeql/rust/elements/internal/generated/DynTraitType.qll da9dce6347ce385d7468986cf6960b4a6787f017ff5632612a7216ed62bdc9c9 9d0b37221674b597a21bfacbdfc7e08b54381a6adacfe544df154481cd562ed8 lib/codeql/rust/elements/internal/generated/Element.qll fb483b636180c699181c8aff83bc471b2c416206694f7028c671015918547663 542d1b9ae80c997974c94db3655887186df3921a8fa3f565eaf292dcfdac3c4c -lib/codeql/rust/elements/internal/generated/Enum.qll 29f6d078ce9b92d35c6634654d221627d09bd58521456863b107302ace5f516c 6b4709358042d2eee20e4827a16fc389835daed03ec185f9bbc9c30dd63f9109 +lib/codeql/rust/elements/internal/generated/Enum.qll 4f4cbc9cd758c20d476bc767b916c62ba434d1750067d0ffb63e0821bb95ec86 3da735d54022add50cec0217bbf8ec4cf29b47f4851ee327628bcdd6454989d0 lib/codeql/rust/elements/internal/generated/Expr.qll 5fa34f2ed21829a1509417440dae42d416234ff43433002974328e7aabb8f30f 46f3972c7413b7db28a3ea8acb5a50a74b6dd9b658e8725f6953a8829ac912f8 lib/codeql/rust/elements/internal/generated/ExprStmt.qll a5947ce40426114df440bc910d2f0117e2a084e8c8bf32ac9a77a4ad68acc119 bc5077b764146db27ddada71a6f1dd10c092322bad05febc3b64798aa24c5360 -lib/codeql/rust/elements/internal/generated/ExternBlock.qll b92413df78a94db12870cc52d06a403c044b75b7110387118e93a1debdd9043a 7ffeff9a0dba5d82789a8c0776d89f6ae2821de36dfcf740c807d6fa0d295160 -lib/codeql/rust/elements/internal/generated/ExternCrate.qll f2ce6c92410f7844502d26577c5ae397dc9652d9bf531396100e47c3de887a56 4b9bcfc8af817f26e9184347bda4b60e2a734f0e4d062f5bfd6b3e7b26d0365d -lib/codeql/rust/elements/internal/generated/ExternItem.qll 851a0ebe12e73300f84a4dae213a2e9beb143946f3e741f4ada49fb49d458ddd f599e6da76f03be2cbb56b74a239a45fd074fa911cfd97bb6a466e88427e7284 -lib/codeql/rust/elements/internal/generated/ExternItemList.qll 947c16a4cd479757a6b39516aab4ae84c442177e9ec7a7e95ef1acce43c6e9d7 ab7a3bb55c37956da87c6ada71e0054008eaef586498bd01e785ada5010440d3 +lib/codeql/rust/elements/internal/generated/ExternBlock.qll a8ba7dec266603ef1e3908f923a497bd1e206ec729cfd4ad397ef4502fddc745 cc20b5a47466dab52a8d57c1b3c99b09c01420967670c2e75d3f90302ced2dbb +lib/codeql/rust/elements/internal/generated/ExternCrate.qll 35fea4e810a896c1656adb4682c4c3bc20283768073e26ae064189ce310433c8 fc504dff79ba758d89b10cd5049539fbc766ee9862ff495066cea26abf0b5e0b +lib/codeql/rust/elements/internal/generated/ExternItem.qll 749b064ad60f32197d5b85e25929afe18e56e12f567b73e21e43e2fdf4c447e3 e2c2d423876675cf2dae399ca442aef7b2860319da9bfadeff29f2c6946f8de7 +lib/codeql/rust/elements/internal/generated/ExternItemList.qll 6bc97fdae6c411cab5c501129c1d6c2321c1011cccb119515d75d07dc55c253b 6b5aa808025c0a4270cac540c07ba6faede1b3c70b8db5fd89ec5d46df9041b2 lib/codeql/rust/elements/internal/generated/FieldExpr.qll 3e506b5cb93793ec30f56bb637a600db869fcba6181b068516a671d55c362739 7bbf953696d763ad6b210f378f487ba85b875fa115b22c0c0508599a63633502 -lib/codeql/rust/elements/internal/generated/FieldList.qll ebd3aa1139bd79324d79e19dfd463a8647d96e470e5a1298f4a21e005b856710 0f9fe87948bdf3446671c336631483049fde954d4ab3d2c262d949a8ffedbe87 -lib/codeql/rust/elements/internal/generated/FnPtrType.qll 92d4142c87c42ceb6991bec97e14cbd1082a854716cc203869f356bec5dcbcd6 145b48ae097c4272782af7f492bff266448482340f6a7a4c000a032e91305be9 -lib/codeql/rust/elements/internal/generated/ForExpr.qll e9292d42ebe71f3d843dd1f0baa0c40e2a2cec47ece5b49be95533a7406a84c5 ec369c4bbbb51e89e2e3f89df2a52c021aaac181509ae583ab1cbbbbda390421 -lib/codeql/rust/elements/internal/generated/ForType.qll 58dd689f0dc8af9bb4313cc631056e57781cfc0ceeb25953ce63a7dc4b05fd5d 13c7677e340b54dcc0eb3c176e662f889a0640d87bcc0e539459b8bb7b5ec58e -lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll 09d8929b63fee13cfb9f8a2de204cfc864ff6ead4f65c85e3cc41bff23facada f86393ec1413b7972e77173dba195e0e9d745427dd7cdba598b78c694d131600 -lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll 7fe594abecbac5cdfb762741766797cd5644419e911f7c9b74ace84bcf279e45 0369b61f40a7a7b8dcdfd36dc3ee949531b49662d4903f50536f80d882977ee0 +lib/codeql/rust/elements/internal/generated/FieldList.qll 43c13c6e3c9ba75a7a4cb870fc4f18752001584d48b9df0734055a6ebb789331 7c51b0b13eb02f1286d3365e53a976ba2655c4dbd8e735bc11c8b205c829e1ee +lib/codeql/rust/elements/internal/generated/FnPtrType.qll e8e2f159983fb0d9ccc30d62d0e8b679a06c066076eb8f4ca36f3bf12be406fe bc8f2efdf4645a63b9eafbec2f8e5d1008e1decb67f29bdf1eed4c3e2a89c64a +lib/codeql/rust/elements/internal/generated/ForExpr.qll 541b62b48911d4999f9ed64ab6c8b9910073ac4add0225761f319677328cf120 976c3a91c9eedfb1e2d9ea76ac501348643b3d23c723d7a777042258d416d091 +lib/codeql/rust/elements/internal/generated/ForType.qll 3d43d044a1189281f09c55caafb6c8020a836f49e2866077086101925a573cf2 646b59bfd1b428aaf7211f574c49f79cb4c6a79ca151aa0663b2b31480298721 +lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll e07a1ae310f590003f1b88fada7dcf4847c99adb9d4c838d1c88e66e1da85c5f 0ef7342451fe2cb06e765fb4b33bb8c4a9b927f5edbc8feb5c6ba3655697f447 +lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll 40d6daa7d2bafb33798a21d79774dc802cfbd7a31618ac3bd0149399ea2bf893 d1172e2151791228559004792e125fc4625f6a26ffad25f29efb0ad263bf8795 lib/codeql/rust/elements/internal/generated/Function.qll b239af1a8874802b8a311706c53d56e3ceaad7ed23a7f97d1694bf961b63768b 4bc3c23685fa05820222e472ab1cdb40a271f862727d3bd878d47de9c2e3f485 -lib/codeql/rust/elements/internal/generated/GenericArg.qll ab1316af9d9c3db0c987a74bb3020cf7835ea264472b27c9a5c18d102e5f1141 02d08e22400bac7721b5424e018414f8734694181aabd26d1f5d31613cd8daee +lib/codeql/rust/elements/internal/generated/GenericArg.qll 464da0ba1c5ddcd1be68617167f177773d99b5ac4775ec8ea24d503e789a9099 6faa1033d59baf7c210ac4837a55781cfc054b7acbad8027faf4630dbfa6e101 lib/codeql/rust/elements/internal/generated/GenericArgList.qll b8cd936bba6f28344e28c98acf38acb8ef43af6ecf8367d79ed487e5b9da17cb 8b14331261e49d004807285b02fca190aafd62bfb9378b05c7d9c1e95525fe7b -lib/codeql/rust/elements/internal/generated/GenericParam.qll 3ae8f4060d578c37f4b2bcbeef16484c44fceba070f5fef569e4b84a2b0139f7 ace1e7c7c5d920a27430b8859cdcecbfc536c9ec4814c1e4a03d28b904f29b35 -lib/codeql/rust/elements/internal/generated/GenericParamList.qll 2bd4aa05d99872aba5c76743edc69645890d3e93d04d8df41a7a1ea7902eed39 d23e1c7fafaaa70a2d8ced7ed2e9e8b2c4225d5b0ca8cbb8c62a17673bee923a +lib/codeql/rust/elements/internal/generated/GenericParam.qll a0285123f974f287154b706bf6688b86edf72a4adcec57346c654d962435651b b42c3915e9564b5b5c5282229bf882aa3309de26a77721b2255d6f4235c0cc38 +lib/codeql/rust/elements/internal/generated/GenericParamList.qll f2d8945bc70cda6929bb6b652f9e3c7707e73fb5e778b21e99dbac594e71285f 7b97da5b6a6504377456bedebddc293d714f90e8fc2ce64199656666d5f749af lib/codeql/rust/elements/internal/generated/IdentPat.qll 557b2b1fe9e719ac6658c06c162f03d5925d848d7fdc4364da850e588a3ca9df 5517fde679c47c0604a0d177c53bed64f83e33e14d1b64f45e3467e3a8be77fb lib/codeql/rust/elements/internal/generated/IfExpr.qll 3d3655fae99a338559f538c245346730ac8cc615ed39e809e7140d217ba3353f 0a58f73b8007980238a039841edaedfcd40368fcf3b1d90d890d2ef405545c45 -lib/codeql/rust/elements/internal/generated/Impl.qll b25fe00b55d48ed53f3092003605e4bb383c44391f392a26d5bfcedcb366565b bca673b397702a39355e6bf30f4f8f964f9f726dc5b3f581b203b27bd0a6e6f8 -lib/codeql/rust/elements/internal/generated/ImplTraitType.qll 12677e9fbc982b622ca46b78c889b816a4d924a933d76734fb74ccf22c717ffb 0e2537cc97c20d44d4ebef381eb12f278075e108d02e111b25243dbe16d796ec +lib/codeql/rust/elements/internal/generated/Impl.qll 31fdd707dd8dcec845758b19eddcd4eb5bbd44ddccac83191cebe0c402834a66 ef06985099dee900a9403898f45349619ed138d23fee185137ed0baf679fe7cc +lib/codeql/rust/elements/internal/generated/ImplTraitType.qll 3c29684f5ef386b883b79dc9758441d97f090e065be177ffc8240aaf0f3d1e7b 03ea42c2a95cf917ec73d88b7b4ca5e53e10d7b046074f59100c0ec6c2c1ed6d lib/codeql/rust/elements/internal/generated/IndexExpr.qll cf951fc40f6690e966b4dc78fa9a6221aa5c6cade44759dcb52254f799292d11 1572e71918cc4e0b7e028331b6d98c9db23100a3646cd3874d1915e06ab6211d -lib/codeql/rust/elements/internal/generated/InferType.qll 136359028a0aaa957a3788469c6cfe95c4e51282f9ce361ab9d21fe6e6a60fd7 d494b9f9f3e03ade31a9c8ccaa212ef920d7a7ff88fcc20eb4f91bd362db30a9 -lib/codeql/rust/elements/internal/generated/Item.qll f9e954d39375e9abd604a877046641f1726544e73f7f2dd6d6d35a339ad4060f 4265dc3d91ddeeec236f6ec436fa6bb09cd0ff83cfd16db02483f904e231dd45 -lib/codeql/rust/elements/internal/generated/ItemList.qll cd230f40f075e57ac51b4cfaf18682de3c042c1c3aa8ab3bf516e4fa9d4f83b0 dae003281463725de231b697ee0c7b7b10c4b4dbfa641eb412165aefb11d5c4f +lib/codeql/rust/elements/internal/generated/InferType.qll 23ee25135c59ea5578cdf7c34a41f606e217e7260c3c8f404d12836585d5cad4 400da322fa1be62c4e300ebdf481eb92d4226eb6c316c668da8cc5168065774f +lib/codeql/rust/elements/internal/generated/Item.qll 70930ebfea4d0b56c0c47bede0c7aa21ec119210467fecc58a850273efb9080d c3bce1b435c3370083a3ef95da7647e720ca4e636b83dfa0ccecbf11f7ecd34b +lib/codeql/rust/elements/internal/generated/ItemList.qll 73c8398a96d4caa47a2dc114d76c657bd3fcc59e4c63cb397ffac4a85b8cf8ab 540a13ca68d414e3727c3d53c6b1cc97687994d572bc74b3df99ecc8b7d8e791 lib/codeql/rust/elements/internal/generated/Label.qll 6630fe16e9d2de6c759ff2684f5b9950bc8566a1525c835c131ebb26f3eea63e 671143775e811fd88ec90961837a6c0ee4db96e54f42efd80c5ae2571661f108 -lib/codeql/rust/elements/internal/generated/LetElse.qll 61254c4e7d2f84482b5551d065bb43aaef55a8b5698547e2e0fe8a038932050c 38736f60234e46fbd1c0f937992661f9f56b40d8be7ebf79e33f7276d005c7a0 +lib/codeql/rust/elements/internal/generated/LetElse.qll 7ca556118b5446bfc85abba8f0edd4970e029b30d414ea824a1b5f568310a76c a403540881336f9d0269cbcdb4b87107a17ab234a985247dc52a380f150a1641 lib/codeql/rust/elements/internal/generated/LetExpr.qll 9af0f89b294c8a0a751317e7074fe370339563d36c1df4911d1ea082a4df77fd 68272593d1feb88990bfbd0b8c222776f085e49694894384fc6d96e9464ba734 lib/codeql/rust/elements/internal/generated/LetStmt.qll aa1852db86ec29f857a90677f0c6b4a07f0fd965fc193d4141be95ce15862fca 40f32a37c0cc161b099fe0b4c7d713da928781d3e2c3de90db991df1d9062647 -lib/codeql/rust/elements/internal/generated/Lifetime.qll 551636289598d15b6b0b8f3940fdc74193f73f42a4077c7d6ee58d0aaf349e3c 686306339fe5d2ec35a42fff49b1546f8005a51a509d354fb2742ef03fd13118 -lib/codeql/rust/elements/internal/generated/LifetimeArg.qll 6470c3dcec621462f72f0423f5a54aa713e977f359dee97853f8e36147ffce67 8e12b9b24a04bc719393c2681da0dba3882c2c8b3918cf9cf6956dea3e0f5047 -lib/codeql/rust/elements/internal/generated/LifetimeParam.qll 55943ccc6ed1cc8182dc782917a795cfda2270c8d605c39a41530a826cd4c4f2 6c8c6894bc91eae551af4ec88de3e20b7dfec659aee8c4b47311e6172beccae5 +lib/codeql/rust/elements/internal/generated/Lifetime.qll 90d01c76188ce0c053122c62b41e47f27c4c7717ca5a4999a76797360043da0d 7b9feb202da5a06cd17f7770bb66742fd9e7cff0d410fefc7ffaafe710ac16d6 +lib/codeql/rust/elements/internal/generated/LifetimeArg.qll 7c1a44e3d480e75142b171eb51382c9492d393043833c0ab4a4036eba19043b8 7d8273b62794268dab6938ba1e3a3560a80a2c49cd9a9717345785dacd311059 +lib/codeql/rust/elements/internal/generated/LifetimeParam.qll bcbde38bfb99034e470634dbd32c0df34c40e1e531e2d235b7ef29c0b66f8a56 1fd15bbaa1dbc521b2ee4bf0bc1009c411aff15eac07c0842ed9883d9a291669 lib/codeql/rust/elements/internal/generated/LiteralExpr.qll f3a564d0a3ed0d915f5ab48e12246777e4972ad987cd9deaafeb94cf407b2877 2337c3d5f60361bd10f6aeca301e88255f5dffb85301cf36cbbfa1a65bfad1cd lib/codeql/rust/elements/internal/generated/LiteralPat.qll ecc2bfe559abfce1be873fbf7b61b5728897c9afc3bb3f69551d8320d273da71 42196fb6a4a0ff9b570fd0bdbc920f24744b3f46772efbb46648af7fbfe1fbda lib/codeql/rust/elements/internal/generated/Locatable.qll c897dc1bdd4dfcb6ded83a4a93332ca3d8f421bae02493ea2a0555023071775e b32d242f8c9480dc9b53c1e13a5cb8dcfce575b0373991c082c1db460a3e37b8 lib/codeql/rust/elements/internal/generated/LoopExpr.qll 22b755dfaf238ecea722c0c94c399992014e23481ec6fdd61f803bbec012b6f9 08731630c2dc05aa1e0ada222a6057752d9ce737329c62076708828247a358be -lib/codeql/rust/elements/internal/generated/MacroCall.qll 0fdb6642a8e064e59c4fbe98e419fd5c018936a48b9447f4253ddeccf82542e5 de7c3915b84719b182f6471b32c57a2176f71a6ab7301c69215a7bf0b7981422 -lib/codeql/rust/elements/internal/generated/MacroDef.qll 4d3e70503fd345203faccc36363a74aa75da5d1f32b5ac7e789505bf710867d6 3d5dc863c0d77b97610ce87c16556ead1a0a1e09b55991fabf7453678e05f39c -lib/codeql/rust/elements/internal/generated/MacroExpr.qll cf6ee2d287ec1b4cdfed5bc0aa3bb2419edbce11d255b677893638b6bfe6550b 513bea7d4eef4f0d8bea5dfe7ece05f59b4e03bdfe48bd724d97d1652eb8ec44 -lib/codeql/rust/elements/internal/generated/MacroPat.qll 7b1a0f02cdd9592957ba65623d392aee1eb51654a0ba024a3f09d124ee113f2e 0ea48a47635bfb9c5066b7ca4822311bef725f92950592491eaad47b771bf0ef -lib/codeql/rust/elements/internal/generated/MacroRules.qll dfc1d7b91c0aa90b4c043b501f6aebe75b8b3c75f25f5645e61353739967ecab 62bdd514ee595ef80f744021d16c7d0f95bd8e52286bd226d02e3c3ce9e5f977 -lib/codeql/rust/elements/internal/generated/MacroType.qll 810abd757bb55e10c9899dc79380ed7a29a76c44778b69b0504abb62a9f30ef7 f28f2585280532a5b628ad579340a998984acc604518d9693ad8f3c812d2aacf +lib/codeql/rust/elements/internal/generated/MacroCall.qll 8b49d44e6aeac26dc2fc4b9ba03c482c65ebf0cba089d16f9d65e784e48ccbb0 9ecf6e278007adcbdc42ed1c10e7b1c0652b6c64738b780d256c9326afa3b393 +lib/codeql/rust/elements/internal/generated/MacroDef.qll e9b3f07ba41aa12a8e0bd6ec1437b26a6c363065ce134b6d059478e96c2273a6 87470dea99da1a6afb3a19565291f9382e851ba864b50a995ac6f29589efbd70 +lib/codeql/rust/elements/internal/generated/MacroExpr.qll 03a1daa41866f51e479ac20f51f8406d04e9946b24f3875e3cf75a6b172c3d35 1ae8ca0ee96bd2be32575d87c07cc999a6ff7770151b66c0e3406f9454153786 +lib/codeql/rust/elements/internal/generated/MacroPat.qll 9e927e09d47029a3025eaad271c975e73479a80ea933c921381b6c9d751f2866 bdf5c58ca27743eb2e2dae2aeea3f3fc21f8a4f98fe1001598876455c88e8f69 +lib/codeql/rust/elements/internal/generated/MacroRules.qll 4fbd94f22b5ee0f3e5aaae39c2b9a5e9b7bf878a1017811ca589942f6de92843 49fb69543ee867bae196febea6918e621f335afdf4d3ccbf219965b37c7537b1 +lib/codeql/rust/elements/internal/generated/MacroType.qll c462824df4a002956c036966d15cd0bce206e664888f8d0c7834dedb38b3c0bf 947480f07c40128ef3d00ad4c3a29a685472b3e20a661680c22f6bb318205ed1 lib/codeql/rust/elements/internal/generated/MatchArm.qll 8fb740a0f2e308782d9cf390672969cd7cf6e698e5b847fb02ae3fa6c205646f 42bfe8dd94fc24ec925fbd44016df111600f99d1216c9a698631373bb6048830 -lib/codeql/rust/elements/internal/generated/MatchArmList.qll 645cf17a5d585106911b6aad573784dc5770d965e10577a1b90ed4a68caff231 b24d8a255568878c9b14f14b889e819280a244afea73f87670a127142a948749 +lib/codeql/rust/elements/internal/generated/MatchArmList.qll 13362680c037fe83fef4653562cc10a4429078316b5ec7c47b076336cf4aca2e 41c674293c13eceaca62134ae0c6778541f6a5201cbc5c146f0ba01b898dc267 lib/codeql/rust/elements/internal/generated/MatchExpr.qll 689d65f690fe05bc262d0a5bfe69bb4f8a142db387c5765fcc4958a9b49989f8 2979cd2017d0538870d17b2b7592c75cc05b706bd36c9de3e5dc38fa3a957e5b -lib/codeql/rust/elements/internal/generated/MatchGuard.qll ffc296730932710f0da0332cd8563f6ac1eff5019e1625a4ab7dc722755fe5a0 f04d4d5c7ab5ea53b461a690ac6f13174aa39daf157788649bd7814df5b07b11 -lib/codeql/rust/elements/internal/generated/Meta.qll f729fe8541204780f1e3827fc81b947023b06400d912236f673505ec8bf3d654 70b13073d38beeafec59a37fc25bf9d6bf28493f147333d4bb8a0028b3a4d345 +lib/codeql/rust/elements/internal/generated/MatchGuard.qll 521a507883963106780f1782084c581fbcf1179863c7c15438c4db79e30e78dd 6226feffaaa8d828a42ece0c693e616cd375672eb987c3b7ff1ca15fa23c116a +lib/codeql/rust/elements/internal/generated/Meta.qll f1ce7cdaf2a6fa3b86f0465e33a9521d254c032468427b276d93276ffd5142be 046d72c868ee2664b8a291de16320238ece9d0612c93c96a0d601e0b6079bf90 lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll c2d6faf1f840628dbc5aa59c90dbd8b244f6bd4a7dba25e410047fcde11ff378 2d0251b095bf15b0275d493efdd1f9ce0926a3cff6671bb550a7a672aaf62a30 lib/codeql/rust/elements/internal/generated/Missing.qll 16735d91df04a4e1ae52fae25db5f59a044e540755734bbab46b5fbb0fe6b0bd 28ca4e49fb7e6b4734be2f2f69e7c224c570344cc160ef80c5a5cd413e750dad lib/codeql/rust/elements/internal/generated/Module.qll ebae5d8963c9fd569c0fbad1d7770abd3fd2479437f236cbce0505ba9f9af52c fa3c382115fed18a26f1a755d8749a201b9489f82c09448a88fb8e9e1435fe5f -lib/codeql/rust/elements/internal/generated/Name.qll 9269c6eba59ac706b2efaddf9300b107f67ac5b5ac50868b57519102195b27c1 e02a8ae65999e0d7527f0036527677050b6d1e37fe9d044d908d831703cdfcfd -lib/codeql/rust/elements/internal/generated/NameRef.qll 8ceff5552a2c1b855c389d69e23db3719b0f4046bb540113f6c1bb8a34d98f41 f86553b63fd62c534cc1aa8167341bfabd7d13d926213d1133a89547d69adb73 -lib/codeql/rust/elements/internal/generated/NeverType.qll 50433d111288dbd18d12c74daad963f6229166d6575a7d8828a8e7dc933594cb aac974c8338634f8012952f8af1b45cf808e9ba78ae9f2154c7a5b6173380e3d +lib/codeql/rust/elements/internal/generated/Name.qll 12aad57744b7d1b04454159536409244c47319aedd580acb58ee93ef9d7f837d 63fc67ccc085db22f82576a53489f15216a7c29d5b941b14a965eab481534e2e +lib/codeql/rust/elements/internal/generated/NameRef.qll 4292fc7aa9ba22a7fa5bd638c38f696cc6724d8ed5e7346e7c5a52c4e4b65eec dfa8c3d4b521e43b76b18666d3d32d159c21b7b194285bac425df681544d269f +lib/codeql/rust/elements/internal/generated/NeverType.qll 14dd3c08db1db873b365fc7f0d1cf3f5d6229b1f78bc85100c36c22d1bb8ee40 34257df0ac59cfd982ea5f30ab225c8bfece71d9fd3be84ff79cf1b0bff55060 lib/codeql/rust/elements/internal/generated/OffsetOfExpr.qll bb17a1e1d4332225cf4bbbae4a1bab9302c2d81d191fe835f2f973915d40dd2a f9e73210b81992040a5a5a9ac3ad936159fb3475445f130c7b28f83dfb4170f5 lib/codeql/rust/elements/internal/generated/OrPat.qll ee0487b90849c3e2a836c956ae8837f27515a9dc795bf17287cba2cf7a39d839 35117b6a3dcebab09f12665441332b6863200e206679ee97894170dd9ef7795c -lib/codeql/rust/elements/internal/generated/Param.qll ed78b4383e95ae259ded868843b48c27c6015809a9707cd9a74c298d9b622896 e8e0e253cdbe735766b93b99a9ecec5d5d9c6c2986cfc64deb3f683bdb084583 -lib/codeql/rust/elements/internal/generated/ParamList.qll ff7f9c67d1d85a48ad2a0c6027011414682caf84c1bfeac4f0d98289dbd8cc5b 13d4dd1bc8c3d04547905dd1e4588baa15f33e85c743b3e09666a02f58cbc941 -lib/codeql/rust/elements/internal/generated/ParenExpr.qll 2b16c61f9efc534d182be3da010c92e2ec9ff12b1b0252d4d90dc9cda3eb3a28 cf487691c5badcf389ea110b15bbc74797194d3251aff2fbaa8eddd7959471b3 -lib/codeql/rust/elements/internal/generated/ParenPat.qll c79ae30c86d401140d44ff574166b547c5f73a6fb73964eec2e1797a36e43b4d d80595a9e85ef0d3d9543049a9d1eb31c21f36d8fe3b79480f87c4514c67b67e -lib/codeql/rust/elements/internal/generated/ParenType.qll 23a22694557ba1faa2f87ad77511e74850bf3abb6569cb179944a94c40a18233 5a2a9503092bea581b4117b38137533da7f2a31be5b1512e5f6444c191962436 +lib/codeql/rust/elements/internal/generated/Param.qll c57bf238123e8337adb1556cf788bde2b2e8841d4afa0799649db9d507b02d85 7cb580219ec9b6257735f7c53260cd2bb5533dbe342bef3b793ec7b6a65e7027 +lib/codeql/rust/elements/internal/generated/ParamList.qll c808c9d84dd7800573832b63a2ca5296b5506bffdeea054893a56cde08f91560 d4599c52231f93e1260fbae7de8891fe4287fa68b1423592b7a1d51c80146dc8 +lib/codeql/rust/elements/internal/generated/ParenExpr.qll bc0731505bfe88516205ec360582a4222d2681d11342c93e15258590ddee82f2 d4bd6e0c80cf1d63746c88d4bcb3a01d4c75732e5da09e3ebd9437ced227fb60 +lib/codeql/rust/elements/internal/generated/ParenPat.qll ce24b8f8ecbf0f204af200317405724063887257460c80cf250c39b2fdf37185 e7c87d37e1a0ca7ea03840017e1aa9ddb7f927f1f3b6396c0305b46aeee33db6 +lib/codeql/rust/elements/internal/generated/ParenType.qll 9cc954d73f8330dcac7b475f97748b63af5c8766dee9d2f2872c0a7e4c903537 c07534c8a9c683c4a9b11d490095647e420de0a0bfc23273eaf6f31b00244273 lib/codeql/rust/elements/internal/generated/ParentChild.qll 62153298532ad8787b0c02df71c1ac4076db75d519ed1bf726f2d71dd5d7ad68 c57903db3133f8e251991cdf9c9c53398ca5e0536ccde5158b959487c05f7856 lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 lib/codeql/rust/elements/internal/generated/Path.qll 299abce24762a5ab023f3cf1ab9718b83047e171aed42a8092e7a155914b1657 db1a23d18640c548f08c9f94823838b5e019ac85877c7b15df2d1493d1846572 lib/codeql/rust/elements/internal/generated/PathExpr.qll 17cdb0a7393258a207450f08e37178fc9d35d167f064ba6015be94246f3dc933 a75fdd280aff6d87e083a92030e041c2eb52b57cf7151d4a6989fcd31d6a64bf lib/codeql/rust/elements/internal/generated/PathPat.qll 98c9938d6a359fd717829b196eb09701d2c798e18c1f43fa7b2a9145afdf6c19 caba2e629cae08682baac90a76ae9a48cda2d7d6f9c23d506fa0ff3f292978a4 -lib/codeql/rust/elements/internal/generated/PathSegment.qll efb651b099cc6e26bb7f25e37ada698a85196e4298b20d8165157ec8b7f2213a 7e4c60588f547316f7dc4f74fd7302e78c080a6eb704063eae03b14eee0aefec -lib/codeql/rust/elements/internal/generated/PathType.qll bf8332463698fdf2c77f440ddab58d563dbe9d2862eb50f2af5c7f598245bfcc d586d81e8a3a08b4815b182d09a256a6c4d3dadb30e159384fda4f7d6e02fa5d +lib/codeql/rust/elements/internal/generated/PathSegment.qll 4621597fd86246f788b8f9ca73f6b0f27929fc04261ce3ccf85da1183071431d aadda8bce386a3b7a9c53b98465eedcc4f724e37b8a904c1775af5b7ffb041ee +lib/codeql/rust/elements/internal/generated/PathType.qll 45de78e5374d6eb0446e2112ec72d3692c2811df9fa2ad03d0127e426940abe3 622cf70408413a565a0dac58f451035ac1339c8d0ee5b24f630680201cb0aa48 lib/codeql/rust/elements/internal/generated/PrefixExpr.qll d723079487d2f648121721dd5e43436e95efd9b0876eee39c0d5e044269718d3 20e5fed17709435245d946e9e0dae51a29d879e66c5dfc21c3140f801cde47ac -lib/codeql/rust/elements/internal/generated/PtrType.qll 55e27062bb52ceeb7e43d02986895f5646c261e51586d1d4d007df8aa6ea4624 607e8915f4cbd4db38e4b147c41536f646dac00a28ea2833b2da255088363f2a +lib/codeql/rust/elements/internal/generated/PtrType.qll 5f12b6ad29b4e5ce51c205e2199594ce190e1aa24fbe3ddcfd82317a0b472222 8940e8dcccdf5cfc863aa2f2bc52bbddfa4d9ac8e8b38973cc1ecc1fbe32b3d4 lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll dc03515d678ba052c2ff2dd9f0883e0bce54cac740ba9a15e5173f292c1b6971 dc03515d678ba052c2ff2dd9f0883e0bce54cac740ba9a15e5173f292c1b6971 lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9 lib/codeql/rust/elements/internal/generated/RangePat.qll efd93730de217cf50dcba5875595263a5eadf9f7e4e1272401342a094d158614 229b251b3d118932e31e78ac4dfb75f48b766f240f20d436062785606d44467b -lib/codeql/rust/elements/internal/generated/Raw.qll c9b1e59237692c0b65d5e3d6a230cefde205be1b26a76170c63c6d7308ff468d 5938446ce1ac3a8c60321a709f79558f08f5e1b797a453a2b38e9a1e7ea5419d +lib/codeql/rust/elements/internal/generated/Raw.qll e99568e4adeb158ca514e886c7c2193583932c5f685d1d2ea75e9d544b5a60b1 957270b1cd461050fdec2eb6249d216cfc4f3fe34efe2be147b0e2a6f1e43ece lib/codeql/rust/elements/internal/generated/RecordExpr.qll eb6cb662e463f9260efae1a6ce874fa781172063b916ef1963f861e9942d308d 1a21cbccc8f3799ff13281e822818ebfb21d81591720a427cac3625512cb9d40 lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1 -lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll eed92ac7305b53090d12eb64b882815f10c862dd35c6b6952c44676a4d992d0b 22ef8801700874012f3c67449f5a80e694fb8051bf622f7e99ddc7d181260332 -lib/codeql/rust/elements/internal/generated/RecordField.qll 9e9af45a478c446c44b4c9b73300a0b5d99324cf2bba9f52f94a494aac52f672 7e939c8525d2d6863f6090b0ca4883a3282f0c43fc62639026e05b46c6299c1f -lib/codeql/rust/elements/internal/generated/RecordFieldList.qll 925b941cfda35def43b37a982e5648f45497a3b6e4805cb2a8bd7b8479f97d6f d0acee1c40e16435a4f45b6c2d834eda308c49d7bc4a761d0cbee1e987f16d60 +lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0 +lib/codeql/rust/elements/internal/generated/RecordField.qll 9f7840e1a2a194d5ed1d5201ab483eb01129849d49392581e0328bbc0934305c 0e019b5b8fe91bc96c7c07933c766d8a09c066d48ed96f24ae3dad303c00585e +lib/codeql/rust/elements/internal/generated/RecordFieldList.qll d7bb2677338cf420b0d6371aeec781aacc2272c73413ea96b7418177ad149fb9 5ef52074b9f4ec31e7422b70efdb2e650d673b2625efdfec18a4e48c30e35cf6 lib/codeql/rust/elements/internal/generated/RecordPat.qll f5f9904fcd8b8fa5fe65b46a68f830021a5e4a68f95ff403151565c3ec770477 56294ed2ff753d8be7742a501b15b5f3f5f20afe0f8171ee6771d049f26489e4 lib/codeql/rust/elements/internal/generated/RecordPatField.qll f17b1aa265091fd8309fd90d5c3822d170870e304f160225327de5a844a9aed4 0458e39dbe88060b4b664692cf0b41ebf4364de268d9417658c14c883c9c1b33 -lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll 091843c79f5a5f311d82da2e6b3c4927ece8adac379d741a65fa382f598776ad fcda9a27dbd830b1280df231347a26ee841309d2161524d2003b08995f209609 +lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll 08d4740bbb519f15ab20b694b3c45e396a2a59cce0f68fa4b9698348784cae43 99919809607ae61c707f591ee609c50bcfb90d5b4f9c263f6b8e78658d21b605 lib/codeql/rust/elements/internal/generated/RefExpr.qll f75a9550456e8b53044d0aa94b69148cb04950273000ac19eda57a836091670e 24ea42dc26b6b84f5807959e787a0487b7a33ed1f20c24d34af2799110a1902b lib/codeql/rust/elements/internal/generated/RefPat.qll 7483fcf9bf555a0ca60bfdbb91fd1c7344c98cb60506469cab24fddd90450005 b233f86eec76a3916ca5daac4812083f452f26089cabc13811a5600862ac1832 -lib/codeql/rust/elements/internal/generated/RefType.qll 69a50e86d2888e34e1fa890bb3b9e97a6e43629eaa0b9fd3f4e5e1f17cf4ea8e b62db90677618bced85937876cb99ae6ae499460b69db5a89407f64239920258 -lib/codeql/rust/elements/internal/generated/Rename.qll 9b6288e058229406ae9ac3574cff29ac79cf60149f7969249e73c26f2bc622b1 abf96eb6b15b8aa8e51e66d526c20c71fdd4e6375354f3dd597f04c5cf56d6e3 -lib/codeql/rust/elements/internal/generated/RestPat.qll 55aa7afd8675082bc879458205a18c73234332797a6ff9c3ea8de7af1cad7182 902230cb2818bbd44390c67df2e604cff913b6afdc17ca0aba2c3b0f19fb2836 -lib/codeql/rust/elements/internal/generated/RetType.qll 3efba9799e12d4e4c21ba8e01ca3a6a905adb7af301d1ed0209699cdb77a3cbb 878b9b0e1a013de26a23b3746e03dc2c0c61d7642e3390f15701bb4001408a55 +lib/codeql/rust/elements/internal/generated/RefType.qll 90b03447b77c9a8ae5317a7f605beac4a3c9251f2e5409681fe8badad41d1dd7 bd96341b52450eb0ab262aa8ffd810ff7b091d4c1ed8576d794d7705af565296 +lib/codeql/rust/elements/internal/generated/Rename.qll d23f999dab4863f9412e142756f956d79867a3579bd077c56993bdde0a5ac2f1 9256c487d3614bf3d22faa294314f490cf312ab526b8de0882e3a4a371434931 +lib/codeql/rust/elements/internal/generated/RestPat.qll b3a4206e68cf67a0310a466721e7c4b3ab855e65490d589d3d856ad333b3d5e8 30b471bec377784f61d73ef93e74fc0dcec7f512ac4b8791d1ca65f2bcea14b8 +lib/codeql/rust/elements/internal/generated/RetType.qll a26860cd526b339b9527c089d126c5486e678dd080e88c60ea2fe641e7d661fd a83c1ce32fd043945ad455b892a60c2a9b6a62d7a5aadf121c4b4056d1dfb094 lib/codeql/rust/elements/internal/generated/ReturnExpr.qll c9c05400d326cd8e0da11c3bfa524daa08b2579ecaee80e468076e5dd7911d56 e7694926727220f46a7617b6ca336767450e359c6fa3782e82b1e21d85d37268 -lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll 423a15bd9d6f427ca06134e51ddfdb23a7c29cbf275dc55bf1367bc63bf73e51 e0492b85d829c0fc5c40f553c2c598a3f151c9798e517717575baf693636362c -lib/codeql/rust/elements/internal/generated/SelfParam.qll 39f520f8a72d63baa944d77f22134c3ea40277b4cd15af5bfc484896650c7136 421cb0ffc3d7d1c4d5a0a73094f4766701c1471afb7bf19e17eef524636b6ac9 +lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll 34e32623d2c0e848c57ce1892c16f4bc81ccca7df22dc21dad5eb48969224465 ccb07c205468bce06392ff4a150136c0d8ebacfb15d1d96dd599ab020b353f47 +lib/codeql/rust/elements/internal/generated/SelfParam.qll cc9693cd6efd7528584f00696b86e41027e05066f8e8aba1ca25bd7567b971ed 689b4746ab4e82de0b7b6e11350959c5194a1562497a21a831c75c6e325ff468 lib/codeql/rust/elements/internal/generated/SlicePat.qll 8b1463758d7b15a0303384c8136a48a8e71ce27da4ba6e421272b9751a988e64 7562d47308f197bc63ade0f114cd23a17e7f60fa696716f6a30fc7b7411642fe -lib/codeql/rust/elements/internal/generated/SliceType.qll e007b3bb897454c5a292c7846b784b9fdf92126f3447be6c7a33138390a88e50 86164f1ae9b8eb622c589d97c07d76ef53273cd68247fe0d6d261b34195f951f -lib/codeql/rust/elements/internal/generated/SourceFile.qll a7670e531ad818f273b6bd3e0c581d863420a745a5572792002764e376e912c3 cbed30f759fcbbb348da4c1c4e0e1eaddf2eb6368bcb2d203eae275c78c5eb0a -lib/codeql/rust/elements/internal/generated/Static.qll d2e643b301409f515037f445f29600cfca2b97c9d198c869ef4f71a5a86e1c5d aae164e6b058f464f61225fe8ad19be3035d12403b926a17ef2c73e50243ff2c +lib/codeql/rust/elements/internal/generated/SliceType.qll 98ee8b566be28f392ab9c9507600e8461ad0b48cbbbd422d22548aca691f8330 528d6eabddf49b9dc474971a2f3a6ddb6f2d77dc7f8449140ef54646c1ceb822 +lib/codeql/rust/elements/internal/generated/SourceFile.qll 55d44c9f09c5ff28c4f715f779a0db74083e1180acaf0d410e63ca07b90d1cb5 78c0af48b0b64aa377413ea4799dfe977602a111208e1d25e4bdfa920dbd7238 +lib/codeql/rust/elements/internal/generated/Static.qll cae5313e08e4af44c46b2580226993eff639a5257863276e720de2309afff3c3 93fdbd117ecb69fbef5c84632e08483c0faf051f882f1a266215044a0d5bfd94 lib/codeql/rust/elements/internal/generated/Stmt.qll 8473ff532dd5cc9d7decaddcd174b94d610f6ca0aec8e473cc051dad9f3db917 6ef7d2b5237c2dbdcacbf7d8b39109d4dc100229f2b28b5c9e3e4fbf673ba72b -lib/codeql/rust/elements/internal/generated/StmtList.qll 1cc19cef831648b7a9888c9dd5cad173a1bb37269469d74d433dec89351306c9 da5db9a60c7851bfd9aaa8f23f92470f49fd93d140e060c0b6b2f8e9088b148e -lib/codeql/rust/elements/internal/generated/Struct.qll 55238e18dea9c861a3f8190fad9afe2b601d4ede45df1d5f344329928d312122 8afb6516367a8470ce818120b69dee16bc2f4ecc3a8f7a51b0af4190e3a51712 +lib/codeql/rust/elements/internal/generated/StmtList.qll a667193e32341e17400867c6e359878c4e645ef9f5f4d97676afc0283a33a026 a320ed678ee359302e2fc1b70a9476705cd616fcfa44a499d32f0c7715627f73 +lib/codeql/rust/elements/internal/generated/Struct.qll 4d57f0db12dc7ad3e31e750a24172ef1505406b4dab16386af0674bd18bf8f4b 1a73c83df926b996f629316f74c61ea775be04532ab61b56af904223354f033e lib/codeql/rust/elements/internal/generated/Synth.qll a5d3868a9c6fef100ef71aed486db8ee3a38b122659531f95270f54dbae087f9 922ac8372f274090881b5ae462af8624f1136864b1f93f3a8de52e47f5cce7b5 lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 649e5d313e51e78802c8bc67bfba1aea59bef9a83fc1b17bb558c3cf4aee089a 649e5d313e51e78802c8bc67bfba1aea59bef9a83fc1b17bb558c3cf4aee089a -lib/codeql/rust/elements/internal/generated/TokenTree.qll 8e5a519b7e8df18a0002fe71fe75a5eff2a247c4bae216e8a3f5a2784745228c e7fd7226940c0a94bda7f6ebca0328cb3ce38323e9078c2cc28c5455188c3d56 -lib/codeql/rust/elements/internal/generated/Trait.qll 6c841ff68aa7e8b15041b8dd005dc282b4abad7cfd0ed6525bee103a1e84cd0f 9b45005dd7466e480e4a34bdf033bf94966d71e7654debdb64091f5713caae19 -lib/codeql/rust/elements/internal/generated/TraitAlias.qll 43d8186b6f68853c743286a1f0128b3f871adfadc014332aca7ad67b1e361d16 be292b7b49928bcf7a07ed92ea79a185f5add9a9dd018756d3372aba0f887f15 -lib/codeql/rust/elements/internal/generated/TryExpr.qll cc3572fffabba8502ca0f09d7051fe18e5e56c76eb1e22e563d3cef498a42417 53fcd5c57e4929ba985b10b33757bcf287e01792c062db57cdd3bc62bb00e7ce +lib/codeql/rust/elements/internal/generated/TokenTree.qll 8577c2b097c1be2f0f7daa5acfcf146f78674a424d99563e08a84dd3e6d91b46 d2f30764e84dbfc0a6a5d3d8a5f935cd432413688cb32da9c94e420fbc10665c +lib/codeql/rust/elements/internal/generated/Trait.qll 32bdbb4dc9f03488195a90320a947013135cd2fae1b9d62b4f71ed9a4e39a967 5dab0fbec64698bf3cdae04879d3d1665cf82386b7b030ed69e6b20776ffa9fc +lib/codeql/rust/elements/internal/generated/TraitAlias.qll 0a3b568100baaca129a12140b0742a1c8e507ef5b2f2c191ff7452c882ba4064 c32e74569f885c683f8d3977682fcbc8b7699b00d5e538cc6b08acdfffa56bc8 +lib/codeql/rust/elements/internal/generated/TryExpr.qll 75bf9fdda5238155d2268806d415e341fa57f293dcadef003b4a11562c4cd877 935c746f822cf183cdf36bef2332f01e7ce38aa09aa8476d64c1062c5e8f13dd lib/codeql/rust/elements/internal/generated/TupleExpr.qll 75186da7c077287b9a86fc9194221ab565d458c08a5f80b763e73be5b646b29f 0250d75c43e2e6f56cdc8a0c00cc42b3d459ea8d48172d236c8cdf0fe96dfed2 -lib/codeql/rust/elements/internal/generated/TupleField.qll d8704db5c3c09f3a0146bd88f149d7c271c4b31f70aba69ba526ea5fa9bf76f4 fad6f0b60aee223ea900accf7b434b49881a523bb2197c3e62661bc620ab72eb -lib/codeql/rust/elements/internal/generated/TupleFieldList.qll 25f2afad44f4bd86d44a781f9c37aae395c8fe10c1c6b0efa1c4ae3f13964975 13a6677f5c626818a0853878c7c338adfc74719f0aecc8da16584f9873cc533f +lib/codeql/rust/elements/internal/generated/TupleField.qll d2580e046a576a1a7669463956c929912e383de304854a86eea5e45807a0a882 b41cbc48fcbb56543705e6bf708b72156307c71735d2ed42b97d8bf3c1099dd1 +lib/codeql/rust/elements/internal/generated/TupleFieldList.qll 9d4981d04c2ee005e41035b9699f03bff270c4e0515af5482d02e614a0b1a875 4e60b857fbcb668fa1a001e0eff03f1aa3a7465d32ce68e23544b705fa54fc5d lib/codeql/rust/elements/internal/generated/TuplePat.qll d61163a380f3f2c1709080e2df69a90764509af060e607e27e832862e4dae18c 108b7db493a21fe1fa0db99fceee952aabb0a128eac41e050877ab9136407403 lib/codeql/rust/elements/internal/generated/TupleStructPat.qll 87e0acfeb51d48c55648d5af783f5ea006aaeccce990ba26458c6935fbdf7c11 7c761e66ddacb51307e653c6ad45bec3fba8315049fbe6c4503ed19241204d41 -lib/codeql/rust/elements/internal/generated/TupleType.qll bdf7ef010405f5c4e888bf5bd5f946c755fbf84af3be0cb802b84692c3184486 a1508000050ec96a92bce5a70610948a51f6b5b9be69e9b5d5bcaa57d24eea7a -lib/codeql/rust/elements/internal/generated/TypeAlias.qll f2999fd1a692130e77e60db5fdddf5298884769fa0655c3478fb61ed06c11821 b394fb46c755a1170b39ef19aa6944d70f54880fe5c9f8061c661b8d724ba368 -lib/codeql/rust/elements/internal/generated/TypeArg.qll 074cb3ff177f1d8cc08053c379bf4a19d63c5434270d6954439b1911806838b0 91da3cd1052c9d5c83b08889808bdd7f4409221241788e0e0a6854e16672cfa2 -lib/codeql/rust/elements/internal/generated/TypeBound.qll 0f7c56054d08c9128428f7b44ca0eb49f7c74678c9a19359e58744275944ff13 2a6fcc9ea2c10eeeedf9c101155866e251a7ae8cf792f4558847bff1a15af224 -lib/codeql/rust/elements/internal/generated/TypeBoundList.qll 1ee71cd9281c47d2950bad0d30476f04251a053e1584d9ffc56630e83ad11834 23f04a00b7ee221a426badaad1959c7a04b46a502e434adb64d46f882cedd435 -lib/codeql/rust/elements/internal/generated/TypeParam.qll 85b22de3b0a520aa73ef464559388341c1132eda0e1a8a68a7fa7cdbb4c2b3c2 e575950dd3a0c7f12965db1b9516c1ce828276ed3a3b2be3272edc06af929fa6 +lib/codeql/rust/elements/internal/generated/TupleType.qll 7fae8e881157a24c4ce4f960269ba8010e227a81d3055b571f861f7196f868e2 18085a19a102df8e2cded938b49709225e89f0ce68b4a003310647bb259a6bd3 +lib/codeql/rust/elements/internal/generated/TypeAlias.qll c584cd4c6fedc50818e7bd6a3ac8d14ba916e7ae6be179bd2f51f3aff95673ab f4be9e83c9814fec205c606de5afeec836a7ec8d58d8b64fec9126472f2a8c68 +lib/codeql/rust/elements/internal/generated/TypeArg.qll fe4441b3faa44e542c43a85353347df23d3f74da0c4b17cb0fdc60f5aca9dee7 1473d044e979e7cb6628525ffd454549cd8a37560488c695f534243946cf83bc +lib/codeql/rust/elements/internal/generated/TypeBound.qll c6f75fd8e99e575c33d424c2c9c85918554bdb87b5f78848c66538df6ad08559 f107ae5edadc3bd1b2e76f0c5ab15d043946ac9d2db62c10132690de7282003c +lib/codeql/rust/elements/internal/generated/TypeBoundList.qll 31881cae2f71df5adf7a427357565bc0e7ba58c6a774a9d5835560a34c4db30f 1ff36ba34dd966d945d743781e3a1cccad4bb9fd5d32902dfd0bcad537501a85 +lib/codeql/rust/elements/internal/generated/TypeParam.qll dd57c5c370b4e3ed87c42c4fccf71b554cf1c588de1a1d1ac4ed5edbc1fb4664 09cd09537c1196f0a84850f654d324c6ad8aeaf9debcc3d9879e23a313ed93d9 lib/codeql/rust/elements/internal/generated/TypeRef.qll c4c3bdafe3deb05338f5031c798fa6e72b58301ee7737a785314e72c9c4f091c e6ec0c680bcfe61ff79468de485241a75fbd795b2d501004324b66b003fddbce lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll b3780c99c5d57159bef4c6bd2fd8ec44ebd1854c892c1ca776c740f71249e58c 2fd451cbf0a779e8042e439882e7d9cadc19d1e596df3bbb086d16f2596407c7 lib/codeql/rust/elements/internal/generated/Unextracted.qll 01563dfd769d6dc3c6b8a40d9a4dc0d99a3b6a0c6725c180d2bf4d7633929a17 a93ce90f8c03f4305e59de9c63f089fc7935298fc9a73d091d76933cf63e790c lib/codeql/rust/elements/internal/generated/Unimplemented.qll a3eb304781991bff1227de1e4422b68bf91e7b344e4f6c9e874b324e82a35e60 6bc4839fda3850a56dc993b79ef9ba921008395c8432b184e14438fba4566f21 -lib/codeql/rust/elements/internal/generated/Union.qll aadaf31598f7c0569e581cdad1b42782fbc8a2d62f3ce9d9b9181790ddcc872b c49923c6bd694105ad8dd401e44a4fb0fcd1f0adead4a4efe7fe853cc6eb6abf -lib/codeql/rust/elements/internal/generated/Use.qll a81a9ece488471e6e396230e3230a213ecae7fce5ab00b5a80c72a2ababa60ae 71912ad9fc8c466c6c8107c7a3b7946247ec0985667a007f2665bb14f3ec9f0d -lib/codeql/rust/elements/internal/generated/UseTree.qll 746d649bbb6ac4c91b6b9d6ad335abcc5dcc2cae04ac078684e2b210e3c3eab7 4ef4e9f969ff4455663bf5e8bddb824445ff42e8e985754e02298c9bed5dc449 -lib/codeql/rust/elements/internal/generated/UseTreeList.qll d92013afb8a46487cff767db232e4c9ab38cb393648ad4b30c4289c4ab376888 e9a8b6767a2aed13342fa84554172a43169030d7f16bce931a6100d6f6fed00f -lib/codeql/rust/elements/internal/generated/Variant.qll e359f67471c2bcf7180a75f400dbbc41c8575b997097a2601e739d3839765127 b577d62195bd230b80b0391632d89fcf7d88a9412d68a87bbd611fce4c628549 -lib/codeql/rust/elements/internal/generated/VariantList.qll ba1adef71852c362db34e88f19bc8892f552c02df4d9b8eff98fe0ad3db26e9f 3487bcd89cacd9a509b5467c220667632f2649daaa5dc76a342110c6b35296b4 -lib/codeql/rust/elements/internal/generated/Visibility.qll 25d4070c2018a00f917030f578316837e315122b7250e313d8c3d3a8e3b2a58e 94ae9e50d0d7fe60c97902f14cbe99b073e1a4863a218f3cea3e683a73a3898e -lib/codeql/rust/elements/internal/generated/WhereClause.qll 9373648f2097cfa1b008aff6264fbdf7a2ffd23d5fc4a48eac9e555ac5ca8b8b 81275c7b63f9327ddde9cd0c838c7524b107d467ffaf3ed2bcf93ae39cb3b158 -lib/codeql/rust/elements/internal/generated/WherePred.qll e221e0d5c42e075b0c8b5b8440fda499f75bff6a4810f42154b002e3a5e569d5 703b726d858f1373d8de2471ac696eaa2f564b851247a1e3349409366194aaab -lib/codeql/rust/elements/internal/generated/WhileExpr.qll 94c22d2bcf1e33023466cced2aad307d11e529f4167d8a1358a77423b5e4283a 06a18e476bc44b68316bfa15a45e68198e6116827a58f932e07275d7ebfa33b3 +lib/codeql/rust/elements/internal/generated/Union.qll 06a602aa7c7097e72fff6ea33d8fb4debaf4023b64b765a3d388ffecc9fa43e4 60d72bd1273e624e36f6227925adc611f5de098081d4f455c32f5af4938ee45d +lib/codeql/rust/elements/internal/generated/Use.qll d42ccf3516a9f79ae8766f93ad5f09d3cdcd7b96844d4c9de64189b56018a7b4 70a9553a8f71f6cbfdd0f59a4b42292d13177613ceb0542436436e0ac2e1f8ee +lib/codeql/rust/elements/internal/generated/UseTree.qll b39cbc96e473802372726d580febbfa7d73668ba476095aa4a61fae914865913 40ce6515b7df068fa8c0a7e5ae8984f50b71f6f96d625d631b28d525e3e868b7 +lib/codeql/rust/elements/internal/generated/UseTreeList.qll 829441cf309f008a6a9d2e784aa414ab4c11880a658f8ee71aa4df385cd2b6a8 ced82df94fea7a191f414f7e6496d13791d2f535046844b6f712a390663ac3d0 +lib/codeql/rust/elements/internal/generated/Variant.qll 2e3d8e7a7a97f2f33d6cad458ec0ded498c17a14b697722a96fffecd50c83097 46149bb257c08d5cd9139198b6519d7ad3fd25cc9ea6bfe99deea66f5f1ef201 +lib/codeql/rust/elements/internal/generated/VariantList.qll 4eb923ca341033c256ca9b8a8a5b4e14c7eac9d015be187fd97eeb25dfb1e18e e7865e975c35db49cd72cb8f9864797d3cfed16c3a675b5032b867ced2bbb405 +lib/codeql/rust/elements/internal/generated/Visibility.qll aba81820f30bed0fd2cd06831f7256af15ae32525b2a437896420b4cc067ea38 d6aed90b27124b812daf2ddd14b4e181277cbe638b4ccaab74e27681ac30e4ab +lib/codeql/rust/elements/internal/generated/WhereClause.qll d6c8f72bbec5d71c024f0d365c1c5e474f4d24ded0d34c56c1f66b1e4a384e9d ed14311d140eee00d3b26a4972f53e20d5af1bddf88fb5618e7e2d3ae1d816f3 +lib/codeql/rust/elements/internal/generated/WherePred.qll 342050e824ca6eb6116488d46cfc03efa79193b4de6049e1f5d4a9fe527b3036 ed07a81de7d63f853c93cbb7291eea3d7169953e34c2f2f98b570028dd1f8cd9 +lib/codeql/rust/elements/internal/generated/WhileExpr.qll fec8a9211b82a80601bf731db17409c5de6bf145295623bd86e28f96452fd91d 3916cf0c0e3b82b834727fc37809dd3e158f395bdf39971abe40b98e5f95a4d2 lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499 lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85 lib/codeql/rust/elements.qll 881084ba8191ae735ffc905d7d05aadb82739aa0887282a226f513f25c790e88 881084ba8191ae735ffc905d7d05aadb82739aa0887282a226f513f25c790e88 -test/extractor-tests/generated/Abi/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Abi/Abi.ql 7f6e7dc4af86eca3ebdc79b10373988cd0871bd78b51997d3cffd969105e5fdd 2f936b6ca005c6157c755121584410c03e4a3949c23bee302fbe05ee10ce118f +test/extractor-tests/generated/Abi/Abi_getAbiString.ql a496762fcec5a0887b87023bbf93e9b650f02e20113e25c44d6e4281ae8f5335 14109c7ce11ba25e3cd6e7f1b3fcb4cb00622f2a4eac91bfe43145c5f366bc52 +test/extractor-tests/generated/ArgList/ArgList.ql e412927756e72165d0e7c5c9bd3fca89d08197bbf760db8fb7683c64bb2229bc 043dba8506946fbb87753e22c387987d7eded6ddb963aa067f9e60ef9024d684 +test/extractor-tests/generated/ArgList/ArgList_getArg.ql c07c946218489a0ad5fe89e5fd4a7f0ad84a73dc2e650729f48a340cb133be84 ff2382c0693f47e5eb1290aca325290e60c19d877b25b1d7e2ee96009f5fe934 test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql fd4e504678714c99a987069e5013bda04313573cec2bab31b74bc4559bb73d7f 0b63120b61964a215ec451793a1b5aef525882484ad62193d7635b5a370881d4 test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql ce143c8b416c35270cca839848baf6d8cda74251f3717314e0f332fcb74a9259 c86d282153feee3facad752ed0fc1638be0cbaafca4ec620f337ad61b694cade test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql e8b7e24db6fc6098131fea1053430920b2e2f33d2aa52b10d2ff29b9efd70a88 a52b6b2476104695b395d86bbd1a99068372ca56989ea94b150055e664ba034a -test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ArrayType/ArrayType.ql d781ea647d60218777261d82230bd85f989a4768a043e736d268363b5a777390 b5c7fa0aa1b8b1f3a82b8af7254bf20efd3477bba83ad53530959d1733636604 +test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql b6a250873bc2d553219b8301a15bd19a4044f590085992c532a800bf3ab744cb 5e6b9dbbe2d3ea7f6fa3fba4811517a528d5eb58169b69d1b9113e1508c6e627 +test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql 1c23613e509ada3ffc1f727d0db7c5955dbc104d886fe5f9d8f39413b54d16b0 a662d234e1e54159d931a873f20ed8953d9b27778c7a6ca898f86b31d1dae0cc test/extractor-tests/generated/AsmExpr/AsmExpr.ql 1273efcd8aab7de2a04ead74075d25c8a22afc9f0e6a3fb4322e3508a2cb6f84 cdd5389a269c048f56afaf3e93a0fb076ba1f445d6dcfc6621d8a324cac2f421 test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql 93e644147ddc4de00c882c32d17ff3c22822e116b67361d52217619153b7d4c4 4c0c3f72707f41e879426ff75c5631e9283dc0507316740bec22216c5feb04e9 test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql 4a37390e948fe336b592342b0c2b63afeac3000ce1416f5875cc9b0ce5a826e4 d32df64ddc3ce1b0536018ddcff30a24d9099c67e6bcbe9a4693ffb6e478361d -test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Attr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/AssocItemList/AssocItemList.ql 0ea572b1350f87cc09ce4dc1794b392cc9ad292abb8439c106a7a1afe166868b 6e7493a3ace65c68b714e31234e149f3fc44941c3b4d125892531102b1060b2f +test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.ql 8149d905f6fc6caeb51fa1ddec787d0d90f4642687461c7b1a9d4ab93a27d65d 8fb9caad7d88a89dd71e5cc8e17496afbdf33800e58179f424ef482b1b765bb1 +test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.ql 06526c4a28fd4fdce04ca15fbadc2205b13dcc2d2de24177c370d812e02540e6 79c8ce6e1f8acc1aaca498531e2c1a0e7e2c0f2459d7fc9fe485fd82263c433f +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql 2bf498a1e318cadf66f9f6341b41247c09070dbbab6d15ed4d3cd986a7f7da85 24d62bb3cb0a97c0e6180221e6cc8be86d9616021f8ef53175bbeabb5151a613 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql c81e25fd7885f13c0500e8f9b84195876e70f2b25ad604046f497818226c8542 62ac0e7c82da169c248e4f9e0e8f866d2f4e599b03a287c2bd407b95a5d9efc8 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql 4d20375752c000aab8d2e4988fff1a5c95689d114c8d63f37b389b95000ee873 957e360a4eeefa2536958770a7d150fda610d1d45c09900dbe66e470e361e294 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.ql 0fbb10321c355b15a9fdb2022af254d9d50b084117e47abf4c03bacc6189c9dd 084624f77b21062822fd16441e0c05e7820140bd2e468aac624782f0c4474e26 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql 586cb26683e522469a5094d359be4d8e5c6a3a74c1621a059bfcbbbedc0e34b4 84784b38c24313f3ffc88371421550922d9deb44d09ca7727ca77e892a672dc9 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql 3e18791a74c12d93ac8f786aa76bd836876052837bb9f0b25222cde47c55e419 b53bb52ff98c1ca0ba09ffce034a97ddd86e32828df7acb9bf34e20c4fb19664 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql 37252b5cee5ae64c36612aea57a6766bd34254ae35b9774642a36a8222aecfe6 c1f587d52b39c8aa66b9e6e4f36f40bda17dfcd72714ff79a262af99f829f89d +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql 6973aa12e00987ad1482401fbc0855a5fa585df5b3d44e2db4e81a84e5af46b1 791822b44c21f78801c8360e2ee4651352719204d9b3ce75bd2d77e5f805f509 +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql 7e006ac8e8574c66a312b1389c7a85a83561b946e060575cc7234ef523b1a3ba 6123b375796c014a0bc96d39877b3108c13eff34536aa68402bda85511da18da +test/extractor-tests/generated/Attr/Attr.ql 028ac0a387f674205c5ef903238872ab1b6b7e2201f58c31776cdf740daf437c cb56a22887e0737d28034b39d7c3fb37a3d6eb1f34ce3d112bcea2f0affb3b13 +test/extractor-tests/generated/Attr/Attr_getMeta.ql f1e2df2bc987c670e31b454ab51b3028efc1018fbed2298a8c97f554eb1862f0 a9115ced872c89edc398bda1cbd54068f9065debc14ea5ac887ba13ad8f4e3d8 test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql 8dcc94a553fbddf17dfc619fbac563a9dc4fc6029860e10703e9ae9765d9ab66 52e7f0c98e6ab5dcef04b2ab5283ecde76e61a2297aa2080d16998f93dc923b7 test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql c5ee1fc6017c4432a59dfec7d10d32681bd23f98cac70bbe65bc2aec8a680f3a ce6cf93c6305e6585c9d452bcc23af9dc8cbe2c872d2af5238a54c85df2071ee test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql 143158284c8b7cc40fd2fa47c0bcf3f137ecd080b830476faca0c950b97c797c 0c9f64ce70cccf90fff7e7e9602f8ffdf68535d113914aab24f6450505b61d10 @@ -648,37 +663,79 @@ test/extractor-tests/generated/CastExpr/CastExpr.ql 2ffb22ebc6e47953a49162488b36 test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql 5d5d98172e495cdb8b5cea9d6588c4c245107b441464e3ffd6c27668af11ab4e 5820bf083aaa4c3275004a2cd9eeecc4b45ab96916cbc0655a1b42611c540715 test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql c37186b8f3e3dab8ae28c0da7263ff7272c40501beb16736ec0fb8990d285e22 59d50d7349234afcf84986b7570db9dcd342e16812f7c46199d4736cdfa5462d test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql ad5d6e260e1495ba360bd2ade3b60f09705a86a08d618acf8c4aff342c8ee200 c02c1dc65ba9160bc28827e40473915de5403bdc91c16d9d8b6778aa97314a1b -test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql 42516df87ac28c814d65f6739b2ede6eaa41c505d64756a3b8c7e0ca79895230 8b840f92ec033a4ef5edbe52bed909d8be0fffddf6d3e4bfaf9a8bc174fa2f2c +test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql 71010c43a78a7abe8e63c94353f4b7eb97aca011755d200e7087467c1e3b7a68 2c834328f783ec5032544a692f7e23975bac0228b52b9f8fde46ef46a5f22a5f test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql d79b1a60e9cd4266f756872f44363d062e8030baae9eb4b1dbaf9465ae88f0ec 46414e0aa4330a42f67083bf866a360fb5e2b234b7df5564559285046311e8e1 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql f7f803afa4e2a5976c911fdf8a91ec607c2f998e22531b9c69a63d85579e34c3 1296acd0fb97e1484aa3f1d5ba09d18088001186f3ba5821eb3218a931ca0d54 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql 22a973a61274e87620e38338b29beef395818b95a88e2261fff197f7a78a8f76 bd28ed426e4d07823044db869aa8022dc81e8599d156e3e0e7cd49be914a1f36 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql cbfcf89b8efb5cb9b7bfbea26b5a78b3d4c7994cbf03d5ca60b61ee1b5cb4be5 621431277732ef79c585cb0b7199c49b14c597ee6b594a70d9e6966a09d40a9f test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql 68ce501516094512dd5bfed42a785474583a91312f704087cba801b02ba7b834 eacbf89d63159e7decfd84c2a1dc5c067dfce56a8157fbb52bc133e9702d266d test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql c95bc7306b2d77aa05a6501b6321e6f1e7a48b7ad422ba082635ab20014288ae fe72d44c9819b42fff49b9092a9fb2bfafde6d3b9e4967547fb5298822f30bc3 -test/extractor-tests/generated/Const/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Const/Const.ql db81591df5a8822a578f9445b8444f6ac391efc43c61aab429edb76ab9c0303d 5f7ae3622c03eb151fa5326db785f0ff3fe6f52033fc071d758eac18ea1b5722 +test/extractor-tests/generated/Const/Const_getAttr.ql bd6296dab00065db39663db8d09fe62146838875206ff9d8595d06d6439f5043 34cb55ca6d1f44e27d82a8b624f16f9408bae2485c85da94cc76327eed168577 +test/extractor-tests/generated/Const/Const_getBody.ql f50f79b7f42bb1043b79ec96f999fa4740c8014e6969a25812d5d023d7a5a5d8 90e5060ba9757f1021429ed4ec4913bc78747f3fc415456ef7e7fc284b8a0026 +test/extractor-tests/generated/Const/Const_getName.ql b876a1964bbb857fbe8852fb05f589fba947a494f343e8c96a1171e791aa2b5e 83655b1fbc67a4a1704439726c1138bb6784553e35b6ac16250b807e6cd0f40c +test/extractor-tests/generated/Const/Const_getTy.ql bf9abfd2be9d22193bc6be9916c7171d79ae7fcdaabf1fc9659997d11d2f074e 133348f60312055fe112eca3a0ef2e1e210b1690261dd9b06979214908d59097 +test/extractor-tests/generated/Const/Const_getVisibility.ql de6b2e9d887316e279b45fab7887980ca7d93fd32c2259f3a06de2b6e2957c12 2f135cdbbb84b43d282131edb7eb4df6caba61bf7421881a49d4679f0f44f661 +test/extractor-tests/generated/ConstArg/ConstArg.ql f1422b216eb45819ff41f0c19e0f88aa184ddd3fa2984ba22ec46df398147fc3 d2e4f367848c2bc4f6aef51c1dd8180035c39919430082c83f18a3f324228df3 +test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql 317fd83ad51acc3ff3dfab71ebb1385b67d49404c1d7b3804a8ca3c099b84e99 91ecf5ebbfc1aab286dce708680f0be97417f9755676db7479fa6836e50be845 test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql b3e1f8c54af03af3cfe16dcf1831777404e360058f67acc4453c0d4211897d12 6f842cf96153219c7ab0d7d04db9a52b8fec71996d527bce69acb6678e437861 test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql cc06e762e1652e467c7cf02c34f17c621fb3a938f294ee527fa04ed78c8701ec f863f8f6bfc9d169b585ae56b4e4ac0fc1603fd14775450e950cca4d5ea28e8a -test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ConstParam/ConstParam.ql f883b198f9c373e2d4c630706af5ba1d8a2f8f4e9847e9a54ca56cc892dbdc34 ad59caac567e80940c7e0f06239a91e7793a57e9e6ab0452535daa1aae3f2a1e +test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql af8949f1ea039a562a3b3561185a85f7f8a871bf27dba0580782f81c62b6508c 2874783b84fdce47b809f953e02c36473cad6a2d3dd1c0f1a9cb14a3e28b9c30 +test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql 021630468422c30e7aa623bdf4e97f3076e68087991723c624922b1ee608d173 9fd78738cfd0455be2c655852f6c618e901af80c6b6791396d9683c118a44e91 +test/extractor-tests/generated/ConstParam/ConstParam_getName.ql e2e9b75dd7ce501793efce75079aabd3851b91aa4d437972693bacd7b04859d8 4d2326b39af870a2ef8b37448f78395cdb5c1e94df88f137ef71f8fd3548cd8e +test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql ad3f1ee12d3ba8e851856cf3e75566791218e40649a8bf54b1f08764c8b5feec f4ed7f40f83f59df8dd2f53073f73ee94c2ef6f6f77963f81ac8c62dd88244c9 test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 971ccb238aec663855745fa2669d5f8973a4e6c76bacdf0deaf23522ec1cf80c 4e3ceb4c4cd833ad8311bb02e5cda18163082e341cd8a3def60734a53cca8929 test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql acb261869d3b3c65e364e7b6fbd7afdf5305806d4417b05044beed9a81e66ea4 af35ce0aee87ddc7a0cd34be4a480c619940d036d5cecce0e4e1fcd75b7c553e test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql 39dae9872d92fa9b15343c93da545c2b0e15b4f27f2296c200fd4611b68858d5 52a209022e3b83260b4ef5513ffbcc1ca1f7c21bad2c721a0d3698793d2161d2 -test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Enum/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/DynTraitType/DynTraitType.ql db4cf318a76eaedaa9a9deaf11009a24497b88557439c2e0560290efe950ca05 e0fcd8be6bbe2e305ac16e25925a50206f36cba25cb0bc4c7e9b166d2ee6b19f +test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql d04a1836c28f14884771f5868d5a3f551d9251c3c3a6c07a4dd9dbef6b764875 9c590f1ecd375c22fbc0ad5657243ef40fe7a7684ee81e57e7efbb73544d4398 +test/extractor-tests/generated/Enum/Enum.ql d4dd671130089b3f62c9f2deb84fa78b33bffb69d88899bd37db9d54b8195d2b c32c6b9772bfebf01ab812b7f60621f16f843c8ab1b78e34b440442d69f5ef27 +test/extractor-tests/generated/Enum/Enum_getAttr.ql 8109ef2495f4a154e3bb408d549a16c6085e28de3aa9b40b51043af3d007afa7 868cf275a582266ffa8da556d99247bc8af0fdf3b43026c49e250cf0cac64687 +test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql 2a858a07195a4b26b8c92e28519995bd6eba64889bddd126e161038f4a8d78e0 db188f238db915c67b084bc85aa0784c6a20b97b5a5f1966b3530c4c945b5527 +test/extractor-tests/generated/Enum/Enum_getName.ql 32a8638534f37bfd416a6906114a3bcaf985af118a165b78f2c8fffd9f1841b8 c9ca8030622932dd6ceab7d41e05f86b923f77067b457fb7ec196fe4f4155397 +test/extractor-tests/generated/Enum/Enum_getVariantList.ql eb30e972b93770be1b64eb387814b99b3901e8884dd74701c5478574242f5269 43e2f53c339f27e71954a96e218f6fc8a631b827457f718693eb2c79737b6cb0 +test/extractor-tests/generated/Enum/Enum_getVisibility.ql 7fdae1b147d3d2ed41e055415c557e1e3d5d4c5ec0da01089c0a8a978782f9cb d377397b4d9a3f34aed2a1790d1e826c9f77b60d65d3535b7738f21c41e1a095 +test/extractor-tests/generated/Enum/Enum_getWhereClause.ql 00be944242a2056cd760a59a04d7a4f95910c122fe8ea6eca3efe44be1386b0c 70107b11fb72ed722afa9464acc4a90916822410d6b8bf3b670f6388a193d27d test/extractor-tests/generated/ExprStmt/ExprStmt.ql 811d3c75a93d081002ecf03f4e299c248f708e3c2708fca9e17b36708da620e5 a4477e67931ba90fd948a7ef778b18b50c8492bae32689356899e7104a6d6794 test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql e269bb222317afe1470eee1be822d305fc37c65bca2999da8d24a86fa9337036 088369d6c5b072192290c34c1828b1068aeedaabdae131594ca529bbb1630548 -test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ExternBlock/ExternBlock.ql d28af9f7d0fa29687fb3f420401769612ea5ed320597bddf6653a108ede53049 b4deea6cb1ebda9db6968096e4048f5eeca41261b2c2c30d5d23971301bd2cb0 +test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql 9b7c7263fcbc84e07361f5b419026a525f781836ede051412b22fb4ddb5d0c6a c3755faa7ffb69ad7d3b4c5d6c7b4d378beca2fa349ea072e3bef4401e18ec99 +test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql 78ed6a2d31ccab67b02da4792e9d2c7c7084a9f20eb065d83f64cd1c0a603d1b e548d4fa8a3dc1ca4b7d7b893897537237a01242c187ac738493b9f5c4700521 +test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql 2c2b29bdfdc3b27173c068cbaab9946b42053aa14cf371236b4b60ff2e723370 dfc20fc8ef81cdce6f0badd664ef3914d6d49082eb942b1da3f45239b4351e2f +test/extractor-tests/generated/ExternCrate/ExternCrate.ql ff105190427f15403325cc1e15a09baa8e79f8115dfd2d50435e4eeda0b715b9 1c8e30eb91b0d42ba319b07c98182b39859447069af7958b6faa518713c98f75 +test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql cbe8efdfdbe5d46b4cd28d0e9d3bffcf08f0f9a093acf12314c15b692a9e502e 67fe03af83e4460725f371920277186c13cf1ed35629bce4ed9e23dd3d986b95 +test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.ql 4bbc210ed3114f355a36768fc8173dfb65bd683bdf47491a30890cf110a6fb2c cd9c1b52dd350337e946fb43243de1504f0ae44d81668dab3629f2b7c2651572 +test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql 52007ef7745e7ceb394de73212c5566300eb7962d1de669136633aea0263afb2 da98779b9e82a1b985c1b1310f0d43c784e5e66716a791ac0f2a78a10702f34b +test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql d2c13d0c19a5ef81ca776f03a7259e743adbfa66ef440f7d402cd97391ecdfc4 c678f6ac0a075c1e0adc3768a344dbeebcf0d13e30878546094777e3fcdf92bd +test/extractor-tests/generated/ExternItemList/ExternItemList.ql 7596986006fe1084815ad47b7e1cb77c4062a8c0432c2e6234c974b8632ead40 23c30ea01dba595e6e1bfa384f3570d32df4310ec2e8dbeb9a20afab9edbbfc0 +test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql f9560f441efc30b65ad88e3d3d323f40cbe3862c04a9c044fb2ca16edac4f3ca 18138daa285c73d40e5caa03791a6133b44429bff4e14cb1f223d487cf1648b4 +test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql 2f20a6a4f41babb7340dd366a8145bb7cc9ceb75812af8a6316d076a4eac3428 4f613a73604dfe3f0d32343156e8ae30f4295186ac4ef2f733c772e96821ffc4 test/extractor-tests/generated/FieldExpr/FieldExpr.ql 1b45da610feb62cee42f7a3866e6a9396c1e4c880ce1a82f09892047090e1322 980eae97fdeff4b8b3b264080a3cbb320d3a2530960fa185108f665b4c2aee29 test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql 609c4f1e275d963cf93a364b5ec750de8cb4790abdaa710cb533ff13ab750a4e 8c2aa84b1ea6ef40a7ee39a2168baf1b88323bfbc6b9f184e7b39631765a48dd test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql 57df2d733faf3e3e30ae106d8423aab612ab0ddf8659da008e384130cf1e8023 1e240bee8e83dc26f78d2c55464ca1fb88d773691d47aee9a2182c90f57eb8f1 test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql 8631f5e8bdd72443a1ee3d667ee9136a51ad49dfd206612a36b79686da1beb19 692aef607108b8e3eaa78b8c915f2fd1d310905f8fea770b9694722a9a2a6232 -test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ForType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/FnPtrType/FnPtrType.ql c8fe0b3c849e37ac2bfbb1658ea3b0081502ed6fffb65454853298ffb2383966 d6732c9fa4e37f42c34369a67147df1a1fd453fdc1aa982c3f59578fd1f3f818 +test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql de1706382c2980c02dbdd295e0a2320c992afa3f19af0c2378b9980a7cd0c481 a3fa36711949d9d5ac53cc5dd39cb19b397c3f2e47c1d457df470c6e5142f9be +test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql 9ea393acf37919e2fd1bbc16e738440e00a56552bf80baef9bfd2a9a405afb93 3b4237b22eea569cef0081eb3ea16b2d0f01f8f070f21e16390267e9cbe0cf57 +test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql 57f662e4778e1bf4103f061bb8085def0708528f94045c9ff4a95ce802fff13d 924b924c7d766458e956afa0963e6eb1bfc083e5f9aeae64cf2d08929f79612c +test/extractor-tests/generated/ForExpr/ForExpr.ql eff335a301b9a71292bb6da0dffdf901c7a51df9960e9250f9eb980aaaa0c7ae ce7ab100c21c6fc334a4445b2ee311ae6c67992ef659ca32c94d60ac884936e3 +test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql d3399b7453e10ff48efc79ec38dd9b6e06bb472b9c39f559242d003e7f63b1d9 ba37e6bf129e1c2f9094e093bbfbf41864f2cb7725a64334f9443270dafdbfdc +test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql 90a6540f8a91cfe3ed1bdde1e680786ce5a00edbb797a8fe70bcc0507c438fcc 65c67ad5890aa502628ee73efd26bcbd4597a8bdfc9839233ede9e26393638f8 +test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql ce90da75e040f448d524187357f3ceededba72407a84c1dc8e1498ed9788044d 0e23d43e0b3412fe90c6a5a4331f8da85eebe19e05b8c7d9710056857280797b +test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql 21657e470752bd83e05e176c2ca9371ba0f7ca3d1f97f764a42dff3caeb46ff2 0cafad7adf79ce90f475465b4a144e6529c6345504282b1ba3c6a12ff2e99892 +test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql 1e0205a9b3a58fd2ddba49ef1b13a82c812519604d4c5bc02f23cbb6ce960016 d00efc63d714b1c76e4b0a67195d4e605f43a1e49d469f4f18bfa18d12280b63 +test/extractor-tests/generated/ForType/ForType.ql ba930d0c4fe52d57449ce4025b1c3e49c688afc5ef18ee8ac1ed7a9fd3eb8d41 08e9aa0301a942f6f9564ddeddc69606f3e2916e1b551cc56ae3b6048c56ce61 +test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql e25cd79737bbae92d8f417c6bbf6fb8ae660976b8005cd91d0900c7076fdd827 b1e32b7e3ca9f29a4564f83e37ae53de6baf04837a393e6dedc64a01cc7d10e8 +test/extractor-tests/generated/ForType/ForType_getTy.ql e932d3412828bb83afc42e2dc1a4cbe9fcf25ec9a9617ec138722f834091a61a 298fc9df34b2cb436c8f180c4d229341ee4a73e3c451b905f017f32a6f65056c +test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.ql a521903c73f79e2616f7b8ef76790e11cbf432f8437825d52d117da232022b9e 4cb195d09ecb51e5bbd5c1c069ec1720f74fc074efc88b0f5c07cfc140167775 +test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.ql 7e1a7f902fb661660760d2a2f3f4cb6818a0c9f5b5061ede6ae80223774e4e09 8a50f64cba6f56320631206c801160201e3c98e74367bb035d689baaa9b4e411 +test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.ql 0e2f24388d516e14d195957163a2d5d97029c9e11a83ca71cf69e00ecc0bb2a8 dab2969f5ae6a15ec331c0152e7c116d1ee2c3d073b2d4da59ffbcb83404c65f +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql 0cd439f61569ecf046e9548c458329647f331bfa034ae8b3d4f7628595881287 013a948607e1ac96100ea9a8cd3c8f357e378ac21baa015dcf4927022c2bdafb +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql 8f692486be1546b914b17abdff4a989dfbaa889bfa1fc44597f4357806c1a1dd da9fd237e31e9c8dd0ef0c3c968157815b87d3e8dcdfd74674c988ce2ab6d270 +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql 1f9bf1344f942e65c3a3591b6ae04d3f5a2a1a65459bce0d976698de7d8a5958 02acb861d8ab4d32cf144c589881a888c3da5e2ade27e8c85fec3ae45219bb3b +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql c912ac37275cbe7b3b29607bed1a3190c80779436422c14a475113e1bfd91a54 ef90f67a9b952a38ce557b1afbf0b5ce8551e83ddfaad8309a0c9523e40b5ea7 test/extractor-tests/generated/Function/Function.ql 608e1053c5be5a5d36e4be5cd9da5d4398a0a374adf0ded9f6b652c8b9e085f7 133260e1104616b467aa14a7e0237337aadac918f1b08bd1b9b4f1818fd911e9 test/extractor-tests/generated/Function/Function_getAbi.ql e5c9c97de036ddd51cae5d99d41847c35c6b2eabbbd145f4467cb501edc606d8 0b81511528bd0ef9e63b19edfc3cb638d8af43eb87d018fad69d6ef8f8221454 test/extractor-tests/generated/Function/Function_getAttr.ql 44067ee11bdec8e91774ff10de0704a8c5c1b60816d587378e86bf3d82e1f660 b4bebf9441bda1f2d1e34e9261e07a7468cbabf53cf8047384f3c8b11869f04e @@ -691,7 +748,8 @@ test/extractor-tests/generated/Function/Function_getVisibility.ql 490b0a369c809a test/extractor-tests/generated/Function/Function_getWhereClause.ql 37a44ce54bfa7e54dda5db2e5662d0fd70ad6e2caa07ffdedd923a6492b4c6a3 2ced4e49d19cf717b9bf26859fa20f94713b6438e817c63c29ccaf34bb5f373c test/extractor-tests/generated/GenericArgList/GenericArgList.ql 2d3e37da2c02a88ec8a1f99baebf352196f84c76c093c6f851d2c2d2ee941e9a 1cd884cfbaf59a2da080f50d966dc511243055fcfdd08a61bdfb10cc5701e1aa test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql 7f92dc62d814c39bc50dfd46c359540261fe433fcad1752ea2fe139a05071183 9863976c97c1b7c07d5d18d8ffee798b1c1b0223784a61066ee2c9ffc46c4979 -test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/GenericParamList/GenericParamList.ql 5d04af9be32c5f8bdf9ec679b0acbabd58ff01a20f5543a0c7d4fe5c5773ebba 7e86c4d3ed64b9ef2f928abd22b593d72131862321096722df5150b5202a4a28 +test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql 7866ed49ebfca1cc1fffeec797329a592f52b4431a5d259aeb7120a7f4961c44 16d89dd05d9db1b1997f801d9e5ba2dd9389d13a3031c730414f3daf5fb7b12f test/extractor-tests/generated/IdentPat/IdentPat.ql 8fc54811b0fabda503949557737d14a2e71ec68170b6e42e69fde08ba1a2c39d aff69e979a6084eb4e1d902df2bafd0cde806a41ab8ef83336585a60d4e3a7c8 test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql 02607c8c616dc94152777390f912fc1e6bb420cc3ea687397e31392848942aa7 aeb10434577815d9a9f0f45a1a448656323f05d5321ff07d435ca4a449527d53 test/extractor-tests/generated/IdentPat/IdentPat_getName.ql b96a3dbca1bade052cad294d95f95504665ad0b14c7f5f9f8083486d0ee64026 28c851703250c25b518024add1052d3204271db3f89eddf862d9a1e122ee6eb0 @@ -701,17 +759,28 @@ test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql f5872cdbb21683bed689e753 test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql 5bab301a1d53fe6ee599edfb17f9c7edb2410ec6ea7108b3f4a5f0a8d14316e3 355183b52cca9dc81591a09891dab799150370fff2034ddcbf7b1e4a7cb43482 test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 8674cedf42fb7be513fdf6b9c3988308453ae3baf8051649832e7767b366c12f e064e5f0b8e394b080a05a7bccd57277a229c1f985aa4df37daea26aeade4603 test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql 0989ddab2c231c0ee122ae805ffa0d3f0697fb7b6d9e53ee6d32b9140d4b0421 81028f9cd6b417c63091d46a8b85c3b32b1c77eea885f3f93ae12c99685bfe0a -test/extractor-tests/generated/Impl/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Impl/Impl.ql 2969c1fc9dcc836ac7f40f5a2030b6f90f57a87f8a3da72b253da34c0620d4fe 0453150f2818fc002becd34a9d8cb67bf4df93b00d91b5be9fe053a9ed44aed2 +test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql cf875361c53c081ac967482fd3af8daf735b0bc22f21dcf0936fcf70500a001a 0ad723839fa26d30fa1cd2badd01f9453977eba81add7f0f0a0fcb3adb76b87e +test/extractor-tests/generated/Impl/Impl_getAttr.ql 018bdf6d9a9724d4f497d249de7cecd8bda0ac2340bde64b9b3d7c57482e715b cd065899d92aa35aca5d53ef64eadf7bb195d9a4e8ed632378a4e8c550b850cd +test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql 88d5cd8fd03cb4cc2887393ee38b2e2315eeef8c4db40a9bd94cf86b95935bdd 9c72828669ccf8f7ca39851bc36a0c426325a91fc428b49681e4bb680d6547a9 +test/extractor-tests/generated/Impl/Impl_getSelfTy.ql 2962d540a174b38815d150cdd9053796251de4843b7276d051191c6a6c8ecad4 b7156cec08bd6231f7b8f621e823da0642a0eb036b05476222f259101d9d37c0 +test/extractor-tests/generated/Impl/Impl_getTrait.ql 3319d2649b4a7f3c501c8e16a1a3e5d74057c94c02772d33f19b4030daf934d2 3acca9d040c3f1d90ed26b159dac71625bea689221e180c856a75c2bab95d286 +test/extractor-tests/generated/Impl/Impl_getVisibility.ql 2497bb8c867297e4c398473ee7f0ec3693f7e894b84819f6336d69bebcd3af5f d8be2e9535b06471fa873af13b0223cc79d30d63a3f5e27a0f64874d60dbf07d +test/extractor-tests/generated/Impl/Impl_getWhereClause.ql 269d4b0639db28a7535b2d745b11cda0885da7369f9cf4c4973a6ccc20c9960b c4baf89f68a173c1415baf90ddd9195e29784997a5ce45a36171485f6bb44c03 +test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql ec1474d83239bf546fcace59188d7ea42f64345b92cf2364117da05f1827fa55 7d352e1cb65bb80c479c7eb90da08745e51252a7e7fd20e33d892b351b5304e1 +test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql dfb41cb9140f96bad398278294ecf20909c0fbc32b361c3dfc97aef2b8b9a5a8 17c9e4687345a5a788b01fcd708e700195ca28524467a3144708f1dc4c6471e5 test/extractor-tests/generated/IndexExpr/IndexExpr.ql 0a93213b755faaab84b7eccb5b8f3d8f8ba87910ad661f194e06917722dbf6a8 46497b3e92523c6c015373fe122678846618b45412b903323ff3644e37f2c52d test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql 360dbf8e7d69c691a1f4c9bb0aaa7860a6b0f09b21a1d1a6db908ec7a7d7561a e50b942f7592cb944f607bd64f8e4d4abac30bdc53f73b4dc851e689dce61be9 test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql 841cacda1a1cd976229f2bd18dcee4315506105c2cb3789c30a7539fd6d49d0c 37a92e9151f10cf971b24f5af6e2ca6dccf87b6e0e0b2237a0564f97719a0d66 test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql 1aa934524dd44009297ef89a657d1ba99304f6590514a0b0b51b2769780f8c20 a42f25640f0331318bbc8f44af133095580b8947309628511bf0b3675149506a -test/extractor-tests/generated/InferType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/InferType/InferType.ql ee94ff7a5d84299fdd6e52583fb2f548cff364cd3b5fe385707a2da8958bf641 9532163987d0c9f11456790d8c5a8249cb02f13526911bcfd4fc726db2e1aaef +test/extractor-tests/generated/ItemList/ItemList.ql 6c1c8ef6da0fce64b1a5edbec98fe18910b0ecc390d1219cc08124ab51b13bf6 e94e5c8d1639c1ed2ba543a521a57a026e15ea6b339b6c6d4409dd30ae67a51f +test/extractor-tests/generated/ItemList/ItemList_getAttr.ql 24d7a764d4f8997bb77e93c21e6e5ba7256ed11657bd6479bf42458b8e89b52f a6b4df0cc6bf79ab3f98c93eabbbd3aaf11ec2506a0e894fa1f51be90191d71c +test/extractor-tests/generated/ItemList/ItemList_getItem.ql 6e129499f77f7dba287b2b31b58fe6d834559e27214797807bb29b2a401f1f7d e406c07421dd6382ea73308d9124c30e971591c9e4c797b3115955f22c93589f test/extractor-tests/generated/Label/Label.ql 6a92a27d615dd9c380cb9d889eecf827fc3a26f4bef65c2374e5ffbd6a7ce6b3 a344e26bc6ef835f2fa818413ba518c23f956750f9a2232acb1ad77aab9df446 test/extractor-tests/generated/Label/Label_getLifetime.ql 3d6ddc3b44182e6432e938d5c1c95e0281575e320d517e431f6bad7748efb93e 56d07e485cb5e4263443eb5a0d62d7d4456bb0c2748331b371e519bfe14d3b81 -test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/LetElse/LetElse.ql bdf2b17d5efe6b9cb5bb4fcfe854a5fcd72443d39ae1e7981d2a0459c481e394 a14a611d0783ae38d631600c2bde7409f4e739ba2f284314b90ec9a21c23ab3a +test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql 32c21ad843884944738a735f01e272032a347d1860fa6d27d17652c549f941b0 2bfd8a5e3d42eb1c73eb679ada847dd29f2f0657a0ad8ef15da126e54fff5ef5 test/extractor-tests/generated/LetExpr/LetExpr.ql a25072a00cfe1242dc846b38199c000ed7217d33fdd50d2763237fdfda7b9449 8c9367af79d9fbc98ed2fe62450929fa876512f1c999615b5c1ecff082fdc7bc test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql 911b143afebaa0a487b13d533f089c5b0eaf336a44a4cab42147c284338484ba 625c91fb6d8c2e3a9f13e5679cc0cd29329c6c2b213d2e1191e23db2b65841dd test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql ccabfaa15cfc8685e86cb950cb62b7f2fec278f28906ab34deb97b308f160cc4 e0574537d47a77f1be85090970f3e1263858174479002fd4de3f85b777ee4336 @@ -722,9 +791,14 @@ test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6a5f0eed3ce3e8c test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql 21f8f1cbf725399da80c24c4d3ca27072758b76cbdfd726a7f1e851ea12e58fc c01a4eda22088184357288910fa41692f52486d60fbf7c0bc3b5b01f8f67fe07 test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql 978e4f7861c7b03e6f2a3a2f7ae82e9b72bb5ef000f111127cb583a04ea6f971 3c92dbb765dfb01c290413e538290b0b2bee5a83bcfee383d081f56202a784fa test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql a13e89ca2f87aa6e5e0cfce296b9515656f4bc9b5291337cf18c2bdd7a04c4e3 7c7c8ac2cc5112d74081a5c239358d62e082b48b361e757cea23022f5ffcf04f -test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Lifetime/Lifetime.ql 07b093285b08fddc149cbce3047700072874efb29d55e591c86d53e6432a10a7 29437b1b20f6321870837c12348d165729312e164ac4fac1029c1000e48d311a +test/extractor-tests/generated/Lifetime/Lifetime_getText.ql 7b06b940145c3d1a1bb3aff67e8e106f902a737edf61ed91577cf3ca94606936 c70d6186c500fdf6bc9d9d028cf3ec093914e20ba9547a391203ac8c5df1d727 +test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql 4a0c2166d9ba79c99d6be430a28f79d3e7e971dcd96777e02c3fec56cec3ffeb 158bbf0f06ad36c81704d11f6318f80a0f7dd9c1a71409980ca60cac49dbe9c4 +test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql 050015eb1130bab1ff6fe7df6915a634e66e27f2c90609026aadb4287fcc0c3f e4f63abbbb7668aa36de0caa2bb38fdbb4ff198aafa312ab12c9667eea67f04e +test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql 4848a1c83b138e3842a7dbd0edb416b1ea2985b77b92d45b6d02b9f8bb997b1d 75fd2beafd2076121edb435996743e4d32ee58f6999205c9dadcb84a7fa80860 +test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql d1ff2d3cd34bfc0f363bcd7638d4b9fdcc604c6a9c74da22359df1877a0cb26d 57b7654249890266ecfc9a325c27da84b8b3cf21666a74f38e6439ed7a0596f9 +test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql 893879293bed44e7a259c7e501f8301b92be0e00665c0049cddfc7d027790284 ee74064414e6ec1299180aa00851b5f323053bf4bbc2c5db6c0bedbcc1388411 +test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql b1fb7f8e9fff999f7b0508951c089b2d6588a0960f172b67e7e111e64d608d49 fdfdd3a159033fca0549d6db97d681114e83f630982e72abbbf7cf1b2d77b4e9 test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql a5644e5cf8b03121a1bdee793083cfe27286a7ac67d6ab5f1733b1fa81c5b38c 711d44afb1d0fba47f355563a040f4b21ca63a1c59a73d9b6510715133fee5b3 test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql 6e76da2bb7858f493641f91216ea28f22dc5825931841327e34330f11d20c8b3 3f10a510944ea049b636ffc2c6223c0a15fd9b528ada7ffce54fb70637640768 test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql 7049fec0bbbf0e048af1ff318f42f43d0f8a7354a5638dc21174c4ea725b54ce 2edc94cc0a7f58ec9808b63ddb4d20a3907c88e50bd9ffb14f0281b433f5621b @@ -734,24 +808,45 @@ test/extractor-tests/generated/LoopExpr/LoopExpr.ql 636c28bff5f8c1ca0fb834f614b3 test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql d557c1a34ae8762b32702d6b50e79c25bc506275c33a896b6b94bbbe73d04c49 34846c9eefa0219f4a16e28b518b2afa23f372d0aa03b08d042c5a35375e0cd6 test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 0b77b9d9fb5903d37bce5a2c0d6b276e6269da56fcb37b83cd931872fb88490f c7f09c526e59dcadec13ec9719980d68b8619d630caab2c26b8368b06c1f2cc0 test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql 0267f54077640f3dfeb38524577e4a1229115eeb1c839398d0c5f460c1d65129 96ec876635b8c561f7add19e57574444f630eae3df9ab9bc33ac180e61f3a7b8 -test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/MacroCall/MacroCall.ql d8b71880ffbfa0f9efa56c598a9bdd3f91e85129e0f8f2b30be6862556f87fcd 682736663ad11f9fdde165904324a8b2f3cdc59f91196a1accb1cd4cf5fb70d4 +test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql c22a2a29d705e85b03a6586d1eda1a2f4f99f95f7dfeb4e6908ec3188b5ad0ad 9b8d9dcc2116a123c15c520a880efab73ade20e08197c64bc3ed0c50902c4672 +test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql 160edc6a001a2d946da6049ffb21a84b9a3756e85f9a2fb0a4d85058124b399a 1e25dd600f19ef89a99f328f86603bce12190220168387c5a88bfb9926da56d9 +test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql 1cbf6b1ac7fa0910ff299b939743153fc00ad7e28a9a70c69a8297c6841e8238 570380c0dc4b20fe25c0499378569720a6da14bdb058e73d757e174bdd62d0c0 +test/extractor-tests/generated/MacroDef/MacroDef.ql dde2df9196800d9af9645fe21786e30245bff6cfa58117900582ce1f5c0b859d 6b87bec4e4df8e9b6ed09f18e7b7c20204c39c8d249494cc66d3a06ae39791e4 +test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql 61f11d6ba6ea3bd42708c4dc172be4016277c015d3560025d776e8fef447270f 331541eff1d8a835a9ecc6306f3adf234cbff96ea74b0638e482e03f3e336fd1 +test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql 0a30875f7b02351a4facf454273fb124aa40c6ef8a47dfe5210072a226b03656 8e97307aef71bf93b28f787050bfaa50fe95edf6c3f5418acd07c1de64e62cc1 +test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql 7b350f48e6f208d9fa4725919efd439baf5e9ec4563ba9be261b7a17dacc451b 33f99a707bb89705c92195a5f86055d1f6019bcd33aafcc1942358a6ed413661 +test/extractor-tests/generated/MacroDef/MacroDef_getName.ql 6bc8a17804f23782e98f7baf70a0a87256a639c11f92e3c80940021319868847 726f9d8249b2ca6789d37bb4248bf5dd044acc9add5c25ed62607502c8af65aa +test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql d858ccaab381432c529bf4a621afc82ea5e4b810b463f2b1f551de79908e14e7 83a85c4f90417ab44570a862642d8f8fc9208e62ba20ca69b32d39a3190381aa +test/extractor-tests/generated/MacroExpr/MacroExpr.ql 69445cf24f5bec5c3f11f0ebf13604891bb2c0dffe715612628e5572587c7a6c 5434db79d94e437c86126d9cf20bf1e86e5537f462a57b9bf6b22a2caa95cc40 +test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql 8859743e23b987225a6a1933054a1ed8f5f1442b61a769599e2efd143f4feb9e d2d336135ff4d2ea65e79430dee8d0f69f9d7818a674f5446903d986f3948b92 +test/extractor-tests/generated/MacroPat/MacroPat.ql d9ec72d4d6a7342ee2d9aa7e90227faa31792ca5842fe948d7fdf22597a123b7 74b0f21ef2bb6c13aae74dba1eea97451755110909a083360e2c56cfbc76fd91 +test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql 398996f0d0f2aa6d3b58d80b26c7d1185b5094d455c6c5c7f075f6d414150aa6 b4662e57cac36ed0e692201f53ba46c3d0826bba99c5cc6dfcb302b44dd2154b +test/extractor-tests/generated/MacroRules/MacroRules.ql 0742faf18179fa34e0f43361e9e4b807bfc242d232f6b3664a35e138a47d39c5 10e1cf45f32a27cb46bd61f5dd45416e2c0c9f25e880f6d213597a7d96e19103 +test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql 7de501c724e3465520cdc870c357911e7e7fce147f6fb5ed30ad37f21cf7d932 0d7754b89bcad6c012a0b43ee4e48e64dd20b608b3a7aeb4042f95eec50bb6e6 +test/extractor-tests/generated/MacroRules/MacroRules_getName.ql 591606e3accae8b8fb49e1218c4867a42724ac209cf99786db0e5d7ea0bf55d5 d2936ef5aa4bbf024372516dde3de578990aafb2b8675bbbf0f72e8b54eb82a8 +test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql 7598d33c3d86f9ad8629219b90667b2b65e3a1e18c6b0887291df9455a319cab 69d90446743e78e851145683c17677497fe42ed02f61f2b2974e216dc6e05b01 +test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql 5306cc85f470d21ebcbe6e98436334b0bf5ba819a0ae186569ba7e88c31636c6 fcbf5c54e5a904767a6f4d37d853072aa0040738e622c49c9a02dec8739d6587 +test/extractor-tests/generated/MacroType/MacroType.ql 408327fdb4d7cf096536457401cc280f83cd7e4f6fa9aebd65e64031f6c119cf 0c502d25194ab96eb068a85e3f57a9217510a951fa923e9d7a20fd75412bd6da +test/extractor-tests/generated/MacroType/MacroType_getMacroCall.ql 565be7a72670218d7999d3f6cec4e704b754c217186243f1b24c334589fa82e2 ba413c712783320188800e2a78738b09c40fe9a6305c08d9e67e971a8fca96ee test/extractor-tests/generated/MatchArm/MatchArm.ql 512aa404c94ba40b859564f07e9dffe6a5e687fafb039556e9145f4f3742981c 529f96e38cede8a26054f8981d4ba1d189c17d14d0f92d622eb20acd8f3d7e5d test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql 4faf7a542702d13283262be7cb2e1cc3c862bc2e1953a460fd2bb5e75a7e9b1e 1d43f4d2a580d0ac309dd18a45a9693ab92107cafd817ccdb26fd7998728edf3 test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql 116f02bef8650d27784a8657208e9215b04af9139d19a54952c6ba2523770f4b e0677aed6d53148e120fd0b03f4bc4fa108c6dd090f605c87b2e3ba413fb0155 test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql 54e2c2805d54b353c9e36258ed750189846cd422dfb476c6eb52301860d7ff13 8fd408a3e9c6e5c138860144ba0f69dc2099a7a062e3bdf7d324c09df7d132f3 test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql b346bca229226414b32acc3d8ab0ae26647563fd79e1c434d1ef8d14bda2d65b e72eb69bb243c39fa997d17bb7060e2f82f2bb33d11a58caaae48f8372996704 -test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/MatchArmList/MatchArmList.ql 14b5e110d48e2b77c85b7a188262e6a98300e0d4d507bb7ed9179c5802251dd6 4d091f06b12fef0fffe1c80a10f74438d8068f2fa09c50d5e240b6d140e60d90 +test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql 4781d002538a92b7f40fb0ec3d61aeedb6348341ddc354bbdd3ff61b74d59767 ae0da9497a30ce006e03bdb70e0ee24b685df529ac15a7d99a6869b5f7d7b371 +test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql 4d7e6d152d2dbeb4c9f594becabea27d3b25fecbde40d791a2907c69cc0c9631 4be9be658bb22e1b764c4ebc8d6b99bf50fd939f35ea44fbb869056c14632bd4 test/extractor-tests/generated/MatchExpr/MatchExpr.ql ec116bca37079488977a50beeba508c440cf337799947fcb810b6bd7a7605255 42dc7b5f0dd6fd91417d9846a7b4f678cbfcf095791aaf57c8d3b4548ce2dd98 test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql cb8057372dcf24dfa02896ebf4e60a0b757dc4742b94011edc38f5b898ed4d25 6809695c2d3ac3b92c06049c9b920e8c0e99ee1998a11a7f181f2b0ceb47c197 test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql 7baaa64071cf2666e3b2bc05630d92a7a3b6cf04a026b1f7053c5e2a735bcaa8 d9ba8d8bbff05cfc0461ab41295f921b48429b4376c29adf54428bd5a9aa5298 test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql d97055bcb0431e8b258b5ecdd98aa07cb24ece06b0cd658b697cd71da4ede8fc 5e9c03b2665ef6b2af98897996abb2e0a9c18d54eb64588340b8efbcee9793bd -test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Meta/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/MatchGuard/MatchGuard.ql 23e47ec1b13e2d80e31b57894a46ec789d6ab5ed1eb66bdb6bba9bd5ae71d3ef 7302f4a93108a83228e0ebd5b4a1bc6bccc1f6f0f3272054866fa90378c0dcc4 +test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql 8a79dd46798f111f8d0d5a975380b5cebe5e337267752b77b3718b268ba2773d 6691d8fb483f64fc7e3ad3f46e3129e0a1184d7beb9f83a1000acdbb081c8b5e +test/extractor-tests/generated/Meta/Meta.ql 5edf76c32512f29dbe033a02e12aa81e64ae8998b1eb70c414c08fd400f794d1 34ce5338b4a82437ba2db9e4bfb2810dcd37c463b8d667d483c3f7b3c6ca2a99 +test/extractor-tests/generated/Meta/Meta_getExpr.ql ec9ec61f5be7d65c32775fb5c068daea04f9db7d875293ed99cc1b2481db041f 77a0c52f1cb6ddc8fdb294d637f9eda1b7301ffa3067f0fca6272d894f57d3ee +test/extractor-tests/generated/Meta/Meta_getPath.ql aa9d4145a4e613c51b6e4637d57e3b7d0f66e0bb88f4ce959d598870814c06bb 2087e00686d502c0e2e89c88eae0fb354463576a9ae4101320981d3fd79b9078 +test/extractor-tests/generated/Meta/Meta_getTokenTree.ql 1051c27ffd0d9a20436d684fde529b9ff55abe30d50e1d575b0318951e75bd34 983975672d928fb907676628384c949731da9807bf0c781bb7ec749d25733d2d test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 05b938f3fdc53ca16a6403e79d04d44ba2a7ea3d1f643fc3aa82a04593d459b9 099fa93ce75278505b38e8025fcc6961308bb88866ce3e17748a3f958f01262b test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql 180e0b1715f5cd2be0de01bff3d3a45594b495b8250748d40ff7108d6c85923d bdadcdbecca5891287a47b6dd6b2fda62e07457718aef39212503ab63bc17783 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql 2ce876a04a159efce83b863dffc47fbb714b95daea2b91fa6fbb623d28eed9ec 7bca1cd0e8fbceec0e640afb6800e1780eff5b5b402e71b9b169c0ba26966f96 @@ -763,20 +858,31 @@ test/extractor-tests/generated/Module/Module_getAttr.ql b97ae3f5175a358bf02c47ec test/extractor-tests/generated/Module/Module_getItemList.ql 59b49af9788e9d8b5bceaeffe3c3d203038abd987880a720669117ac3db35388 9550939a0e07b11892b38ca03a0ce305d0e924c28d27f25c9acc47a819088969 test/extractor-tests/generated/Module/Module_getName.ql 7945dc007146c650cf4f5ac6e312bbd9c8b023246ff77f033a9410da29774ace 9de11a1806487d123376c6a267a332d72cd81e7d6e4baa48669e0bb28b7e352e test/extractor-tests/generated/Module/Module_getVisibility.ql bdce43e97b99226f55c84547a84d99b44f5d1eac757d49bcc06d732e0fb0b5a8 a482c18851286fb14ec6f709dc7f3280a62de8c3d59c49ba29d07bd24cf416cd -test/extractor-tests/generated/Name/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Name/Name.ql 0a78cd5c0c703ff30f8e3253b38f9aac98a564b22c02329d525cf101d8ac3fda 2fd83327063e6ab57dcae2dc5103c2965d7a09f6a10d553ea336cf594d32032c +test/extractor-tests/generated/Name/Name_getText.ql 5d223baad356308abc45cdce9ca9201d674de1cc1e9fff7ef55dd96082d59d99 6488ccc102ed4f0a2e1c5cef3f8b1adbe00d52c961573f1a16eca66af31e2d14 +test/extractor-tests/generated/NameRef/NameRef.ql f73d49d5c176cd7589f6ca148b0d0cc3d1084e27686910058adfd5764ef5767d ebff67ed3b325b01277e25baa1ad588e633ef8ce63209a72305465a0dc8002d1 +test/extractor-tests/generated/NameRef/NameRef_getText.ql 5212dfc1b65c0f724a72f5bffd82268d1f8ae287d3d61797673c29fd70d7ebd6 75c343614925c55a18917c07ef62af08c97c9cc714f627d1a27b9f26158a0bde +test/extractor-tests/generated/NeverType/NeverType.ql 7da48f7c20733a77495718c06a96eb1a8ea5e825b95e585a960cf777edff1b6a 30e24cfcb4f2ae1b7862a177e622636b4563a1b1d348413884bc605302d31fcf test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql f7d7b30870567124e46dc81503a33cb6425fff51f99fa57894228847e68291a3 b0c242095e0df52687502baae97f36e0fc7b4e1e01cd05f75ff0cbe92a6e2f33 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql a12e828c85577184a41b255f54b10d4a654b57703074a7ebcfde2d43a358955f bc2590e76b60a3ddda9cc10903c68d07c6af19a593c8426d108a2a6520304145 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql 6d729fb91deacb1f620df5cbc86473183664e81849958624195da883c410a707 f3374c3d7306699d1f9d1c6c5788ee7c5a17103345bf53847be9d94e5fb9f14d test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql b8597637cffd7a492148020b306c4ab1d2f17f919f441f462ebc00d229b038ca 2c7de1df4351929c221b30e3cede4cd6981fe8a2c1861e194489981c65e00f33 test/extractor-tests/generated/OrPat/OrPat.ql 49d881b384acaf68fa79de46da997cacab3e75467641f61150908f4112c47fa4 5d721da23be44e79d7b8a0dd475119836828d6a1edaff2c55decea8da83e65b8 test/extractor-tests/generated/OrPat/OrPat_getPat.ql d56b78287cecebacb25249380647500387e0d9e28be20034b8a12406a999a7c4 cba7bb60afaaed4333ea5ff6d3850fb44a8b42edee67d86fd16df85938454269 -test/extractor-tests/generated/Param/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Param/Param.ql 060c53b7e93840ae9cbf0c8fdaea17b16d6825f4b7aaa2eab164a660c5a7ea4d 172f6f4b86a98720f710e5d4342b7d52839c6f3c169ce1debb37629961a702ba +test/extractor-tests/generated/Param/Param_getAttr.ql e1dcf86540fd2971ced34a33b2959f001c3f654914d82e576caa4534b80fbfbf 987a826bf6dcd25c3426edb603a22f6caa030c82c1cb0e9e11062fdbfed23030 +test/extractor-tests/generated/Param/Param_getPat.ql 0c448e8ba8bf3432be08b5eb4a052aa19cccf0eb4596a3239481401dae9d2dc2 c943d4da36e1e734c1a012f092b2f597cb389a7ab33d5371ff8ee9c93e115ffc +test/extractor-tests/generated/Param/Param_getTy.ql 134dec0c5562a8df68224069f10ee51c7dcc35e0b44a49c0e2078c305487db87 94fa72a213c37f2f63f03789a33e55fc5a22bd83cf0c1d293281bceffb63bd78 +test/extractor-tests/generated/ParamList/ParamList.ql 4d879e6a6db24fb8d7f935c2dd332075ca4b2de41cc841aafec7e0b6b77f2cf3 b7e2357b77961f0f8315d3c9e8fde8578373ecfb9efba892416b31d7c168bb26 +test/extractor-tests/generated/ParamList/ParamList_getParam.ql dcaabf654941bf9afe50df3a5c61ef0eab50830a436eede98e30778bfd244a09 63cc7f529f96d5016804f50a385d8a736a534475a6340a8c2f51de99b54206a1 +test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql 310582a9921226a44e6fee2b386d48bf84388351204941dd12e3a2da395eefaf 6c2e0a6d5bc6db49430cf25501444da6540b7b2f9ac0052da93c8086e2af0c46 +test/extractor-tests/generated/ParenExpr/ParenExpr.ql a40c60a92be944f15f5cbcca52b0fde318bb1ad6864f9ab9302dbf5ce5f1058d a50e80b6b222fb43f9fec82677d0785c0b2696b9818887e2befafb7a6d399a7a +test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql e8b9016d2374d124472d135c8b9031124227cbb139362f6aa6d4d99cad631e30 4aaf95ee8a9ab1ead19eaa4dabc080f12aca49f50a150a287b93132de5c61df1 +test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql a75dc46dc78d3b4a4f629ba16f7129ecc0ab90f60b651259d00d241b2886bf7c 32164d75418df184618501f41fbc0a81dafe1ad2dcbc9ec87bea909aaf05ae40 +test/extractor-tests/generated/ParenPat/ParenPat.ql 565182ccd81a9b420911b488c083f540d339eec6a9c230424800bb505df13a66 876cdca008ed32f415c9ee99ce7e66b276769d0b51ad7eee716e1317484a34ce +test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql 96f3db0ec4e71fd8706192a16729203448ccc7b0a12ba0abeb0c20757b64fba1 0c66ba801869dc6d48dc0b2bca146757b868e8a88ad9429ba340837750f3a902 +test/extractor-tests/generated/ParenType/ParenType.ql 81c8ad667397ce36157941abd9b879e9305a440018853af4528eb737ae4d2935 3ef3b86203b0143be2d7f7f4833f55fd6c226cb9205e3c1940b6c2a1371622f3 +test/extractor-tests/generated/ParenType/ParenType_getTy.ql 41dd6605e7b348618156712b559e2f1b6aac02d6c727e8cbf8653530794ec969 30ac6611c730e76cfb75f98efcf817783a50cec0cf3b3197459d7642f74dde85 test/extractor-tests/generated/Path/Path.ql 2bdcd99b3b5ffc83ac47d8cc27a4561d616bcf06844f0c452c699cd10ee640ca 5a7d7ffb8b0c04d6a8cbb2a953761df8561b796c4372bef1bd55c359b2f19911 test/extractor-tests/generated/Path/Path_getPart.ql 8aa45a0b58203ef1177166efbe1c2851faf4b4c9a453c83137f0c9298badcdbf b82d490d9b3a8237487cd5da8b3b6fc4aa477977b332a5c6539b3cd4e6d5b45b test/extractor-tests/generated/Path/Path_getQualifier.ql 9af95e22cdf3a65da6a41d93136aef4523db5ce81d38f6ed4bc613f1c68784d0 3102d9241a417a92c97a53ac56a7a8683463f1adc7a593cda1382c0d25b3f261 @@ -785,13 +891,22 @@ test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql 2ccac48cd91d86670c1d test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql e7894071313a74166bdd31d7cd974037fcd5a7f0e92d5eec42833266196eb858 46a06e8a1207e7a0fa175cd4b61068e5fd6c43b5575b88986409f0ac2be64c51 test/extractor-tests/generated/PathPat/PathPat.ql 823732954a5882e33a37bd0bf0cafb2cec51659a5203a4831eec2516da0e49fa 54001149718a9ca15d8c0d4be63f3fe00a9f0d44fa1309e2f605d7932355ea5d test/extractor-tests/generated/PathPat/PathPat_getPath.ql 6c0c71c80a6e631ea7775ec8660b470ff6b264bab14a399606cf113b1fb190fc 8e34cbb4d064db929e94652e1901ec4f26affa71e30e556b7acdff71dd622cbb -test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/PathType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/PathSegment/PathSegment.ql efc39cea1b4c0b2b0da6434136334430d074699f84124d6bcf94c24aa854dc64 c0a4bd60c67665c058ca22a59e535e925fdb00dec95ffc5c71697fb0ed78a329 +test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql 8f6e67b3e316309f20e21d7e7944accf66b0256b76fa50ee9a714044c6ec8cea 15f10a701fc4d3f9fd6734da90790cdbc8a1ddd57bf52695740acedcb2e6e485 +test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql 799d284e2f9267d6bbe67aa7035e525ef347dc74cb3e2180e7b2171b5cb49674 592130bc2358989536abf62e8a261272c851483ede4f19783f7d61ffc1803e4b +test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql e1e7b9b5062f936c33b7e7e29b21456448242df4985c6cffb54900063cfd3e63 6568e851cb6bcb32622f89d01e3aa6e7dd21940d21572a9988584e34bdf25366 +test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql 01942da6d0b10c1d15caec6abb8c53f1dc7f8c04a91a797f572063aa003dbc4b cb21e6cb160652527ba571265297dae86beffe191dd7dfc4d0beee45cb0cda29 +test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql 36386a514bc925f5b17ad87afba9fef7986900c1b791732de061213c6e86743f f38bcee68c1da19e70bb1e1c4a4047c763a466f1b8ef2c4f65f8c724c0b58197 +test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql d1db51208a311c30af369ce2fdc3a3296e7d598b27bf4960b8b34622a9d9163b 561b1e38c6d8b301fdc016e1d012dd805fde1b42b0720c17d7b15535715047f2 +test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql a0ceaf3f37e521cc92c21cc0bae929499ef3584f86349ef34808c20963d31c75 d674e56e08a6d2a7d211503a466df2cc90c35a3951e41598febf62c8dc693655 +test/extractor-tests/generated/PathType/PathType.ql cb67b05cf7e4f32cbd46ac89a15f6eafe3507cc655db0b9d54a1cf8e7fbcca40 890053e7fd8cd8a92015c09588c7c646f075901cddc3eb8d57210b02b23a5944 +test/extractor-tests/generated/PathType/PathType_getPath.ql 7043c7939e4f835e4b2c7e3e207637c362d7a9dbdba0151b38c873fdaf43e7a5 ee2aad1b4fb2b00e1a5d39387848aa164a39e3cd49141f07c175b205c8451bb1 test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql 44fb7174365c6deecdc22c720d84617c6e060c05d49c41c90433451588f8aa6f 871fab471c82fede3c36edc003f9decee5bb7844c016951d28be78d0c91487e5 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql fdad6ad5199435ded1e4a9ea6b246e76b904cd73a36aaa4780e84eef91741c5b 75d63940046e62c1efa1151b0cac45b5ec0bab5e39aec2e11d43f6c385e37984 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql 2d1d97f6277794871fbb032ea87ac30b1aa902a74cd874720156162057ea202e b1b9880fce07d66df7ec87f12189c37adf9f233a1d0b38a1b09808d052a95642 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql d27602e77ddf491a278426de65041dda8568f427d1e0ff97c0f23069ae64670e 4e4766e948adf88a6b003ead7d9de1ad26174fe9e30c370f1d3e666aa944df52 -test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/PtrType/PtrType.ql 6a1cae6f398efe5021e94a945d791da9f01da56a19b25fe7692cbbe7e1a3817c e2d38e534bae46176e26f3941bb0029148cb70b244b61c19d2e9524682f3c5de +test/extractor-tests/generated/PtrType/PtrType_getTy.ql 97f5e6197e66c4dcf15d4a62692e30a26979f2902d83354911985d39c8560d1a 0b049b882a33be9746fbb704394a024ac320415cfd1707dc48fe114781558e36 test/extractor-tests/generated/RangeExpr/RangeExpr.ql 707c08aab49cc0a22c80a734e663b13ecbbddf0db28b6a25fdbc030a1ce38d6f 1f78950b30485cdde9fe7d9e416ad1dfdac8c5b6bc328172e6e721821c076131 test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql 8767e670f88c2115bc61b16195d2c9d02bc074adc4ca57d2aa537c1af9b4c530 4fa51652c60ca7d06bd9ad604107e002603ee2a7b4587636f6b46b8e8060e06c test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql 0328c3d0597004f3facf3d553ed763566344f54e1b9c9e26f2f41b8146b6bdba 8e701b595631af117fd0a79154e298dfc64cb0874eb58018921f94076a0c7ebe @@ -808,9 +923,17 @@ test/extractor-tests/generated/RecordExprField/RecordExprField.ql 62ee00e478fcf0 test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql 789d20f8c0bb0e9567d3d9a0c0266a04841cda0dbdbe10af8c450d5a82bb289e 9036f5b0e7ddf301012f52f3919804382421061366d2a4f3a016e9783befec6d test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql 7dcb5cf0d04bcd62b655fa0626535526cdaa0f891845f4b22cb50fcf1ae3e511 a177db76e4e9583438fad9bfb1300fed9e812c1046c44dccd307bf3a46603a69 test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql 4607b1adb0e25fc5314c108dab14c19aff5a35a6b16445ed64a82c01bb7f6086 0040f2b4dffb37b257fea9870b2ac742ea3c1f9dfdeff6f69b449f9a4a3719d7 -test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql b6cd65fc4fa687dc34d0848ff8c23d37088345f94902b5622b5411a62924441e 34fa8bccddf7ead18b1e597f49af008e4b244ff19d4b7f23d0777978c4d3f361 +test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql 15b297e79c1ba8c92cb97148d6aab78ed1fd2c94f0d3a430ead8d541024e81ce 4f0a131011cf32e172f7bd027769e39642fb506d37b3d50b175c6ed5947d3d9c +test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql c55e4775c8880c05944be04bdeb1c9e6bad45b922ba71ac3145acd83ff988e59 14ce98d1e5564e9e27c29110237cf6210d130ea887920b2b1bd34a853b7fcc63 +test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql f2dd6b85da1cd8195986aefbe7dc8171db6fbbe5b2612c4cbdd8aba052cb0c6a 2c19cb1510c215ddfa004d40bf30fc0fe0dcbb530c320b297541f1dbcb204143 +test/extractor-tests/generated/RecordField/RecordField.ql d503ee1b9de70830947f2b406df058a3fdff7d360293f1c70671bb7f21fcf514 08687d8737dd20ce4a699e2ba4a2313b18c08de593847bce4a13077b608900f4 +test/extractor-tests/generated/RecordField/RecordField_getAttr.ql aa29d317dee23039a807df530a6f04b0678c4d1d34207a4381be535ff04af478 41c5778d6316eec19192334046ed110aea44a4c45937d5c355a9b71c54aa8e04 +test/extractor-tests/generated/RecordField/RecordField_getName.ql 1f5c47d41367bd0115df86f22a70d4621d7cbfb41554daa598da29f549479670 64535303b273f1c2027b6ce89b50816ad3cbbca9bf00b2b8402e36b26e675d97 +test/extractor-tests/generated/RecordField/RecordField_getTy.ql 601fbb244267f366ff989d3cf3d1ff29fc7c6edf415c7844f401efc7798f09b5 de1e54cd4330abed23312a32efdea35fcd8b2d6accf8d8f6f984fe27f4af30e0 +test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql cc45e9bb9418d15cef07a1827358c3f18a8737324c8e6852591a2da70df89360 45557497fc165a212fffda71dedabc8159a4f72323430df732698a18922b366c +test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql 586bccfa550243177d9fdfd6900a473f51a76ed360b537f19cb300330d5dad5b a063373dfdbf06b68c69694ea4ae72a26b906c910f9095894c09e72f8fb52819 +test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql 2eb92ef8528204f3f105c19a36cdc06b3b6d20242463ff2ed1fb81c544812a71 d69091899e7157099f117e14fe60cd3705cfda45f28f6a6a2b7234a4a9c1e664 test/extractor-tests/generated/RecordPat/RecordPat.ql 01510828e1facc6551e06241e41636259883a546ad43b08499468c14d6052768 fcf3873fe1cd1ebe4910150763aa350f882ca8e84603f35520bb0beeea2c21af test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql 187b8d44de158fc809257e28b2e8fdd246c8eb3c60115d54cd53396a320e372d 74813fd13c6f34927420ed44620743f7c80c537984e0db72c1c5f4b754b40b83 test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql 32e45a6f59cdb8edbf7f9326164e225a7f545fabd2dd168b660699954a999fdf 325c9121dc130459426b473691876a0698b51d5cdf4530698a398510ce8e3051 @@ -818,60 +941,153 @@ test/extractor-tests/generated/RecordPatField/RecordPatField.ql 6c51343258e56673 test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql fb0592f7a1be4fd9c6f36c79dee5a0f6711b0a7820b079f8e95413722ae1aeb7 9dfb0de00ec9c4a23efd38515c63a3567204f2a3ac2634858296f58aa564d170 test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql 3380a41d6cecd80681fc955719fa11377c32a5e0be276871f2d0d75ae62d8f0a 44efe89657d3a59fb94962d0fbf52d06571e203863a3d9e9dd47a5135a8ba4d9 test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql 577187a4775283bbce66abcb54af50e5684e1f03f8b55e59d84f1914d142b04f 7c23778ad92a6dccf193abb269bd8fbcb33f3b778eb18c6d23135540a27fcec7 -test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql 5a49488f43bbac2349d75b3acbb3bca4440d9b3725434fefd1ba2eda2be6feb2 898177f203181e5e095091b0a3f6a92f1323c80862400cbfd85902d783a9160d +test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql 7c0d190762089af3b6f4fb9ef95561bb2107d7476477bdcfce6b313caa61cab1 17c85ac9670c4faea44a76e9e21184a3d5cabc6c3deba083a0b84fb91e3cbe16 +test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql 0caef1f5d09a73a973200e061e09ea5498b855dc19af19c1dc48cd9f20da6857 45c12708b566a5efcc79155b45174fc3ff5a084109043493cffa5216b9054205 test/extractor-tests/generated/RefExpr/RefExpr.ql 6a4d786b68003295ed2cc9a7a9b2f93d6b91f91e4faa7165537e369c3bb0923c 6dd9467a92ce7e966095c01c0356f8429e340e21c036e3ad5665c6442e705580 test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql 477fb3fee61395fabf78f76360ea27656432cb9db62e6f1dab1e9f3c75c83d39 5210f2ac54c082b616d8dcb091659cdad08a5d4ae06bf61193c33f208237482f test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql 180d6417fd7322cabf4143d0ddd7810f65506b172a5c82484b3ef398041636b2 a291f0bec1ec5b3fa6d088b3d1a658889b9a3521c39ff3bb7a5ab22a56b8b20a test/extractor-tests/generated/RefPat/RefPat.ql 2d2e9b058d66d2183a0795cdd719a36e53d27d9c267eca22e34624c558991250 b95d435925f0bd38a101eb00eab548acbc39a9d7e8fdaa10e1d65f0f72362a9b test/extractor-tests/generated/RefPat/RefPat_getPat.ql 60f5e010b90c2c62d26674323d209b7e46c1c2b968a69765e1b1cde028893111 fe9e7dc6a5459250355336eca0bdf2a0be575b1e34936280fd12a76a004f7b46 -test/extractor-tests/generated/RefType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Rename/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/RetType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/RefType/RefType.ql d5b822b2e4ffd6a85aac88cc37d113d321029ae042cacb66cb63cd7169faa1eb 3a4a866bc02d733236ebb2b32565bf6a00976afbea3cf50ef1d2271e4ebac9a5 +test/extractor-tests/generated/RefType/RefType_getLifetime.ql 880434f5908752adcc02d3645a48f22399250600c19e43c2da852cb6242e6a0b b8f9b9fab827972fd318d5edcaf37e4c7d0cf92261f9744e258537e6aee5a87a +test/extractor-tests/generated/RefType/RefType_getTy.ql 0d5667542ad05a0da1a6a4c36882a39014c4803a76cadb11400d747b603890fd 2e6c3a56f1a7bbb72c181819be72d85c650af1df06f8582ae61bba9e165cf764 +test/extractor-tests/generated/Rename/Rename.ql c8605e5d8ebb39be238ba26e46861df493d86c9caf9aa9a791ed5ff8d65a812a 7263c2c2565e41c652eda03d1e1ddd030fea79a8e3c967909df9945e30ecbe68 +test/extractor-tests/generated/Rename/Rename_getName.ql 1648191216ece0e3468823ed376292611bd3e5dbe9b3e215167d7051aa03385f 381683d4637a1a7322c9a0df2d90a30a153630965e7facbfaccd6cdb5c1de2cd +test/extractor-tests/generated/RestPat/RestPat.ql 0abc6a13ec82ebc923ce768344d468871a05a515690f0feaaf55b7967cf34a9e c2bc069de6927c6c04c89c54e694b50d6ca052230cc36668302907a7ed883e08 +test/extractor-tests/generated/RestPat/RestPat_getAttr.ql fb391ab265a454b10270136efd61c1ae9b29951cd28b0f585c6b6eea37c64745 6311e3ca49eb8a061684f8cebdfb11cc5ae09db6e145d1b2349a2ee80298cfe9 +test/extractor-tests/generated/RetType/RetType.ql 7aca20c92e840f930aacd0ef8e70840da76c02592ac2f2fd5a9bf24dc872c30e ef3aed1090a77684773c814692cfaee9cd245d88292cd75f1b5acf9005a2cd17 +test/extractor-tests/generated/RetType/RetType_getTy.ql 55118e2a41cc1a097f6a69d3b63f3ed77d5da6c02b218b69b1c93d605e7239fd b32abe7a3978fe858a53a5772faabf750b5d14880054493f5a99466092b10dce test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 8e9eba0837a466255e8e249e62c69c613cb5a78193fe50e26a617cf9d21c995a f33f6cc874f74d1ce93a6975c88748bd5bca6dc10360f8fd59493d939be63658 test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql 9fb7e1c79798e4f42e18785f3af17ea75f901a36abf9beb47a1eede69c613ba9 9cdb7cc4a4742865f6c92357973f84cee9229f55ff28081e5d17b6d57d6d275f test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql 7d4562efb0d26d92d11f03a0ef80338eb7d5a0c073f1f09cbb8a826f0cef33de 523ebd51b97f957afaf497e5a4d27929eed18e1d276054e3d5a7c5cfe7285c6e -test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql 976ce33fe3fd34aae2028a11b4accdee122b6d82d07722488c3239f0d2c14609 906bf8c8e7769a1052196bc78947b655158dd3b2903fef2802e2031cffbc1d78 +test/extractor-tests/generated/SelfParam/SelfParam.ql 61977791634b816d79507478a0be913befc843257fea1d6c564de58ff6d22cce 3e33365f58f59f61e0d190f1bfb101d5fc8f086d24322a7ca464e2a397b90110 +test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql 00dd5409c07e9a7b5dc51c1444e24b35d2ac3cab11320396ef70f531a3b65dc0 effbed79ad530a835e85b931389a0c8609a10ee035cb694f2e39b8539f8e54ba +test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql 0b7c243f609e005dd63fd1b3b9f0096fc13cb98fe113e6f3fefb0d5c414e9a5f f6e06de8bcddfc9bd978c058079e53174edbe7b39f18df3c0bd4e80486808eda +test/extractor-tests/generated/SelfParam/SelfParam_getName.ql 69207a57b415ba590e50003d506a64fd1780b27b8832b14f9bd3c909bddb5593 56fa28ba1222f45893237052fa5a9421d960e14fbf1396b2d1049b440c2e5abe +test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql 521db95ede5184298ef05f78062f6c42152ebc60f1a395e162ceda73e4fe5d36 b1e261e0bef72db4bb1a5bc294b93497e5b61ba607588444154cacdb23ac15a4 test/extractor-tests/generated/SlicePat/SlicePat.ql c6ff3c926ebbea3d923ba8ed00bf9cc20eaaee4c6ae49ea797c0975d0535240e 1b27e0caeb793da3b82059268b83bd624e81f215de42acbb548c52bacba3ed9e test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql e2f892a3a4c623fe3f7e64e1438128126bc4d8b8c0f657ae53bb99d3209a3b13 af835d9ec840c63e13edc6a9230a4e34cb894f4379b85b463b8068de5a8bd717 -test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Static/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/StmtList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Struct/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Trait/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/SliceType/SliceType.ql 2c81c68b54bf21d32f94ed66765642549540d3d179ac4daa52b597a3ad862c36 1d3b21af4a62a99776f3d569be3b85cac9fdb214d04f37ffb2f9f0759f520da9 +test/extractor-tests/generated/SliceType/SliceType_getTy.ql 0bc70c0e60fc3552584b07ba2a23f304b47ad24644e015674665d0182fa4d1e5 f6ec0703b013d805eec2bb11d28393fc750d000ff6c2188618aa333095c7e328 +test/extractor-tests/generated/SourceFile/SourceFile.ql c30a3c2c82be3114f3857295615e2ec1e59c823f0b65ea3918be85e6b7adb921 6a5bbe96f81861c953eb89f77ea64d580f996dca5950f717dd257a0b795453e6 +test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql 450404306b3d991b23c60a7bb354631d37925e74dec7cc795452fe3263dc2358 07ffcc91523fd029bd599be28fe2fc909917e22f2b95c4257d3605f54f9d7551 +test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql f17e44bc0c829b2aadcb6d4ab9c687c10dc8f1afbed4e5190404e574d6ab3107 1cf49a37cc32a67fdc00d16b520daf39143e1b27205c1a610e24d2fe1a464b95 +test/extractor-tests/generated/Static/Static.ql 0a704360ff0075d90b0ab68e447892728036b55dd62ac87aba162155a920bfc2 1004434e09a18db400e57e1901555cfc20e7be743d4ec5a07beab5e163822f30 +test/extractor-tests/generated/Static/Static_getAttr.ql adb0bbf55fb962c0e9d317fd815c09c88793c04f2fb78dfd62c259420c70bc68 d317429171c69c4d5d926c26e97b47f5df87cf0552338f575cd3aeea0e57d2c2 +test/extractor-tests/generated/Static/Static_getBody.ql e735bbd421e22c67db792671f5cb78291c437621fdfd700e5ef13b5b76b3684d 9148dc9d1899cedf817258a30a274e4f2c34659140090ca2afeb1b6f2f21e52f +test/extractor-tests/generated/Static/Static_getName.ql c7537e166d994b6f961547e8b97ab4328b78cbd038a0eb9afaae42e35f6d9cb4 bb5ae24b85cd7a8340a4ce9e9d56ec3be31558051c82257ccb84289291f38a42 +test/extractor-tests/generated/Static/Static_getTy.ql 1f282ac9c52b8d9efa1eb7f963767d0af28332c99baf283b3818edf53b3b8b9f 656cd5516601e21ffd54c51934bbbbe293de0b30a4327240208f5bd51ed524b7 +test/extractor-tests/generated/Static/Static_getVisibility.ql 0672b27f16955f7b0223a27c037884338dcf30759b7b8bb3da44e5d533228f90 0e4916f5683963041ef23c724ca8e16acfa370b583d90b76508c87131b9e1c73 +test/extractor-tests/generated/StmtList/StmtList.ql 0010df0d5e30f7bed3bd5d916faff7d101cc1edddceab7ddc12bb744f8e46cf7 aaff98988c68713b3577f3d4b4ed16b978eb11433ec7f3a32def82e96aac8c5b +test/extractor-tests/generated/StmtList/StmtList_getAttr.ql 78d4bf65273498f04238706330b03d0b61dd03b001531f05fcb2230f24ceab64 6e02cee05c0b9f104ddea72b20097034edb76e985188b3f10f079bb03163b830 +test/extractor-tests/generated/StmtList/StmtList_getStatement.ql abbc3bcf98aab395fc851d5cc58c9c8a13fe1bdd531723bec1bc1b8ddbec6614 e302a26079986fa055306a1f641533dfde36c9bc0dd7958d21e2518b59e808c2 +test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql 578d7c944ef42bdb822fc6ce52fe3d49a0012cf7854cfddbb3d5117133700587 64ea407455a3b4dfbb86202e71a72b5abbff885479367b2834c0dd16d1f9d0ee +test/extractor-tests/generated/Struct/Struct.ql d79ad03043f5a94b977fe1605489f057d56acf4b56f7284b6ce1a8779d803ea8 8ffe7775ec0b606d730bd3b2a5c37fc181a9ece3c2f7747c21b71503d20aa6d6 +test/extractor-tests/generated/Struct/Struct_getAttr.ql 028d90ddc5189b82cfc8de20f9e05d98e8a12cc185705481f91dd209f2cb1f87 760780a48c12be4581c1675c46aae054a6198196a55b6b989402cc29b7caf245 +test/extractor-tests/generated/Struct/Struct_getFieldList.ql f45d6d5d953741e52aca67129994b80f6904b2e6b43c519d6d42c29c7b663c42 77a7d07e8462fa608efc58af97ce8f17c5369f9573f9d200191136607cb0e600 +test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql cd72452713004690b77086163541fa319f8ab5faf503bb4a6a20bcaf2f790d38 4d72e891c5fac6e491d9e18b87ecf680dc423787d6b419da8f700fe1a14bc26f +test/extractor-tests/generated/Struct/Struct_getName.ql 8f1d9da4013307b4d23a1ce5dc76466ecdd7f0010b5148ec2e7dd2883efe3427 411b326d15d56713c2a5e6d22909474c5d33062296518221e36c920927f859fe +test/extractor-tests/generated/Struct/Struct_getVisibility.ql 17139d3f91e02a0fc12ad8443fe166fe11003301fee0c303f13aa6d1138e82d5 07bdc1fbcc0ea40508364ea632fce899cbe734159f5c377ea2029bc41bc9a3b4 +test/extractor-tests/generated/Struct/Struct_getWhereClause.ql d0db2c9811ed4568359e84255f04f0c75ae65a80d40981a1545d6cddf53e9c09 1133a46bc502757aaab61a8ac94b4a256b590548c5e27ec6a239ffd5a4a81577 +test/extractor-tests/generated/TokenTree/TokenTree.ql ba2ef197e0566640b57503579f3bc811a16fec56f4817117395bf81da08922a6 2e7b105cb917a444171669eb06f5491a4b222b1f81fa79209a138ab97db85aff +test/extractor-tests/generated/Trait/Trait.ql a51ba80b65687fb6eb99f36e4f98565b4a9ed9cc97d2c7ad2f09254ec9089b3d 81783aedb5af5a09f470ec0df6694588a4dcf8390b1b1645fb7459d35bc1bc3e +test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql 05e6896f60afabf931a244e42f75ee55e09c749954a751d8895846de3121f58f def1f07d9945e8d9b45a659a285b0eb72b37509d20624c88e0a2d34abf7f0c72 +test/extractor-tests/generated/Trait/Trait_getAttr.ql 9711125fa4fc0212b6357f06d1bc50df50b46168d139b649034296c64d732e21 901b6a9d04055b563f13d8742bd770c76ed1b2ccf9a7236a64de9d6d287fbd52 +test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql b27ff28e3aff9ec3369bbbcbee40a07a4bd8af40928c8c1cb7dd1e407a88ffee 2b48e2049df18de61ae3026f8ab4c3e9e517f411605328b37a0b71b288826925 +test/extractor-tests/generated/Trait/Trait_getName.ql d4ff3374f9d6068633bd125ede188fcd3f842f739ede214327cd33c3ace37379 3dcf91c303531113b65ea5205e9b6936c5d8b45cd3ddb60cd89ca7e49f0f00c1 +test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql 8a4eb898424fe476db549207d67ba520999342f708cbb89ee0713e6bbf1c050d 69d01d97d161eef86f24dd0777e510530a4db5b0c31c760a9a3a54f70d6dc144 +test/extractor-tests/generated/Trait/Trait_getVisibility.ql 8f4641558effd13a96c45d902e5726ba5e78fc9f39d3a05b4c72069993c499f4 553cf299e7d60a242cf44f2a68b8349fd8666cc4ccecab5ce200ce44ad244ba9 +test/extractor-tests/generated/Trait/Trait_getWhereClause.ql b34562e7f9ad9003d2ae1f3a9be1b5c141944d3236eae3402a6c73f14652e8ad 509fa3815933737e8996ea2c1540f5d7f3f7de21947b02e10597006967efc9d1 +test/extractor-tests/generated/TraitAlias/TraitAlias.ql 328b81e9ce5a5c1030277d3ccdac6b1de2f5845e28a253c1c7d88850a0bf03fd 62407b39c24dc2eca89aaeecbc033d28fc9ffbe625ad40d1633fcb08d8f5c217 +test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql 128c24196bfa6204fffd4154ff6acebd2d1924bb366809cdb227f33d89e185c8 56e8329e652567f19ef7d4c4933ee670a27c0afb877a0fab060a0a2031d8133e +test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql 5a40c1760fcf5074dc9e9efa1a543fc6223f4e5d2984923355802f91edb307e4 9fd7ab65c1d6affe19f96b1037ec3fb9381e90f602dd4611bb958048710601fa +test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql e91fa621774b9467ae820f3c408191ac75ad33dd73bcd417d299006a84c1a069 113e0c5dd2e3ac2ddb1fd6b099b9b5c91d5cdd4a02e62d4eb8e575096f7f4c6a +test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql 9ab4c329b25ea5e1a899b8698093f404ee9c095f0b0e38011161ca6480cd10a7 95c3b93610cdc08a0e251ab1307523f8cfb5560460923c81aace8619e30746dd +test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql 7e86140d2e9081d46063a15d82719be315406eb4d6e6738b3cb5ba7bcbef458f 8fb1ecf6a96b1f1d4a840425139c4ad47feb8b0ff14a319c08f82535e62e23c7 +test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql 129e1f10aa23f10d71f144caa4ccb923928ec1fd791b203cdba9989b079fc1e1 1fb112215bd3e39b7bc8ebc059f9cc362e5b2f04a242df053e150efa638cfea7 +test/extractor-tests/generated/TryExpr/TryExpr.ql 3beaa08f6d734e74eca32ae2e3fb6aa7694400a429cd6b3db97bfd3402b379b8 3f55bfc71e804e2ba6f02087c0808901a379b2cb30f58d5933c91becc10f3654 +test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql a2cef886bb959ff0f47fa555e7a89075f93ab013e1766270590951bf0b14a47b 24d12c96f1c7a1ae3d0d596551fb53ef2745c890eb602e0f99db3cb70cf1e474 +test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql 4ccd50eb4bdf01381eabb843b5ea3ebddec5d5852a04f10be9b9a4ef8a3005f1 0ec050d28c70322f6f280180fee998d1b6cd82db4e114db7e10758fcee2a2fca test/extractor-tests/generated/TupleExpr/TupleExpr.ql d6caa8d9ff94f27f88d338b07cacc280289970931e101680c6574e32bc0c863e 70508104013003dcf98f22db6eb9b60d14552831714048f348f812807189e9b1 test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql b1e93069613a8cd2b49af93a5cdd1571b343571e9c3d049d8bf19b25a461f9d3 be18008a00e3b0fb786f5dd36268201fd43bf8527d8a40119b147a3a8c973b3b test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql 308cd14873afedc74e3ed61d283f72da50008ce7690510c57fe0934c92158d58 5e3e23a7221486ead6502debb5d4978fb67046c8b0a5c8a688e4e196cb1f28a1 -test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/TupleField/TupleField.ql 2dbdb37ecb22a05007713434ac747a348266bab2863e48704fff48a10eb01c75 4309f177306f8adea929c1cff809eb26e262ae12e0d95b22597efd36c9105bfd +test/extractor-tests/generated/TupleField/TupleField_getAttr.ql b6b6a5349fc6767b0081d737e818425f0c93be5bd8de47c29fd89b7812e3267d 23d82a649cb733bc8c1d1b09dde84dbfcc8f847ed35be986a9ca8717ea9e5081 +test/extractor-tests/generated/TupleField/TupleField_getTy.ql 291d62ba4246acad200cd5347ed1280d80595fdf663f0ec39389996c23745fd0 d364381e5aab8aca36be354af5c41b2e8b5e95ae8cb7a14a702a28f644d567a8 +test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql c7af5373382394a686d12a23c4e688a7cc0dfe6b6cbee25c7e863b4713601ddb b174f30404e69eef112dedc8397ad444e968f12dde9befdccb051305d98a75d2 +test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql 7dc88440222ff036eb6aeabf9311568ea34f31f7c1ad19c71dd69a2dc17a6ed9 0255890d1389da004f18e8a0fc0b72d22790c36ccfacc6f452b269667f030f22 +test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql ad552a9c0b9964d1770f14cabbb436db60ebedc3c569006542a8eae9ddb30f6d 3a8c49d629376a9b8326138836b05ee2366b1021ffd19f5be74ab023e70aa50d test/extractor-tests/generated/TuplePat/TuplePat.ql 24ee56bc848537da65eb8ecef71e84cc351a2aedcc31d6fb53a5b7865f15f7c2 81db1076e2e4921ceb50933b96cd7b574caab1818de257c1e9038f3f97447d59 test/extractor-tests/generated/TuplePat/TuplePat_getField.ql f000bed41af031bc56d0705ce312abe7ab3dc6745b2936798c9938781e51475e f464a84dbc36aa371d60d6db68d6251f6b275dc4ecebdc56f195637be390b067 test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 6e6cfba0d2565782088af55ca977ada3d8093200aa180a49a67c9a176c52c254 c10c93823a9d814d694ca88fdf65a9bf8c1bb178e50c08982a97aa8d445284b3 test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql f3f2e23cc2a32aa5abc1e0fda1300dab1693230632b9eaa75bb3b1e82ee9ea1a 24b87a39ec639a26ff8c1d04dc3429b72266b2a3b1650a06a7cd4387b6f0e615 test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 13a06696bbf1fa8d5b73107e28cdba40e93da04b27f9c54381b78a52368d2ad1 5558c35ea9bb371ad90a5b374d7530dd1936f83e6ba656ebfbfd5bd63598e088 -test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/TupleType/TupleType.ql e5951a30817b8c51fe9cb9435f75bfdca2a1277b2094267d3205e33ef1ee9a9c 9a4d57322ed2cff57057654272981b056f833136f983141b033afaf64e19c117 +test/extractor-tests/generated/TupleType/TupleType_getField.ql b73a8cdaf6ba46cf9b63d8819239d2d2c06b3496ed4768e8a387a7558178fbd8 6efbcf13c25d0ff3ed0c6d194ba44d2abfa620406badef8184953395fab92bb4 +test/extractor-tests/generated/TypeAlias/TypeAlias.ql be2f90fb1bab4f8b77687f93f0fb7180582a0a3b3bb1a5e9fb77d55c12b01048 7fb298034353d13193e6b2fbb95b2cb2f7fa11c9eff7bd10bd7180f02267883f +test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql ecf4b45ef4876e46252785d2e42b11207e65757cdb26e60decafd765e7b03b49 21bb4d635d3d38abd731b9ad1a2b871f8e0788f48a03e9572823abeea0ea9382 +test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql e7e936458dce5a8c6675485a49e2769b6dbff29c112ed744c880e0fc7ae740ef e5fcf3a33d2416db6b0a73401a3cbc0cece22d0e06794e01a1645f2b3bca9306 +test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql 757deb3493764677de3eb1ff7cc119a469482b7277ed01eb8aa0c38b4a8797fb 5efed24a6968544b10ff44bfac7d0432a9621bde0e53b8477563d600d4847825 +test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.ql c4d56678981c78cd839b203dbd4a02dd30144db83329fb0015e90cf6c6138757 f9626eee79ce10727c6f13ed6a4819eb7da32827357a52939afaf4e71419af33 +test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql 309efaa32a840fb1fca7d34b7cdbbf51ab469707fa195b69a9f1a7d141db3a02 e12bf44d8858e930bdde80ecd7909b5405a51a1b00a6d2c8ee880e68dd622075 +test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql a1851a78f31ad6e3e5e43537832701f4c420546c2c86449c8391d3cc366d5445 23c118f662dee5f0e286753d107165b1964ce703a1378765f974530929a32723 +test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql 0cd281b7b5d3a76e4ec1938d7dcebb41e24ed54e94f352dcf48cbcdb5d48b353 5898e71246d8ba7517dab1f8d726af02a7add79924c8e6b30ce2c760e1344e8f +test/extractor-tests/generated/TypeArg/TypeArg.ql 8019f0eb5a64162df88e7e64ba0355578dad158b884c8eb42b2f10e093e52121 4871ac369925228978a1e16cf1393a449ea846657893d8a760fb46dbd6a0d609 +test/extractor-tests/generated/TypeArg/TypeArg_getTy.ql 54c291039d88fb460b0bc6bb83938c3be272898512415d08abffea714a000275 3117f1bbc1168b0ff75948459673c50971e3e71b0bb966783a8dc44328803f33 +test/extractor-tests/generated/TypeBound/TypeBound.ql 8824b2133040a1c39ed74d3b90669e4d8859a9dd52090e3fd71fe0d8ef90c7f0 932a0361678a16c7f538d5ee9133a61c495234de323e1e012f0ae307c8d2170e +test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.ql 7cf4ce64ea8048b85733fc2de627480465a616d62f57345c25bb62fdfda0ca59 e63b77ed3555b150cebf205016b1cc8d1b10fda315d5a21b3e60753ad602ea8f +test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql 615b0f5ccbffc425a3fa9480197bfae649c072717697f59d2e9b8112d2ff3fcf 1f969aca15be820eb27fe80317ad7fd4ce60f1a0fbcb4ae98b04828b0aeca632 +test/extractor-tests/generated/TypeBound/TypeBound_getTy.ql bded40be75f99b97869e5b4701a479db91867a861fb9f2071f4f7df0980ac6a2 6bdb30e50ba3ab7c2976aa602bae54a089019c8b81cab497c962b6b96362fbab +test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql 829c62ad88caa7707a4067c1a34f81971e936af1280a134b0b3532fbd4e4c887 10133eec05b902d5f0a6b3ed66156879914a83290014ba0ded26f1c3aaeb2b28 +test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql a6f6ec3f8d329da3509a8040ee2383ec6d9c66fe7c5685d94e90ac989a9e61b0 c812280f09658c63beb2a2ec0ab86e007819da08b6637bb4299c6ed6c90a4c6f +test/extractor-tests/generated/TypeParam/TypeParam.ql bff624133257883477db43ae05cc17681ab20d5564c2025dc78758255a62eaf2 a25d4adbe6119f4f36fa57f08cf7ba52e0b54668047e685d811570e0126bcfaf +test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql c071639828faca21de4b65a26a712ce126f7e989118ad4a896342b8e7d2aa2d0 83050691345f58c73a47f9cfd011bdf65a0759ffb3ea957336dc0ff6d600d13a +test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql 705edd03cf04c030a244541de287d2acfd3842389bfc58a26cfd1577da475113 7f2680131d4bcf301e8207a4844305c459615744a83c81f2c3a245db8284df74 +test/extractor-tests/generated/TypeParam/TypeParam_getName.ql 9d5b6d6a9f2a5793e2fff8dfa69d470659cc36dc417fc8b463364892f70c9d13 91dc4396c2af6c5175c188691c84b768da0d779d5d82afee19baf31e92c7dd91 +test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql 080a6b370ad460bf128fdfd632aa443af2ad91c3483e192ad756eb234dbfa4d8 8b048d282963f670db357f1eef9b8339f83d03adf57489a22b441d5c782aff62 test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 4ad6ed0c803fb4f58094a55b866940b947b16259756c674200172551ee6546e0 d3270bdcc4c026325159bd2a59848eb51d96298b2bf21402ea0a83ac1ea6d291 test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql d8502be88bcd97465f387c410b5078a4709e32b2baa556a4918ea5e609c40dd7 b238dc37404254e3e7806d50a7b1453e17e71da122931331b16a55853d3a843f -test/extractor-tests/generated/Union/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Use/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/UseTreeList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Variant/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/VariantList/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/Union/Union.ql c3e3307d406616ecfc4b6cd0d533591f539af6960efe61a8acff65e6e639586b a5c22ccaea66b18503b96773c8acf75f0f08a8e2544989e288c5e94c76d04d2f +test/extractor-tests/generated/Union/Union_getAttr.ql 42fa0878a6566208863b1d884baf7b68b46089827fdb1dbbfacbfccf5966a9a2 54aa94f0281ca80d1a4bdb0e2240f4384af2ab8d50f251875d1877d0964579fc +test/extractor-tests/generated/Union/Union_getGenericParamList.ql c55156ae26b766e385be7d21e67f8c3c45c29274201c93d660077fcc47e1ceee 4c4d338e17c32876ef6e51fd19cff67d125dd89c10e939dfaadbac824bef6a68 +test/extractor-tests/generated/Union/Union_getName.ql 17247183e1a8c8bbb15e67120f65ca323630bddeb614fa8a48e1e74319f8ed37 e21c2a0205bc991ba86f3e508451ef31398bdf5441f6d2a3f72113aaae9e152b +test/extractor-tests/generated/Union/Union_getRecordFieldList.ql ded2890094adaa627be35f2a8335abbe5c1d4b5dcf1671f09f504546148cc02e 1f0d94a5c3259b8c39f2a78f1f9250655c6183a5277131a7f3de14126eee6d03 +test/extractor-tests/generated/Union/Union_getVisibility.ql 86628736a677343d816e541ba76db02bdae3390f8367c09be3c1ff46d1ae8274 6514cdf4bfad8d9c968de290cc981be1063c0919051822cc6fdb03e8a891f123 +test/extractor-tests/generated/Union/Union_getWhereClause.ql 508e68ffa87f4eca2e2f9c894d215ea76070d628a294809dc267082b9e36a359 29da765d11794441a32a5745d4cf594495a9733e28189d898f64da864817894f +test/extractor-tests/generated/Use/Use.ql e17104b0664bd772e04398b355d4c0546f67ed66755d52febf3eb344dafe7a44 68701f1bb78b8c88a9a96e3e4b15e8be60cc1f2781fde9162aa7285ad3e57034 +test/extractor-tests/generated/Use/Use_getAttr.ql 6d43c25401398108553508aabb32ca476b3072060bb73eb07b1b60823a01f964 84e6f6953b4aa9a7472082f0a4f2df26ab1d157529ab2c661f0031603c94bb1d +test/extractor-tests/generated/Use/Use_getUseTree.ql 1dfe6bb40b29fbf823d67fecfc36ba928b43f17c38227b8eedf19fa252edf3af aacdcc4cf418ef1eec267287d2af905fe73f5bcfb080ef5373d08da31c608720 +test/extractor-tests/generated/Use/Use_getVisibility.ql 587f80acdd780042c48aeb347004be5e9fd9df063d263e6e4f2b660c48c53a8f 0c2c04f95838bca93dfe93fa208e1df7677797efc62b4e8052a4f9c5d20831dd +test/extractor-tests/generated/UseTree/UseTree.ql cb9f63051ae08cf8557b86b69b02cefe1732fc1e2daec34bcb891e271829cd86 eb46496aab9252b21eb0ccdd75792a97264885259c23d7e17e3013d943783947 +test/extractor-tests/generated/UseTree/UseTree_getPath.ql 80384a99674bdda85315a36681cb22ad2ad094005a5543b63d930fc7e030dd5b 2cd92b5de8b4214527f8a58d641430f6804d9bd40927e1da0c7efda2f86f6544 +test/extractor-tests/generated/UseTree/UseTree_getRename.ql ec3917501f3c89ac4974fab3f812d00b159ae6f2402dd20e5b4b3f8e8426391d db9ed981ce5f822aee349e5841d3126af7878d90e64140756ab4519552defe72 +test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql c265a88347e813840969ae934dfd2904bc06f502de77709bc0b1c7255e46382a 52a239c8ea5fd8fbfbd606559d70ecadc769887437a9bcab6fb3e774208ad868 +test/extractor-tests/generated/UseTreeList/UseTreeList.ql cd943c15c86e66244caafeb95b960a5c3d351d5edbd506258744fb60a61af3b2 cfa584cd9d8aa08267fd1106745a66226b2c99fadd1da65059cc7ecf2f2e68cf +test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql dd72966b1cb7b04f0267503013809063fcfb145e2b2d7d5250d9f24d2e405f9a 75b953aa11c51ca0fe95e67d50d6238962d8df4a4b9054999a2c6338e5a5613d +test/extractor-tests/generated/Variant/Variant.ql bf9b928ab3b1911e6c81fdc3fb9811e754ea28bfd0e4a21dca08b844aa42c3f1 bffd4bcc5019f721010722453985b39a4285240774e474e233ebe46f1cd5beb1 +test/extractor-tests/generated/Variant/Variant_getAttr.ql dd38e48e1eb05ce280b880652a90010eb63f7de3be7232411ba6265691249420 f8980680104de1e5fd40f264d8d62346aacaf6403a5e051f6fd680e234c82c1f +test/extractor-tests/generated/Variant/Variant_getExpr.ql ce00af303d28f60c5fd1dc7df628c7974aced21884e223a2f656cb4f0d1a74d5 9de51a65510cf9a15801d4207b616915bd959c95ec7330fdb502c5dff5b650cc +test/extractor-tests/generated/Variant/Variant_getFieldList.ql 083c8cf61989663de33d99b72dec231c308ccc8bb6739921465c473a07e8ea03 d03bff6945853c940acdc053b813d53b008ddab9a8bd4307826433828d4763ce +test/extractor-tests/generated/Variant/Variant_getName.ql 0d7b47bec9f9031c67f7b684112a84a311ef9b2efeb260bd7cd6f424011ca0d8 73565e6f965dd7fd7bb9b3408c7d7b69120e1971b67ab307fed293eb663a59ae +test/extractor-tests/generated/Variant/Variant_getVisibility.ql 2c8f365d28d96af55589f4d71ac3fee718b319b4cbc784560c0591d1f605a119 13160d9cf39fe169410eff6c338f5d063e1948109e8f18dd33ea0064f1dd9283 +test/extractor-tests/generated/VariantList/VariantList.ql 9830a7910c10aab76af40b093f10250fc80b8e92c3e2d25c1e88f7866773119d 758d6a8499a4528468e77575ca8f436450a12d1244d17cd2ab1c375e30fea870 +test/extractor-tests/generated/VariantList/VariantList_getVariant.ql beaf322eb010ddfafc5957cd2795595bf2b331033de69842f05cc2b5f8c57da5 c57187b3105c8bcd43de018671c58d3d532cef1724cf2f82039a99061ecb8d27 +test/extractor-tests/generated/Visibility/Visibility.ql 417b501e0eef74006cdc41aef2ee7496871fac8479c93737147336d53a60b1fc f65527aeb6c888c18096efc8b3a68d02cc4e857c18ae5381d85d3e10c610812e +test/extractor-tests/generated/Visibility/Visibility_getPath.ql 53de9942208dff340d4665f602c519592c79b65dad5db217360fe23bb22b9318 6e4d2b191792d7a259f2edbbb2333df3f97c14600b04142fff4c86266dc61b75 +test/extractor-tests/generated/WhereClause/WhereClause.ql 89af4f9e3021560c67c49a3b7458449aeda469f586317d8855d00977a8969a95 59f9f9e7619fb0aa17124679c69723a31f03e7a7af24088b274234c034371e7c +test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql cc9f83e30aa028d0130c7f27a1cb72a2c8e3100d65de4041f24670e8062192a4 a561ef1d71efc850b73f30a695777acda4835e2b9a34b1d054a57ebb2450d73c +test/extractor-tests/generated/WherePred/WherePred.ql 4955fa96838565a7cbfaa3361586632764cb67e52e1ca10d2951a924353d94f3 4bfcfe08c3482e0801214b4a06ed632ca02e163c5437ad94d370fc901eb23baf +test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql 21c3aaae697a7c8b4df82aa5c6eeef4963c9240fafb20cca3888e4361e208966 2f9ab4ed12984a4c82af2b8b805b28c2cb0c82d4e90927d9cf5be81e3bdc231a +test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql e08d9d6cccf634746f42a6ee583bbb3e7e9a9edbb63242e73b2bff4463df55d8 139543750c18f88d9c1ad2cdbcf1699d597cf2264bbb6b02a7e5792444e277ef +test/extractor-tests/generated/WherePred/WherePred_getTy.ql 34cee0335bbaf8946fe15e3c32449150d07a730fcca56b4faed554fbb8689e21 883976c8c27c276c402d591ebd89d076c2c4d8da4d4f738f3c860c34d4a03b97 +test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql c78e31ff4d1822a6b76f403e5ccb8f5529b4f784e14e618833df0378adca55fc 8bb1c9b5a1cfca0f5e8335464f7439aa098063176fbd3edbaf3407169f1899e6 +test/extractor-tests/generated/WhileExpr/WhileExpr.ql e061fac7584adf999d31ed0785041e2cc14b26a1c9901281f90c859335d8f614 fb1e597e28841e3b2d275d697aa6de7158db51b70a348d634291a75b25e4e80a +test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql f8527130eb2492743c0e629c97db291abcefe3d35302c840fee327ab0d8f10fd b41bedd429e5566fd68a50140ff1f50b51e2c7c351cbc8253fbc126527073f7e +test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql 84a021806423425b24eaeb9fb9967a6aadabe823c24e77a0dfefcb3509041597 147aa8bbe4dbf9b90be2467db8207dc96aed281e722eb6b9c998442a90911a6c +test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql 60ef4de57d85c7df23c0518b944b3839a9b2478044326829b5bf709a8c8d7240 3916e9ff50733c58afdc09837339b72a555a043f92f1c4e09e1652866029b017 +test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql cd62b7a464b5778ac925c3dbaf607e97d88ecd30f83f9106ace8e4e148d935b6 ab8027bddd6f138d3530ecd1aeb342b15015e886af1db80b75160c210a380086 test/extractor-tests/generated/WildcardPat/WildcardPat.ql c6da9df739528763f423eac0fa537bfd524d3ea67794abdbc7f7c56193163273 42be2c5e296ad3afd05b5dcc208a4d2db2fda9323cda2df66054f921e37f6efe test/extractor-tests/generated/YeetExpr/YeetExpr.ql 8a9f110486be12494256382374d6d5af8aa2210a84fd4452e99a3a3882b0eb59 510fa9eadeb062bd4f733ca6b6892e8908c2c6d58ec8478efc6942bd63a527f4 test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql 84e44a1fbf1a9d18f255781a3a9aaa71583b6c05da228989471dbe03da4e817f 560332129d3341fbb1c0ea88c894033f0bde19d0adc081111f7bf8af55b61f88 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 33cf15e7a924..8c303421256b 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -609,18 +609,33 @@ /lib/codeql/rust/elements/internal/generated/YeetExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/YieldExpr.qll linguist-generated /lib/codeql/rust/elements.qll linguist-generated -/test/extractor-tests/generated/Abi/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Abi/Abi.ql linguist-generated +/test/extractor-tests/generated/Abi/Abi_getAbiString.ql linguist-generated +/test/extractor-tests/generated/ArgList/ArgList.ql linguist-generated +/test/extractor-tests/generated/ArgList/ArgList_getArg.ql linguist-generated /test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql linguist-generated /test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql linguist-generated -/test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ArrayType/ArrayType.ql linguist-generated +/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql linguist-generated +/test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql linguist-generated -/test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Attr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/AssocItemList/AssocItemList.ql linguist-generated +/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.ql linguist-generated +/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql linguist-generated +/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql linguist-generated +/test/extractor-tests/generated/Attr/Attr.ql linguist-generated +/test/extractor-tests/generated/Attr/Attr_getMeta.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql linguist-generated @@ -650,37 +665,79 @@ /test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql linguist-generated -/test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql linguist-generated +/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated -/test/extractor-tests/generated/Const/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Const/Const.ql linguist-generated +/test/extractor-tests/generated/Const/Const_getAttr.ql linguist-generated +/test/extractor-tests/generated/Const/Const_getBody.ql linguist-generated +/test/extractor-tests/generated/Const/Const_getName.ql linguist-generated +/test/extractor-tests/generated/Const/Const_getTy.ql linguist-generated +/test/extractor-tests/generated/Const/Const_getVisibility.ql linguist-generated +/test/extractor-tests/generated/ConstArg/ConstArg.ql linguist-generated +/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql linguist-generated /test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql linguist-generated /test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql linguist-generated -/test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ConstParam/ConstParam.ql linguist-generated +/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql linguist-generated +/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql linguist-generated +/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql linguist-generated +/test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql linguist-generated -/test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Enum/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/DynTraitType/DynTraitType.ql linguist-generated +/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum_getAttr.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum_getName.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum_getVariantList.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum_getVisibility.ql linguist-generated +/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql linguist-generated /test/extractor-tests/generated/ExprStmt/ExprStmt.ql linguist-generated /test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ExternBlock/ExternBlock.ql linguist-generated +/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql linguist-generated +/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql linguist-generated +/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql linguist-generated +/test/extractor-tests/generated/ExternCrate/ExternCrate.ql linguist-generated +/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql linguist-generated +/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.ql linguist-generated +/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql linguist-generated +/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql linguist-generated +/test/extractor-tests/generated/ExternItemList/ExternItemList.ql linguist-generated +/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql linguist-generated +/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql linguist-generated -/test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ForType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/FnPtrType/FnPtrType.ql linguist-generated +/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql linguist-generated +/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql linguist-generated +/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql linguist-generated +/test/extractor-tests/generated/ForType/ForType.ql linguist-generated +/test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/ForType/ForType_getTy.ql linguist-generated +/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.ql linguist-generated +/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.ql linguist-generated +/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.ql linguist-generated +/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql linguist-generated +/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql linguist-generated +/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated /test/extractor-tests/generated/Function/Function_getAbi.ql linguist-generated /test/extractor-tests/generated/Function/Function_getAttr.ql linguist-generated @@ -693,7 +750,8 @@ /test/extractor-tests/generated/Function/Function_getWhereClause.ql linguist-generated /test/extractor-tests/generated/GenericArgList/GenericArgList.ql linguist-generated /test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql linguist-generated -/test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/GenericParamList/GenericParamList.ql linguist-generated +/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql linguist-generated /test/extractor-tests/generated/IdentPat/IdentPat.ql linguist-generated /test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql linguist-generated /test/extractor-tests/generated/IdentPat/IdentPat_getName.ql linguist-generated @@ -703,17 +761,28 @@ /test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql linguist-generated -/test/extractor-tests/generated/Impl/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Impl/Impl.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getAttr.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getTrait.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getVisibility.ql linguist-generated +/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql linguist-generated +/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql linguist-generated -/test/extractor-tests/generated/InferType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/InferType/InferType.ql linguist-generated +/test/extractor-tests/generated/ItemList/ItemList.ql linguist-generated +/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql linguist-generated +/test/extractor-tests/generated/ItemList/ItemList_getItem.ql linguist-generated /test/extractor-tests/generated/Label/Label.ql linguist-generated /test/extractor-tests/generated/Label/Label_getLifetime.ql linguist-generated -/test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/LetElse/LetElse.ql linguist-generated +/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql linguist-generated @@ -724,9 +793,14 @@ /test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getTy.ql linguist-generated -/test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Lifetime/Lifetime.ql linguist-generated +/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql linguist-generated +/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql linguist-generated +/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql linguist-generated +/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql linguist-generated +/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql linguist-generated +/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql linguist-generated +/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql linguist-generated @@ -736,24 +810,45 @@ /test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/MacroCall/MacroCall.ql linguist-generated +/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql linguist-generated +/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql linguist-generated +/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql linguist-generated +/test/extractor-tests/generated/MacroDef/MacroDef.ql linguist-generated +/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql linguist-generated +/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql linguist-generated +/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql linguist-generated +/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql linguist-generated +/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql linguist-generated +/test/extractor-tests/generated/MacroExpr/MacroExpr.ql linguist-generated +/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql linguist-generated +/test/extractor-tests/generated/MacroPat/MacroPat.ql linguist-generated +/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql linguist-generated +/test/extractor-tests/generated/MacroRules/MacroRules.ql linguist-generated +/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql linguist-generated +/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql linguist-generated +/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql linguist-generated +/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql linguist-generated +/test/extractor-tests/generated/MacroType/MacroType.ql linguist-generated +/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql linguist-generated -/test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/MatchArmList/MatchArmList.ql linguist-generated +/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql linguist-generated +/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql linguist-generated -/test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Meta/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/MatchGuard/MatchGuard.ql linguist-generated +/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql linguist-generated +/test/extractor-tests/generated/Meta/Meta.ql linguist-generated +/test/extractor-tests/generated/Meta/Meta_getExpr.ql linguist-generated +/test/extractor-tests/generated/Meta/Meta_getPath.ql linguist-generated +/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql linguist-generated @@ -765,20 +860,31 @@ /test/extractor-tests/generated/Module/Module_getItemList.ql linguist-generated /test/extractor-tests/generated/Module/Module_getName.ql linguist-generated /test/extractor-tests/generated/Module/Module_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Name/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Name/Name.ql linguist-generated +/test/extractor-tests/generated/Name/Name_getText.ql linguist-generated +/test/extractor-tests/generated/NameRef/NameRef.ql linguist-generated +/test/extractor-tests/generated/NameRef/NameRef_getText.ql linguist-generated +/test/extractor-tests/generated/NeverType/NeverType.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat_getPat.ql linguist-generated -/test/extractor-tests/generated/Param/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Param/Param.ql linguist-generated +/test/extractor-tests/generated/Param/Param_getAttr.ql linguist-generated +/test/extractor-tests/generated/Param/Param_getPat.ql linguist-generated +/test/extractor-tests/generated/Param/Param_getTy.ql linguist-generated +/test/extractor-tests/generated/ParamList/ParamList.ql linguist-generated +/test/extractor-tests/generated/ParamList/ParamList_getParam.ql linguist-generated +/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql linguist-generated +/test/extractor-tests/generated/ParenExpr/ParenExpr.ql linguist-generated +/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/ParenPat/ParenPat.ql linguist-generated +/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql linguist-generated +/test/extractor-tests/generated/ParenType/ParenType.ql linguist-generated +/test/extractor-tests/generated/ParenType/ParenType_getTy.ql linguist-generated /test/extractor-tests/generated/Path/Path.ql linguist-generated /test/extractor-tests/generated/Path/Path_getPart.ql linguist-generated /test/extractor-tests/generated/Path/Path_getQualifier.ql linguist-generated @@ -787,13 +893,22 @@ /test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql linguist-generated /test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated /test/extractor-tests/generated/PathPat/PathPat_getPath.ql linguist-generated -/test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/PathType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql linguist-generated +/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql linguist-generated +/test/extractor-tests/generated/PathType/PathType.ql linguist-generated +/test/extractor-tests/generated/PathType/PathType_getPath.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql linguist-generated -/test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/PtrType/PtrType.ql linguist-generated +/test/extractor-tests/generated/PtrType/PtrType_getTy.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql linguist-generated @@ -810,9 +925,17 @@ /test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql linguist-generated /test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql linguist-generated /test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql linguist-generated -/test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql linguist-generated +/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql linguist-generated +/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql linguist-generated +/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql linguist-generated +/test/extractor-tests/generated/RecordField/RecordField.ql linguist-generated +/test/extractor-tests/generated/RecordField/RecordField_getAttr.ql linguist-generated +/test/extractor-tests/generated/RecordField/RecordField_getName.ql linguist-generated +/test/extractor-tests/generated/RecordField/RecordField_getTy.ql linguist-generated +/test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql linguist-generated +/test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql linguist-generated +/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql linguist-generated @@ -820,60 +943,153 @@ /test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql linguist-generated /test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql linguist-generated /test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql linguist-generated -/test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql linguist-generated +/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql linguist-generated +/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/RefPat/RefPat.ql linguist-generated /test/extractor-tests/generated/RefPat/RefPat_getPat.ql linguist-generated -/test/extractor-tests/generated/RefType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Rename/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RetType/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RefType/RefType.ql linguist-generated +/test/extractor-tests/generated/RefType/RefType_getLifetime.ql linguist-generated +/test/extractor-tests/generated/RefType/RefType_getTy.ql linguist-generated +/test/extractor-tests/generated/Rename/Rename.ql linguist-generated +/test/extractor-tests/generated/Rename/Rename_getName.ql linguist-generated +/test/extractor-tests/generated/RestPat/RestPat.ql linguist-generated +/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql linguist-generated +/test/extractor-tests/generated/RetType/RetType.ql linguist-generated +/test/extractor-tests/generated/RetType/RetType_getTy.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated -/test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql linguist-generated +/test/extractor-tests/generated/SelfParam/SelfParam.ql linguist-generated +/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql linguist-generated +/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql linguist-generated +/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql linguist-generated +/test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql linguist-generated /test/extractor-tests/generated/SlicePat/SlicePat.ql linguist-generated /test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql linguist-generated -/test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Static/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/StmtList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Struct/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Trait/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/SliceType/SliceType.ql linguist-generated +/test/extractor-tests/generated/SliceType/SliceType_getTy.ql linguist-generated +/test/extractor-tests/generated/SourceFile/SourceFile.ql linguist-generated +/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql linguist-generated +/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql linguist-generated +/test/extractor-tests/generated/Static/Static.ql linguist-generated +/test/extractor-tests/generated/Static/Static_getAttr.ql linguist-generated +/test/extractor-tests/generated/Static/Static_getBody.ql linguist-generated +/test/extractor-tests/generated/Static/Static_getName.ql linguist-generated +/test/extractor-tests/generated/Static/Static_getTy.ql linguist-generated +/test/extractor-tests/generated/Static/Static_getVisibility.ql linguist-generated +/test/extractor-tests/generated/StmtList/StmtList.ql linguist-generated +/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql linguist-generated +/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql linguist-generated +/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct_getAttr.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct_getFieldList.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct_getName.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct_getVisibility.ql linguist-generated +/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/TokenTree/TokenTree.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getAttr.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getName.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getVisibility.ql linguist-generated +/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql linguist-generated +/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/TryExpr/TryExpr.ql linguist-generated +/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql linguist-generated -/test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/TupleField/TupleField.ql linguist-generated +/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql linguist-generated +/test/extractor-tests/generated/TupleField/TupleField_getTy.ql linguist-generated +/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql linguist-generated +/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql linguist-generated +/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql linguist-generated /test/extractor-tests/generated/TuplePat/TuplePat.ql linguist-generated /test/extractor-tests/generated/TuplePat/TuplePat_getField.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated -/test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/TupleType/TupleType.ql linguist-generated +/test/extractor-tests/generated/TupleType/TupleType_getField.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql linguist-generated +/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/TypeArg/TypeArg.ql linguist-generated +/test/extractor-tests/generated/TypeArg/TypeArg_getTy.ql linguist-generated +/test/extractor-tests/generated/TypeBound/TypeBound.ql linguist-generated +/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql linguist-generated +/test/extractor-tests/generated/TypeBound/TypeBound_getTy.ql linguist-generated +/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql linguist-generated +/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql linguist-generated +/test/extractor-tests/generated/TypeParam/TypeParam.ql linguist-generated +/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql linguist-generated +/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql linguist-generated +/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql linguist-generated +/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/Union/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Use/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/UseTreeList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Variant/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/VariantList/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Union/Union.ql linguist-generated +/test/extractor-tests/generated/Union/Union_getAttr.ql linguist-generated +/test/extractor-tests/generated/Union/Union_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/Union/Union_getName.ql linguist-generated +/test/extractor-tests/generated/Union/Union_getRecordFieldList.ql linguist-generated +/test/extractor-tests/generated/Union/Union_getVisibility.ql linguist-generated +/test/extractor-tests/generated/Union/Union_getWhereClause.ql linguist-generated +/test/extractor-tests/generated/Use/Use.ql linguist-generated +/test/extractor-tests/generated/Use/Use_getAttr.ql linguist-generated +/test/extractor-tests/generated/Use/Use_getUseTree.ql linguist-generated +/test/extractor-tests/generated/Use/Use_getVisibility.ql linguist-generated +/test/extractor-tests/generated/UseTree/UseTree.ql linguist-generated +/test/extractor-tests/generated/UseTree/UseTree_getPath.ql linguist-generated +/test/extractor-tests/generated/UseTree/UseTree_getRename.ql linguist-generated +/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql linguist-generated +/test/extractor-tests/generated/UseTreeList/UseTreeList.ql linguist-generated +/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql linguist-generated +/test/extractor-tests/generated/Variant/Variant.ql linguist-generated +/test/extractor-tests/generated/Variant/Variant_getAttr.ql linguist-generated +/test/extractor-tests/generated/Variant/Variant_getExpr.ql linguist-generated +/test/extractor-tests/generated/Variant/Variant_getFieldList.ql linguist-generated +/test/extractor-tests/generated/Variant/Variant_getName.ql linguist-generated +/test/extractor-tests/generated/Variant/Variant_getVisibility.ql linguist-generated +/test/extractor-tests/generated/VariantList/VariantList.ql linguist-generated +/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql linguist-generated +/test/extractor-tests/generated/Visibility/Visibility.ql linguist-generated +/test/extractor-tests/generated/Visibility/Visibility_getPath.ql linguist-generated +/test/extractor-tests/generated/WhereClause/WhereClause.ql linguist-generated +/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql linguist-generated +/test/extractor-tests/generated/WherePred/WherePred.ql linguist-generated +/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql linguist-generated +/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql linguist-generated +/test/extractor-tests/generated/WherePred/WherePred_getTy.ql linguist-generated +/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql linguist-generated +/test/extractor-tests/generated/WhileExpr/WhileExpr.ql linguist-generated +/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql linguist-generated +/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql linguist-generated /test/extractor-tests/generated/WildcardPat/WildcardPat.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/Abi.qll b/rust/ql/lib/codeql/rust/elements/Abi.qll index a1872ae9c41b..f8c95ad23a4d 100644 --- a/rust/ql/lib/codeql/rust/elements/Abi.qll +++ b/rust/ql/lib/codeql/rust/elements/Abi.qll @@ -6,4 +6,10 @@ private import internal.AbiImpl import codeql.rust.elements.AstNode +/** + * A Abi. For example: + * ```rust + * todo!() + * ``` + */ final class Abi = Impl::Abi; diff --git a/rust/ql/lib/codeql/rust/elements/ArgList.qll b/rust/ql/lib/codeql/rust/elements/ArgList.qll index 24ada531dc48..1f62274e1b0b 100644 --- a/rust/ql/lib/codeql/rust/elements/ArgList.qll +++ b/rust/ql/lib/codeql/rust/elements/ArgList.qll @@ -7,4 +7,10 @@ private import internal.ArgListImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Expr +/** + * A ArgList. For example: + * ```rust + * todo!() + * ``` + */ final class ArgList = Impl::ArgList; diff --git a/rust/ql/lib/codeql/rust/elements/ArrayType.qll b/rust/ql/lib/codeql/rust/elements/ArrayType.qll index 5c8e967396fd..85054d113298 100644 --- a/rust/ql/lib/codeql/rust/elements/ArrayType.qll +++ b/rust/ql/lib/codeql/rust/elements/ArrayType.qll @@ -7,4 +7,10 @@ private import internal.ArrayTypeImpl import codeql.rust.elements.ConstArg import codeql.rust.elements.TypeRef +/** + * A ArrayType. For example: + * ```rust + * todo!() + * ``` + */ final class ArrayType = Impl::ArrayType; diff --git a/rust/ql/lib/codeql/rust/elements/AssocItem.qll b/rust/ql/lib/codeql/rust/elements/AssocItem.qll index c33fe834ee45..0a56f7109c38 100644 --- a/rust/ql/lib/codeql/rust/elements/AssocItem.qll +++ b/rust/ql/lib/codeql/rust/elements/AssocItem.qll @@ -6,4 +6,10 @@ private import internal.AssocItemImpl import codeql.rust.elements.AstNode +/** + * A AssocItem. For example: + * ```rust + * todo!() + * ``` + */ final class AssocItem = Impl::AssocItem; diff --git a/rust/ql/lib/codeql/rust/elements/AssocItemList.qll b/rust/ql/lib/codeql/rust/elements/AssocItemList.qll index 1ca7cae64092..f71a004af722 100644 --- a/rust/ql/lib/codeql/rust/elements/AssocItemList.qll +++ b/rust/ql/lib/codeql/rust/elements/AssocItemList.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AssocItem import codeql.rust.elements.AstNode import codeql.rust.elements.Attr +/** + * A AssocItemList. For example: + * ```rust + * todo!() + * ``` + */ final class AssocItemList = Impl::AssocItemList; diff --git a/rust/ql/lib/codeql/rust/elements/AssocTypeArg.qll b/rust/ql/lib/codeql/rust/elements/AssocTypeArg.qll index a78aa49e6c7b..bd8f6aca76d7 100644 --- a/rust/ql/lib/codeql/rust/elements/AssocTypeArg.qll +++ b/rust/ql/lib/codeql/rust/elements/AssocTypeArg.qll @@ -14,4 +14,10 @@ import codeql.rust.elements.ReturnTypeSyntax import codeql.rust.elements.TypeBoundList import codeql.rust.elements.TypeRef +/** + * A AssocTypeArg. For example: + * ```rust + * todo!() + * ``` + */ final class AssocTypeArg = Impl::AssocTypeArg; diff --git a/rust/ql/lib/codeql/rust/elements/Attr.qll b/rust/ql/lib/codeql/rust/elements/Attr.qll index 1f75bf11d656..c7160519253d 100644 --- a/rust/ql/lib/codeql/rust/elements/Attr.qll +++ b/rust/ql/lib/codeql/rust/elements/Attr.qll @@ -7,4 +7,10 @@ private import internal.AttrImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Meta +/** + * A Attr. For example: + * ```rust + * todo!() + * ``` + */ final class Attr = Impl::Attr; diff --git a/rust/ql/lib/codeql/rust/elements/ClosureBinder.qll b/rust/ql/lib/codeql/rust/elements/ClosureBinder.qll index 70c8c25626e7..14464283aa82 100644 --- a/rust/ql/lib/codeql/rust/elements/ClosureBinder.qll +++ b/rust/ql/lib/codeql/rust/elements/ClosureBinder.qll @@ -7,4 +7,10 @@ private import internal.ClosureBinderImpl import codeql.rust.elements.AstNode import codeql.rust.elements.GenericParamList +/** + * A ClosureBinder. For example: + * ```rust + * todo!() + * ``` + */ final class ClosureBinder = Impl::ClosureBinder; diff --git a/rust/ql/lib/codeql/rust/elements/Const.qll b/rust/ql/lib/codeql/rust/elements/Const.qll index e196f56b524a..c069f1ae56cd 100644 --- a/rust/ql/lib/codeql/rust/elements/Const.qll +++ b/rust/ql/lib/codeql/rust/elements/Const.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.TypeRef import codeql.rust.elements.Visibility +/** + * A Const. For example: + * ```rust + * todo!() + * ``` + */ final class Const = Impl::Const; diff --git a/rust/ql/lib/codeql/rust/elements/ConstArg.qll b/rust/ql/lib/codeql/rust/elements/ConstArg.qll index 774bd61e097a..c48b43b3157a 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstArg.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstArg.qll @@ -7,4 +7,10 @@ private import internal.ConstArgImpl import codeql.rust.elements.Expr import codeql.rust.elements.GenericArg +/** + * A ConstArg. For example: + * ```rust + * todo!() + * ``` + */ final class ConstArg = Impl::ConstArg; diff --git a/rust/ql/lib/codeql/rust/elements/ConstParam.qll b/rust/ql/lib/codeql/rust/elements/ConstParam.qll index eafc6e0916b2..625e603cb8a0 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstParam.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstParam.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.GenericParam import codeql.rust.elements.Name import codeql.rust.elements.TypeRef +/** + * A ConstParam. For example: + * ```rust + * todo!() + * ``` + */ final class ConstParam = Impl::ConstParam; diff --git a/rust/ql/lib/codeql/rust/elements/DynTraitType.qll b/rust/ql/lib/codeql/rust/elements/DynTraitType.qll index 461445aee6c5..237e7d4704a3 100644 --- a/rust/ql/lib/codeql/rust/elements/DynTraitType.qll +++ b/rust/ql/lib/codeql/rust/elements/DynTraitType.qll @@ -7,4 +7,10 @@ private import internal.DynTraitTypeImpl import codeql.rust.elements.TypeBoundList import codeql.rust.elements.TypeRef +/** + * A DynTraitType. For example: + * ```rust + * todo!() + * ``` + */ final class DynTraitType = Impl::DynTraitType; diff --git a/rust/ql/lib/codeql/rust/elements/Enum.qll b/rust/ql/lib/codeql/rust/elements/Enum.qll index 0fba6120ed93..eb3801611cb5 100644 --- a/rust/ql/lib/codeql/rust/elements/Enum.qll +++ b/rust/ql/lib/codeql/rust/elements/Enum.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.VariantList import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A Enum. For example: + * ```rust + * todo!() + * ``` + */ final class Enum = Impl::Enum; diff --git a/rust/ql/lib/codeql/rust/elements/ExternBlock.qll b/rust/ql/lib/codeql/rust/elements/ExternBlock.qll index d9f5dbd84fbc..46112c915dcd 100644 --- a/rust/ql/lib/codeql/rust/elements/ExternBlock.qll +++ b/rust/ql/lib/codeql/rust/elements/ExternBlock.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.ExternItemList import codeql.rust.elements.Item +/** + * A ExternBlock. For example: + * ```rust + * todo!() + * ``` + */ final class ExternBlock = Impl::ExternBlock; diff --git a/rust/ql/lib/codeql/rust/elements/ExternCrate.qll b/rust/ql/lib/codeql/rust/elements/ExternCrate.qll index 1449667196c3..f76857a80586 100644 --- a/rust/ql/lib/codeql/rust/elements/ExternCrate.qll +++ b/rust/ql/lib/codeql/rust/elements/ExternCrate.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.NameRef import codeql.rust.elements.Rename import codeql.rust.elements.Visibility +/** + * A ExternCrate. For example: + * ```rust + * todo!() + * ``` + */ final class ExternCrate = Impl::ExternCrate; diff --git a/rust/ql/lib/codeql/rust/elements/ExternItem.qll b/rust/ql/lib/codeql/rust/elements/ExternItem.qll index aa7a8101c087..e15a22a702dc 100644 --- a/rust/ql/lib/codeql/rust/elements/ExternItem.qll +++ b/rust/ql/lib/codeql/rust/elements/ExternItem.qll @@ -6,4 +6,10 @@ private import internal.ExternItemImpl import codeql.rust.elements.AstNode +/** + * A ExternItem. For example: + * ```rust + * todo!() + * ``` + */ final class ExternItem = Impl::ExternItem; diff --git a/rust/ql/lib/codeql/rust/elements/ExternItemList.qll b/rust/ql/lib/codeql/rust/elements/ExternItemList.qll index efb36b15be65..5047b23daee5 100644 --- a/rust/ql/lib/codeql/rust/elements/ExternItemList.qll +++ b/rust/ql/lib/codeql/rust/elements/ExternItemList.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Attr import codeql.rust.elements.ExternItem +/** + * A ExternItemList. For example: + * ```rust + * todo!() + * ``` + */ final class ExternItemList = Impl::ExternItemList; diff --git a/rust/ql/lib/codeql/rust/elements/FieldList.qll b/rust/ql/lib/codeql/rust/elements/FieldList.qll index 646d1ad91641..ce71dd9af024 100644 --- a/rust/ql/lib/codeql/rust/elements/FieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/FieldList.qll @@ -6,4 +6,10 @@ private import internal.FieldListImpl import codeql.rust.elements.AstNode +/** + * A FieldList. For example: + * ```rust + * todo!() + * ``` + */ final class FieldList = Impl::FieldList; diff --git a/rust/ql/lib/codeql/rust/elements/FnPtrType.qll b/rust/ql/lib/codeql/rust/elements/FnPtrType.qll index 30c58fc4bb13..e0ed6490b5f0 100644 --- a/rust/ql/lib/codeql/rust/elements/FnPtrType.qll +++ b/rust/ql/lib/codeql/rust/elements/FnPtrType.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.ParamList import codeql.rust.elements.RetType import codeql.rust.elements.TypeRef +/** + * A FnPtrType. For example: + * ```rust + * todo!() + * ``` + */ final class FnPtrType = Impl::FnPtrType; diff --git a/rust/ql/lib/codeql/rust/elements/ForExpr.qll b/rust/ql/lib/codeql/rust/elements/ForExpr.qll index 1a4a712576af..c4ef6f9faffc 100644 --- a/rust/ql/lib/codeql/rust/elements/ForExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ForExpr.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Expr import codeql.rust.elements.Label import codeql.rust.elements.Pat +/** + * A ForExpr. For example: + * ```rust + * todo!() + * ``` + */ final class ForExpr = Impl::ForExpr; diff --git a/rust/ql/lib/codeql/rust/elements/ForType.qll b/rust/ql/lib/codeql/rust/elements/ForType.qll index 68b1c5efea80..ec6bae3ab95a 100644 --- a/rust/ql/lib/codeql/rust/elements/ForType.qll +++ b/rust/ql/lib/codeql/rust/elements/ForType.qll @@ -7,4 +7,10 @@ private import internal.ForTypeImpl import codeql.rust.elements.GenericParamList import codeql.rust.elements.TypeRef +/** + * A ForType. For example: + * ```rust + * todo!() + * ``` + */ final class ForType = Impl::ForType; diff --git a/rust/ql/lib/codeql/rust/elements/FormatArgsArg.qll b/rust/ql/lib/codeql/rust/elements/FormatArgsArg.qll index e568667170d9..fc461602dd6b 100644 --- a/rust/ql/lib/codeql/rust/elements/FormatArgsArg.qll +++ b/rust/ql/lib/codeql/rust/elements/FormatArgsArg.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Expr import codeql.rust.elements.Name +/** + * A FormatArgsArg. For example: + * ```rust + * todo!() + * ``` + */ final class FormatArgsArg = Impl::FormatArgsArg; diff --git a/rust/ql/lib/codeql/rust/elements/FormatArgsExpr.qll b/rust/ql/lib/codeql/rust/elements/FormatArgsExpr.qll index 510ab7163139..226b4d211aae 100644 --- a/rust/ql/lib/codeql/rust/elements/FormatArgsExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/FormatArgsExpr.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.FormatArgsArg +/** + * A FormatArgsExpr. For example: + * ```rust + * todo!() + * ``` + */ final class FormatArgsExpr = Impl::FormatArgsExpr; diff --git a/rust/ql/lib/codeql/rust/elements/GenericArg.qll b/rust/ql/lib/codeql/rust/elements/GenericArg.qll index b04621358021..0958b33326f3 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericArg.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericArg.qll @@ -6,4 +6,10 @@ private import internal.GenericArgImpl import codeql.rust.elements.AstNode +/** + * A GenericArg. For example: + * ```rust + * todo!() + * ``` + */ final class GenericArg = Impl::GenericArg; diff --git a/rust/ql/lib/codeql/rust/elements/GenericParam.qll b/rust/ql/lib/codeql/rust/elements/GenericParam.qll index 873a5d858f06..a7569c08f999 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericParam.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericParam.qll @@ -6,4 +6,10 @@ private import internal.GenericParamImpl import codeql.rust.elements.AstNode +/** + * A GenericParam. For example: + * ```rust + * todo!() + * ``` + */ final class GenericParam = Impl::GenericParam; diff --git a/rust/ql/lib/codeql/rust/elements/GenericParamList.qll b/rust/ql/lib/codeql/rust/elements/GenericParamList.qll index 79d33c9a926e..ea6756f5abfd 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericParamList.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericParamList.qll @@ -7,4 +7,10 @@ private import internal.GenericParamListImpl import codeql.rust.elements.AstNode import codeql.rust.elements.GenericParam +/** + * A GenericParamList. For example: + * ```rust + * todo!() + * ``` + */ final class GenericParamList = Impl::GenericParamList; diff --git a/rust/ql/lib/codeql/rust/elements/Impl.qll b/rust/ql/lib/codeql/rust/elements/Impl.qll index c61b00a94b3e..747cbe90cc67 100644 --- a/rust/ql/lib/codeql/rust/elements/Impl.qll +++ b/rust/ql/lib/codeql/rust/elements/Impl.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.TypeRef import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A Impl. For example: + * ```rust + * todo!() + * ``` + */ final class Impl = Impl::Impl; diff --git a/rust/ql/lib/codeql/rust/elements/ImplTraitType.qll b/rust/ql/lib/codeql/rust/elements/ImplTraitType.qll index 818e67faa947..7f3a8a961597 100644 --- a/rust/ql/lib/codeql/rust/elements/ImplTraitType.qll +++ b/rust/ql/lib/codeql/rust/elements/ImplTraitType.qll @@ -7,4 +7,10 @@ private import internal.ImplTraitTypeImpl import codeql.rust.elements.TypeBoundList import codeql.rust.elements.TypeRef +/** + * A ImplTraitType. For example: + * ```rust + * todo!() + * ``` + */ final class ImplTraitType = Impl::ImplTraitType; diff --git a/rust/ql/lib/codeql/rust/elements/InferType.qll b/rust/ql/lib/codeql/rust/elements/InferType.qll index a7abfbe7461a..ae0f6eff7d55 100644 --- a/rust/ql/lib/codeql/rust/elements/InferType.qll +++ b/rust/ql/lib/codeql/rust/elements/InferType.qll @@ -6,4 +6,10 @@ private import internal.InferTypeImpl import codeql.rust.elements.TypeRef +/** + * A InferType. For example: + * ```rust + * todo!() + * ``` + */ final class InferType = Impl::InferType; diff --git a/rust/ql/lib/codeql/rust/elements/Item.qll b/rust/ql/lib/codeql/rust/elements/Item.qll index 9035620b48b1..838ba32b964c 100644 --- a/rust/ql/lib/codeql/rust/elements/Item.qll +++ b/rust/ql/lib/codeql/rust/elements/Item.qll @@ -6,4 +6,10 @@ private import internal.ItemImpl import codeql.rust.elements.Stmt +/** + * A Item. For example: + * ```rust + * todo!() + * ``` + */ final class Item = Impl::Item; diff --git a/rust/ql/lib/codeql/rust/elements/ItemList.qll b/rust/ql/lib/codeql/rust/elements/ItemList.qll index 41f4090f7a14..631b875820cf 100644 --- a/rust/ql/lib/codeql/rust/elements/ItemList.qll +++ b/rust/ql/lib/codeql/rust/elements/ItemList.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Attr import codeql.rust.elements.Item +/** + * A ItemList. For example: + * ```rust + * todo!() + * ``` + */ final class ItemList = Impl::ItemList; diff --git a/rust/ql/lib/codeql/rust/elements/LetElse.qll b/rust/ql/lib/codeql/rust/elements/LetElse.qll index 85aa3857d9e7..1129ae3ff72b 100644 --- a/rust/ql/lib/codeql/rust/elements/LetElse.qll +++ b/rust/ql/lib/codeql/rust/elements/LetElse.qll @@ -7,4 +7,10 @@ private import internal.LetElseImpl import codeql.rust.elements.AstNode import codeql.rust.elements.BlockExpr +/** + * A LetElse. For example: + * ```rust + * todo!() + * ``` + */ final class LetElse = Impl::LetElse; diff --git a/rust/ql/lib/codeql/rust/elements/Lifetime.qll b/rust/ql/lib/codeql/rust/elements/Lifetime.qll index cd2c6756a092..512d04c1ee99 100644 --- a/rust/ql/lib/codeql/rust/elements/Lifetime.qll +++ b/rust/ql/lib/codeql/rust/elements/Lifetime.qll @@ -6,4 +6,10 @@ private import internal.LifetimeImpl import codeql.rust.elements.AstNode +/** + * A Lifetime. For example: + * ```rust + * todo!() + * ``` + */ final class Lifetime = Impl::Lifetime; diff --git a/rust/ql/lib/codeql/rust/elements/LifetimeArg.qll b/rust/ql/lib/codeql/rust/elements/LifetimeArg.qll index 9ee40ebc7df1..35342e96c030 100644 --- a/rust/ql/lib/codeql/rust/elements/LifetimeArg.qll +++ b/rust/ql/lib/codeql/rust/elements/LifetimeArg.qll @@ -7,4 +7,10 @@ private import internal.LifetimeArgImpl import codeql.rust.elements.GenericArg import codeql.rust.elements.Lifetime +/** + * A LifetimeArg. For example: + * ```rust + * todo!() + * ``` + */ final class LifetimeArg = Impl::LifetimeArg; diff --git a/rust/ql/lib/codeql/rust/elements/LifetimeParam.qll b/rust/ql/lib/codeql/rust/elements/LifetimeParam.qll index 281dd65171cc..f3aa605c665e 100644 --- a/rust/ql/lib/codeql/rust/elements/LifetimeParam.qll +++ b/rust/ql/lib/codeql/rust/elements/LifetimeParam.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.GenericParam import codeql.rust.elements.Lifetime import codeql.rust.elements.TypeBoundList +/** + * A LifetimeParam. For example: + * ```rust + * todo!() + * ``` + */ final class LifetimeParam = Impl::LifetimeParam; diff --git a/rust/ql/lib/codeql/rust/elements/MacroCall.qll b/rust/ql/lib/codeql/rust/elements/MacroCall.qll index 4631dfa66e74..5399f1f2a872 100644 --- a/rust/ql/lib/codeql/rust/elements/MacroCall.qll +++ b/rust/ql/lib/codeql/rust/elements/MacroCall.qll @@ -11,4 +11,10 @@ import codeql.rust.elements.Item import codeql.rust.elements.Path import codeql.rust.elements.TokenTree +/** + * A MacroCall. For example: + * ```rust + * todo!() + * ``` + */ final class MacroCall = Impl::MacroCall; diff --git a/rust/ql/lib/codeql/rust/elements/MacroDef.qll b/rust/ql/lib/codeql/rust/elements/MacroDef.qll index 03785e6ad3b2..3ae14a9e6624 100644 --- a/rust/ql/lib/codeql/rust/elements/MacroDef.qll +++ b/rust/ql/lib/codeql/rust/elements/MacroDef.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.TokenTree import codeql.rust.elements.Visibility +/** + * A MacroDef. For example: + * ```rust + * todo!() + * ``` + */ final class MacroDef = Impl::MacroDef; diff --git a/rust/ql/lib/codeql/rust/elements/MacroExpr.qll b/rust/ql/lib/codeql/rust/elements/MacroExpr.qll index 4fcfdf7fa30c..8085cabc3fe0 100644 --- a/rust/ql/lib/codeql/rust/elements/MacroExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MacroExpr.qll @@ -7,4 +7,10 @@ private import internal.MacroExprImpl import codeql.rust.elements.Expr import codeql.rust.elements.MacroCall +/** + * A MacroExpr. For example: + * ```rust + * todo!() + * ``` + */ final class MacroExpr = Impl::MacroExpr; diff --git a/rust/ql/lib/codeql/rust/elements/MacroPat.qll b/rust/ql/lib/codeql/rust/elements/MacroPat.qll index 1fa9e5a0fb20..7bb99d04ec44 100644 --- a/rust/ql/lib/codeql/rust/elements/MacroPat.qll +++ b/rust/ql/lib/codeql/rust/elements/MacroPat.qll @@ -7,4 +7,10 @@ private import internal.MacroPatImpl import codeql.rust.elements.MacroCall import codeql.rust.elements.Pat +/** + * A MacroPat. For example: + * ```rust + * todo!() + * ``` + */ final class MacroPat = Impl::MacroPat; diff --git a/rust/ql/lib/codeql/rust/elements/MacroRules.qll b/rust/ql/lib/codeql/rust/elements/MacroRules.qll index 8f70ed3778c6..afaf41bd15a3 100644 --- a/rust/ql/lib/codeql/rust/elements/MacroRules.qll +++ b/rust/ql/lib/codeql/rust/elements/MacroRules.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.TokenTree import codeql.rust.elements.Visibility +/** + * A MacroRules. For example: + * ```rust + * todo!() + * ``` + */ final class MacroRules = Impl::MacroRules; diff --git a/rust/ql/lib/codeql/rust/elements/MacroType.qll b/rust/ql/lib/codeql/rust/elements/MacroType.qll index 968e22dd0ad3..38be0fa4a20f 100644 --- a/rust/ql/lib/codeql/rust/elements/MacroType.qll +++ b/rust/ql/lib/codeql/rust/elements/MacroType.qll @@ -7,4 +7,10 @@ private import internal.MacroTypeImpl import codeql.rust.elements.MacroCall import codeql.rust.elements.TypeRef +/** + * A MacroType. For example: + * ```rust + * todo!() + * ``` + */ final class MacroType = Impl::MacroType; diff --git a/rust/ql/lib/codeql/rust/elements/MatchArmList.qll b/rust/ql/lib/codeql/rust/elements/MatchArmList.qll index 1aa2cd7f8e58..ce9b1edf3299 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchArmList.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchArmList.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Attr import codeql.rust.elements.MatchArm +/** + * A MatchArmList. For example: + * ```rust + * todo!() + * ``` + */ final class MatchArmList = Impl::MatchArmList; diff --git a/rust/ql/lib/codeql/rust/elements/MatchGuard.qll b/rust/ql/lib/codeql/rust/elements/MatchGuard.qll index 348a3b6354c0..79f90f151c95 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchGuard.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchGuard.qll @@ -7,4 +7,10 @@ private import internal.MatchGuardImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Expr +/** + * A MatchGuard. For example: + * ```rust + * todo!() + * ``` + */ final class MatchGuard = Impl::MatchGuard; diff --git a/rust/ql/lib/codeql/rust/elements/Meta.qll b/rust/ql/lib/codeql/rust/elements/Meta.qll index 599857cdb6d3..62b8e008ef7f 100644 --- a/rust/ql/lib/codeql/rust/elements/Meta.qll +++ b/rust/ql/lib/codeql/rust/elements/Meta.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Expr import codeql.rust.elements.Path import codeql.rust.elements.TokenTree +/** + * A Meta. For example: + * ```rust + * todo!() + * ``` + */ final class Meta = Impl::Meta; diff --git a/rust/ql/lib/codeql/rust/elements/Name.qll b/rust/ql/lib/codeql/rust/elements/Name.qll index c3fde9caf3e6..74c74acc44dd 100644 --- a/rust/ql/lib/codeql/rust/elements/Name.qll +++ b/rust/ql/lib/codeql/rust/elements/Name.qll @@ -6,4 +6,10 @@ private import internal.NameImpl import codeql.rust.elements.AstNode +/** + * A Name. For example: + * ```rust + * todo!() + * ``` + */ final class Name = Impl::Name; diff --git a/rust/ql/lib/codeql/rust/elements/NameRef.qll b/rust/ql/lib/codeql/rust/elements/NameRef.qll index 3a8d9a1312e7..b9bc8ad82e1c 100644 --- a/rust/ql/lib/codeql/rust/elements/NameRef.qll +++ b/rust/ql/lib/codeql/rust/elements/NameRef.qll @@ -6,4 +6,10 @@ private import internal.NameRefImpl import codeql.rust.elements.AstNode +/** + * A NameRef. For example: + * ```rust + * todo!() + * ``` + */ final class NameRef = Impl::NameRef; diff --git a/rust/ql/lib/codeql/rust/elements/NeverType.qll b/rust/ql/lib/codeql/rust/elements/NeverType.qll index 872bbcb2234e..3c46acd33ca2 100644 --- a/rust/ql/lib/codeql/rust/elements/NeverType.qll +++ b/rust/ql/lib/codeql/rust/elements/NeverType.qll @@ -6,4 +6,10 @@ private import internal.NeverTypeImpl import codeql.rust.elements.TypeRef +/** + * A NeverType. For example: + * ```rust + * todo!() + * ``` + */ final class NeverType = Impl::NeverType; diff --git a/rust/ql/lib/codeql/rust/elements/Param.qll b/rust/ql/lib/codeql/rust/elements/Param.qll index 4a3481858f12..eb46d206ba48 100644 --- a/rust/ql/lib/codeql/rust/elements/Param.qll +++ b/rust/ql/lib/codeql/rust/elements/Param.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Pat import codeql.rust.elements.TypeRef +/** + * A Param. For example: + * ```rust + * todo!() + * ``` + */ final class Param = Impl::Param; diff --git a/rust/ql/lib/codeql/rust/elements/ParamList.qll b/rust/ql/lib/codeql/rust/elements/ParamList.qll index 0b78046995b8..4678b78c3e67 100644 --- a/rust/ql/lib/codeql/rust/elements/ParamList.qll +++ b/rust/ql/lib/codeql/rust/elements/ParamList.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Param import codeql.rust.elements.SelfParam +/** + * A ParamList. For example: + * ```rust + * todo!() + * ``` + */ final class ParamList = Impl::ParamList; diff --git a/rust/ql/lib/codeql/rust/elements/ParenExpr.qll b/rust/ql/lib/codeql/rust/elements/ParenExpr.qll index 229b6c9dafa3..60466bdc7b7a 100644 --- a/rust/ql/lib/codeql/rust/elements/ParenExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ParenExpr.qll @@ -7,4 +7,10 @@ private import internal.ParenExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A ParenExpr. For example: + * ```rust + * todo!() + * ``` + */ final class ParenExpr = Impl::ParenExpr; diff --git a/rust/ql/lib/codeql/rust/elements/ParenPat.qll b/rust/ql/lib/codeql/rust/elements/ParenPat.qll index 98676814921e..291ddb76152e 100644 --- a/rust/ql/lib/codeql/rust/elements/ParenPat.qll +++ b/rust/ql/lib/codeql/rust/elements/ParenPat.qll @@ -6,4 +6,10 @@ private import internal.ParenPatImpl import codeql.rust.elements.Pat +/** + * A ParenPat. For example: + * ```rust + * todo!() + * ``` + */ final class ParenPat = Impl::ParenPat; diff --git a/rust/ql/lib/codeql/rust/elements/ParenType.qll b/rust/ql/lib/codeql/rust/elements/ParenType.qll index bcd6568328c5..cbf1b89dc5c2 100644 --- a/rust/ql/lib/codeql/rust/elements/ParenType.qll +++ b/rust/ql/lib/codeql/rust/elements/ParenType.qll @@ -6,4 +6,10 @@ private import internal.ParenTypeImpl import codeql.rust.elements.TypeRef +/** + * A ParenType. For example: + * ```rust + * todo!() + * ``` + */ final class ParenType = Impl::ParenType; diff --git a/rust/ql/lib/codeql/rust/elements/PathSegment.qll b/rust/ql/lib/codeql/rust/elements/PathSegment.qll index 775dd9d8cd12..5566ba322b62 100644 --- a/rust/ql/lib/codeql/rust/elements/PathSegment.qll +++ b/rust/ql/lib/codeql/rust/elements/PathSegment.qll @@ -13,4 +13,10 @@ import codeql.rust.elements.RetType import codeql.rust.elements.ReturnTypeSyntax import codeql.rust.elements.TypeRef +/** + * A PathSegment. For example: + * ```rust + * todo!() + * ``` + */ final class PathSegment = Impl::PathSegment; diff --git a/rust/ql/lib/codeql/rust/elements/PathType.qll b/rust/ql/lib/codeql/rust/elements/PathType.qll index 58519285d4d5..e313b9d1b561 100644 --- a/rust/ql/lib/codeql/rust/elements/PathType.qll +++ b/rust/ql/lib/codeql/rust/elements/PathType.qll @@ -7,4 +7,10 @@ private import internal.PathTypeImpl import codeql.rust.elements.Path import codeql.rust.elements.TypeRef +/** + * A PathType. For example: + * ```rust + * todo!() + * ``` + */ final class PathType = Impl::PathType; diff --git a/rust/ql/lib/codeql/rust/elements/PtrType.qll b/rust/ql/lib/codeql/rust/elements/PtrType.qll index 1ba63af7e5a7..4a40eaeeb485 100644 --- a/rust/ql/lib/codeql/rust/elements/PtrType.qll +++ b/rust/ql/lib/codeql/rust/elements/PtrType.qll @@ -6,4 +6,10 @@ private import internal.PtrTypeImpl import codeql.rust.elements.TypeRef +/** + * A PtrType. For example: + * ```rust + * todo!() + * ``` + */ final class PtrType = Impl::PtrType; diff --git a/rust/ql/lib/codeql/rust/elements/RecordExprFieldList.qll b/rust/ql/lib/codeql/rust/elements/RecordExprFieldList.qll index 0a482665df08..731dfb962628 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordExprFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordExprFieldList.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.RecordExprField +/** + * A RecordExprFieldList. For example: + * ```rust + * todo!() + * ``` + */ final class RecordExprFieldList = Impl::RecordExprFieldList; diff --git a/rust/ql/lib/codeql/rust/elements/RecordField.qll b/rust/ql/lib/codeql/rust/elements/RecordField.qll index aa690a1fd391..d5f4a6a021d7 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordField.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordField.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.TypeRef import codeql.rust.elements.Visibility +/** + * A RecordField. For example: + * ```rust + * todo!() + * ``` + */ final class RecordField = Impl::RecordField; diff --git a/rust/ql/lib/codeql/rust/elements/RecordFieldList.qll b/rust/ql/lib/codeql/rust/elements/RecordFieldList.qll index 526066c4196b..67fdc604e4d2 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordFieldList.qll @@ -7,4 +7,10 @@ private import internal.RecordFieldListImpl import codeql.rust.elements.FieldList import codeql.rust.elements.RecordField +/** + * A RecordFieldList. For example: + * ```rust + * todo!() + * ``` + */ final class RecordFieldList = Impl::RecordFieldList; diff --git a/rust/ql/lib/codeql/rust/elements/RecordPatFieldList.qll b/rust/ql/lib/codeql/rust/elements/RecordPatFieldList.qll index c4bd56fb69e1..1392d045d4ec 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordPatFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordPatFieldList.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.RecordPatField import codeql.rust.elements.RestPat +/** + * A RecordPatFieldList. For example: + * ```rust + * todo!() + * ``` + */ final class RecordPatFieldList = Impl::RecordPatFieldList; diff --git a/rust/ql/lib/codeql/rust/elements/RefType.qll b/rust/ql/lib/codeql/rust/elements/RefType.qll index 4ddfa7efa9ed..71ecac73f53a 100644 --- a/rust/ql/lib/codeql/rust/elements/RefType.qll +++ b/rust/ql/lib/codeql/rust/elements/RefType.qll @@ -7,4 +7,10 @@ private import internal.RefTypeImpl import codeql.rust.elements.Lifetime import codeql.rust.elements.TypeRef +/** + * A RefType. For example: + * ```rust + * todo!() + * ``` + */ final class RefType = Impl::RefType; diff --git a/rust/ql/lib/codeql/rust/elements/Rename.qll b/rust/ql/lib/codeql/rust/elements/Rename.qll index fbb799c711b2..11b635b4af93 100644 --- a/rust/ql/lib/codeql/rust/elements/Rename.qll +++ b/rust/ql/lib/codeql/rust/elements/Rename.qll @@ -7,4 +7,10 @@ private import internal.RenameImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Name +/** + * A Rename. For example: + * ```rust + * todo!() + * ``` + */ final class Rename = Impl::Rename; diff --git a/rust/ql/lib/codeql/rust/elements/RestPat.qll b/rust/ql/lib/codeql/rust/elements/RestPat.qll index 405127cb9a65..7a127cbc30a4 100644 --- a/rust/ql/lib/codeql/rust/elements/RestPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RestPat.qll @@ -7,4 +7,10 @@ private import internal.RestPatImpl import codeql.rust.elements.Attr import codeql.rust.elements.Pat +/** + * A RestPat. For example: + * ```rust + * todo!() + * ``` + */ final class RestPat = Impl::RestPat; diff --git a/rust/ql/lib/codeql/rust/elements/RetType.qll b/rust/ql/lib/codeql/rust/elements/RetType.qll index d359897c84ff..edca3af1b7a6 100644 --- a/rust/ql/lib/codeql/rust/elements/RetType.qll +++ b/rust/ql/lib/codeql/rust/elements/RetType.qll @@ -7,4 +7,10 @@ private import internal.RetTypeImpl import codeql.rust.elements.AstNode import codeql.rust.elements.TypeRef +/** + * A RetType. For example: + * ```rust + * todo!() + * ``` + */ final class RetType = Impl::RetType; diff --git a/rust/ql/lib/codeql/rust/elements/ReturnTypeSyntax.qll b/rust/ql/lib/codeql/rust/elements/ReturnTypeSyntax.qll index f903b30f199f..85c42a697f26 100644 --- a/rust/ql/lib/codeql/rust/elements/ReturnTypeSyntax.qll +++ b/rust/ql/lib/codeql/rust/elements/ReturnTypeSyntax.qll @@ -6,4 +6,10 @@ private import internal.ReturnTypeSyntaxImpl import codeql.rust.elements.AstNode +/** + * A ReturnTypeSyntax. For example: + * ```rust + * todo!() + * ``` + */ final class ReturnTypeSyntax = Impl::ReturnTypeSyntax; diff --git a/rust/ql/lib/codeql/rust/elements/SelfParam.qll b/rust/ql/lib/codeql/rust/elements/SelfParam.qll index b7f3db1c80fc..74d2fb5e2ebc 100644 --- a/rust/ql/lib/codeql/rust/elements/SelfParam.qll +++ b/rust/ql/lib/codeql/rust/elements/SelfParam.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Lifetime import codeql.rust.elements.Name import codeql.rust.elements.TypeRef +/** + * A SelfParam. For example: + * ```rust + * todo!() + * ``` + */ final class SelfParam = Impl::SelfParam; diff --git a/rust/ql/lib/codeql/rust/elements/SliceType.qll b/rust/ql/lib/codeql/rust/elements/SliceType.qll index fb4b4d4c7d04..f87746784115 100644 --- a/rust/ql/lib/codeql/rust/elements/SliceType.qll +++ b/rust/ql/lib/codeql/rust/elements/SliceType.qll @@ -6,4 +6,10 @@ private import internal.SliceTypeImpl import codeql.rust.elements.TypeRef +/** + * A SliceType. For example: + * ```rust + * todo!() + * ``` + */ final class SliceType = Impl::SliceType; diff --git a/rust/ql/lib/codeql/rust/elements/SourceFile.qll b/rust/ql/lib/codeql/rust/elements/SourceFile.qll index 90dae7feee6b..f0cb51d063c5 100644 --- a/rust/ql/lib/codeql/rust/elements/SourceFile.qll +++ b/rust/ql/lib/codeql/rust/elements/SourceFile.qll @@ -8,4 +8,10 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Attr import codeql.rust.elements.Item +/** + * A SourceFile. For example: + * ```rust + * todo!() + * ``` + */ final class SourceFile = Impl::SourceFile; diff --git a/rust/ql/lib/codeql/rust/elements/Static.qll b/rust/ql/lib/codeql/rust/elements/Static.qll index f4b62547b36e..6bc791bd403d 100644 --- a/rust/ql/lib/codeql/rust/elements/Static.qll +++ b/rust/ql/lib/codeql/rust/elements/Static.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.TypeRef import codeql.rust.elements.Visibility +/** + * A Static. For example: + * ```rust + * todo!() + * ``` + */ final class Static = Impl::Static; diff --git a/rust/ql/lib/codeql/rust/elements/StmtList.qll b/rust/ql/lib/codeql/rust/elements/StmtList.qll index 3b106b9417f3..df22f0cc703f 100644 --- a/rust/ql/lib/codeql/rust/elements/StmtList.qll +++ b/rust/ql/lib/codeql/rust/elements/StmtList.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.Stmt +/** + * A StmtList. For example: + * ```rust + * todo!() + * ``` + */ final class StmtList = Impl::StmtList; diff --git a/rust/ql/lib/codeql/rust/elements/Struct.qll b/rust/ql/lib/codeql/rust/elements/Struct.qll index 1ad266a8c2f7..b01abf3e9a4c 100644 --- a/rust/ql/lib/codeql/rust/elements/Struct.qll +++ b/rust/ql/lib/codeql/rust/elements/Struct.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A Struct. For example: + * ```rust + * todo!() + * ``` + */ final class Struct = Impl::Struct; diff --git a/rust/ql/lib/codeql/rust/elements/TokenTree.qll b/rust/ql/lib/codeql/rust/elements/TokenTree.qll index a8f13d07de41..1461db3dc0f6 100644 --- a/rust/ql/lib/codeql/rust/elements/TokenTree.qll +++ b/rust/ql/lib/codeql/rust/elements/TokenTree.qll @@ -6,4 +6,10 @@ private import internal.TokenTreeImpl import codeql.rust.elements.AstNode +/** + * A TokenTree. For example: + * ```rust + * todo!() + * ``` + */ final class TokenTree = Impl::TokenTree; diff --git a/rust/ql/lib/codeql/rust/elements/Trait.qll b/rust/ql/lib/codeql/rust/elements/Trait.qll index f7cd5e2f7732..377b9a1bce25 100644 --- a/rust/ql/lib/codeql/rust/elements/Trait.qll +++ b/rust/ql/lib/codeql/rust/elements/Trait.qll @@ -13,4 +13,10 @@ import codeql.rust.elements.TypeBoundList import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A Trait. For example: + * ```rust + * todo!() + * ``` + */ final class Trait = Impl::Trait; diff --git a/rust/ql/lib/codeql/rust/elements/TraitAlias.qll b/rust/ql/lib/codeql/rust/elements/TraitAlias.qll index ea2da753087b..21d89531ed56 100644 --- a/rust/ql/lib/codeql/rust/elements/TraitAlias.qll +++ b/rust/ql/lib/codeql/rust/elements/TraitAlias.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.TypeBoundList import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A TraitAlias. For example: + * ```rust + * todo!() + * ``` + */ final class TraitAlias = Impl::TraitAlias; diff --git a/rust/ql/lib/codeql/rust/elements/TryExpr.qll b/rust/ql/lib/codeql/rust/elements/TryExpr.qll index a2e9bed20428..9617f5c54638 100644 --- a/rust/ql/lib/codeql/rust/elements/TryExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/TryExpr.qll @@ -7,4 +7,10 @@ private import internal.TryExprImpl import codeql.rust.elements.Attr import codeql.rust.elements.Expr +/** + * A TryExpr. For example: + * ```rust + * todo!() + * ``` + */ final class TryExpr = Impl::TryExpr; diff --git a/rust/ql/lib/codeql/rust/elements/TupleField.qll b/rust/ql/lib/codeql/rust/elements/TupleField.qll index 21557ff2677d..a7ad4706e8e6 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleField.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleField.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Attr import codeql.rust.elements.TypeRef import codeql.rust.elements.Visibility +/** + * A TupleField. For example: + * ```rust + * todo!() + * ``` + */ final class TupleField = Impl::TupleField; diff --git a/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll b/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll index 36575f3dfe51..68294d7df7aa 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll @@ -7,4 +7,10 @@ private import internal.TupleFieldListImpl import codeql.rust.elements.FieldList import codeql.rust.elements.TupleField +/** + * A TupleFieldList. For example: + * ```rust + * todo!() + * ``` + */ final class TupleFieldList = Impl::TupleFieldList; diff --git a/rust/ql/lib/codeql/rust/elements/TupleType.qll b/rust/ql/lib/codeql/rust/elements/TupleType.qll index 67f9b09f76cc..a82799ee9de8 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleType.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleType.qll @@ -6,4 +6,10 @@ private import internal.TupleTypeImpl import codeql.rust.elements.TypeRef +/** + * A TupleType. For example: + * ```rust + * todo!() + * ``` + */ final class TupleType = Impl::TupleType; diff --git a/rust/ql/lib/codeql/rust/elements/TypeAlias.qll b/rust/ql/lib/codeql/rust/elements/TypeAlias.qll index 94d33ec4d405..2f20a6c0ec6c 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeAlias.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeAlias.qll @@ -15,4 +15,10 @@ import codeql.rust.elements.TypeRef import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A TypeAlias. For example: + * ```rust + * todo!() + * ``` + */ final class TypeAlias = Impl::TypeAlias; diff --git a/rust/ql/lib/codeql/rust/elements/TypeArg.qll b/rust/ql/lib/codeql/rust/elements/TypeArg.qll index da2246d99817..b93f0781adce 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeArg.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeArg.qll @@ -7,4 +7,10 @@ private import internal.TypeArgImpl import codeql.rust.elements.GenericArg import codeql.rust.elements.TypeRef +/** + * A TypeArg. For example: + * ```rust + * todo!() + * ``` + */ final class TypeArg = Impl::TypeArg; diff --git a/rust/ql/lib/codeql/rust/elements/TypeBound.qll b/rust/ql/lib/codeql/rust/elements/TypeBound.qll index b7b58d84a06d..77990f6425b0 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeBound.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeBound.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.GenericParamList import codeql.rust.elements.Lifetime import codeql.rust.elements.TypeRef +/** + * A TypeBound. For example: + * ```rust + * todo!() + * ``` + */ final class TypeBound = Impl::TypeBound; diff --git a/rust/ql/lib/codeql/rust/elements/TypeBoundList.qll b/rust/ql/lib/codeql/rust/elements/TypeBoundList.qll index 9c6d7f6a5d97..6f2107b9ddff 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeBoundList.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeBoundList.qll @@ -7,4 +7,10 @@ private import internal.TypeBoundListImpl import codeql.rust.elements.AstNode import codeql.rust.elements.TypeBound +/** + * A TypeBoundList. For example: + * ```rust + * todo!() + * ``` + */ final class TypeBoundList = Impl::TypeBoundList; diff --git a/rust/ql/lib/codeql/rust/elements/TypeParam.qll b/rust/ql/lib/codeql/rust/elements/TypeParam.qll index 5442823d8709..8de967d4f917 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeParam.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeParam.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Name import codeql.rust.elements.TypeBoundList import codeql.rust.elements.TypeRef +/** + * A TypeParam. For example: + * ```rust + * todo!() + * ``` + */ final class TypeParam = Impl::TypeParam; diff --git a/rust/ql/lib/codeql/rust/elements/Union.qll b/rust/ql/lib/codeql/rust/elements/Union.qll index 7b9eea1e8da8..38a96aed38e3 100644 --- a/rust/ql/lib/codeql/rust/elements/Union.qll +++ b/rust/ql/lib/codeql/rust/elements/Union.qll @@ -12,4 +12,10 @@ import codeql.rust.elements.RecordFieldList import codeql.rust.elements.Visibility import codeql.rust.elements.WhereClause +/** + * A Union. For example: + * ```rust + * todo!() + * ``` + */ final class Union = Impl::Union; diff --git a/rust/ql/lib/codeql/rust/elements/Use.qll b/rust/ql/lib/codeql/rust/elements/Use.qll index 5dfb3009ac87..7485018a975a 100644 --- a/rust/ql/lib/codeql/rust/elements/Use.qll +++ b/rust/ql/lib/codeql/rust/elements/Use.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Item import codeql.rust.elements.UseTree import codeql.rust.elements.Visibility +/** + * A Use. For example: + * ```rust + * todo!() + * ``` + */ final class Use = Impl::Use; diff --git a/rust/ql/lib/codeql/rust/elements/UseTree.qll b/rust/ql/lib/codeql/rust/elements/UseTree.qll index 6ca982e73a85..ff57eccc951a 100644 --- a/rust/ql/lib/codeql/rust/elements/UseTree.qll +++ b/rust/ql/lib/codeql/rust/elements/UseTree.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.Path import codeql.rust.elements.Rename import codeql.rust.elements.UseTreeList +/** + * A UseTree. For example: + * ```rust + * todo!() + * ``` + */ final class UseTree = Impl::UseTree; diff --git a/rust/ql/lib/codeql/rust/elements/UseTreeList.qll b/rust/ql/lib/codeql/rust/elements/UseTreeList.qll index 455bd7c3742c..92202501028a 100644 --- a/rust/ql/lib/codeql/rust/elements/UseTreeList.qll +++ b/rust/ql/lib/codeql/rust/elements/UseTreeList.qll @@ -7,4 +7,10 @@ private import internal.UseTreeListImpl import codeql.rust.elements.AstNode import codeql.rust.elements.UseTree +/** + * A UseTreeList. For example: + * ```rust + * todo!() + * ``` + */ final class UseTreeList = Impl::UseTreeList; diff --git a/rust/ql/lib/codeql/rust/elements/Variant.qll b/rust/ql/lib/codeql/rust/elements/Variant.qll index 2968155bc798..6100928696ea 100644 --- a/rust/ql/lib/codeql/rust/elements/Variant.qll +++ b/rust/ql/lib/codeql/rust/elements/Variant.qll @@ -11,4 +11,10 @@ import codeql.rust.elements.FieldList import codeql.rust.elements.Name import codeql.rust.elements.Visibility +/** + * A Variant. For example: + * ```rust + * todo!() + * ``` + */ final class Variant = Impl::Variant; diff --git a/rust/ql/lib/codeql/rust/elements/VariantList.qll b/rust/ql/lib/codeql/rust/elements/VariantList.qll index 502f3eadddd2..e0cf435c4682 100644 --- a/rust/ql/lib/codeql/rust/elements/VariantList.qll +++ b/rust/ql/lib/codeql/rust/elements/VariantList.qll @@ -7,4 +7,10 @@ private import internal.VariantListImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Variant +/** + * A VariantList. For example: + * ```rust + * todo!() + * ``` + */ final class VariantList = Impl::VariantList; diff --git a/rust/ql/lib/codeql/rust/elements/Visibility.qll b/rust/ql/lib/codeql/rust/elements/Visibility.qll index 32b161da10c6..58db9b66fe27 100644 --- a/rust/ql/lib/codeql/rust/elements/Visibility.qll +++ b/rust/ql/lib/codeql/rust/elements/Visibility.qll @@ -7,4 +7,10 @@ private import internal.VisibilityImpl import codeql.rust.elements.AstNode import codeql.rust.elements.Path +/** + * A Visibility. For example: + * ```rust + * todo!() + * ``` + */ final class Visibility = Impl::Visibility; diff --git a/rust/ql/lib/codeql/rust/elements/WhereClause.qll b/rust/ql/lib/codeql/rust/elements/WhereClause.qll index f79c1fe0ae2e..2f52bd3955f1 100644 --- a/rust/ql/lib/codeql/rust/elements/WhereClause.qll +++ b/rust/ql/lib/codeql/rust/elements/WhereClause.qll @@ -7,4 +7,10 @@ private import internal.WhereClauseImpl import codeql.rust.elements.AstNode import codeql.rust.elements.WherePred +/** + * A WhereClause. For example: + * ```rust + * todo!() + * ``` + */ final class WhereClause = Impl::WhereClause; diff --git a/rust/ql/lib/codeql/rust/elements/WherePred.qll b/rust/ql/lib/codeql/rust/elements/WherePred.qll index 4c3259c58780..2300be0ad457 100644 --- a/rust/ql/lib/codeql/rust/elements/WherePred.qll +++ b/rust/ql/lib/codeql/rust/elements/WherePred.qll @@ -10,4 +10,10 @@ import codeql.rust.elements.Lifetime import codeql.rust.elements.TypeBoundList import codeql.rust.elements.TypeRef +/** + * A WherePred. For example: + * ```rust + * todo!() + * ``` + */ final class WherePred = Impl::WherePred; diff --git a/rust/ql/lib/codeql/rust/elements/WhileExpr.qll b/rust/ql/lib/codeql/rust/elements/WhileExpr.qll index b5a92625379e..9dcbe9c6346f 100644 --- a/rust/ql/lib/codeql/rust/elements/WhileExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/WhileExpr.qll @@ -9,4 +9,10 @@ import codeql.rust.elements.BlockExpr import codeql.rust.elements.Expr import codeql.rust.elements.Label +/** + * A WhileExpr. For example: + * ```rust + * todo!() + * ``` + */ final class WhileExpr = Impl::WhileExpr; diff --git a/rust/ql/lib/codeql/rust/elements/internal/AbiImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AbiImpl.qll index 96b0614e9202..c0af077785f6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AbiImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AbiImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Abi * be referenced directly. */ module Impl { + /** + * A Abi. For example: + * ```rust + * todo!() + * ``` + */ class Abi extends Generated::Abi { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ArgListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ArgListImpl.qll index e4a5453ae6d3..af47a245980d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ArgListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ArgListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ArgList * be referenced directly. */ module Impl { + /** + * A ArgList. For example: + * ```rust + * todo!() + * ``` + */ class ArgList extends Generated::ArgList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ArrayTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ArrayTypeImpl.qll index 9f9dbd3ee538..d1ff17da78d9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ArrayTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ArrayTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ArrayType * be referenced directly. */ module Impl { + /** + * A ArrayType. For example: + * ```rust + * todo!() + * ``` + */ class ArrayType extends Generated::ArrayType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/AssocItemImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AssocItemImpl.qll index c6fe870c4c33..d4c871249b43 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AssocItemImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AssocItemImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.AssocItem * be referenced directly. */ module Impl { + /** + * A AssocItem. For example: + * ```rust + * todo!() + * ``` + */ class AssocItem extends Generated::AssocItem { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/AssocItemListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AssocItemListImpl.qll index fe80fb9718e6..4ec980ac4d4a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AssocItemListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AssocItemListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.AssocItemList * be referenced directly. */ module Impl { + /** + * A AssocItemList. For example: + * ```rust + * todo!() + * ``` + */ class AssocItemList extends Generated::AssocItemList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/AssocTypeArgImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AssocTypeArgImpl.qll index c9e460369ed2..075188ac0bdb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AssocTypeArgImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AssocTypeArgImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.AssocTypeArg * be referenced directly. */ module Impl { + /** + * A AssocTypeArg. For example: + * ```rust + * todo!() + * ``` + */ class AssocTypeArg extends Generated::AssocTypeArg { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/AttrImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AttrImpl.qll index b8322ce402e6..afdac06f558d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AttrImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AttrImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Attr * be referenced directly. */ module Impl { + /** + * A Attr. For example: + * ```rust + * todo!() + * ``` + */ class Attr extends Generated::Attr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll index 62393ea90ae8..e84935438981 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ClosureBinder * be referenced directly. */ module Impl { + /** + * A ClosureBinder. For example: + * ```rust + * todo!() + * ``` + */ class ClosureBinder extends Generated::ClosureBinder { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ConstArgImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ConstArgImpl.qll index 1bbad2608d8a..c66296be9c4c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ConstArgImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ConstArgImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ConstArg * be referenced directly. */ module Impl { + /** + * A ConstArg. For example: + * ```rust + * todo!() + * ``` + */ class ConstArg extends Generated::ConstArg { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll index 8e89af434ee8..b312e791d5e4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Const * be referenced directly. */ module Impl { + /** + * A Const. For example: + * ```rust + * todo!() + * ``` + */ class Const extends Generated::Const { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ConstParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ConstParamImpl.qll index 15248ed53a41..72fcf2769470 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ConstParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ConstParamImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ConstParam * be referenced directly. */ module Impl { + /** + * A ConstParam. For example: + * ```rust + * todo!() + * ``` + */ class ConstParam extends Generated::ConstParam { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll index ef624527fa67..bba5a65eebde 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/DynTraitTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.DynTraitType * be referenced directly. */ module Impl { + /** + * A DynTraitType. For example: + * ```rust + * todo!() + * ``` + */ class DynTraitType extends Generated::DynTraitType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll index cccf603e7a05..bef9d3da903a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Enum * be referenced directly. */ module Impl { + /** + * A Enum. For example: + * ```rust + * todo!() + * ``` + */ class Enum extends Generated::Enum { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ExternBlockImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ExternBlockImpl.qll index b65475196fd6..0bd734b88359 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ExternBlockImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ExternBlockImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ExternBlock * be referenced directly. */ module Impl { + /** + * A ExternBlock. For example: + * ```rust + * todo!() + * ``` + */ class ExternBlock extends Generated::ExternBlock { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ExternCrateImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ExternCrateImpl.qll index 146a574519ea..6c219b20d794 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ExternCrateImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ExternCrateImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ExternCrate * be referenced directly. */ module Impl { + /** + * A ExternCrate. For example: + * ```rust + * todo!() + * ``` + */ class ExternCrate extends Generated::ExternCrate { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ExternItemImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ExternItemImpl.qll index 0f5ac310cb24..beabbf706eea 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ExternItemImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ExternItemImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ExternItem * be referenced directly. */ module Impl { + /** + * A ExternItem. For example: + * ```rust + * todo!() + * ``` + */ class ExternItem extends Generated::ExternItem { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ExternItemListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ExternItemListImpl.qll index beb3452f894d..255074a9bf95 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ExternItemListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ExternItemListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ExternItemList * be referenced directly. */ module Impl { + /** + * A ExternItemList. For example: + * ```rust + * todo!() + * ``` + */ class ExternItemList extends Generated::ExternItemList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FieldListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FieldListImpl.qll index dc843147dbf2..8d7186484103 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FieldListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FieldListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.FieldList * be referenced directly. */ module Impl { + /** + * A FieldList. For example: + * ```rust + * todo!() + * ``` + */ class FieldList extends Generated::FieldList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll index 55b5e30c8fb7..63c7420cf330 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FnPtrTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.FnPtrType * be referenced directly. */ module Impl { + /** + * A FnPtrType. For example: + * ```rust + * todo!() + * ``` + */ class FnPtrType extends Generated::FnPtrType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ForExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ForExprImpl.qll index f3add3e4c146..a196a6802e9a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ForExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ForExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ForExpr * be referenced directly. */ module Impl { + /** + * A ForExpr. For example: + * ```rust + * todo!() + * ``` + */ class ForExpr extends Generated::ForExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ForTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ForTypeImpl.qll index 9a0dc21fcdff..d6465a76dc56 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ForTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ForTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ForType * be referenced directly. */ module Impl { + /** + * A ForType. For example: + * ```rust + * todo!() + * ``` + */ class ForType extends Generated::ForType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll index 8f3456adab7d..1b6c2e027b39 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.FormatArgsArg * be referenced directly. */ module Impl { + /** + * A FormatArgsArg. For example: + * ```rust + * todo!() + * ``` + */ class FormatArgsArg extends Generated::FormatArgsArg { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll index 1a8e1da09a94..0cf47a9ed1fe 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.FormatArgsExpr * be referenced directly. */ module Impl { + /** + * A FormatArgsExpr. For example: + * ```rust + * todo!() + * ``` + */ class FormatArgsExpr extends Generated::FormatArgsExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/GenericArgImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/GenericArgImpl.qll index 9705b928c4e0..9d9e3561472b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/GenericArgImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/GenericArgImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.GenericArg * be referenced directly. */ module Impl { + /** + * A GenericArg. For example: + * ```rust + * todo!() + * ``` + */ class GenericArg extends Generated::GenericArg { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/GenericParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/GenericParamImpl.qll index 5a1d69c15a11..28027026ae8d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/GenericParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/GenericParamImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.GenericParam * be referenced directly. */ module Impl { + /** + * A GenericParam. For example: + * ```rust + * todo!() + * ``` + */ class GenericParam extends Generated::GenericParam { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/GenericParamListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/GenericParamListImpl.qll index ef85a60f6ac5..a9e9004e4c40 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/GenericParamListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/GenericParamListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.GenericParamList * be referenced directly. */ module Impl { + /** + * A GenericParamList. For example: + * ```rust + * todo!() + * ``` + */ class GenericParamList extends Generated::GenericParamList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll index f6cef19ba389..b1918d16e56e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Impl * be referenced directly. */ module Impl { + /** + * A Impl. For example: + * ```rust + * todo!() + * ``` + */ class Impl extends Generated::Impl { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll index 1a31deee39f9..b0aaa982998d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ImplTraitType * be referenced directly. */ module Impl { + /** + * A ImplTraitType. For example: + * ```rust + * todo!() + * ``` + */ class ImplTraitType extends Generated::ImplTraitType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/InferTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/InferTypeImpl.qll index f9896fcb4707..b29406661ba9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/InferTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/InferTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.InferType * be referenced directly. */ module Impl { + /** + * A InferType. For example: + * ```rust + * todo!() + * ``` + */ class InferType extends Generated::InferType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll index 8a24585ee7e8..1a453671cbf5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Item * be referenced directly. */ module Impl { + /** + * A Item. For example: + * ```rust + * todo!() + * ``` + */ class Item extends Generated::Item { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ItemListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ItemListImpl.qll index b4d47c5096c7..668bf039eb62 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ItemListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ItemListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ItemList * be referenced directly. */ module Impl { + /** + * A ItemList. For example: + * ```rust + * todo!() + * ``` + */ class ItemList extends Generated::ItemList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll index 586566964f5f..2399964cf1af 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.LetElse * be referenced directly. */ module Impl { + /** + * A LetElse. For example: + * ```rust + * todo!() + * ``` + */ class LetElse extends Generated::LetElse { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LifetimeArgImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LifetimeArgImpl.qll index 183a8ef65401..d4f0373cda34 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LifetimeArgImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LifetimeArgImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.LifetimeArg * be referenced directly. */ module Impl { + /** + * A LifetimeArg. For example: + * ```rust + * todo!() + * ``` + */ class LifetimeArg extends Generated::LifetimeArg { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll index fdad40216b01..3eb13ac87e5c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Lifetime * be referenced directly. */ module Impl { + /** + * A Lifetime. For example: + * ```rust + * todo!() + * ``` + */ class Lifetime extends Generated::Lifetime { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LifetimeParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LifetimeParamImpl.qll index c59b3d521a02..e4918e4cf56f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LifetimeParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LifetimeParamImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.LifetimeParam * be referenced directly. */ module Impl { + /** + * A LifetimeParam. For example: + * ```rust + * todo!() + * ``` + */ class LifetimeParam extends Generated::LifetimeParam { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll index 96ef416265f6..76fcd7645a6f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MacroCall * be referenced directly. */ module Impl { + /** + * A MacroCall. For example: + * ```rust + * todo!() + * ``` + */ class MacroCall extends Generated::MacroCall { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroDefImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroDefImpl.qll index 04eb65db2600..17d0293b1088 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroDefImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroDefImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MacroDef * be referenced directly. */ module Impl { + /** + * A MacroDef. For example: + * ```rust + * todo!() + * ``` + */ class MacroDef extends Generated::MacroDef { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll index 52b8840f6d96..42c46e9e60b6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MacroExpr * be referenced directly. */ module Impl { + /** + * A MacroExpr. For example: + * ```rust + * todo!() + * ``` + */ class MacroExpr extends Generated::MacroExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroPatImpl.qll index 2a78ee8f468c..70c056fa5c16 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroPatImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MacroPat * be referenced directly. */ module Impl { + /** + * A MacroPat. For example: + * ```rust + * todo!() + * ``` + */ class MacroPat extends Generated::MacroPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroRulesImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroRulesImpl.qll index 493d8eb1c270..ca0051dce8d0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroRulesImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroRulesImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MacroRules * be referenced directly. */ module Impl { + /** + * A MacroRules. For example: + * ```rust + * todo!() + * ``` + */ class MacroRules extends Generated::MacroRules { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroTypeImpl.qll index 5b50b4d795e9..6feb1321888d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MacroType * be referenced directly. */ module Impl { + /** + * A MacroType. For example: + * ```rust + * todo!() + * ``` + */ class MacroType extends Generated::MacroType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchArmListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchArmListImpl.qll index 9575a4747f9a..5e1ac06282a5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchArmListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchArmListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MatchArmList * be referenced directly. */ module Impl { + /** + * A MatchArmList. For example: + * ```rust + * todo!() + * ``` + */ class MatchArmList extends Generated::MatchArmList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchGuardImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchGuardImpl.qll index a810c603e27b..e4bc039ee535 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchGuardImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchGuardImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.MatchGuard * be referenced directly. */ module Impl { + /** + * A MatchGuard. For example: + * ```rust + * todo!() + * ``` + */ class MatchGuard extends Generated::MatchGuard { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MetaImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MetaImpl.qll index e3b36f05d057..1e6b30b6249b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MetaImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MetaImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Meta * be referenced directly. */ module Impl { + /** + * A Meta. For example: + * ```rust + * todo!() + * ``` + */ class Meta extends Generated::Meta { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/NameImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/NameImpl.qll index 8d788126ae70..672f29e24559 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/NameImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/NameImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Name * be referenced directly. */ module Impl { + /** + * A Name. For example: + * ```rust + * todo!() + * ``` + */ class Name extends Generated::Name { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/NameRefImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/NameRefImpl.qll index b663b59d93ad..708e6d3e03f8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/NameRefImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/NameRefImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.NameRef * be referenced directly. */ module Impl { + /** + * A NameRef. For example: + * ```rust + * todo!() + * ``` + */ class NameRef extends Generated::NameRef { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/NeverTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/NeverTypeImpl.qll index fa201b2b5b7e..9c04237f38c1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/NeverTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/NeverTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.NeverType * be referenced directly. */ module Impl { + /** + * A NeverType. For example: + * ```rust + * todo!() + * ``` + */ class NeverType extends Generated::NeverType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ParamImpl.qll index 89c346e6969f..7015d097e9f4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ParamImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Param * be referenced directly. */ module Impl { + /** + * A Param. For example: + * ```rust + * todo!() + * ``` + */ class Param extends Generated::Param { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ParamListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ParamListImpl.qll index 97ba6eaa6094..e31c2734355d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ParamListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ParamListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ParamList * be referenced directly. */ module Impl { + /** + * A ParamList. For example: + * ```rust + * todo!() + * ``` + */ class ParamList extends Generated::ParamList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ParenExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ParenExprImpl.qll index acabc632d566..98c3cab9267c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ParenExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ParenExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ParenExpr * be referenced directly. */ module Impl { + /** + * A ParenExpr. For example: + * ```rust + * todo!() + * ``` + */ class ParenExpr extends Generated::ParenExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ParenPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ParenPatImpl.qll index 9e2ff4d698e1..cdba455451c6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ParenPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ParenPatImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ParenPat * be referenced directly. */ module Impl { + /** + * A ParenPat. For example: + * ```rust + * todo!() + * ``` + */ class ParenPat extends Generated::ParenPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ParenTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ParenTypeImpl.qll index 145a84d7244d..ab49c9c4fcfc 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ParenTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ParenTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ParenType * be referenced directly. */ module Impl { + /** + * A ParenType. For example: + * ```rust + * todo!() + * ``` + */ class ParenType extends Generated::ParenType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll index d282d0e2426a..cc3f669dd5d7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.PathSegment * be referenced directly. */ module Impl { + /** + * A PathSegment. For example: + * ```rust + * todo!() + * ``` + */ class PathSegment extends Generated::PathSegment { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll index 8eddc4c5dda7..74fa536e08b5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.PathType * be referenced directly. */ module Impl { + /** + * A PathType. For example: + * ```rust + * todo!() + * ``` + */ class PathType extends Generated::PathType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PtrTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PtrTypeImpl.qll index c968bdeadc7a..95c558cdb81e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PtrTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PtrTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.PtrType * be referenced directly. */ module Impl { + /** + * A PtrType. For example: + * ```rust + * todo!() + * ``` + */ class PtrType extends Generated::PtrType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll index 91eaff6654d6..cc93f5fa8a6f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RecordExprFieldList * be referenced directly. */ module Impl { + /** + * A RecordExprFieldList. For example: + * ```rust + * todo!() + * ``` + */ class RecordExprFieldList extends Generated::RecordExprFieldList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordFieldImpl.qll index ba3b319383e1..5e886e469ac7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordFieldImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RecordField * be referenced directly. */ module Impl { + /** + * A RecordField. For example: + * ```rust + * todo!() + * ``` + */ class RecordField extends Generated::RecordField { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordFieldListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordFieldListImpl.qll index 34fb21e5ce28..732cecf0065d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordFieldListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordFieldListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RecordFieldList * be referenced directly. */ module Impl { + /** + * A RecordFieldList. For example: + * ```rust + * todo!() + * ``` + */ class RecordFieldList extends Generated::RecordFieldList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll index 2a97fdadc0fa..d0a706bd198f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RecordPatFieldList * be referenced directly. */ module Impl { + /** + * A RecordPatFieldList. For example: + * ```rust + * todo!() + * ``` + */ class RecordPatFieldList extends Generated::RecordPatFieldList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RefTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RefTypeImpl.qll index 87aadf10fa00..c473ec2e8ef4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RefTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RefTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RefType * be referenced directly. */ module Impl { + /** + * A RefType. For example: + * ```rust + * todo!() + * ``` + */ class RefType extends Generated::RefType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RenameImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RenameImpl.qll index 18ed41b60ffb..99aead7ffaad 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RenameImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RenameImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Rename * be referenced directly. */ module Impl { + /** + * A Rename. For example: + * ```rust + * todo!() + * ``` + */ class Rename extends Generated::Rename { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RestPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RestPatImpl.qll index 82a08884ccf8..bd483e4ba9a6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RestPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RestPatImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RestPat * be referenced directly. */ module Impl { + /** + * A RestPat. For example: + * ```rust + * todo!() + * ``` + */ class RestPat extends Generated::RestPat { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RetTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RetTypeImpl.qll index cc45ae8adada..9fcda02c6e63 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RetTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RetTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.RetType * be referenced directly. */ module Impl { + /** + * A RetType. For example: + * ```rust + * todo!() + * ``` + */ class RetType extends Generated::RetType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll index 4c55c27de6fa..3ecfd51816c6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.ReturnTypeSyntax * be referenced directly. */ module Impl { + /** + * A ReturnTypeSyntax. For example: + * ```rust + * todo!() + * ``` + */ class ReturnTypeSyntax extends Generated::ReturnTypeSyntax { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll index 65543aea0adf..2be3b75ac47a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.SelfParam * be referenced directly. */ module Impl { + /** + * A SelfParam. For example: + * ```rust + * todo!() + * ``` + */ class SelfParam extends Generated::SelfParam { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/SliceTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/SliceTypeImpl.qll index eea9c5c26553..ba7146aad7ca 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/SliceTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/SliceTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.SliceType * be referenced directly. */ module Impl { + /** + * A SliceType. For example: + * ```rust + * todo!() + * ``` + */ class SliceType extends Generated::SliceType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/SourceFileImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/SourceFileImpl.qll index 8a8de59d87c6..38acafaacf4d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/SourceFileImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/SourceFileImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.SourceFile * be referenced directly. */ module Impl { + /** + * A SourceFile. For example: + * ```rust + * todo!() + * ``` + */ class SourceFile extends Generated::SourceFile { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StaticImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StaticImpl.qll index 6abb28bbc776..69cad71522bf 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StaticImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StaticImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Static * be referenced directly. */ module Impl { + /** + * A Static. For example: + * ```rust + * todo!() + * ``` + */ class Static extends Generated::Static { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StmtListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StmtListImpl.qll index d4a15e8a28e3..8bb9fb3ea0e7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StmtListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StmtListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.StmtList * be referenced directly. */ module Impl { + /** + * A StmtList. For example: + * ```rust + * todo!() + * ``` + */ class StmtList extends Generated::StmtList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll index 2639efd57615..ddd1189658d0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Struct * be referenced directly. */ module Impl { + /** + * A Struct. For example: + * ```rust + * todo!() + * ``` + */ class Struct extends Generated::Struct { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TokenTreeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TokenTreeImpl.qll index 9719f6267d1b..111613deac3f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TokenTreeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TokenTreeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TokenTree * be referenced directly. */ module Impl { + /** + * A TokenTree. For example: + * ```rust + * todo!() + * ``` + */ class TokenTree extends Generated::TokenTree { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TraitAliasImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TraitAliasImpl.qll index 2e581ba75079..560714839286 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TraitAliasImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TraitAliasImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TraitAlias * be referenced directly. */ module Impl { + /** + * A TraitAlias. For example: + * ```rust + * todo!() + * ``` + */ class TraitAlias extends Generated::TraitAlias { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll index fd9bf05367dc..850224743da8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Trait * be referenced directly. */ module Impl { + /** + * A Trait. For example: + * ```rust + * todo!() + * ``` + */ class Trait extends Generated::Trait { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TryExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TryExprImpl.qll index 1f348cb24225..be694161dc70 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TryExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TryExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TryExpr * be referenced directly. */ module Impl { + /** + * A TryExpr. For example: + * ```rust + * todo!() + * ``` + */ class TryExpr extends Generated::TryExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll index 823b5ab6e2e1..7f9d23b1f5e8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TupleField * be referenced directly. */ module Impl { + /** + * A TupleField. For example: + * ```rust + * todo!() + * ``` + */ class TupleField extends Generated::TupleField { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll index fe48612c1f30..1065853b735a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TupleFieldList * be referenced directly. */ module Impl { + /** + * A TupleFieldList. For example: + * ```rust + * todo!() + * ``` + */ class TupleFieldList extends Generated::TupleFieldList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleTypeImpl.qll index 44bf5175a120..69ac32d20e4c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleTypeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TupleType * be referenced directly. */ module Impl { + /** + * A TupleType. For example: + * ```rust + * todo!() + * ``` + */ class TupleType extends Generated::TupleType { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeAliasImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeAliasImpl.qll index 7085937b2dcd..e8553da37a0b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeAliasImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeAliasImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TypeAlias * be referenced directly. */ module Impl { + /** + * A TypeAlias. For example: + * ```rust + * todo!() + * ``` + */ class TypeAlias extends Generated::TypeAlias { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeArgImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeArgImpl.qll index 23eac7328eee..f48c2c50dbe5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeArgImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeArgImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TypeArg * be referenced directly. */ module Impl { + /** + * A TypeArg. For example: + * ```rust + * todo!() + * ``` + */ class TypeArg extends Generated::TypeArg { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll index e5eca26b6ba6..fea226dd7425 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TypeBound * be referenced directly. */ module Impl { + /** + * A TypeBound. For example: + * ```rust + * todo!() + * ``` + */ class TypeBound extends Generated::TypeBound { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll index d9776797f5a3..bbd38ee7371c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TypeBoundList * be referenced directly. */ module Impl { + /** + * A TypeBoundList. For example: + * ```rust + * todo!() + * ``` + */ class TypeBoundList extends Generated::TypeBoundList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeParamImpl.qll index c7a6b39bbae2..1581d2ec3c6e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeParamImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.TypeParam * be referenced directly. */ module Impl { + /** + * A TypeParam. For example: + * ```rust + * todo!() + * ``` + */ class TypeParam extends Generated::TypeParam { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll index c64672ea8895..dc850eac4d19 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Union * be referenced directly. */ module Impl { + /** + * A Union. For example: + * ```rust + * todo!() + * ``` + */ class Union extends Generated::Union { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/UseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/UseImpl.qll index 790647c95b40..3b45ab46439e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/UseImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/UseImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Use * be referenced directly. */ module Impl { + /** + * A Use. For example: + * ```rust + * todo!() + * ``` + */ class Use extends Generated::Use { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/UseTreeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/UseTreeImpl.qll index 9a0291dbf5df..39d693400d7b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/UseTreeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/UseTreeImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.UseTree * be referenced directly. */ module Impl { + /** + * A UseTree. For example: + * ```rust + * todo!() + * ``` + */ class UseTree extends Generated::UseTree { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/UseTreeListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/UseTreeListImpl.qll index 0ff913874834..eb4689c663dd 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/UseTreeListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/UseTreeListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.UseTreeList * be referenced directly. */ module Impl { + /** + * A UseTreeList. For example: + * ```rust + * todo!() + * ``` + */ class UseTreeList extends Generated::UseTreeList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll index 762126398048..e58f32e0149a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Variant * be referenced directly. */ module Impl { + /** + * A Variant. For example: + * ```rust + * todo!() + * ``` + */ class Variant extends Generated::Variant { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/VariantListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VariantListImpl.qll index c547b2870309..deff6d7d196d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VariantListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VariantListImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.VariantList * be referenced directly. */ module Impl { + /** + * A VariantList. For example: + * ```rust + * todo!() + * ``` + */ class VariantList extends Generated::VariantList { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll index ad39f66286ad..0e7f79cd243e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.Visibility * be referenced directly. */ module Impl { + /** + * A Visibility. For example: + * ```rust + * todo!() + * ``` + */ class Visibility extends Generated::Visibility { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/WhereClauseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/WhereClauseImpl.qll index 0b16d8738084..40f01ae51cc8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/WhereClauseImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/WhereClauseImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.WhereClause * be referenced directly. */ module Impl { + /** + * A WhereClause. For example: + * ```rust + * todo!() + * ``` + */ class WhereClause extends Generated::WhereClause { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/WherePredImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/WherePredImpl.qll index 95e0c3ad2a53..386a864eaf07 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/WherePredImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/WherePredImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.WherePred * be referenced directly. */ module Impl { + /** + * A WherePred. For example: + * ```rust + * todo!() + * ``` + */ class WherePred extends Generated::WherePred { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/WhileExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/WhileExprImpl.qll index fd131754108c..647864d46592 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/WhileExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/WhileExprImpl.qll @@ -12,5 +12,11 @@ private import codeql.rust.elements.internal.generated.WhileExpr * be referenced directly. */ module Impl { + /** + * A WhileExpr. For example: + * ```rust + * todo!() + * ``` + */ class WhileExpr extends Generated::WhileExpr { } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Abi.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Abi.qll index 1b80e3073410..f16f5ae4b312 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Abi.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Abi.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A Abi. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Abi` class directly. * Use the subclass `Abi`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ArgList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ArgList.qll index 8fb3a91cb309..cd5334aedded 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ArgList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ArgList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A ArgList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ArgList` class directly. * Use the subclass `ArgList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayType.qll index 2199cd3c14a0..6e4ae1314ce6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ArrayType.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A ArrayType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ArrayType` class directly. * Use the subclass `ArrayType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItem.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItem.qll index 1789ede2b275..aadca24997a5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItem.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItem.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A AssocItem. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::AssocItem` class directly. * Use the subclass `AssocItem`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItemList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItemList.qll index 6fe47b4205f4..9dac48242c36 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItemList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/AssocItemList.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.Attr */ module Generated { /** + * A AssocItemList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::AssocItemList` class directly. * Use the subclass `AssocItemList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll index 1e1b102232bc..940e76ebbbcb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/AssocTypeArg.qll @@ -22,6 +22,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A AssocTypeArg. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::AssocTypeArg` class directly. * Use the subclass `AssocTypeArg`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Attr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Attr.qll index 55207effe44b..00784693f7d2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Attr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Attr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Meta */ module Generated { /** + * A Attr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Attr` class directly. * Use the subclass `Attr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureBinder.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureBinder.qll index 61938ab3d845..20c26e455c75 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureBinder.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ClosureBinder.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.GenericParamList */ module Generated { /** + * A ClosureBinder. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ClosureBinder` class directly. * Use the subclass `ClosureBinder`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Const.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Const.qll index 7be93018cba4..37c3b55204db 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Const.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Const.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A Const. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Const` class directly. * Use the subclass `Const`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ConstArg.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ConstArg.qll index 5fc43e76704f..153a4bc16b7f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ConstArg.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ConstArg.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.GenericArgImpl::Impl as GenericArgImpl */ module Generated { /** + * A ConstArg. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ConstArg` class directly. * Use the subclass `ConstArg`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ConstParam.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ConstParam.qll index 1d8fd63914ae..c4f6cfa022da 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ConstParam.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ConstParam.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A ConstParam. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ConstParam` class directly. * Use the subclass `ConstParam`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/DynTraitType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/DynTraitType.qll index ad0216f831a0..acd35715487d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/DynTraitType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/DynTraitType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A DynTraitType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::DynTraitType` class directly. * Use the subclass `DynTraitType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Enum.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Enum.qll index 118e415ab10b..9c7c3bc331f1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Enum.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Enum.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A Enum. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Enum` class directly. * Use the subclass `Enum`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternBlock.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternBlock.qll index b6f1c8f01e9f..f259e509c1e4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternBlock.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternBlock.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.internal.ItemImpl::Impl as ItemImpl */ module Generated { /** + * A ExternBlock. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ExternBlock` class directly. * Use the subclass `ExternBlock`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternCrate.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternCrate.qll index c8a8686ffbee..b3518993cf39 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternCrate.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternCrate.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A ExternCrate. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ExternCrate` class directly. * Use the subclass `ExternCrate`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItem.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItem.qll index 7f75df3cbdff..8756b7076084 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItem.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItem.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A ExternItem. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ExternItem` class directly. * Use the subclass `ExternItem`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItemList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItemList.qll index f4d9e85ab9f0..bffae8deb81e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItemList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ExternItemList.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.ExternItem */ module Generated { /** + * A ExternItemList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ExternItemList` class directly. * Use the subclass `ExternItemList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/FieldList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/FieldList.qll index fdf7bbbf0857..3c386c8d957a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/FieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/FieldList.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A FieldList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::FieldList` class directly. * Use the subclass `FieldList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/FnPtrType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/FnPtrType.qll index 0a472d2cd9a6..4f8f2feb07c7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/FnPtrType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/FnPtrType.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A FnPtrType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::FnPtrType` class directly. * Use the subclass `FnPtrType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ForExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ForExpr.qll index b98901936824..dc5f2d34d3ee 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ForExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ForExpr.qll @@ -19,6 +19,10 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A ForExpr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ForExpr` class directly. * Use the subclass `ForExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ForType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ForType.qll index 9aa61f5ab255..0230cd6cd448 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ForType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ForType.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A ForType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ForType` class directly. * Use the subclass `ForType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll index d3d94ef2a433..0c78bd03f889 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.Name */ module Generated { /** + * A FormatArgsArg. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::FormatArgsArg` class directly. * Use the subclass `FormatArgsArg`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll index 52c684eba56d..7fe088e25411 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.FormatArgsArg */ module Generated { /** + * A FormatArgsExpr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::FormatArgsExpr` class directly. * Use the subclass `FormatArgsExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArg.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArg.qll index 7de1e7107dc0..05227971de17 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArg.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericArg.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A GenericArg. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::GenericArg` class directly. * Use the subclass `GenericArg`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParam.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParam.qll index 50fec6d0dcb7..56532c2a85e8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParam.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParam.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A GenericParam. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::GenericParam` class directly. * Use the subclass `GenericParam`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParamList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParamList.qll index 220727c991cd..3d726fa85bc7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParamList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/GenericParamList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.GenericParam */ module Generated { /** + * A GenericParamList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::GenericParamList` class directly. * Use the subclass `GenericParamList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Impl.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Impl.qll index 1dd9845be80b..1b99ed4745b1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Impl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Impl.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A Impl. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Impl` class directly. * Use the subclass `Impl`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ImplTraitType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ImplTraitType.qll index 083d095fa0c7..1346e89d1259 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ImplTraitType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ImplTraitType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A ImplTraitType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ImplTraitType` class directly. * Use the subclass `ImplTraitType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/InferType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/InferType.qll index 2861915a4b9f..09c8169a0b3e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/InferType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/InferType.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A InferType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::InferType` class directly. * Use the subclass `InferType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Item.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Item.qll index 184a913560c7..a51bc3634103 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Item.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Item.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.StmtImpl::Impl as StmtImpl */ module Generated { /** + * A Item. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Item` class directly. * Use the subclass `Item`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ItemList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ItemList.qll index 34dfd43217c6..7205dbc6bef2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ItemList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ItemList.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.Item */ module Generated { /** + * A ItemList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ItemList` class directly. * Use the subclass `ItemList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LetElse.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LetElse.qll index c4157e5fc1fe..69c89f1b3b59 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LetElse.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LetElse.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.BlockExpr */ module Generated { /** + * A LetElse. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::LetElse` class directly. * Use the subclass `LetElse`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Lifetime.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Lifetime.qll index 76e0f8465046..2830b84d4065 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Lifetime.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Lifetime.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A Lifetime. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Lifetime` class directly. * Use the subclass `Lifetime`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeArg.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeArg.qll index d43c5eb87346..38f66b06f2f9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeArg.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeArg.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Lifetime */ module Generated { /** + * A LifetimeArg. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::LifetimeArg` class directly. * Use the subclass `LifetimeArg`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeParam.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeParam.qll index db88db9d8005..7bf2d05b0864 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeParam.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/LifetimeParam.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.TypeBoundList */ module Generated { /** + * A LifetimeParam. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::LifetimeParam` class directly. * Use the subclass `LifetimeParam`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroCall.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroCall.qll index 6ae26b337694..30717a1a3919 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroCall.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroCall.qll @@ -19,6 +19,10 @@ import codeql.rust.elements.TokenTree */ module Generated { /** + * A MacroCall. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MacroCall` class directly. * Use the subclass `MacroCall`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroDef.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroDef.qll index b0b4f288cf53..8f4b7e0d8a48 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroDef.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroDef.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A MacroDef. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MacroDef` class directly. * Use the subclass `MacroDef`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroExpr.qll index 9ac002406da2..2a986228abd6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.MacroCall */ module Generated { /** + * A MacroExpr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MacroExpr` class directly. * Use the subclass `MacroExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroPat.qll index 2eabab34fbd1..79a261adb09a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroPat.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A MacroPat. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MacroPat` class directly. * Use the subclass `MacroPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroRules.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroRules.qll index eabbcde75218..0ca357049216 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroRules.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroRules.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A MacroRules. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MacroRules` class directly. * Use the subclass `MacroRules`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroType.qll index 93a0967c866f..f2fd6ceb9ebf 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MacroType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MacroType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A MacroType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MacroType` class directly. * Use the subclass `MacroType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArmList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArmList.qll index c1246762d880..37658ce922ff 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArmList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchArmList.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.MatchArm */ module Generated { /** + * A MatchArmList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MatchArmList` class directly. * Use the subclass `MatchArmList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchGuard.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchGuard.qll index ac6e87a2a612..193a85eaa114 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MatchGuard.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MatchGuard.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A MatchGuard. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::MatchGuard` class directly. * Use the subclass `MatchGuard`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Meta.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Meta.qll index 93ee1770d9cf..146c08a9b1e6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Meta.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Meta.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.TokenTree */ module Generated { /** + * A Meta. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Meta` class directly. * Use the subclass `Meta`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Name.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Name.qll index 54b1957a79d0..bffcfbdba6ff 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Name.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Name.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A Name. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Name` class directly. * Use the subclass `Name`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/NameRef.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/NameRef.qll index b67ddc423ee0..ae05f5a06211 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/NameRef.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/NameRef.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A NameRef. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::NameRef` class directly. * Use the subclass `NameRef`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/NeverType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/NeverType.qll index f8f7f7234654..8bc481b5f2ac 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/NeverType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/NeverType.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A NeverType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::NeverType` class directly. * Use the subclass `NeverType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Param.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Param.qll index 495657c849af..1ac10da37d35 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Param.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Param.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A Param. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Param` class directly. * Use the subclass `Param`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParamList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParamList.qll index 032b6c0c63ed..e09cc06cdeee 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParamList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParamList.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.SelfParam */ module Generated { /** + * A ParamList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ParamList` class directly. * Use the subclass `ParamList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParenExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParenExpr.qll index 11d471701f12..5ad83f994fff 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParenExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParenExpr.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A ParenExpr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ParenExpr` class directly. * Use the subclass `ParenExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParenPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParenPat.qll index be611d93f2d8..411362dde2ba 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParenPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParenPat.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A ParenPat. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ParenPat` class directly. * Use the subclass `ParenPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParenType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParenType.qll index ca426f849a16..abc547266e90 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParenType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParenType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A ParenType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ParenType` class directly. * Use the subclass `ParenType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll index 48a2031a51c4..0878635e7d17 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll @@ -21,6 +21,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A PathSegment. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::PathSegment` class directly. * Use the subclass `PathSegment`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PathType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PathType.qll index c90d8a8cdedd..3ac799108ccb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PathType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PathType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A PathType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::PathType` class directly. * Use the subclass `PathType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PtrType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PtrType.qll index e1a95bc56ce2..47f438002db3 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PtrType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PtrType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A PtrType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::PtrType` class directly. * Use the subclass `PtrType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll index 5a0cb115feab..4340f391a447 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -47,6 +47,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Abi. For example: + * ```rust + * todo!() + * ``` */ class Abi extends @abi, AstNode { override string toString() { result = "Abi" } @@ -59,6 +63,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ArgList. For example: + * ```rust + * todo!() + * ``` */ class ArgList extends @arg_list, AstNode { override string toString() { result = "ArgList" } @@ -71,11 +79,19 @@ module Raw { /** * INTERNAL: Do not use. + * A AssocItem. For example: + * ```rust + * todo!() + * ``` */ class AssocItem extends @assoc_item, AstNode { } /** * INTERNAL: Do not use. + * A AssocItemList. For example: + * ```rust + * todo!() + * ``` */ class AssocItemList extends @assoc_item_list, AstNode { override string toString() { result = "AssocItemList" } @@ -93,6 +109,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Attr. For example: + * ```rust + * todo!() + * ``` */ class Attr extends @attr, AstNode { override string toString() { result = "Attr" } @@ -105,6 +125,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ClosureBinder. For example: + * ```rust + * todo!() + * ``` */ class ClosureBinder extends @closure_binder, AstNode { override string toString() { result = "ClosureBinder" } @@ -123,11 +147,19 @@ module Raw { /** * INTERNAL: Do not use. + * A ExternItem. For example: + * ```rust + * todo!() + * ``` */ class ExternItem extends @extern_item, AstNode { } /** * INTERNAL: Do not use. + * A ExternItemList. For example: + * ```rust + * todo!() + * ``` */ class ExternItemList extends @extern_item_list, AstNode { override string toString() { result = "ExternItemList" } @@ -145,11 +177,19 @@ module Raw { /** * INTERNAL: Do not use. + * A FieldList. For example: + * ```rust + * todo!() + * ``` */ class FieldList extends @field_list, AstNode { } /** * INTERNAL: Do not use. + * A FormatArgsArg. For example: + * ```rust + * todo!() + * ``` */ class FormatArgsArg extends @format_args_arg, AstNode { override string toString() { result = "FormatArgsArg" } @@ -167,6 +207,10 @@ module Raw { /** * INTERNAL: Do not use. + * A GenericArg. For example: + * ```rust + * todo!() + * ``` */ class GenericArg extends @generic_arg, AstNode { } @@ -188,11 +232,19 @@ module Raw { /** * INTERNAL: Do not use. + * A GenericParam. For example: + * ```rust + * todo!() + * ``` */ class GenericParam extends @generic_param, AstNode { } /** * INTERNAL: Do not use. + * A GenericParamList. For example: + * ```rust + * todo!() + * ``` */ class GenericParamList extends @generic_param_list, AstNode { override string toString() { result = "GenericParamList" } @@ -207,6 +259,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ItemList. For example: + * ```rust + * todo!() + * ``` */ class ItemList extends @item_list, AstNode { override string toString() { result = "ItemList" } @@ -243,6 +299,10 @@ module Raw { /** * INTERNAL: Do not use. + * A LetElse. For example: + * ```rust + * todo!() + * ``` */ class LetElse extends @let_else, AstNode { override string toString() { result = "LetElse" } @@ -255,6 +315,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Lifetime. For example: + * ```rust + * todo!() + * ``` */ class Lifetime extends @lifetime, AstNode { override string toString() { result = "Lifetime" } @@ -307,6 +371,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MatchArmList. For example: + * ```rust + * todo!() + * ``` */ class MatchArmList extends @match_arm_list, AstNode { override string toString() { result = "MatchArmList" } @@ -324,6 +392,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MatchGuard. For example: + * ```rust + * todo!() + * ``` */ class MatchGuard extends @match_guard, AstNode { override string toString() { result = "MatchGuard" } @@ -336,6 +408,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Meta. For example: + * ```rust + * todo!() + * ``` */ class Meta extends @meta, AstNode { override string toString() { result = "Meta" } @@ -358,6 +434,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Name. For example: + * ```rust + * todo!() + * ``` */ class Name extends @name, AstNode { override string toString() { result = "Name" } @@ -370,6 +450,10 @@ module Raw { /** * INTERNAL: Do not use. + * A NameRef. For example: + * ```rust + * todo!() + * ``` */ class NameRef extends @name_ref, AstNode { override string toString() { result = "NameRef" } @@ -382,6 +466,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Param. For example: + * ```rust + * todo!() + * ``` */ class Param extends @param, AstNode { override string toString() { result = "Param" } @@ -404,6 +492,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ParamList. For example: + * ```rust + * todo!() + * ``` */ class ParamList extends @param_list, AstNode { override string toString() { result = "ParamList" } @@ -448,6 +540,10 @@ module Raw { /** * INTERNAL: Do not use. + * A PathSegment. For example: + * ```rust + * todo!() + * ``` */ class PathSegment extends @path_segment, AstNode { override string toString() { result = "PathSegment" } @@ -516,6 +612,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RecordExprFieldList. For example: + * ```rust + * todo!() + * ``` */ class RecordExprFieldList extends @record_expr_field_list, AstNode { override string toString() { result = "RecordExprFieldList" } @@ -538,6 +638,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RecordField. For example: + * ```rust + * todo!() + * ``` */ class RecordField extends @record_field, AstNode { override string toString() { result = "RecordField" } @@ -591,6 +695,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RecordPatFieldList. For example: + * ```rust + * todo!() + * ``` */ class RecordPatFieldList extends @record_pat_field_list, AstNode { override string toString() { result = "RecordPatFieldList" } @@ -608,6 +716,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Rename. For example: + * ```rust + * todo!() + * ``` */ class Rename extends @rename, AstNode { override string toString() { result = "Rename" } @@ -620,6 +732,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RetType. For example: + * ```rust + * todo!() + * ``` */ class RetType extends @ret_type, AstNode { override string toString() { result = "RetType" } @@ -632,6 +748,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ReturnTypeSyntax. For example: + * ```rust + * todo!() + * ``` */ class ReturnTypeSyntax extends @return_type_syntax, AstNode { override string toString() { result = "ReturnTypeSyntax" } @@ -639,6 +759,10 @@ module Raw { /** * INTERNAL: Do not use. + * A SelfParam. For example: + * ```rust + * todo!() + * ``` */ class SelfParam extends @self_param, AstNode { override string toString() { result = "SelfParam" } @@ -666,6 +790,10 @@ module Raw { /** * INTERNAL: Do not use. + * A SourceFile. For example: + * ```rust + * todo!() + * ``` */ class SourceFile extends @source_file, AstNode { override string toString() { result = "SourceFile" } @@ -689,6 +817,10 @@ module Raw { /** * INTERNAL: Do not use. + * A StmtList. For example: + * ```rust + * todo!() + * ``` */ class StmtList extends @stmt_list, AstNode { override string toString() { result = "StmtList" } @@ -711,6 +843,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TokenTree. For example: + * ```rust + * todo!() + * ``` */ class TokenTree extends @token_tree, AstNode { override string toString() { result = "TokenTree" } @@ -718,6 +854,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TupleField. For example: + * ```rust + * todo!() + * ``` */ class TupleField extends @tuple_field, AstNode { override string toString() { result = "TupleField" } @@ -740,6 +880,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TypeBound. For example: + * ```rust + * todo!() + * ``` */ class TypeBound extends @type_bound, AstNode { override string toString() { result = "TypeBound" } @@ -762,6 +906,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TypeBoundList. For example: + * ```rust + * todo!() + * ``` */ class TypeBoundList extends @type_bound_list, AstNode { override string toString() { result = "TypeBoundList" } @@ -785,6 +933,10 @@ module Raw { /** * INTERNAL: Do not use. + * A UseTree. For example: + * ```rust + * todo!() + * ``` */ class UseTree extends @use_tree, AstNode { override string toString() { result = "UseTree" } @@ -807,6 +959,10 @@ module Raw { /** * INTERNAL: Do not use. + * A UseTreeList. For example: + * ```rust + * todo!() + * ``` */ class UseTreeList extends @use_tree_list, AstNode { override string toString() { result = "UseTreeList" } @@ -819,6 +975,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Variant. For example: + * ```rust + * todo!() + * ``` */ class Variant extends @variant, AstNode { override string toString() { result = "Variant" } @@ -851,6 +1011,10 @@ module Raw { /** * INTERNAL: Do not use. + * A VariantList. For example: + * ```rust + * todo!() + * ``` */ class VariantList extends @variant_list, AstNode { override string toString() { result = "VariantList" } @@ -863,6 +1027,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Visibility. For example: + * ```rust + * todo!() + * ``` */ class Visibility extends @visibility, AstNode { override string toString() { result = "Visibility" } @@ -875,6 +1043,10 @@ module Raw { /** * INTERNAL: Do not use. + * A WhereClause. For example: + * ```rust + * todo!() + * ``` */ class WhereClause extends @where_clause, AstNode { override string toString() { result = "WhereClause" } @@ -887,6 +1059,10 @@ module Raw { /** * INTERNAL: Do not use. + * A WherePred. For example: + * ```rust + * todo!() + * ``` */ class WherePred extends @where_pred, AstNode { override string toString() { result = "WherePred" } @@ -936,6 +1112,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ArrayType. For example: + * ```rust + * todo!() + * ``` */ class ArrayType extends @array_type, TypeRef { override string toString() { result = "ArrayType" } @@ -976,6 +1156,10 @@ module Raw { /** * INTERNAL: Do not use. + * A AssocTypeArg. For example: + * ```rust + * todo!() + * ``` */ class AssocTypeArg extends @assoc_type_arg, GenericArg { override string toString() { result = "AssocTypeArg" } @@ -1296,6 +1480,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ConstArg. For example: + * ```rust + * todo!() + * ``` */ class ConstArg extends @const_arg, GenericArg { override string toString() { result = "ConstArg" } @@ -1327,6 +1515,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ConstParam. For example: + * ```rust + * todo!() + * ``` */ class ConstParam extends @const_param, GenericParam { override string toString() { result = "ConstParam" } @@ -1386,6 +1578,10 @@ module Raw { /** * INTERNAL: Do not use. + * A DynTraitType. For example: + * ```rust + * todo!() + * ``` */ class DynTraitType extends @dyn_trait_type, TypeRef { override string toString() { result = "DynTraitType" } @@ -1442,6 +1638,10 @@ module Raw { /** * INTERNAL: Do not use. + * A FnPtrType. For example: + * ```rust + * todo!() + * ``` */ class FnPtrType extends @fn_ptr_type, TypeRef { override string toString() { result = "FnPtrType" } @@ -1464,6 +1664,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ForExpr. For example: + * ```rust + * todo!() + * ``` */ class ForExpr extends @for_expr, Expr { override string toString() { result = "ForExpr" } @@ -1496,6 +1700,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ForType. For example: + * ```rust + * todo!() + * ``` */ class ForType extends @for_type, TypeRef { override string toString() { result = "ForType" } @@ -1513,6 +1721,10 @@ module Raw { /** * INTERNAL: Do not use. + * A FormatArgsExpr. For example: + * ```rust + * todo!() + * ``` */ class FormatArgsExpr extends @format_args_expr, Expr { override string toString() { result = "FormatArgsExpr" } @@ -1610,6 +1822,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ImplTraitType. For example: + * ```rust + * todo!() + * ``` */ class ImplTraitType extends @impl_trait_type, TypeRef { override string toString() { result = "ImplTraitType" } @@ -1649,6 +1865,10 @@ module Raw { /** * INTERNAL: Do not use. + * A InferType. For example: + * ```rust + * todo!() + * ``` */ class InferType extends @infer_type, TypeRef { override string toString() { result = "InferType" } @@ -1656,6 +1876,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Item. For example: + * ```rust + * todo!() + * ``` */ class Item extends @item, Stmt { } @@ -1732,6 +1956,10 @@ module Raw { /** * INTERNAL: Do not use. + * A LifetimeArg. For example: + * ```rust + * todo!() + * ``` */ class LifetimeArg extends @lifetime_arg, GenericArg { override string toString() { result = "LifetimeArg" } @@ -1744,6 +1972,10 @@ module Raw { /** * INTERNAL: Do not use. + * A LifetimeParam. For example: + * ```rust + * todo!() + * ``` */ class LifetimeParam extends @lifetime_param, GenericParam { override string toString() { result = "LifetimeParam" } @@ -1857,6 +2089,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MacroExpr. For example: + * ```rust + * todo!() + * ``` */ class MacroExpr extends @macro_expr, Expr { override string toString() { result = "MacroExpr" } @@ -1869,6 +2105,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MacroPat. For example: + * ```rust + * todo!() + * ``` */ class MacroPat extends @macro_pat, Pat { override string toString() { result = "MacroPat" } @@ -1881,6 +2121,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MacroType. For example: + * ```rust + * todo!() + * ``` */ class MacroType extends @macro_type, TypeRef { override string toString() { result = "MacroType" } @@ -1965,6 +2209,10 @@ module Raw { /** * INTERNAL: Do not use. + * A NeverType. For example: + * ```rust + * todo!() + * ``` */ class NeverType extends @never_type, TypeRef { override string toString() { result = "NeverType" } @@ -2016,6 +2264,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ParenExpr. For example: + * ```rust + * todo!() + * ``` */ class ParenExpr extends @paren_expr, Expr { override string toString() { result = "ParenExpr" } @@ -2033,6 +2285,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ParenPat. For example: + * ```rust + * todo!() + * ``` */ class ParenPat extends @paren_pat, Pat { override string toString() { result = "ParenPat" } @@ -2045,6 +2301,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ParenType. For example: + * ```rust + * todo!() + * ``` */ class ParenType extends @paren_type, TypeRef { override string toString() { result = "ParenType" } @@ -2100,6 +2360,10 @@ module Raw { /** * INTERNAL: Do not use. + * A PathType. For example: + * ```rust + * todo!() + * ``` */ class PathType extends @path_type, TypeRef { override string toString() { result = "PathType" } @@ -2140,6 +2404,10 @@ module Raw { /** * INTERNAL: Do not use. + * A PtrType. For example: + * ```rust + * todo!() + * ``` */ class PtrType extends @ptr_type, TypeRef { override string toString() { result = "PtrType" } @@ -2244,6 +2512,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RecordFieldList. For example: + * ```rust + * todo!() + * ``` */ class RecordFieldList extends @record_field_list, FieldList { override string toString() { result = "RecordFieldList" } @@ -2323,6 +2595,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RefType. For example: + * ```rust + * todo!() + * ``` */ class RefType extends @ref_type, TypeRef { override string toString() { result = "RefType" } @@ -2340,6 +2616,10 @@ module Raw { /** * INTERNAL: Do not use. + * A RestPat. For example: + * ```rust + * todo!() + * ``` */ class RestPat extends @rest_pat, Pat { override string toString() { result = "RestPat" } @@ -2400,6 +2680,10 @@ module Raw { /** * INTERNAL: Do not use. + * A SliceType. For example: + * ```rust + * todo!() + * ``` */ class SliceType extends @slice_type, TypeRef { override string toString() { result = "SliceType" } @@ -2412,6 +2696,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TryExpr. For example: + * ```rust + * todo!() + * ``` */ class TryExpr extends @try_expr, Expr { override string toString() { result = "TryExpr" } @@ -2451,6 +2739,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TupleFieldList. For example: + * ```rust + * todo!() + * ``` */ class TupleFieldList extends @tuple_field_list, FieldList { override string toString() { result = "TupleFieldList" } @@ -2505,6 +2797,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TupleType. For example: + * ```rust + * todo!() + * ``` */ class TupleType extends @tuple_type, TypeRef { override string toString() { result = "TupleType" } @@ -2517,6 +2813,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TypeArg. For example: + * ```rust + * todo!() + * ``` */ class TypeArg extends @type_arg, GenericArg { override string toString() { result = "TypeArg" } @@ -2529,6 +2829,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TypeParam. For example: + * ```rust + * todo!() + * ``` */ class TypeParam extends @type_param, GenericParam { override string toString() { result = "TypeParam" } @@ -2572,6 +2876,10 @@ module Raw { /** * INTERNAL: Do not use. + * A WhileExpr. For example: + * ```rust + * todo!() + * ``` */ class WhileExpr extends @while_expr, Expr { override string toString() { result = "WhileExpr" } @@ -2657,6 +2965,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Const. For example: + * ```rust + * todo!() + * ``` */ class Const extends @const, AssocItem, Item { override string toString() { result = "Const" } @@ -2689,6 +3001,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Enum. For example: + * ```rust + * todo!() + * ``` */ class Enum extends @enum, Item { override string toString() { result = "Enum" } @@ -2726,6 +3042,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ExternBlock. For example: + * ```rust + * todo!() + * ``` */ class ExternBlock extends @extern_block, Item { override string toString() { result = "ExternBlock" } @@ -2748,6 +3068,10 @@ module Raw { /** * INTERNAL: Do not use. + * A ExternCrate. For example: + * ```rust + * todo!() + * ``` */ class ExternCrate extends @extern_crate, Item { override string toString() { result = "ExternCrate" } @@ -2837,6 +3161,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Impl. For example: + * ```rust + * todo!() + * ``` */ class Impl extends @impl, Item { override string toString() { result = "Impl" } @@ -2879,6 +3207,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MacroCall. For example: + * ```rust + * todo!() + * ``` */ class MacroCall extends @macro_call, AssocItem, ExternItem, Item { override string toString() { result = "MacroCall" } @@ -2901,6 +3233,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MacroDef. For example: + * ```rust + * todo!() + * ``` */ class MacroDef extends @macro_def, Item { override string toString() { result = "MacroDef" } @@ -2933,6 +3269,10 @@ module Raw { /** * INTERNAL: Do not use. + * A MacroRules. For example: + * ```rust + * todo!() + * ``` */ class MacroRules extends @macro_rules, Item { override string toString() { result = "MacroRules" } @@ -2996,6 +3336,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Static. For example: + * ```rust + * todo!() + * ``` */ class Static extends @static, ExternItem, Item { override string toString() { result = "Static" } @@ -3028,6 +3372,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Struct. For example: + * ```rust + * todo!() + * ``` */ class Struct extends @struct, Item { override string toString() { result = "Struct" } @@ -3065,6 +3413,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Trait. For example: + * ```rust + * todo!() + * ``` */ class Trait extends @trait, Item { override string toString() { result = "Trait" } @@ -3107,6 +3459,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TraitAlias. For example: + * ```rust + * todo!() + * ``` */ class TraitAlias extends @trait_alias, Item { override string toString() { result = "TraitAlias" } @@ -3144,6 +3500,10 @@ module Raw { /** * INTERNAL: Do not use. + * A TypeAlias. For example: + * ```rust + * todo!() + * ``` */ class TypeAlias extends @type_alias, AssocItem, ExternItem, Item { override string toString() { result = "TypeAlias" } @@ -3186,6 +3546,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Union. For example: + * ```rust + * todo!() + * ``` */ class Union extends @union, Item { override string toString() { result = "Union" } @@ -3223,6 +3587,10 @@ module Raw { /** * INTERNAL: Do not use. + * A Use. For example: + * ```rust + * todo!() + * ``` */ class Use extends @use, Item { override string toString() { result = "Use" } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll index 0453bd681a05..5f531d8186d1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.RecordExprField */ module Generated { /** + * A RecordExprFieldList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RecordExprFieldList` class directly. * Use the subclass `RecordExprFieldList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordField.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordField.qll index 9b784dae3254..c5fcb867b89b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordField.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordField.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A RecordField. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RecordField` class directly. * Use the subclass `RecordField`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordFieldList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordFieldList.qll index ca90c526958e..2ce5c33093ea 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordFieldList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.RecordField */ module Generated { /** + * A RecordFieldList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RecordFieldList` class directly. * Use the subclass `RecordFieldList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll index 1e7d1ba46bd2..452207977062 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.RestPat */ module Generated { /** + * A RecordPatFieldList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RecordPatFieldList` class directly. * Use the subclass `RecordPatFieldList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RefType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RefType.qll index dee120e8b0f0..2d3df19798c1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RefType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RefType.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A RefType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RefType` class directly. * Use the subclass `RefType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Rename.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Rename.qll index 57d402ad6738..89ac3f7f12cb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Rename.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Rename.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Name */ module Generated { /** + * A Rename. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Rename` class directly. * Use the subclass `Rename`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RestPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RestPat.qll index c2d667c05c93..055c6476f4c4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RestPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RestPat.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.PatImpl::Impl as PatImpl */ module Generated { /** + * A RestPat. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RestPat` class directly. * Use the subclass `RestPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/RetType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/RetType.qll index ef92ec35b068..3b916d7d20de 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/RetType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/RetType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A RetType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::RetType` class directly. * Use the subclass `RetType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll index 4251a3405402..e4c653da5d36 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A ReturnTypeSyntax. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::ReturnTypeSyntax` class directly. * Use the subclass `ReturnTypeSyntax`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll index fe4e62e8a435..24bf5433361f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A SelfParam. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::SelfParam` class directly. * Use the subclass `SelfParam`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/SliceType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/SliceType.qll index 0e3c4f5d03c8..5576f34e13d6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/SliceType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/SliceType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A SliceType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::SliceType` class directly. * Use the subclass `SliceType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/SourceFile.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/SourceFile.qll index dfeb843637ae..07b5f25fda0d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/SourceFile.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/SourceFile.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.Item */ module Generated { /** + * A SourceFile. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::SourceFile` class directly. * Use the subclass `SourceFile`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Static.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Static.qll index 77362c4f2a27..6fbe692fb28d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Static.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Static.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A Static. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Static` class directly. * Use the subclass `Static`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/StmtList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/StmtList.qll index e59ce7eed73d..1366eab77963 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/StmtList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/StmtList.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.Stmt */ module Generated { /** + * A StmtList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::StmtList` class directly. * Use the subclass `StmtList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Struct.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Struct.qll index 11d47076035d..a596843e100f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Struct.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Struct.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A Struct. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Struct` class directly. * Use the subclass `Struct`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TokenTree.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TokenTree.qll index a49bf0845aaf..530f3e3199c0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TokenTree.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TokenTree.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl */ module Generated { /** + * A TokenTree. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TokenTree` class directly. * Use the subclass `TokenTree`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Trait.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Trait.qll index 1f1e20d9beb2..88cea87c5b5a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Trait.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Trait.qll @@ -21,6 +21,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A Trait. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Trait` class directly. * Use the subclass `Trait`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TraitAlias.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TraitAlias.qll index 906fd934a1a0..d084fc36436b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TraitAlias.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TraitAlias.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A TraitAlias. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TraitAlias` class directly. * Use the subclass `TraitAlias`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TryExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TryExpr.qll index 68aa77d4d70f..e71c2c26b9e6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TryExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TryExpr.qll @@ -16,6 +16,10 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl */ module Generated { /** + * A TryExpr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TryExpr` class directly. * Use the subclass `TryExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll index 52dd290882ac..fa7b8a338ff5 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A TupleField. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TupleField` class directly. * Use the subclass `TupleField`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll index edc89b77d80e..9b25d9a93165 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TupleField */ module Generated { /** + * A TupleFieldList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TupleFieldList` class directly. * Use the subclass `TupleFieldList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleType.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleType.qll index bafcc2be06e9..ec7d95114d88 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleType.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleType.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.internal.TypeRefImpl::Impl as TypeRefImpl */ module Generated { /** + * A TupleType. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TupleType` class directly. * Use the subclass `TupleType`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeAlias.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeAlias.qll index 18b57000495f..1014900cb0a6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeAlias.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeAlias.qll @@ -23,6 +23,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A TypeAlias. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TypeAlias` class directly. * Use the subclass `TypeAlias`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeArg.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeArg.qll index a4973a6cdfab..29b24efb9301 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeArg.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeArg.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A TypeArg. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TypeArg` class directly. * Use the subclass `TypeArg`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBound.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBound.qll index a5e329370e6e..4a571897ba71 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBound.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBound.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A TypeBound. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TypeBound` class directly. * Use the subclass `TypeBound`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBoundList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBoundList.qll index 1271f888650c..2781ab89de0f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBoundList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeBoundList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TypeBound */ module Generated { /** + * A TypeBoundList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TypeBoundList` class directly. * Use the subclass `TypeBoundList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeParam.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeParam.qll index 56641611a1c9..6b010ca50db2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TypeParam.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TypeParam.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A TypeParam. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::TypeParam` class directly. * Use the subclass `TypeParam`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Union.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Union.qll index 40999c72e50c..a456d5b56e74 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Union.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Union.qll @@ -20,6 +20,10 @@ import codeql.rust.elements.WhereClause */ module Generated { /** + * A Union. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Union` class directly. * Use the subclass `Union`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Use.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Use.qll index 8888368ecb3d..2bc1364b7901 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Use.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Use.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A Use. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Use` class directly. * Use the subclass `Use`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/UseTree.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/UseTree.qll index b3cbd43be83d..38696c378ad8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/UseTree.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/UseTree.qll @@ -17,6 +17,10 @@ import codeql.rust.elements.UseTreeList */ module Generated { /** + * A UseTree. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::UseTree` class directly. * Use the subclass `UseTree`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/UseTreeList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/UseTreeList.qll index b666449bbd70..9aa72b89a1ee 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/UseTreeList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/UseTreeList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.UseTree */ module Generated { /** + * A UseTreeList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::UseTreeList` class directly. * Use the subclass `UseTreeList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Variant.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Variant.qll index 71221bb7e395..ec57b2a03da2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Variant.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Variant.qll @@ -19,6 +19,10 @@ import codeql.rust.elements.Visibility */ module Generated { /** + * A Variant. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Variant` class directly. * Use the subclass `Variant`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/VariantList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/VariantList.qll index 3ece8597d014..a09fcb80e3dd 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/VariantList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/VariantList.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Variant */ module Generated { /** + * A VariantList. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::VariantList` class directly. * Use the subclass `VariantList`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Visibility.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Visibility.qll index b5d00229e96a..ba397d4a5d25 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Visibility.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Visibility.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Path */ module Generated { /** + * A Visibility. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::Visibility` class directly. * Use the subclass `Visibility`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/WhereClause.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/WhereClause.qll index df007bea418b..727af1be1362 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/WhereClause.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/WhereClause.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.WherePred */ module Generated { /** + * A WhereClause. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::WhereClause` class directly. * Use the subclass `WhereClause`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/WherePred.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/WherePred.qll index ba133fdfb883..90a1d732b30a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/WherePred.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/WherePred.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A WherePred. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::WherePred` class directly. * Use the subclass `WherePred`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/WhileExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/WhileExpr.qll index 4542976589be..5cd48bb25063 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/WhileExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/WhileExpr.qll @@ -18,6 +18,10 @@ import codeql.rust.elements.Label */ module Generated { /** + * A WhileExpr. For example: + * ```rust + * todo!() + * ``` * INTERNAL: Do not reference the `Generated::WhileExpr` class directly. * Use the subclass `WhileExpr`, where the following predicates are available. */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index 1922cf0831f6..0a3f2946e480 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -1,5 +1,11 @@ +Abi/gen_abi.rs 5d2f6eccb2bab86080188be9700ab64a34fa6e8e8e7b08f65a5c97d1de0a900c 5d2f6eccb2bab86080188be9700ab64a34fa6e8e8e7b08f65a5c97d1de0a900c +ArgList/gen_arg_list.rs 569d0b9b0479de5453ae0f89e4f90e32b02ee84dfb3d815821d722ece6f75b64 569d0b9b0479de5453ae0f89e4f90e32b02ee84dfb3d815821d722ece6f75b64 ArrayExpr/gen_array_expr.rs e4863b428ea2b5cfd59773f201e58fd905f7363512e54e4fdebd02c297bd85ff e4863b428ea2b5cfd59773f201e58fd905f7363512e54e4fdebd02c297bd85ff +ArrayType/gen_array_type.rs 3cb5f35006648d676ead1088aa330cd34beaabaaad7b9aa952e6375bc1cec5cb 3cb5f35006648d676ead1088aa330cd34beaabaaad7b9aa952e6375bc1cec5cb AsmExpr/gen_asm_expr.rs 00b21fd66fe12785174bd0160d0317a6c78ff05dbba73313eb07b56531cf3158 00b21fd66fe12785174bd0160d0317a6c78ff05dbba73313eb07b56531cf3158 +AssocItemList/gen_assoc_item_list.rs 78c835e9f031147eb4a39052db3e61b567a1d9149903dd865b2e343cdb2c8c1f 78c835e9f031147eb4a39052db3e61b567a1d9149903dd865b2e343cdb2c8c1f +AssocTypeArg/gen_assoc_type_arg.rs 00ec0e22c4d73338de605dc3b1b1306bc83a95f87376ce976f08d2f9923cc2b4 00ec0e22c4d73338de605dc3b1b1306bc83a95f87376ce976f08d2f9923cc2b4 +Attr/gen_attr.rs cd6e50f5ebb17066209682b1a9f22ff116584ffef180d8ab51e2ba5cab6a91ec cd6e50f5ebb17066209682b1a9f22ff116584ffef180d8ab51e2ba5cab6a91ec AwaitExpr/gen_await_expr.rs cbfa17a0b84bb0033b1f577c1f2a7ff187506c6211faaf6d90c371d4186b9aa2 cbfa17a0b84bb0033b1f577c1f2a7ff187506c6211faaf6d90c371d4186b9aa2 BecomeExpr/gen_become_expr.rs ab763211a01a2ca92be1589625465672c762df66fa3d12c9f1376021e497c06c ab763211a01a2ca92be1589625465672c762df66fa3d12c9f1376021e497c06c BinaryExpr/gen_binary_expr.rs 5ea68396dc2e3ff7fcaf5a5201636dd175dd45be36647b6ae0043c765ce24549 5ea68396dc2e3ff7fcaf5a5201636dd175dd45be36647b6ae0043c765ce24549 @@ -8,46 +14,126 @@ BoxPat/gen_box_pat.rs 1493e24b732370b577ade38c47db17fa157df19f5390606a67a6040e49 BreakExpr/gen_break_expr.rs 5240475a75b772ea45ab5a9d4f09a8fbba4a9d3e6cd8483fc2d0de29c880eac8 5240475a75b772ea45ab5a9d4f09a8fbba4a9d3e6cd8483fc2d0de29c880eac8 CallExpr/gen_call_expr.rs 013a7c878996aefb25b94b68eebc4f0b1bb74ccd09e91c491980817a383e2401 013a7c878996aefb25b94b68eebc4f0b1bb74ccd09e91c491980817a383e2401 CastExpr/gen_cast_expr.rs abd59cc7b92578b56098ac0045cf7de4b15c645cce79e3bdad8d3b6f4657360d abd59cc7b92578b56098ac0045cf7de4b15c645cce79e3bdad8d3b6f4657360d +ClosureBinder/gen_closure_binder.rs 78d3219bdfc58a22f333e3c82468fc23001e92b1d5acb085de7f48d7d1722244 78d3219bdfc58a22f333e3c82468fc23001e92b1d5acb085de7f48d7d1722244 ClosureExpr/gen_closure_expr.rs 15bd9abdb8aaffabb8bb335f8ebd0571eb5f29115e1dc8d11837aa988702cd80 15bd9abdb8aaffabb8bb335f8ebd0571eb5f29115e1dc8d11837aa988702cd80 +Const/gen_const.rs fea9d399fe4036c55b94b419ecb1cbb3131248ae338c20d383080dd1ca30f274 fea9d399fe4036c55b94b419ecb1cbb3131248ae338c20d383080dd1ca30f274 +ConstArg/gen_const_arg.rs feab3cdbbc469a287884ff7605e9a7541f904e9e5bd1f14a8e0f741fa970dd7c feab3cdbbc469a287884ff7605e9a7541f904e9e5bd1f14a8e0f741fa970dd7c ConstBlockPat/gen_const_block_pat.rs 7e3057cd24d22e752354369cf7e08e9536642812c0947b36aa5d8290a45476fd 7e3057cd24d22e752354369cf7e08e9536642812c0947b36aa5d8290a45476fd +ConstParam/gen_const_param.rs f0a4176333b9519b4cc2533a083f68f6859b5b0855d1b0dbcef4d4e206721830 f0a4176333b9519b4cc2533a083f68f6859b5b0855d1b0dbcef4d4e206721830 ContinueExpr/gen_continue_expr.rs 63840dcd8440aaf1b96b713b80eb2b56acb1639d3200b3c732b45291a071b5ff 63840dcd8440aaf1b96b713b80eb2b56acb1639d3200b3c732b45291a071b5ff +DynTraitType/gen_dyn_trait_type.rs 65b8e54bdc4bdfff8b68480582acca642bf2d28e316c5251fb3b8371cd7328bd 65b8e54bdc4bdfff8b68480582acca642bf2d28e316c5251fb3b8371cd7328bd +Enum/gen_enum.rs efa816c579bfba60d1f32f818b022956d08d397af508c82b7331f14615f25be4 efa816c579bfba60d1f32f818b022956d08d397af508c82b7331f14615f25be4 ExprStmt/gen_expr_stmt.rs 318a0fd72ee8d6da17c5d635ba0724ed2c11c0f7e9b75c939990cd0c7f3929e4 318a0fd72ee8d6da17c5d635ba0724ed2c11c0f7e9b75c939990cd0c7f3929e4 +ExternBlock/gen_extern_block.rs 5b5c4d7a2c4a91027df1578b74900ae1b971aede7720ab12de9bb918c42a583d 5b5c4d7a2c4a91027df1578b74900ae1b971aede7720ab12de9bb918c42a583d +ExternCrate/gen_extern_crate.rs 9b3ab23a56b7778723ce436b25310547b2b0aeca3e5c6b7e61f273b5ce5573e3 9b3ab23a56b7778723ce436b25310547b2b0aeca3e5c6b7e61f273b5ce5573e3 +ExternItemList/gen_extern_item_list.rs ff2baaaa32099808b86fbf6f4853171146594d5db23c6ee447eb5cec10cee7cf ff2baaaa32099808b86fbf6f4853171146594d5db23c6ee447eb5cec10cee7cf FieldExpr/gen_field_expr.rs 9a70500d592e0a071b03d974a55558b3bc0df531ff11bce5898feb36e17ffd8b 9a70500d592e0a071b03d974a55558b3bc0df531ff11bce5898feb36e17ffd8b +FnPtrType/gen_fn_ptr_type.rs a7842d8c21636739d1be959e5ce5e0b23482d5ef6eab5c45b009895da8175932 a7842d8c21636739d1be959e5ce5e0b23482d5ef6eab5c45b009895da8175932 +ForExpr/gen_for_expr.rs 67decf3073e1a9363d9df05a5a64a6059349e50b81356f480f7aeb352189136d 67decf3073e1a9363d9df05a5a64a6059349e50b81356f480f7aeb352189136d +ForType/gen_for_type.rs 6cb447df02c61b192e283e019576c28225added02d167030d64ebd0bebb1b158 6cb447df02c61b192e283e019576c28225added02d167030d64ebd0bebb1b158 +FormatArgsArg/gen_format_args_arg.rs c466f2fc2c0f9592061a159a217a87551d67f1ccb0e4d8f7f56a463a2aa4a73a c466f2fc2c0f9592061a159a217a87551d67f1ccb0e4d8f7f56a463a2aa4a73a +FormatArgsExpr/gen_format_args_expr.rs 7184dbb8833f970676e59fca3a40ec51d14a68e3151d8a6d637896494f2b4454 7184dbb8833f970676e59fca3a40ec51d14a68e3151d8a6d637896494f2b4454 Function/gen_function.rs ba6ecb9e0d89183295eb02f3c20ebbf5c209f89bd0172c73a3b4a6dacbf3a54c ba6ecb9e0d89183295eb02f3c20ebbf5c209f89bd0172c73a3b4a6dacbf3a54c GenericArgList/gen_generic_arg_list.rs cfb072d3b48f9dd568c23d4dfefba28766628678f66bbf9a436de9919ead35f5 cfb072d3b48f9dd568c23d4dfefba28766628678f66bbf9a436de9919ead35f5 +GenericParamList/gen_generic_param_list.rs 4cc9b628f53e1a6c5781ad195b8648fa6dee0bb41b24007fbd986527374d3669 4cc9b628f53e1a6c5781ad195b8648fa6dee0bb41b24007fbd986527374d3669 IdentPat/gen_ident_pat.rs 87f9201ca47683ff6f12a0c844c062fdedb6d86546794522d358b117ba0fe477 87f9201ca47683ff6f12a0c844c062fdedb6d86546794522d358b117ba0fe477 IfExpr/gen_if_expr.rs f2f79d4df0f01dc691b5c62c0f9e1815d7ebc978cf83b7559b5eeab0fcc2fc01 f2f79d4df0f01dc691b5c62c0f9e1815d7ebc978cf83b7559b5eeab0fcc2fc01 +Impl/gen_impl.rs dd97fa44ec844b735b30e7dfd1b8ecd4449c7914af1ea427edcba848194a84ed dd97fa44ec844b735b30e7dfd1b8ecd4449c7914af1ea427edcba848194a84ed +ImplTraitType/gen_impl_trait_type.rs feef13242cbee4e8c59a6db01778384d6d27d5b702431c2fd8dca0859f04a831 feef13242cbee4e8c59a6db01778384d6d27d5b702431c2fd8dca0859f04a831 IndexExpr/gen_index_expr.rs 22d7f81ba43dc63f1f49e21a2c25ce25a1b8f6e8e95e1a66f518f010a4d73c61 22d7f81ba43dc63f1f49e21a2c25ce25a1b8f6e8e95e1a66f518f010a4d73c61 +InferType/gen_infer_type.rs d1b7ee04417cfa8617bfd170920a48e8cfe97373b704153f5e2182ae29072ca3 d1b7ee04417cfa8617bfd170920a48e8cfe97373b704153f5e2182ae29072ca3 +ItemList/gen_item_list.rs 2ea6180e66de963627aabdaf64ce3c95c40cc7628d8734607ae2720bab857643 2ea6180e66de963627aabdaf64ce3c95c40cc7628d8734607ae2720bab857643 Label/gen_label.rs 0584f519f210f621d7ebc0cb8c95ce05db0795d6109c0d16866f8f699a28213c 0584f519f210f621d7ebc0cb8c95ce05db0795d6109c0d16866f8f699a28213c +LetElse/gen_let_else.rs 2cb09461b0ea48f666bd65a208663e64a874efadacb22764301871ea07956901 2cb09461b0ea48f666bd65a208663e64a874efadacb22764301871ea07956901 LetExpr/gen_let_expr.rs 7aebcd7197fd0e6b5b954deb2f6380769c94609c57e34eb86a33eb04e91d4a78 7aebcd7197fd0e6b5b954deb2f6380769c94609c57e34eb86a33eb04e91d4a78 LetStmt/gen_let_stmt.rs 3f41c9721149ee0bf8f89a58bc419756358a2e267b80d07660354a7fc44ef1eb 3f41c9721149ee0bf8f89a58bc419756358a2e267b80d07660354a7fc44ef1eb +Lifetime/gen_lifetime.rs 4f5c39d68e29ee4a351379ae9aa9c216f750b8858dac94d30928a348bee87a20 4f5c39d68e29ee4a351379ae9aa9c216f750b8858dac94d30928a348bee87a20 +LifetimeArg/gen_lifetime_arg.rs 95616e0dc445679761f4a60fe03247418b2c5979251413e309306b1c8fbf09de 95616e0dc445679761f4a60fe03247418b2c5979251413e309306b1c8fbf09de +LifetimeParam/gen_lifetime_param.rs 2caed50ce48360681271e4e89fde0d6d9076ebb9cd9c62fc4d43109cd873b31c 2caed50ce48360681271e4e89fde0d6d9076ebb9cd9c62fc4d43109cd873b31c LiteralExpr/gen_literal_expr.rs 2db01ad390e5c0c63a957c043230a462cb4cc25715eea6ede15d43c55d35976d 2db01ad390e5c0c63a957c043230a462cb4cc25715eea6ede15d43c55d35976d LiteralPat/gen_literal_pat.rs a471b481b6989001817a3988696f445d9a4dea784e543c346536dacbee1e96f3 a471b481b6989001817a3988696f445d9a4dea784e543c346536dacbee1e96f3 LoopExpr/gen_loop_expr.rs 35deaf35e765db4ae3124a11284266d8f341d1ce7b700030efada0dda8878619 35deaf35e765db4ae3124a11284266d8f341d1ce7b700030efada0dda8878619 +MacroCall/gen_macro_call.rs 139ef2c69323eea1a901e260d4e2acdd00b26f013b90c9344f48c6503ce29d79 139ef2c69323eea1a901e260d4e2acdd00b26f013b90c9344f48c6503ce29d79 +MacroDef/gen_macro_def.rs 17c5387fb464a60b4a4520d22b055ba35ff23e9fe431a18a33808ae02c4bbff5 17c5387fb464a60b4a4520d22b055ba35ff23e9fe431a18a33808ae02c4bbff5 +MacroExpr/gen_macro_expr.rs 3c23dc88fcc4bc8f97d9364d2f367671a0a5a63d07e52237d28204b64756dcdb 3c23dc88fcc4bc8f97d9364d2f367671a0a5a63d07e52237d28204b64756dcdb +MacroPat/gen_macro_pat.rs b8041370598bd7fb26778d829a15c415c2078d69124f6af634ddeba13a114aa0 b8041370598bd7fb26778d829a15c415c2078d69124f6af634ddeba13a114aa0 +MacroRules/gen_macro_rules.rs 7e03b410f4669e422d3b4328f7aafdca2e286e5d951495dd69cee0d44cb793a9 7e03b410f4669e422d3b4328f7aafdca2e286e5d951495dd69cee0d44cb793a9 +MacroType/gen_macro_type.rs 84db79c78860512b14f885391fcae999ca7282f2d8a9ab65d30cc413d5bbebd0 84db79c78860512b14f885391fcae999ca7282f2d8a9ab65d30cc413d5bbebd0 MatchArm/gen_match_arm.rs ac75b4836a103e2755bd47a1ee1b74af6eb8349adc4ebedaaa27b3ea3ae41aa5 ac75b4836a103e2755bd47a1ee1b74af6eb8349adc4ebedaaa27b3ea3ae41aa5 +MatchArmList/gen_match_arm_list.rs dbf36444d371421a2b8768a188660dd45ed3b823fb1c56b90c1ba77f177d23d6 dbf36444d371421a2b8768a188660dd45ed3b823fb1c56b90c1ba77f177d23d6 MatchExpr/gen_match_expr.rs 081c5d4c78cb71ccd13fb37a93d7f525267c51b179f44b5a22ca3297897002a0 081c5d4c78cb71ccd13fb37a93d7f525267c51b179f44b5a22ca3297897002a0 +MatchGuard/gen_match_guard.rs d2b4bd28bf175620383a01584171f641990136c5b3087a66b3261d11747573ff d2b4bd28bf175620383a01584171f641990136c5b3087a66b3261d11747573ff +Meta/gen_meta.rs e5c16b61f41a5fb5e4f83d4a7103ece0ff97656ac2e06d9040adc7101c6dbef2 e5c16b61f41a5fb5e4f83d4a7103ece0ff97656ac2e06d9040adc7101c6dbef2 MethodCallExpr/gen_method_call_expr.rs f2b4679eb1ec095981fe6bd656b632c22bf6bd0da133309da3f7ef5bd1ab4b5d f2b4679eb1ec095981fe6bd656b632c22bf6bd0da133309da3f7ef5bd1ab4b5d Module/gen_module.rs 815605a604fea1d9276684f8d6738a4e833eacad57ceeb27e2095fc450264fc1 815605a604fea1d9276684f8d6738a4e833eacad57ceeb27e2095fc450264fc1 +Name/gen_name.rs bbf5cff7da2400de554712ed66ff1e6370170ba988209b4e346bc053421df1ff bbf5cff7da2400de554712ed66ff1e6370170ba988209b4e346bc053421df1ff +NameRef/gen_name_ref.rs 41307c2f7ca82d28217129639e556bd4c91221cf3a4170250b313fd53b9e3f82 41307c2f7ca82d28217129639e556bd4c91221cf3a4170250b313fd53b9e3f82 +NeverType/gen_never_type.rs a5413fab6a45dcfc2ff0ec5c8308b6c515963212ec4aa9edb9a96ec9a7e96830 a5413fab6a45dcfc2ff0ec5c8308b6c515963212ec4aa9edb9a96ec9a7e96830 OffsetOfExpr/gen_offset_of_expr.rs 8e2077b4d7b85c91c17c3630511bc4f929950e9007261cbf0471c4a064c4b934 8e2077b4d7b85c91c17c3630511bc4f929950e9007261cbf0471c4a064c4b934 OrPat/gen_or_pat.rs 71feef6e056bfe4cc8c22c9eb54fa3fecef613606769061d0efd059adbbd6f56 71feef6e056bfe4cc8c22c9eb54fa3fecef613606769061d0efd059adbbd6f56 +Param/gen_param.rs 6c9e4a972b2dc0702dc29ebcbdcbe2c6a433b3cd372ad6924feedcea4698faba 6c9e4a972b2dc0702dc29ebcbdcbe2c6a433b3cd372ad6924feedcea4698faba +ParamList/gen_param_list.rs ef2e83d0aed45b969fe78dd717e87ef3c1f848e6179cfb4dc3cb136f1836b998 ef2e83d0aed45b969fe78dd717e87ef3c1f848e6179cfb4dc3cb136f1836b998 +ParenExpr/gen_paren_expr.rs dd0c4a21a92e54e8a6151145e013cbec9c9e1cad093d572e293b4f51d6c44aea dd0c4a21a92e54e8a6151145e013cbec9c9e1cad093d572e293b4f51d6c44aea +ParenPat/gen_paren_pat.rs c8d18521b9a0b7d39841eb72e3895914aa652b7235dea42ed12a4eb280e3bf0e c8d18521b9a0b7d39841eb72e3895914aa652b7235dea42ed12a4eb280e3bf0e +ParenType/gen_paren_type.rs ae1a945b56020eab14bb0ef75ae9ccb735d8e45d1213adee210a90e6dba8430f ae1a945b56020eab14bb0ef75ae9ccb735d8e45d1213adee210a90e6dba8430f Path/gen_path.rs e32637d04445d5b9411086f3ad5d8b41de24327f7ad641d1a1a25c1d160121c8 e32637d04445d5b9411086f3ad5d8b41de24327f7ad641d1a1a25c1d160121c8 PathExpr/gen_path_expr.rs a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a PathPat/gen_path_pat.rs fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 +PathSegment/gen_path_segment.rs bc0c914821a70f9a7db23766f4d84e2d69fc76d5075a8bc3341f2ba59a8ce911 bc0c914821a70f9a7db23766f4d84e2d69fc76d5075a8bc3341f2ba59a8ce911 +PathType/gen_path_type.rs 710a5505615769da940202e7c6d9031edc23a4b05cd9fb25241c60affbba4027 710a5505615769da940202e7c6d9031edc23a4b05cd9fb25241c60affbba4027 PrefixExpr/gen_prefix_expr.rs 2b7c6eb7efe5b1bbf895dde386eca9e1c4dcfa047ca141628580c97ec304ac4a 2b7c6eb7efe5b1bbf895dde386eca9e1c4dcfa047ca141628580c97ec304ac4a +PtrType/gen_ptr_type.rs dd7faad19454b92d7942ef664df1a5f26c01863e408b87249aa4d5d4f68c78b3 dd7faad19454b92d7942ef664df1a5f26c01863e408b87249aa4d5d4f68c78b3 RangeExpr/gen_range_expr.rs 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 RangePat/gen_range_pat.rs 18b5169c3ab9230c95d86c4897f8343b2176d9602c9ea371c70c1eb0dbf89a28 18b5169c3ab9230c95d86c4897f8343b2176d9602c9ea371c70c1eb0dbf89a28 RecordExpr/gen_record_expr.rs f8a7db88ae9e2a47588d26a76331cba64014dc6d5e065af28adcd718c8c52727 f8a7db88ae9e2a47588d26a76331cba64014dc6d5e065af28adcd718c8c52727 RecordExprField/gen_record_expr_field.rs ea34f9fc64a600a5fff6b3388a2f89990bc9381937f49e83ce5f8192a14a0e4f ea34f9fc64a600a5fff6b3388a2f89990bc9381937f49e83ce5f8192a14a0e4f +RecordExprFieldList/gen_record_expr_field_list.rs e1cf6cdf9b8eaade99e8ad60c24d34c401d3789173fa31cb9aacf14fbd84e062 e1cf6cdf9b8eaade99e8ad60c24d34c401d3789173fa31cb9aacf14fbd84e062 +RecordField/gen_record_field.rs 6adab09450e655a004190d3f5485f9cb0f0bdc2d94206f727a3b323358c0cd72 6adab09450e655a004190d3f5485f9cb0f0bdc2d94206f727a3b323358c0cd72 +RecordFieldList/gen_record_field_list.rs 7799933ffee9cc21cb848866b0d6d6c2d290dbee32d6a5f441ee9ce708f0d95a 7799933ffee9cc21cb848866b0d6d6c2d290dbee32d6a5f441ee9ce708f0d95a RecordPat/gen_record_pat.rs a7e8aafb51532785459467e82d175a4cbab7ad5757cd00d74a0b1b673a5f21d9 a7e8aafb51532785459467e82d175a4cbab7ad5757cd00d74a0b1b673a5f21d9 RecordPatField/gen_record_pat_field.rs f6c31bd08e6021aa4da6e8238561a77208f0ef723c5e217c6fbc16b8aec73a84 f6c31bd08e6021aa4da6e8238561a77208f0ef723c5e217c6fbc16b8aec73a84 +RecordPatFieldList/gen_record_pat_field_list.rs 35aa6ce694da1c822a593a9b1251e2a2c61365489edf2c0e9710251d8d02fe3f 35aa6ce694da1c822a593a9b1251e2a2c61365489edf2c0e9710251d8d02fe3f RefExpr/gen_ref_expr.rs 82695467551def4a00c78aa1ea6a1460e9edbef7df2672f13daccb0ee5d6b4c6 82695467551def4a00c78aa1ea6a1460e9edbef7df2672f13daccb0ee5d6b4c6 RefPat/gen_ref_pat.rs aba7518649d9a37928e59a40d42f76cc0f4735e8daf711a3def6d2f0520e1f54 aba7518649d9a37928e59a40d42f76cc0f4735e8daf711a3def6d2f0520e1f54 +RefType/gen_ref_type.rs 9d5c6d8257e580b550cbec5717e96b5cea6257c9e261e6f56db36c8570363b9d 9d5c6d8257e580b550cbec5717e96b5cea6257c9e261e6f56db36c8570363b9d +Rename/gen_rename.rs 553c16f243d1ae3b6b28510d39436c83425944e5085171c18e0a2aa40deb74fc 553c16f243d1ae3b6b28510d39436c83425944e5085171c18e0a2aa40deb74fc +RestPat/gen_rest_pat.rs e762bf7537225f97da751c5dca6a2cd3836ad7579b68c748b8c6cba65087acca e762bf7537225f97da751c5dca6a2cd3836ad7579b68c748b8c6cba65087acca +RetType/gen_ret_type.rs 0947aed0974461b7a5b56bbc5fe36131663bde715c37302345d4eee23b71c825 0947aed0974461b7a5b56bbc5fe36131663bde715c37302345d4eee23b71c825 ReturnExpr/gen_return_expr.rs 4f6ef29d7b3c60d6d71d1a6034a0721671f517428ba21897361a92b01009d38f 4f6ef29d7b3c60d6d71d1a6034a0721671f517428ba21897361a92b01009d38f +ReturnTypeSyntax/gen_return_type_syntax.rs 0b11a4cc400f9a2001996f99d61391bdb636e8aea036f587cf18ad6a957fe496 0b11a4cc400f9a2001996f99d61391bdb636e8aea036f587cf18ad6a957fe496 +SelfParam/gen_self_param.rs b7bf9f23fedad6f1a15f02e5fac33fc2c68ec3409b44f24142c2fdec1e5e6f1f b7bf9f23fedad6f1a15f02e5fac33fc2c68ec3409b44f24142c2fdec1e5e6f1f SlicePat/gen_slice_pat.rs df4a6692f5100aa11dd777561400ce71e37b85f2363b0638c21975a1771b15d5 df4a6692f5100aa11dd777561400ce71e37b85f2363b0638c21975a1771b15d5 +SliceType/gen_slice_type.rs 073282f4755994473933db7e4f1e4d34a80363d7e331299ec4ac1a2d6a235b86 073282f4755994473933db7e4f1e4d34a80363d7e331299ec4ac1a2d6a235b86 +SourceFile/gen_source_file.rs a7a1d4fa77b53adb6fbc031bf7ab49cf7c8787728ba0a687c348b5eefbb5b9df a7a1d4fa77b53adb6fbc031bf7ab49cf7c8787728ba0a687c348b5eefbb5b9df +Static/gen_static.rs ff01782c2f0f702373fc6df45ac9277fbdd8d4fad69dbe5f984a14790a46e7b9 ff01782c2f0f702373fc6df45ac9277fbdd8d4fad69dbe5f984a14790a46e7b9 +StmtList/gen_stmt_list.rs bb3791a613b91a2086c19cb0eddbf978bb37bbb2bd79d3e61b40be35c71daaad bb3791a613b91a2086c19cb0eddbf978bb37bbb2bd79d3e61b40be35c71daaad +Struct/gen_struct.rs 09c5c164d7c8a3991fad1a118d66c12c24d2ebf30fbea6205f7690ca9f24dbb2 09c5c164d7c8a3991fad1a118d66c12c24d2ebf30fbea6205f7690ca9f24dbb2 +TokenTree/gen_token_tree.rs dde6595ee4e8f3fcdecfb054438b08e1a7db10d83d9fff121794df814c7aee0e dde6595ee4e8f3fcdecfb054438b08e1a7db10d83d9fff121794df814c7aee0e +Trait/gen_trait.rs abef0d860253d9979d68c1e3051dd1de5d8b64a1575140dda1694e3516badba9 abef0d860253d9979d68c1e3051dd1de5d8b64a1575140dda1694e3516badba9 +TraitAlias/gen_trait_alias.rs c0c2d370674a20173db33e118e011328a880ba8ab42788ca735bb3d80b4b64a8 c0c2d370674a20173db33e118e011328a880ba8ab42788ca735bb3d80b4b64a8 +TryExpr/gen_try_expr.rs 2c7d8a5f3d65a084b645b5e4659fbbd3fbe65994fed1e6474ebd83df06f8d725 2c7d8a5f3d65a084b645b5e4659fbbd3fbe65994fed1e6474ebd83df06f8d725 TupleExpr/gen_tuple_expr.rs 8ecd1b6ecc58a0319eed434a423cc6f41bdf1901b1950e6e79735d7f7b2f8374 8ecd1b6ecc58a0319eed434a423cc6f41bdf1901b1950e6e79735d7f7b2f8374 +TupleField/gen_tuple_field.rs 8a77f7f1c2e4ac4374a147c27db7789e80496b5a405fd9cc3341f764a2136c38 8a77f7f1c2e4ac4374a147c27db7789e80496b5a405fd9cc3341f764a2136c38 +TupleFieldList/gen_tuple_field_list.rs d2a5151b413be3edbf093c4f47a8d57945e794d399378971940f6a5c65d4c223 d2a5151b413be3edbf093c4f47a8d57945e794d399378971940f6a5c65d4c223 TuplePat/gen_tuple_pat.rs b1b0c9c5ff1b787f380644691c77807655a4f6441fc7431c90ecf78c54c26148 b1b0c9c5ff1b787f380644691c77807655a4f6441fc7431c90ecf78c54c26148 TupleStructPat/gen_tuple_struct_pat.rs 601ca8813272d15b4c8fd7402d0d28a42a62be82865eb5e86b985ad31464ca98 601ca8813272d15b4c8fd7402d0d28a42a62be82865eb5e86b985ad31464ca98 +TupleType/gen_tuple_type.rs f4302ca264cb17e0c27015f657e678a13147f691c06323cba778836467815265 f4302ca264cb17e0c27015f657e678a13147f691c06323cba778836467815265 +TypeAlias/gen_type_alias.rs eee732f674d9f999fee1e1976c426ba07f23c63b58b3a53c2026a4b922c00c8f eee732f674d9f999fee1e1976c426ba07f23c63b58b3a53c2026a4b922c00c8f +TypeArg/gen_type_arg.rs 11e024708429bb683adc848d0be168cd9d190793833880e6ec74139df296e818 11e024708429bb683adc848d0be168cd9d190793833880e6ec74139df296e818 +TypeBound/gen_type_bound.rs 4198346113b075812f79858ccbd467339d6b8039a449bd58c4710dd0aba1c9c1 4198346113b075812f79858ccbd467339d6b8039a449bd58c4710dd0aba1c9c1 +TypeBoundList/gen_type_bound_list.rs bf70e31e5908e0eea6cdb4354ae78fc6ee1077b193409e741cac9b5d93d5deb2 bf70e31e5908e0eea6cdb4354ae78fc6ee1077b193409e741cac9b5d93d5deb2 +TypeParam/gen_type_param.rs 31c02d18020b305f1c37fdeb97656dd5b1e49e6b9a072329c2f099c55a06e3b7 31c02d18020b305f1c37fdeb97656dd5b1e49e6b9a072329c2f099c55a06e3b7 UnderscoreExpr/gen_underscore_expr.rs fe34e99d322bf86c0f5509c9b5fd6e1e8abbdf63dbe7e01687344a41e9aabe52 fe34e99d322bf86c0f5509c9b5fd6e1e8abbdf63dbe7e01687344a41e9aabe52 +Union/gen_union.rs d5e814688e93dcb105f29a392159c1b995ee15a74720167219f9431db8ef70a3 d5e814688e93dcb105f29a392159c1b995ee15a74720167219f9431db8ef70a3 +Use/gen_use.rs 2a0ea9fa34d844fda63e8f605f6a951e8b272d63ebfb0ae501fc734559a83a6b 2a0ea9fa34d844fda63e8f605f6a951e8b272d63ebfb0ae501fc734559a83a6b +UseTree/gen_use_tree.rs 0a310eb8ce7abf481df813464dabac528a8f70d64d541409c66f957dfdd068d0 0a310eb8ce7abf481df813464dabac528a8f70d64d541409c66f957dfdd068d0 +UseTreeList/gen_use_tree_list.rs ba450699782e51b1d3139148709827e35f2e57235849fb26a073e2786dfc53e3 ba450699782e51b1d3139148709827e35f2e57235849fb26a073e2786dfc53e3 +Variant/gen_variant.rs 036566793ee468418f915974e2925d8bafaec3c93c2463212f222e6a5f290f24 036566793ee468418f915974e2925d8bafaec3c93c2463212f222e6a5f290f24 +VariantList/gen_variant_list.rs 932b67564c5ef4116d84db6945e098f6d7438755d99fc198fde8f4527979bf00 932b67564c5ef4116d84db6945e098f6d7438755d99fc198fde8f4527979bf00 +Visibility/gen_visibility.rs 6f5ca31d3593643eb0ff2be9b191619d3d8c3a4aa0093293ae2bdc299421ce60 6f5ca31d3593643eb0ff2be9b191619d3d8c3a4aa0093293ae2bdc299421ce60 +WhereClause/gen_where_clause.rs bdfb67817b24df5d33080825320f07574e57f1a950a4505a79c2cbd6967fb882 bdfb67817b24df5d33080825320f07574e57f1a950a4505a79c2cbd6967fb882 +WherePred/gen_where_pred.rs d127641a319766500581898c09b7d00be34c686670cb860022dc0f7f52f50137 d127641a319766500581898c09b7d00be34c686670cb860022dc0f7f52f50137 +WhileExpr/gen_while_expr.rs 81c9082bcba72c6a89d6f4cbdb456ccc521be64fd554755924dbd3bbe6dcdf6d 81c9082bcba72c6a89d6f4cbdb456ccc521be64fd554755924dbd3bbe6dcdf6d WildcardPat/gen_wildcard_pat.rs f1b175eeb3a0fc32bbcfb70a207be33dfde51a7d5198f72b8e08948f0d43e3dc f1b175eeb3a0fc32bbcfb70a207be33dfde51a7d5198f72b8e08948f0d43e3dc YeetExpr/gen_yeet_expr.rs c243b785a2cbd941bcec23dafc23ffbc64b93cf2843b6ede9783cdb81fed439d c243b785a2cbd941bcec23dafc23ffbc64b93cf2843b6ede9783cdb81fed439d YieldExpr/gen_yield_expr.rs 20f607719ff90bbcd831fe48a530400d0774394867ae65618cd1671d638f853e 20f607719ff90bbcd831fe48a530400d0774394867ae65618cd1671d638f853e diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 53818a1fc53e..2ca1ee90ffed 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -1,7 +1,13 @@ /.generated_tests.list linguist-generated /.gitattributes linguist-generated +/Abi/gen_abi.rs linguist-generated +/ArgList/gen_arg_list.rs linguist-generated /ArrayExpr/gen_array_expr.rs linguist-generated +/ArrayType/gen_array_type.rs linguist-generated /AsmExpr/gen_asm_expr.rs linguist-generated +/AssocItemList/gen_assoc_item_list.rs linguist-generated +/AssocTypeArg/gen_assoc_type_arg.rs linguist-generated +/Attr/gen_attr.rs linguist-generated /AwaitExpr/gen_await_expr.rs linguist-generated /BecomeExpr/gen_become_expr.rs linguist-generated /BinaryExpr/gen_binary_expr.rs linguist-generated @@ -10,46 +16,126 @@ /BreakExpr/gen_break_expr.rs linguist-generated /CallExpr/gen_call_expr.rs linguist-generated /CastExpr/gen_cast_expr.rs linguist-generated +/ClosureBinder/gen_closure_binder.rs linguist-generated /ClosureExpr/gen_closure_expr.rs linguist-generated +/Const/gen_const.rs linguist-generated +/ConstArg/gen_const_arg.rs linguist-generated /ConstBlockPat/gen_const_block_pat.rs linguist-generated +/ConstParam/gen_const_param.rs linguist-generated /ContinueExpr/gen_continue_expr.rs linguist-generated +/DynTraitType/gen_dyn_trait_type.rs linguist-generated +/Enum/gen_enum.rs linguist-generated /ExprStmt/gen_expr_stmt.rs linguist-generated +/ExternBlock/gen_extern_block.rs linguist-generated +/ExternCrate/gen_extern_crate.rs linguist-generated +/ExternItemList/gen_extern_item_list.rs linguist-generated /FieldExpr/gen_field_expr.rs linguist-generated +/FnPtrType/gen_fn_ptr_type.rs linguist-generated +/ForExpr/gen_for_expr.rs linguist-generated +/ForType/gen_for_type.rs linguist-generated +/FormatArgsArg/gen_format_args_arg.rs linguist-generated +/FormatArgsExpr/gen_format_args_expr.rs linguist-generated /Function/gen_function.rs linguist-generated /GenericArgList/gen_generic_arg_list.rs linguist-generated +/GenericParamList/gen_generic_param_list.rs linguist-generated /IdentPat/gen_ident_pat.rs linguist-generated /IfExpr/gen_if_expr.rs linguist-generated +/Impl/gen_impl.rs linguist-generated +/ImplTraitType/gen_impl_trait_type.rs linguist-generated /IndexExpr/gen_index_expr.rs linguist-generated +/InferType/gen_infer_type.rs linguist-generated +/ItemList/gen_item_list.rs linguist-generated /Label/gen_label.rs linguist-generated +/LetElse/gen_let_else.rs linguist-generated /LetExpr/gen_let_expr.rs linguist-generated /LetStmt/gen_let_stmt.rs linguist-generated +/Lifetime/gen_lifetime.rs linguist-generated +/LifetimeArg/gen_lifetime_arg.rs linguist-generated +/LifetimeParam/gen_lifetime_param.rs linguist-generated /LiteralExpr/gen_literal_expr.rs linguist-generated /LiteralPat/gen_literal_pat.rs linguist-generated /LoopExpr/gen_loop_expr.rs linguist-generated +/MacroCall/gen_macro_call.rs linguist-generated +/MacroDef/gen_macro_def.rs linguist-generated +/MacroExpr/gen_macro_expr.rs linguist-generated +/MacroPat/gen_macro_pat.rs linguist-generated +/MacroRules/gen_macro_rules.rs linguist-generated +/MacroType/gen_macro_type.rs linguist-generated /MatchArm/gen_match_arm.rs linguist-generated +/MatchArmList/gen_match_arm_list.rs linguist-generated /MatchExpr/gen_match_expr.rs linguist-generated +/MatchGuard/gen_match_guard.rs linguist-generated +/Meta/gen_meta.rs linguist-generated /MethodCallExpr/gen_method_call_expr.rs linguist-generated /Module/gen_module.rs linguist-generated +/Name/gen_name.rs linguist-generated +/NameRef/gen_name_ref.rs linguist-generated +/NeverType/gen_never_type.rs linguist-generated /OffsetOfExpr/gen_offset_of_expr.rs linguist-generated /OrPat/gen_or_pat.rs linguist-generated +/Param/gen_param.rs linguist-generated +/ParamList/gen_param_list.rs linguist-generated +/ParenExpr/gen_paren_expr.rs linguist-generated +/ParenPat/gen_paren_pat.rs linguist-generated +/ParenType/gen_paren_type.rs linguist-generated /Path/gen_path.rs linguist-generated /PathExpr/gen_path_expr.rs linguist-generated /PathPat/gen_path_pat.rs linguist-generated +/PathSegment/gen_path_segment.rs linguist-generated +/PathType/gen_path_type.rs linguist-generated /PrefixExpr/gen_prefix_expr.rs linguist-generated +/PtrType/gen_ptr_type.rs linguist-generated /RangeExpr/gen_range_expr.rs linguist-generated /RangePat/gen_range_pat.rs linguist-generated /RecordExpr/gen_record_expr.rs linguist-generated /RecordExprField/gen_record_expr_field.rs linguist-generated +/RecordExprFieldList/gen_record_expr_field_list.rs linguist-generated +/RecordField/gen_record_field.rs linguist-generated +/RecordFieldList/gen_record_field_list.rs linguist-generated /RecordPat/gen_record_pat.rs linguist-generated /RecordPatField/gen_record_pat_field.rs linguist-generated +/RecordPatFieldList/gen_record_pat_field_list.rs linguist-generated /RefExpr/gen_ref_expr.rs linguist-generated /RefPat/gen_ref_pat.rs linguist-generated +/RefType/gen_ref_type.rs linguist-generated +/Rename/gen_rename.rs linguist-generated +/RestPat/gen_rest_pat.rs linguist-generated +/RetType/gen_ret_type.rs linguist-generated /ReturnExpr/gen_return_expr.rs linguist-generated +/ReturnTypeSyntax/gen_return_type_syntax.rs linguist-generated +/SelfParam/gen_self_param.rs linguist-generated /SlicePat/gen_slice_pat.rs linguist-generated +/SliceType/gen_slice_type.rs linguist-generated +/SourceFile/gen_source_file.rs linguist-generated +/Static/gen_static.rs linguist-generated +/StmtList/gen_stmt_list.rs linguist-generated +/Struct/gen_struct.rs linguist-generated +/TokenTree/gen_token_tree.rs linguist-generated +/Trait/gen_trait.rs linguist-generated +/TraitAlias/gen_trait_alias.rs linguist-generated +/TryExpr/gen_try_expr.rs linguist-generated /TupleExpr/gen_tuple_expr.rs linguist-generated +/TupleField/gen_tuple_field.rs linguist-generated +/TupleFieldList/gen_tuple_field_list.rs linguist-generated /TuplePat/gen_tuple_pat.rs linguist-generated /TupleStructPat/gen_tuple_struct_pat.rs linguist-generated +/TupleType/gen_tuple_type.rs linguist-generated +/TypeAlias/gen_type_alias.rs linguist-generated +/TypeArg/gen_type_arg.rs linguist-generated +/TypeBound/gen_type_bound.rs linguist-generated +/TypeBoundList/gen_type_bound_list.rs linguist-generated +/TypeParam/gen_type_param.rs linguist-generated /UnderscoreExpr/gen_underscore_expr.rs linguist-generated +/Union/gen_union.rs linguist-generated +/Use/gen_use.rs linguist-generated +/UseTree/gen_use_tree.rs linguist-generated +/UseTreeList/gen_use_tree_list.rs linguist-generated +/Variant/gen_variant.rs linguist-generated +/VariantList/gen_variant_list.rs linguist-generated +/Visibility/gen_visibility.rs linguist-generated +/WhereClause/gen_where_clause.rs linguist-generated +/WherePred/gen_where_pred.rs linguist-generated +/WhileExpr/gen_while_expr.rs linguist-generated /WildcardPat/gen_wildcard_pat.rs linguist-generated /YeetExpr/gen_yeet_expr.rs linguist-generated /YieldExpr/gen_yield_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi.ql b/rust/ql/test/extractor-tests/generated/Abi/Abi.ql new file mode 100644 index 000000000000..3c0fd40eaeb3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Abi/Abi.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Abi x, string hasAbiString +where + toBeTested(x) and + not x.isUnknown() and + if x.hasAbiString() then hasAbiString = "yes" else hasAbiString = "no" +select x, "hasAbiString:", hasAbiString diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql b/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql new file mode 100644 index 000000000000..77104019b328 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Abi x +where toBeTested(x) and not x.isUnknown() +select x, x.getAbiString() diff --git a/rust/ql/test/extractor-tests/generated/Abi/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Abi/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Abi/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Abi/gen_abi.rs b/rust/ql/test/extractor-tests/generated/Abi/gen_abi.rs new file mode 100644 index 000000000000..01c614999d02 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Abi/gen_abi.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_abi() -> () { + // A Abi. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql new file mode 100644 index 000000000000..0e8c23922b5a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArgList x, int getNumberOfArgs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfArgs = x.getNumberOfArgs() +select x, "getNumberOfArgs:", getNumberOfArgs diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql new file mode 100644 index 000000000000..253d13f2b56a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArgList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ArgList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ArgList/gen_arg_list.rs b/rust/ql/test/extractor-tests/generated/ArgList/gen_arg_list.rs new file mode 100644 index 000000000000..2cfe6d29c0db --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArgList/gen_arg_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_arg_list() -> () { + // A ArgList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.ql b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.ql new file mode 100644 index 000000000000..1538043e2922 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayType x, string hasConstArg, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasConstArg() then hasConstArg = "yes" else hasConstArg = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasConstArg:", hasConstArg, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql new file mode 100644 index 000000000000..55c3fc89475c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayType x +where toBeTested(x) and not x.isUnknown() +select x, x.getConstArg() diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql new file mode 100644 index 000000000000..d274baf857f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/gen_array_type.rs b/rust/ql/test/extractor-tests/generated/ArrayType/gen_array_type.rs new file mode 100644 index 000000000000..2449a2052274 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayType/gen_array_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_array_type() -> () { + // A ArrayType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.ql b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.ql new file mode 100644 index 000000000000..eebd261c6bd8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocItemList x, int getNumberOfAssocItems, int getNumberOfAttrs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAssocItems = x.getNumberOfAssocItems() and + getNumberOfAttrs = x.getNumberOfAttrs() +select x, "getNumberOfAssocItems:", getNumberOfAssocItems, "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.ql b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.ql new file mode 100644 index 000000000000..01d36f7cc54a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocItemList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAssocItem(index) diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.ql b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.ql new file mode 100644 index 000000000000..72b5f3667371 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocItemList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/AssocItemList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/gen_assoc_item_list.rs b/rust/ql/test/extractor-tests/generated/AssocItemList/gen_assoc_item_list.rs new file mode 100644 index 000000000000..b858bff4755f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocItemList/gen_assoc_item_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_assoc_item_list() -> () { + // A AssocItemList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql new file mode 100644 index 000000000000..b1cafa773f51 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql @@ -0,0 +1,22 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + AssocTypeArg x, string hasConstArg, string hasGenericArgList, string hasNameRef, + string hasParamList, string hasRetType, string hasReturnTypeSyntax, string hasTy, + string hasTypeBoundList +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasConstArg() then hasConstArg = "yes" else hasConstArg = "no") and + (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and + (if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no") and + (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and + (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and + (if x.hasReturnTypeSyntax() then hasReturnTypeSyntax = "yes" else hasReturnTypeSyntax = "no") and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" +select x, "hasConstArg:", hasConstArg, "hasGenericArgList:", hasGenericArgList, "hasNameRef:", + hasNameRef, "hasParamList:", hasParamList, "hasRetType:", hasRetType, "hasReturnTypeSyntax:", + hasReturnTypeSyntax, "hasTy:", hasTy, "hasTypeBoundList:", hasTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql new file mode 100644 index 000000000000..6619858dfe39 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getConstArg() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql new file mode 100644 index 000000000000..09c1924f693f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericArgList() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.ql new file mode 100644 index 000000000000..8f393e344435 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql new file mode 100644 index 000000000000..e745669c52df --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql new file mode 100644 index 000000000000..413b05df0d44 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql new file mode 100644 index 000000000000..f3929edba7ec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getReturnTypeSyntax() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql new file mode 100644 index 000000000000..4b037c90ab25 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql new file mode 100644 index 000000000000..e798c8bbaa42 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AssocTypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/gen_assoc_type_arg.rs b/rust/ql/test/extractor-tests/generated/AssocTypeArg/gen_assoc_type_arg.rs new file mode 100644 index 000000000000..9f7bb10a69ae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/gen_assoc_type_arg.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_assoc_type_arg() -> () { + // A AssocTypeArg. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr.ql b/rust/ql/test/extractor-tests/generated/Attr/Attr.ql new file mode 100644 index 000000000000..b80d3089be9b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Attr/Attr.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Attr x, string hasMeta +where + toBeTested(x) and + not x.isUnknown() and + if x.hasMeta() then hasMeta = "yes" else hasMeta = "no" +select x, "hasMeta:", hasMeta diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql b/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql new file mode 100644 index 000000000000..dd4ed7f56efb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Attr x +where toBeTested(x) and not x.isUnknown() +select x, x.getMeta() diff --git a/rust/ql/test/extractor-tests/generated/Attr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Attr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Attr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Attr/gen_attr.rs b/rust/ql/test/extractor-tests/generated/Attr/gen_attr.rs new file mode 100644 index 000000000000..c028915cabf7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Attr/gen_attr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_attr() -> () { + // A Attr. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql new file mode 100644 index 000000000000..b099f4aa548d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureBinder x, string hasGenericParamList +where + toBeTested(x) and + not x.isUnknown() and + if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no" +select x, "hasGenericParamList:", hasGenericParamList diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql new file mode 100644 index 000000000000..553bcf8970e3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureBinder x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureBinder/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/gen_closure_binder.rs b/rust/ql/test/extractor-tests/generated/ClosureBinder/gen_closure_binder.rs new file mode 100644 index 000000000000..a924e2f61689 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureBinder/gen_closure_binder.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_closure_binder() -> () { + // A ClosureBinder. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Const/Const.ql b/rust/ql/test/extractor-tests/generated/Const/Const.ql new file mode 100644 index 000000000000..9af69afe4d3b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/Const.ql @@ -0,0 +1,16 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Const x, int getNumberOfAttrs, string hasBody, string hasName, string hasTy, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasBody() then hasBody = "yes" else hasBody = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, "hasName:", hasName, "hasTy:", + hasTy, "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql new file mode 100644 index 000000000000..0b4adeec093f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Const x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql new file mode 100644 index 000000000000..368aa82afb41 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Const x +where toBeTested(x) and not x.isUnknown() +select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getName.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getName.ql new file mode 100644 index 000000000000..23698a012eb3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/Const_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Const x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getTy.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getTy.ql new file mode 100644 index 000000000000..d133dcb5d384 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/Const_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Const x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql new file mode 100644 index 000000000000..c0599d921a0d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Const x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Const/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Const/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Const/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Const/gen_const.rs b/rust/ql/test/extractor-tests/generated/Const/gen_const.rs new file mode 100644 index 000000000000..32c17ef6c2bd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Const/gen_const.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_const() -> () { + // A Const. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql new file mode 100644 index 000000000000..4080bf099c44 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstArg x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql new file mode 100644 index 000000000000..702328c2aacd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ConstArg/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/gen_const_arg.rs b/rust/ql/test/extractor-tests/generated/ConstArg/gen_const_arg.rs new file mode 100644 index 000000000000..ac9bd5d15515 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstArg/gen_const_arg.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_const_arg() -> () { + // A ConstArg. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql new file mode 100644 index 000000000000..2415e1728d9c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstParam x, int getNumberOfAttrs, string hasDefaultVal, string hasName, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasDefaultVal() then hasDefaultVal = "yes" else hasDefaultVal = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasDefaultVal:", hasDefaultVal, "hasName:", + hasName, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql new file mode 100644 index 000000000000..ed8406eecefc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstParam x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql new file mode 100644 index 000000000000..f4af24f39b73 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getDefaultVal() diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql new file mode 100644 index 000000000000..7c627d43650b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql new file mode 100644 index 000000000000..9f9aa53542bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/gen_const_param.rs b/rust/ql/test/extractor-tests/generated/ConstParam/gen_const_param.rs new file mode 100644 index 000000000000..c0e3388f3e9f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/gen_const_param.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_const_param() -> () { + // A ConstParam. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.ql b/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.ql new file mode 100644 index 000000000000..ad7a7e7101e5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from DynTraitType x, string hasTypeBoundList +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" +select x, "hasTypeBoundList:", hasTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql new file mode 100644 index 000000000000..bd63c4c6e3b9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from DynTraitType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/DynTraitType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/DynTraitType/gen_dyn_trait_type.rs b/rust/ql/test/extractor-tests/generated/DynTraitType/gen_dyn_trait_type.rs new file mode 100644 index 000000000000..511d9b782c09 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/DynTraitType/gen_dyn_trait_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_dyn_trait_type() -> () { + // A DynTraitType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum.ql new file mode 100644 index 000000000000..4ef58323c876 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum.ql @@ -0,0 +1,19 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Enum x, int getNumberOfAttrs, string hasGenericParamList, string hasName, string hasVariantList, + string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasVariantList() then hasVariantList = "yes" else hasVariantList = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, + "hasName:", hasName, "hasVariantList:", hasVariantList, "hasVisibility:", hasVisibility, + "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql new file mode 100644 index 000000000000..b2ffb4b5666d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Enum x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql new file mode 100644 index 000000000000..79486fad3eb5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Enum x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql new file mode 100644 index 000000000000..218e5ee494b1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Enum x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql new file mode 100644 index 000000000000..35af7d9d396f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Enum x +where toBeTested(x) and not x.isUnknown() +select x, x.getVariantList() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql new file mode 100644 index 000000000000..b437e30e2ca8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Enum x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql new file mode 100644 index 000000000000..b9aaa3f34993 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Enum x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Enum/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Enum/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Enum/gen_enum.rs b/rust/ql/test/extractor-tests/generated/Enum/gen_enum.rs new file mode 100644 index 000000000000..0711920e4ca0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Enum/gen_enum.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_enum() -> () { + // A Enum. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql new file mode 100644 index 000000000000..8400769a595f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternBlock x, string hasAbi, int getNumberOfAttrs, string hasExternItemList +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExternItemList() then hasExternItemList = "yes" else hasExternItemList = "no" +select x, "hasAbi:", hasAbi, "getNumberOfAttrs:", getNumberOfAttrs, "hasExternItemList:", + hasExternItemList diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql new file mode 100644 index 000000000000..d713045ef755 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternBlock x +where toBeTested(x) and not x.isUnknown() +select x, x.getAbi() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql new file mode 100644 index 000000000000..2ac7fc2aa724 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternBlock x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql new file mode 100644 index 000000000000..6d04cb67441a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternBlock x +where toBeTested(x) and not x.isUnknown() +select x, x.getExternItemList() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/gen_extern_block.rs b/rust/ql/test/extractor-tests/generated/ExternBlock/gen_extern_block.rs new file mode 100644 index 000000000000..8ba8ca6532a4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/gen_extern_block.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_extern_block() -> () { + // A ExternBlock. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql new file mode 100644 index 000000000000..56ebb02461ad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternCrate x, int getNumberOfAttrs, string hasNameRef, string hasRename, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no") and + (if x.hasRename() then hasRename = "yes" else hasRename = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasNameRef:", hasNameRef, "hasRename:", hasRename, + "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql new file mode 100644 index 000000000000..68edd573a7a0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternCrate x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.ql new file mode 100644 index 000000000000..3a9fcac37748 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternCrate x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql new file mode 100644 index 000000000000..82df3d60e05a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternCrate x +where toBeTested(x) and not x.isUnknown() +select x, x.getRename() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql new file mode 100644 index 000000000000..e7a9b316e1bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternCrate x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/gen_extern_crate.rs b/rust/ql/test/extractor-tests/generated/ExternCrate/gen_extern_crate.rs new file mode 100644 index 000000000000..88a4a7e0b9d9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/gen_extern_crate.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_extern_crate() -> () { + // A ExternCrate. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql new file mode 100644 index 000000000000..e9530f3c1aa8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternItemList x, int getNumberOfAttrs, int getNumberOfExternItems +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfExternItems = x.getNumberOfExternItems() +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfExternItems:", getNumberOfExternItems diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql new file mode 100644 index 000000000000..33a1c2f4c5ca --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternItemList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql new file mode 100644 index 000000000000..d4be03a1d479 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ExternItemList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getExternItem(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ExternItemList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/gen_extern_item_list.rs b/rust/ql/test/extractor-tests/generated/ExternItemList/gen_extern_item_list.rs new file mode 100644 index 000000000000..80577fc78fb0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/gen_extern_item_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_extern_item_list() -> () { + // A ExternItemList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.ql b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.ql new file mode 100644 index 000000000000..b5b871c4f271 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FnPtrType x, string hasAbi, string hasParamList, string hasRetType +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and + (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and + if x.hasRetType() then hasRetType = "yes" else hasRetType = "no" +select x, "hasAbi:", hasAbi, "hasParamList:", hasParamList, "hasRetType:", hasRetType diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql new file mode 100644 index 000000000000..cfe7f4ba6fc7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FnPtrType x +where toBeTested(x) and not x.isUnknown() +select x, x.getAbi() diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql new file mode 100644 index 000000000000..718885c3be08 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FnPtrType x +where toBeTested(x) and not x.isUnknown() +select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql new file mode 100644 index 000000000000..39bece0dbebb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FnPtrType x +where toBeTested(x) and not x.isUnknown() +select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/FnPtrType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/gen_fn_ptr_type.rs b/rust/ql/test/extractor-tests/generated/FnPtrType/gen_fn_ptr_type.rs new file mode 100644 index 000000000000..6f58b0cc5203 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FnPtrType/gen_fn_ptr_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_fn_ptr_type() -> () { + // A FnPtrType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql new file mode 100644 index 000000000000..ef1999ff4a9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql @@ -0,0 +1,17 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + ForExpr x, int getNumberOfAttrs, string hasIterable, string hasLabel, string hasLoopBody, + string hasPat +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasIterable() then hasIterable = "yes" else hasIterable = "no") and + (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and + (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasIterable:", hasIterable, "hasLabel:", hasLabel, + "hasLoopBody:", hasLoopBody, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql new file mode 100644 index 000000000000..c348759b84ee --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql new file mode 100644 index 000000000000..742189903504 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getIterable() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql new file mode 100644 index 000000000000..019495fcf98c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql new file mode 100644 index 000000000000..5cc166fa96f5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLoopBody() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql new file mode 100644 index 000000000000..9f83218ea31e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/gen_for_expr.rs b/rust/ql/test/extractor-tests/generated/ForExpr/gen_for_expr.rs new file mode 100644 index 000000000000..bda4a972556e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/gen_for_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_for_expr() -> () { + // A ForExpr. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ForType/ForType.ql b/rust/ql/test/extractor-tests/generated/ForType/ForType.ql new file mode 100644 index 000000000000..fd98b365bfc0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForType/ForType.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForType x, string hasGenericParamList, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasGenericParamList:", hasGenericParamList, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql new file mode 100644 index 000000000000..7a2c53aba83a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForType x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.ql b/rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.ql new file mode 100644 index 000000000000..4ed564967a12 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/ForType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ForType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ForType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ForType/gen_for_type.rs b/rust/ql/test/extractor-tests/generated/ForType/gen_for_type.rs new file mode 100644 index 000000000000..f44e4411a047 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForType/gen_for_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_for_type() -> () { + // A ForType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.ql b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.ql new file mode 100644 index 000000000000..428bd82909f5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsArg x, string hasExpr, string hasName +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasName() then hasName = "yes" else hasName = "no" +select x, "hasExpr:", hasExpr, "hasName:", hasName diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.ql new file mode 100644 index 000000000000..ee67794f93ac --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.ql b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.ql new file mode 100644 index 000000000000..8f4bdb2a0c84 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsArg/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/gen_format_args_arg.rs b/rust/ql/test/extractor-tests/generated/FormatArgsArg/gen_format_args_arg.rs new file mode 100644 index 000000000000..6f189e15de6e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsArg/gen_format_args_arg.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_format_args_arg() -> () { + // A FormatArgsArg. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql new file mode 100644 index 000000000000..4d5bcf051735 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsExpr x, int getNumberOfArgs, int getNumberOfAttrs, string hasTemplate +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfArgs = x.getNumberOfArgs() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasTemplate() then hasTemplate = "yes" else hasTemplate = "no" +select x, "getNumberOfArgs:", getNumberOfArgs, "getNumberOfAttrs:", getNumberOfAttrs, + "hasTemplate:", hasTemplate diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql new file mode 100644 index 000000000000..1bf575a0f868 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql new file mode 100644 index 000000000000..bfaf15b6ff5a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql new file mode 100644 index 000000000000..b43b24ed4f23 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTemplate() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/gen_format_args_expr.rs b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/gen_format_args_expr.rs new file mode 100644 index 000000000000..7345a633ba5d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/gen_format_args_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_format_args_expr() -> () { + // A FormatArgsExpr. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql new file mode 100644 index 000000000000..b79afcf33f75 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from GenericParamList x, int getNumberOfGenericParams +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfGenericParams = x.getNumberOfGenericParams() +select x, "getNumberOfGenericParams:", getNumberOfGenericParams diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql new file mode 100644 index 000000000000..323c11e3841e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from GenericParamList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getGenericParam(index) diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/GenericParamList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/gen_generic_param_list.rs b/rust/ql/test/extractor-tests/generated/GenericParamList/gen_generic_param_list.rs new file mode 100644 index 000000000000..a6b4414d2b5b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericParamList/gen_generic_param_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_generic_param_list() -> () { + // A GenericParamList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl.ql new file mode 100644 index 000000000000..72e934f58c61 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl.ql @@ -0,0 +1,20 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Impl x, string hasAssocItemList, int getNumberOfAttrs, string hasGenericParamList, + string hasSelfTy, string hasTrait, string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasAssocItemList() then hasAssocItemList = "yes" else hasAssocItemList = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasSelfTy() then hasSelfTy = "yes" else hasSelfTy = "no") and + (if x.hasTrait() then hasTrait = "yes" else hasTrait = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "hasAssocItemList:", hasAssocItemList, "getNumberOfAttrs:", getNumberOfAttrs, + "hasGenericParamList:", hasGenericParamList, "hasSelfTy:", hasSelfTy, "hasTrait:", hasTrait, + "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql new file mode 100644 index 000000000000..8365b6b0dfe4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x +where toBeTested(x) and not x.isUnknown() +select x, x.getAssocItemList() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql new file mode 100644 index 000000000000..d6c01005755b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql new file mode 100644 index 000000000000..2b24c7d73a99 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql new file mode 100644 index 000000000000..283903e8d34b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x +where toBeTested(x) and not x.isUnknown() +select x, x.getSelfTy() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql new file mode 100644 index 000000000000..7551a5e960ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x +where toBeTested(x) and not x.isUnknown() +select x, x.getTrait() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql new file mode 100644 index 000000000000..f50c36bc8343 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql new file mode 100644 index 000000000000..e2e87ef03c4e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Impl x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Impl/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Impl/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Impl/gen_impl.rs b/rust/ql/test/extractor-tests/generated/Impl/gen_impl.rs new file mode 100644 index 000000000000..41254299a94a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/gen_impl.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_impl() -> () { + // A Impl. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql b/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql new file mode 100644 index 000000000000..d4cfdef4778c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ImplTraitType x, string hasTypeBoundList +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" +select x, "hasTypeBoundList:", hasTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql new file mode 100644 index 000000000000..132a6001355f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ImplTraitType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ImplTraitType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitType/gen_impl_trait_type.rs b/rust/ql/test/extractor-tests/generated/ImplTraitType/gen_impl_trait_type.rs new file mode 100644 index 000000000000..3f50d59edbd3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ImplTraitType/gen_impl_trait_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_impl_trait_type() -> () { + // A ImplTraitType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/InferType/InferType.ql b/rust/ql/test/extractor-tests/generated/InferType/InferType.ql new file mode 100644 index 000000000000..88b42a4d53f6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InferType/InferType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from InferType x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/InferType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/InferType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/InferType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/InferType/gen_infer_type.rs b/rust/ql/test/extractor-tests/generated/InferType/gen_infer_type.rs new file mode 100644 index 000000000000..c65f65c22306 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InferType/gen_infer_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_infer_type() -> () { + // A InferType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql new file mode 100644 index 000000000000..b656fd735009 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ItemList x, int getNumberOfAttrs, int getNumberOfItems +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfItems = x.getNumberOfItems() +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfItems:", getNumberOfItems diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql new file mode 100644 index 000000000000..b49e5c18d37d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ItemList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql new file mode 100644 index 000000000000..f9e65903fe96 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ItemList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getItem(index) diff --git a/rust/ql/test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ItemList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ItemList/gen_item_list.rs b/rust/ql/test/extractor-tests/generated/ItemList/gen_item_list.rs new file mode 100644 index 000000000000..5866f8da8914 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ItemList/gen_item_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_item_list() -> () { + // A ItemList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql new file mode 100644 index 000000000000..288e99d5a47c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetElse x, string hasBlockExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasBlockExpr() then hasBlockExpr = "yes" else hasBlockExpr = "no" +select x, "hasBlockExpr:", hasBlockExpr diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql b/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql new file mode 100644 index 000000000000..daebdb306132 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetElse x +where toBeTested(x) and not x.isUnknown() +select x, x.getBlockExpr() diff --git a/rust/ql/test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LetElse/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LetElse/gen_let_else.rs b/rust/ql/test/extractor-tests/generated/LetElse/gen_let_else.rs new file mode 100644 index 000000000000..3bd4a6254487 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetElse/gen_let_else.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_let_else() -> () { + // A LetElse. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql new file mode 100644 index 000000000000..e07b53ec7a02 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Lifetime x, string hasText +where + toBeTested(x) and + not x.isUnknown() and + if x.hasText() then hasText = "yes" else hasText = "no" +select x, "hasText:", hasText diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql new file mode 100644 index 000000000000..471b3a2405b3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Lifetime x +where toBeTested(x) and not x.isUnknown() +select x, x.getText() diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Lifetime/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/gen_lifetime.rs b/rust/ql/test/extractor-tests/generated/Lifetime/gen_lifetime.rs new file mode 100644 index 000000000000..700261e2af55 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Lifetime/gen_lifetime.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_lifetime() -> () { + // A Lifetime. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql new file mode 100644 index 000000000000..83033e27af9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LifetimeArg x, string hasLifetime +where + toBeTested(x) and + not x.isUnknown() and + if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" +select x, "hasLifetime:", hasLifetime diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql new file mode 100644 index 000000000000..0fe36ad85149 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LifetimeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeArg/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/gen_lifetime_arg.rs b/rust/ql/test/extractor-tests/generated/LifetimeArg/gen_lifetime_arg.rs new file mode 100644 index 000000000000..cb03015cad0a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeArg/gen_lifetime_arg.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_lifetime_arg() -> () { + // A LifetimeArg. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql new file mode 100644 index 000000000000..abe4635c285b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LifetimeParam x, int getNumberOfAttrs, string hasLifetime, string hasTypeBoundList +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and + if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime, "hasTypeBoundList:", + hasTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql new file mode 100644 index 000000000000..6053ca9b5fea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LifetimeParam x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql new file mode 100644 index 000000000000..0cc315fabe0f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LifetimeParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql new file mode 100644 index 000000000000..673701670844 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LifetimeParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/gen_lifetime_param.rs b/rust/ql/test/extractor-tests/generated/LifetimeParam/gen_lifetime_param.rs new file mode 100644 index 000000000000..7b55f1346653 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/gen_lifetime_param.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_lifetime_param() -> () { + // A LifetimeParam. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql new file mode 100644 index 000000000000..6ae14827e5ad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroCall x, int getNumberOfAttrs, string hasPath, string hasTokenTree +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + if x.hasTokenTree() then hasTokenTree = "yes" else hasTokenTree = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasPath:", hasPath, "hasTokenTree:", hasTokenTree diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql new file mode 100644 index 000000000000..ef6a94400f02 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroCall x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql new file mode 100644 index 000000000000..729ce15fb3f6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroCall x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql new file mode 100644 index 000000000000..3186e5c62974 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroCall x +where toBeTested(x) and not x.isUnknown() +select x, x.getTokenTree() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/gen_macro_call.rs b/rust/ql/test/extractor-tests/generated/MacroCall/gen_macro_call.rs new file mode 100644 index 000000000000..33b3ec161245 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/gen_macro_call.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_macro_call() -> () { + // A MacroCall. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql new file mode 100644 index 000000000000..ac6eb7e901c8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql @@ -0,0 +1,17 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + MacroDef x, string hasArgs, int getNumberOfAttrs, string hasBody, string hasName, + string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasArgs() then hasArgs = "yes" else hasArgs = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasBody() then hasBody = "yes" else hasBody = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "hasArgs:", hasArgs, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, + "hasName:", hasName, "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql new file mode 100644 index 000000000000..304f6f8d5e33 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroDef x +where toBeTested(x) and not x.isUnknown() +select x, x.getArgs() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql new file mode 100644 index 000000000000..28e5f418c01c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroDef x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql new file mode 100644 index 000000000000..0c2f4e329fdb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroDef x +where toBeTested(x) and not x.isUnknown() +select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql new file mode 100644 index 000000000000..49cba18e277b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroDef x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql new file mode 100644 index 000000000000..11323b3a581e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroDef x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/gen_macro_def.rs b/rust/ql/test/extractor-tests/generated/MacroDef/gen_macro_def.rs new file mode 100644 index 000000000000..7fdd2aea7569 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/gen_macro_def.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_macro_def() -> () { + // A MacroDef. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql new file mode 100644 index 000000000000..a2c2d4315125 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroExpr x, string hasMacroCall +where + toBeTested(x) and + not x.isUnknown() and + if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" +select x, "hasMacroCall:", hasMacroCall diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql new file mode 100644 index 000000000000..7c1d6c44c26a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getMacroCall() diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/gen_macro_expr.rs b/rust/ql/test/extractor-tests/generated/MacroExpr/gen_macro_expr.rs new file mode 100644 index 000000000000..245187b18533 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/gen_macro_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_macro_expr() -> () { + // A MacroExpr. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MacroPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql new file mode 100644 index 000000000000..d54889e043b4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroPat x, string hasMacroCall +where + toBeTested(x) and + not x.isUnknown() and + if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" +select x, "hasMacroCall:", hasMacroCall diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql new file mode 100644 index 000000000000..9c8f0846ede4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getMacroCall() diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/gen_macro_pat.rs b/rust/ql/test/extractor-tests/generated/MacroPat/gen_macro_pat.rs new file mode 100644 index 000000000000..bfd718fe9285 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroPat/gen_macro_pat.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_macro_pat() -> () { + // A MacroPat. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql new file mode 100644 index 000000000000..c17c5085c237 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroRules x, int getNumberOfAttrs, string hasName, string hasTokenTree, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTokenTree() then hasTokenTree = "yes" else hasTokenTree = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasName:", hasName, "hasTokenTree:", hasTokenTree, + "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql new file mode 100644 index 000000000000..4fa5d762c629 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroRules x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql new file mode 100644 index 000000000000..7a1fd49401aa --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroRules x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql new file mode 100644 index 000000000000..7fae79438fcb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroRules x +where toBeTested(x) and not x.isUnknown() +select x, x.getTokenTree() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql new file mode 100644 index 000000000000..bd50e49e339c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroRules x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/gen_macro_rules.rs b/rust/ql/test/extractor-tests/generated/MacroRules/gen_macro_rules.rs new file mode 100644 index 000000000000..19c15ac5f784 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/gen_macro_rules.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_macro_rules() -> () { + // A MacroRules. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MacroType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MacroType/MacroType.ql b/rust/ql/test/extractor-tests/generated/MacroType/MacroType.ql new file mode 100644 index 000000000000..6fcbdc8617a1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroType/MacroType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroType x, string hasMacroCall +where + toBeTested(x) and + not x.isUnknown() and + if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" +select x, "hasMacroCall:", hasMacroCall diff --git a/rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.ql new file mode 100644 index 000000000000..d7c5035f79b6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroType x +where toBeTested(x) and not x.isUnknown() +select x, x.getMacroCall() diff --git a/rust/ql/test/extractor-tests/generated/MacroType/gen_macro_type.rs b/rust/ql/test/extractor-tests/generated/MacroType/gen_macro_type.rs new file mode 100644 index 000000000000..31f93e580a21 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroType/gen_macro_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_macro_type() -> () { + // A MacroType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArmList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql new file mode 100644 index 000000000000..be4583a9501c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArmList x, int getNumberOfArms, int getNumberOfAttrs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfArms = x.getNumberOfArms() and + getNumberOfAttrs = x.getNumberOfAttrs() +select x, "getNumberOfArms:", getNumberOfArms, "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql new file mode 100644 index 000000000000..3d29c5731586 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArmList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArm(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql new file mode 100644 index 000000000000..0992c49ba305 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchArmList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/gen_match_arm_list.rs b/rust/ql/test/extractor-tests/generated/MatchArmList/gen_match_arm_list.rs new file mode 100644 index 000000000000..b2192f929e2c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/gen_match_arm_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_match_arm_list() -> () { + // A MatchArmList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/MatchGuard/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql new file mode 100644 index 000000000000..d31138b1d957 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchGuard x, string hasCondition +where + toBeTested(x) and + not x.isUnknown() and + if x.hasCondition() then hasCondition = "yes" else hasCondition = "no" +select x, "hasCondition:", hasCondition diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql new file mode 100644 index 000000000000..1334666a960e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchGuard x +where toBeTested(x) and not x.isUnknown() +select x, x.getCondition() diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/gen_match_guard.rs b/rust/ql/test/extractor-tests/generated/MatchGuard/gen_match_guard.rs new file mode 100644 index 000000000000..9e45b8c3564e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchGuard/gen_match_guard.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_match_guard() -> () { + // A MatchGuard. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Meta/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Meta/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta.ql new file mode 100644 index 000000000000..7d476131b8cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Meta/Meta.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Meta x, string hasExpr, string hasPath, string hasTokenTree +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + if x.hasTokenTree() then hasTokenTree = "yes" else hasTokenTree = "no" +select x, "hasExpr:", hasExpr, "hasPath:", hasPath, "hasTokenTree:", hasTokenTree diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql new file mode 100644 index 000000000000..a93132dd15a9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Meta x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql new file mode 100644 index 000000000000..759c013a975e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Meta x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql new file mode 100644 index 000000000000..b0425a57bd37 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Meta x +where toBeTested(x) and not x.isUnknown() +select x, x.getTokenTree() diff --git a/rust/ql/test/extractor-tests/generated/Meta/gen_meta.rs b/rust/ql/test/extractor-tests/generated/Meta/gen_meta.rs new file mode 100644 index 000000000000..204fb3bd7de6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Meta/gen_meta.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_meta() -> () { + // A Meta. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Name/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Name/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Name/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Name/Name.ql b/rust/ql/test/extractor-tests/generated/Name/Name.ql new file mode 100644 index 000000000000..6685f4f9b7ae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Name/Name.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Name x, string hasText +where + toBeTested(x) and + not x.isUnknown() and + if x.hasText() then hasText = "yes" else hasText = "no" +select x, "hasText:", hasText diff --git a/rust/ql/test/extractor-tests/generated/Name/Name_getText.ql b/rust/ql/test/extractor-tests/generated/Name/Name_getText.ql new file mode 100644 index 000000000000..90ff2d3e04bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Name/Name_getText.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Name x +where toBeTested(x) and not x.isUnknown() +select x, x.getText() diff --git a/rust/ql/test/extractor-tests/generated/Name/gen_name.rs b/rust/ql/test/extractor-tests/generated/Name/gen_name.rs new file mode 100644 index 000000000000..6b09a11fc12a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Name/gen_name.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_name() -> () { + // A Name. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/NameRef/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql new file mode 100644 index 000000000000..cb5ab8652f8a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from NameRef x, string hasText +where + toBeTested(x) and + not x.isUnknown() and + if x.hasText() then hasText = "yes" else hasText = "no" +select x, "hasText:", hasText diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql new file mode 100644 index 000000000000..daa44134dca8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from NameRef x +where toBeTested(x) and not x.isUnknown() +select x, x.getText() diff --git a/rust/ql/test/extractor-tests/generated/NameRef/gen_name_ref.rs b/rust/ql/test/extractor-tests/generated/NameRef/gen_name_ref.rs new file mode 100644 index 000000000000..fe161cef749f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NameRef/gen_name_ref.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_name_ref() -> () { + // A NameRef. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/NeverType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/NeverType/NeverType.ql b/rust/ql/test/extractor-tests/generated/NeverType/NeverType.ql new file mode 100644 index 000000000000..b093d5f1ee5b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NeverType/NeverType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from NeverType x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/NeverType/gen_never_type.rs b/rust/ql/test/extractor-tests/generated/NeverType/gen_never_type.rs new file mode 100644 index 000000000000..f84b6dc6c0ad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NeverType/gen_never_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_never_type() -> () { + // A NeverType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Param/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Param/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Param/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Param/Param.ql b/rust/ql/test/extractor-tests/generated/Param/Param.ql new file mode 100644 index 000000000000..6e022c29db92 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Param/Param.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Param x, int getNumberOfAttrs, string hasPat, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasPat() then hasPat = "yes" else hasPat = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasPat:", hasPat, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql b/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql new file mode 100644 index 000000000000..72c788635317 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Param x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql b/rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql new file mode 100644 index 000000000000..5e8e11356c79 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Param x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getTy.ql b/rust/ql/test/extractor-tests/generated/Param/Param_getTy.ql new file mode 100644 index 000000000000..360f8b65bd7d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Param/Param_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Param x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/Param/gen_param.rs b/rust/ql/test/extractor-tests/generated/Param/gen_param.rs new file mode 100644 index 000000000000..5bc96d632198 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Param/gen_param.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_param() -> () { + // A Param. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ParamList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql new file mode 100644 index 000000000000..9e65fbf7f7f7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParamList x, int getNumberOfParams, string hasSelfParam +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfParams = x.getNumberOfParams() and + if x.hasSelfParam() then hasSelfParam = "yes" else hasSelfParam = "no" +select x, "getNumberOfParams:", getNumberOfParams, "hasSelfParam:", hasSelfParam diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql new file mode 100644 index 000000000000..d0a24b094092 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParamList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getParam(index) diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql new file mode 100644 index 000000000000..bdd98b434d71 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParamList x +where toBeTested(x) and not x.isUnknown() +select x, x.getSelfParam() diff --git a/rust/ql/test/extractor-tests/generated/ParamList/gen_param_list.rs b/rust/ql/test/extractor-tests/generated/ParamList/gen_param_list.rs new file mode 100644 index 000000000000..7f25b68c774b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParamList/gen_param_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_param_list() -> () { + // A ParamList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql new file mode 100644 index 000000000000..114bf888239b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql new file mode 100644 index 000000000000..c2352453b9a5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql new file mode 100644 index 000000000000..c8a007478c38 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/gen_paren_expr.rs b/rust/ql/test/extractor-tests/generated/ParenExpr/gen_paren_expr.rs new file mode 100644 index 000000000000..954e1878ee3e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/gen_paren_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_paren_expr() -> () { + // A ParenExpr. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ParenPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql new file mode 100644 index 000000000000..bf9724edde3a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenPat x, string hasPat +where + toBeTested(x) and + not x.isUnknown() and + if x.hasPat() then hasPat = "yes" else hasPat = "no" +select x, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql new file mode 100644 index 000000000000..648fbfd9df08 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/gen_paren_pat.rs b/rust/ql/test/extractor-tests/generated/ParenPat/gen_paren_pat.rs new file mode 100644 index 000000000000..9c24db9dce7e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenPat/gen_paren_pat.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_paren_pat() -> () { + // A ParenPat. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ParenType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ParenType/ParenType.ql b/rust/ql/test/extractor-tests/generated/ParenType/ParenType.ql new file mode 100644 index 000000000000..e704767d6314 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenType/ParenType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenType x, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.ql b/rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.ql new file mode 100644 index 000000000000..b472d03f718c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/ParenType/gen_paren_type.rs b/rust/ql/test/extractor-tests/generated/ParenType/gen_paren_type.rs new file mode 100644 index 000000000000..ad07406451be --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenType/gen_paren_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_paren_type() -> () { + // A ParenType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/PathSegment/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.ql new file mode 100644 index 000000000000..cf18bedaced3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.ql @@ -0,0 +1,20 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + PathSegment x, string hasGenericArgList, string hasNameRef, string hasParamList, + string hasPathType, string hasRetType, string hasReturnTypeSyntax, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and + (if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no") and + (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and + (if x.hasPathType() then hasPathType = "yes" else hasPathType = "no") and + (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and + (if x.hasReturnTypeSyntax() then hasReturnTypeSyntax = "yes" else hasReturnTypeSyntax = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasGenericArgList:", hasGenericArgList, "hasNameRef:", hasNameRef, "hasParamList:", + hasParamList, "hasPathType:", hasPathType, "hasRetType:", hasRetType, "hasReturnTypeSyntax:", + hasReturnTypeSyntax, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql new file mode 100644 index 000000000000..a93675780034 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericArgList() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql new file mode 100644 index 000000000000..6a68a4d7bba2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getNameRef() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql new file mode 100644 index 000000000000..761c43ad8ec5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql new file mode 100644 index 000000000000..6131393c89af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getPathType() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql new file mode 100644 index 000000000000..311642a5f859 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql new file mode 100644 index 000000000000..f978f70c8a6c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getReturnTypeSyntax() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql new file mode 100644 index 000000000000..6445000c2a47 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathSegment x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs b/rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs new file mode 100644 index 000000000000..0ab008b6a685 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_path_segment() -> () { + // A PathSegment. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/PathType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/PathType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/PathType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType.ql b/rust/ql/test/extractor-tests/generated/PathType/PathType.ql new file mode 100644 index 000000000000..a064955c56fe --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathType/PathType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathType x, string hasPath +where + toBeTested(x) and + not x.isUnknown() and + if x.hasPath() then hasPath = "yes" else hasPath = "no" +select x, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.ql b/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.ql new file mode 100644 index 000000000000..991efc310379 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathType x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/PathType/gen_path_type.rs b/rust/ql/test/extractor-tests/generated/PathType/gen_path_type.rs new file mode 100644 index 000000000000..e7666e2128a6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathType/gen_path_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_path_type() -> () { + // A PathType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/PtrType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PtrType/PtrType.ql b/rust/ql/test/extractor-tests/generated/PtrType/PtrType.ql new file mode 100644 index 000000000000..4b64e7c0efe4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PtrType/PtrType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PtrType x, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.ql b/rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.ql new file mode 100644 index 000000000000..4b42d47161a3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PtrType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/PtrType/gen_ptr_type.rs b/rust/ql/test/extractor-tests/generated/PtrType/gen_ptr_type.rs new file mode 100644 index 000000000000..1a7e8960f1d1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PtrType/gen_ptr_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_ptr_type() -> () { + // A PtrType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql new file mode 100644 index 000000000000..a68e94bea3f5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprFieldList x, int getNumberOfAttrs, int getNumberOfFields, string hasSpread +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfFields = x.getNumberOfFields() and + if x.hasSpread() then hasSpread = "yes" else hasSpread = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields, + "hasSpread:", hasSpread diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql new file mode 100644 index 000000000000..546c4cdda0ac --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprFieldList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql new file mode 100644 index 000000000000..47d0784b8a90 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprFieldList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql new file mode 100644 index 000000000000..494e680c8cf5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExprFieldList x +where toBeTested(x) and not x.isUnknown() +select x, x.getSpread() diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/gen_record_expr_field_list.rs b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/gen_record_expr_field_list.rs new file mode 100644 index 000000000000..bb00282cad3f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/gen_record_expr_field_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_record_expr_field_list() -> () { + // A RecordExprFieldList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordField/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField.ql b/rust/ql/test/extractor-tests/generated/RecordField/RecordField.ql new file mode 100644 index 000000000000..a54b29b82156 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordField/RecordField.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordField x, int getNumberOfAttrs, string hasName, string hasTy, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasName:", hasName, "hasTy:", hasTy, + "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.ql b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.ql new file mode 100644 index 000000000000..ba85fae117fd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordField x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.ql b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.ql new file mode 100644 index 000000000000..07c40f02c8ba --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordField x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.ql b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.ql new file mode 100644 index 000000000000..1abbb150b25e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordField x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql new file mode 100644 index 000000000000..b20e05587d91 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordField x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/RecordField/gen_record_field.rs b/rust/ql/test/extractor-tests/generated/RecordField/gen_record_field.rs new file mode 100644 index 000000000000..ece43571ef89 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordField/gen_record_field.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_record_field() -> () { + // A RecordField. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordFieldList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql b/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql new file mode 100644 index 000000000000..6fdb617e3112 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordFieldList x, int getNumberOfFields +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfFields = x.getNumberOfFields() +select x, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql new file mode 100644 index 000000000000..8a20f3de13fd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordFieldList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldList/gen_record_field_list.rs b/rust/ql/test/extractor-tests/generated/RecordFieldList/gen_record_field_list.rs new file mode 100644 index 000000000000..34add5d3754d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldList/gen_record_field_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_record_field_list() -> () { + // A RecordFieldList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql new file mode 100644 index 000000000000..527f6722cd20 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatFieldList x, int getNumberOfFields, string hasRestPat +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfFields = x.getNumberOfFields() and + if x.hasRestPat() then hasRestPat = "yes" else hasRestPat = "no" +select x, "getNumberOfFields:", getNumberOfFields, "hasRestPat:", hasRestPat diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql new file mode 100644 index 000000000000..21a45ead5355 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatFieldList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql new file mode 100644 index 000000000000..82877cbe6ba1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordPatFieldList x +where toBeTested(x) and not x.isUnknown() +select x, x.getRestPat() diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/gen_record_pat_field_list.rs b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/gen_record_pat_field_list.rs new file mode 100644 index 000000000000..b2f5d70cd575 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/gen_record_pat_field_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_record_pat_field_list() -> () { + // A RecordPatFieldList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RefType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RefType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RefType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RefType/RefType.ql b/rust/ql/test/extractor-tests/generated/RefType/RefType.ql new file mode 100644 index 000000000000..63537e176306 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefType/RefType.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefType x, string hasLifetime, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasLifetime:", hasLifetime, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.ql b/rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.ql new file mode 100644 index 000000000000..897c4ef519d7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefType x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.ql b/rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.ql new file mode 100644 index 000000000000..43df7ca037c1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/RefType/gen_ref_type.rs b/rust/ql/test/extractor-tests/generated/RefType/gen_ref_type.rs new file mode 100644 index 000000000000..dacb6fc482d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefType/gen_ref_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_ref_type() -> () { + // A RefType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Rename/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Rename/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Rename/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename.ql b/rust/ql/test/extractor-tests/generated/Rename/Rename.ql new file mode 100644 index 000000000000..91e748797f2c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Rename/Rename.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Rename x, string hasName +where + toBeTested(x) and + not x.isUnknown() and + if x.hasName() then hasName = "yes" else hasName = "no" +select x, "hasName:", hasName diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql b/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql new file mode 100644 index 000000000000..59df9dcf5cae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Rename x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Rename/gen_rename.rs b/rust/ql/test/extractor-tests/generated/Rename/gen_rename.rs new file mode 100644 index 000000000000..8d8ca68ce357 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Rename/gen_rename.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_rename() -> () { + // A Rename. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RestPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql new file mode 100644 index 000000000000..c3cb2a24f832 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RestPat x, int getNumberOfAttrs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() +select x, "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql new file mode 100644 index 000000000000..e85a7975b6be --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RestPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RestPat/gen_rest_pat.rs b/rust/ql/test/extractor-tests/generated/RestPat/gen_rest_pat.rs new file mode 100644 index 000000000000..0f7b95b93f20 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RestPat/gen_rest_pat.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_rest_pat() -> () { + // A RestPat. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/RetType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RetType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/RetType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RetType/RetType.ql b/rust/ql/test/extractor-tests/generated/RetType/RetType.ql new file mode 100644 index 000000000000..c2fd2818d853 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RetType/RetType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RetType x, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.ql b/rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.ql new file mode 100644 index 000000000000..5163cb62b2f4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RetType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/RetType/gen_ret_type.rs b/rust/ql/test/extractor-tests/generated/RetType/gen_ret_type.rs new file mode 100644 index 000000000000..146766cefe3f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RetType/gen_ret_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_ret_type() -> () { + // A RetType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql new file mode 100644 index 000000000000..e29f818af433 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ReturnTypeSyntax x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/gen_return_type_syntax.rs b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/gen_return_type_syntax.rs new file mode 100644 index 000000000000..31601c86b33d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/gen_return_type_syntax.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_return_type_syntax() -> () { + // A ReturnTypeSyntax. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql new file mode 100644 index 000000000000..044de94c3800 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SelfParam x, int getNumberOfAttrs, string hasLifetime, string hasName, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime, "hasName:", hasName, + "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql new file mode 100644 index 000000000000..682c1a9374a9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SelfParam x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql new file mode 100644 index 000000000000..a64eb368a711 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SelfParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql new file mode 100644 index 000000000000..7a99270bfa5f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SelfParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql new file mode 100644 index 000000000000..5c04c13cdf2d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SelfParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs b/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs new file mode 100644 index 000000000000..36f8ffd8baf5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_self_param() -> () { + // A SelfParam. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/SliceType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/SliceType/SliceType.ql b/rust/ql/test/extractor-tests/generated/SliceType/SliceType.ql new file mode 100644 index 000000000000..ebd87495b495 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SliceType/SliceType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SliceType x, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.ql b/rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.ql new file mode 100644 index 000000000000..ff977cdd8fc1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SliceType x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/SliceType/gen_slice_type.rs b/rust/ql/test/extractor-tests/generated/SliceType/gen_slice_type.rs new file mode 100644 index 000000000000..49c11e484ac8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SliceType/gen_slice_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_slice_type() -> () { + // A SliceType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/SourceFile/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql new file mode 100644 index 000000000000..b904bf731a88 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SourceFile x, int getNumberOfAttrs, int getNumberOfItems +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfItems = x.getNumberOfItems() +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfItems:", getNumberOfItems diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql new file mode 100644 index 000000000000..d1842052239c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SourceFile x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql new file mode 100644 index 000000000000..339ea18c216b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SourceFile x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getItem(index) diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/gen_source_file.rs b/rust/ql/test/extractor-tests/generated/SourceFile/gen_source_file.rs new file mode 100644 index 000000000000..5d8e1d2caf47 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/gen_source_file.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_source_file() -> () { + // A SourceFile. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Static/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Static/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Static/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Static/Static.ql b/rust/ql/test/extractor-tests/generated/Static/Static.ql new file mode 100644 index 000000000000..a629119be703 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Static.ql @@ -0,0 +1,16 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Static x, int getNumberOfAttrs, string hasBody, string hasName, string hasTy, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasBody() then hasBody = "yes" else hasBody = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, "hasName:", hasName, "hasTy:", + hasTy, "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql new file mode 100644 index 000000000000..df76d9642d26 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Static x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql new file mode 100644 index 000000000000..3983685f7fab --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Static x +where toBeTested(x) and not x.isUnknown() +select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getName.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getName.ql new file mode 100644 index 000000000000..714d58c38922 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Static_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Static x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getTy.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getTy.ql new file mode 100644 index 000000000000..b1dc6d79529a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Static_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Static x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql new file mode 100644 index 000000000000..7ba134e17bcf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Static x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Static/gen_static.rs b/rust/ql/test/extractor-tests/generated/Static/gen_static.rs new file mode 100644 index 000000000000..cd0e40d3f6ca --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/gen_static.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_static() -> () { + // A Static. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/StmtList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/StmtList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/StmtList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql new file mode 100644 index 000000000000..e24be9ebffe4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from StmtList x, int getNumberOfAttrs, int getNumberOfStatements, string hasTailExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + getNumberOfStatements = x.getNumberOfStatements() and + if x.hasTailExpr() then hasTailExpr = "yes" else hasTailExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfStatements:", getNumberOfStatements, + "hasTailExpr:", hasTailExpr diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql new file mode 100644 index 000000000000..a1a2079e938e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from StmtList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql new file mode 100644 index 000000000000..f895ca9fa016 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from StmtList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql new file mode 100644 index 000000000000..592c60854510 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from StmtList x +where toBeTested(x) and not x.isUnknown() +select x, x.getTailExpr() diff --git a/rust/ql/test/extractor-tests/generated/StmtList/gen_stmt_list.rs b/rust/ql/test/extractor-tests/generated/StmtList/gen_stmt_list.rs new file mode 100644 index 000000000000..cea5eceb1cd3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/gen_stmt_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_stmt_list() -> () { + // A StmtList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Struct/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Struct/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct.ql new file mode 100644 index 000000000000..8f9c02aee179 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct.ql @@ -0,0 +1,19 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Struct x, int getNumberOfAttrs, string hasFieldList, string hasGenericParamList, string hasName, + string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasFieldList() then hasFieldList = "yes" else hasFieldList = "no") and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasFieldList:", hasFieldList, + "hasGenericParamList:", hasGenericParamList, "hasName:", hasName, "hasVisibility:", hasVisibility, + "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql new file mode 100644 index 000000000000..11789c109f0f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Struct x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql new file mode 100644 index 000000000000..cdbdf6a37be4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Struct x +where toBeTested(x) and not x.isUnknown() +select x, x.getFieldList() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql new file mode 100644 index 000000000000..31a30a865f77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Struct x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql new file mode 100644 index 000000000000..40a167b3f2ee --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Struct x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql new file mode 100644 index 000000000000..a86863cb1c77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Struct x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql new file mode 100644 index 000000000000..b1df6874c1d0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Struct x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Struct/gen_struct.rs b/rust/ql/test/extractor-tests/generated/Struct/gen_struct.rs new file mode 100644 index 000000000000..f5b42b79190c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Struct/gen_struct.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_struct() -> () { + // A Struct. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TokenTree/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql b/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql new file mode 100644 index 000000000000..299c1e48b6bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TokenTree x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/TokenTree/gen_token_tree.rs b/rust/ql/test/extractor-tests/generated/TokenTree/gen_token_tree.rs new file mode 100644 index 000000000000..7781391e232a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TokenTree/gen_token_tree.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_token_tree() -> () { + // A TokenTree. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Trait/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Trait/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait.ql new file mode 100644 index 000000000000..a1f58bb68204 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait.ql @@ -0,0 +1,20 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Trait x, string hasAssocItemList, int getNumberOfAttrs, string hasGenericParamList, + string hasName, string hasTypeBoundList, string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasAssocItemList() then hasAssocItemList = "yes" else hasAssocItemList = "no") and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "hasAssocItemList:", hasAssocItemList, "getNumberOfAttrs:", getNumberOfAttrs, + "hasGenericParamList:", hasGenericParamList, "hasName:", hasName, "hasTypeBoundList:", + hasTypeBoundList, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql new file mode 100644 index 000000000000..94a59605021a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x +where toBeTested(x) and not x.isUnknown() +select x, x.getAssocItemList() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql new file mode 100644 index 000000000000..219303af515b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql new file mode 100644 index 000000000000..db979636892f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql new file mode 100644 index 000000000000..eeb7b6f48023 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql new file mode 100644 index 000000000000..f5544da39d35 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql new file mode 100644 index 000000000000..1405d15127ed --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql new file mode 100644 index 000000000000..fb7448f81966 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Trait x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Trait/gen_trait.rs b/rust/ql/test/extractor-tests/generated/Trait/gen_trait.rs new file mode 100644 index 000000000000..c35e33c24ecd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/gen_trait.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_trait() -> () { + // A Trait. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql new file mode 100644 index 000000000000..cd475f68ee48 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql @@ -0,0 +1,19 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + TraitAlias x, int getNumberOfAttrs, string hasGenericParamList, string hasName, + string hasTypeBoundList, string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, + "hasName:", hasName, "hasTypeBoundList:", hasTypeBoundList, "hasVisibility:", hasVisibility, + "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql new file mode 100644 index 000000000000..3ca992de122a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TraitAlias x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql new file mode 100644 index 000000000000..3372d78e89e8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TraitAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql new file mode 100644 index 000000000000..2b64f27e19d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TraitAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql new file mode 100644 index 000000000000..28f7588ec9f6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TraitAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql new file mode 100644 index 000000000000..1dde55e9663f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TraitAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql new file mode 100644 index 000000000000..91e39d5e6464 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TraitAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/gen_trait_alias.rs b/rust/ql/test/extractor-tests/generated/TraitAlias/gen_trait_alias.rs new file mode 100644 index 000000000000..708e0d99e58f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/gen_trait_alias.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_trait_alias() -> () { + // A TraitAlias. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TryExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql new file mode 100644 index 000000000000..be3c70a933ce --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TryExpr x, int getNumberOfAttrs, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql new file mode 100644 index 000000000000..1073bec18600 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TryExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql new file mode 100644 index 000000000000..477a2bb5811e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TryExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/gen_try_expr.rs b/rust/ql/test/extractor-tests/generated/TryExpr/gen_try_expr.rs new file mode 100644 index 000000000000..083dffd3c35e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TryExpr/gen_try_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_try_expr() -> () { + // A TryExpr. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TupleField/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql new file mode 100644 index 000000000000..d3f839684974 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleField x, int getNumberOfAttrs, string hasTy, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTy:", hasTy, "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql new file mode 100644 index 000000000000..23481ed001ad --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleField x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.ql new file mode 100644 index 000000000000..ba0b3bfdbeef --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleField x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql new file mode 100644 index 000000000000..457bbd1a57bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleField x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs b/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs new file mode 100644 index 000000000000..245862c35d7d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_tuple_field() -> () { + // A TupleField. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TupleFieldList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql new file mode 100644 index 000000000000..fd25929804e6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleFieldList x, int getNumberOfFields +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfFields = x.getNumberOfFields() +select x, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql new file mode 100644 index 000000000000..8483c03f1d77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleFieldList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs b/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs new file mode 100644 index 000000000000..5f6858c12ab9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_tuple_field_list() -> () { + // A TupleFieldList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TupleType/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TupleType/TupleType.ql b/rust/ql/test/extractor-tests/generated/TupleType/TupleType.ql new file mode 100644 index 000000000000..785ae988aa0d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleType/TupleType.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleType x, int getNumberOfFields +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfFields = x.getNumberOfFields() +select x, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.ql b/rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.ql new file mode 100644 index 000000000000..c77aa1e03b6c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleType x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleType/gen_tuple_type.rs b/rust/ql/test/extractor-tests/generated/TupleType/gen_tuple_type.rs new file mode 100644 index 000000000000..5e1a26db519a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleType/gen_tuple_type.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_tuple_type() -> () { + // A TupleType. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql new file mode 100644 index 000000000000..10494cb2889d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql @@ -0,0 +1,20 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + TypeAlias x, int getNumberOfAttrs, string hasGenericParamList, string hasName, string hasTy, + string hasTypeBoundList, string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + (if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, + "hasName:", hasName, "hasTy:", hasTy, "hasTypeBoundList:", hasTypeBoundList, "hasVisibility:", + hasVisibility, "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql new file mode 100644 index 000000000000..2eabe53ca6d8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql new file mode 100644 index 000000000000..9742b1a9bb7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql new file mode 100644 index 000000000000..95b90c69e391 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.ql new file mode 100644 index 000000000000..885047b16e9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql new file mode 100644 index 000000000000..6988a3baf7d4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql new file mode 100644 index 000000000000..78bb19e876a1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql new file mode 100644 index 000000000000..becbdac30165 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeAlias x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/gen_type_alias.rs b/rust/ql/test/extractor-tests/generated/TypeAlias/gen_type_alias.rs new file mode 100644 index 000000000000..e7aedd9c1266 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/gen_type_alias.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_type_alias() -> () { + // A TypeAlias. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeArg/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql new file mode 100644 index 000000000000..17a26b5b190e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeArg x, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.ql b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.ql new file mode 100644 index 000000000000..55434bfda46c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeArg x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/gen_type_arg.rs b/rust/ql/test/extractor-tests/generated/TypeArg/gen_type_arg.rs new file mode 100644 index 000000000000..f429e9d21870 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeArg/gen_type_arg.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_type_arg() -> () { + // A TypeArg. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBound/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql new file mode 100644 index 000000000000..06e117fe2242 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeBound x, string hasGenericParamList, string hasLifetime, string hasTy +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and + if x.hasTy() then hasTy = "yes" else hasTy = "no" +select x, "hasGenericParamList:", hasGenericParamList, "hasLifetime:", hasLifetime, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.ql new file mode 100644 index 000000000000..ee3046476010 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeBound x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql new file mode 100644 index 000000000000..267ed0dd7ae8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeBound x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.ql new file mode 100644 index 000000000000..56c8f92d433f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeBound x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/gen_type_bound.rs b/rust/ql/test/extractor-tests/generated/TypeBound/gen_type_bound.rs new file mode 100644 index 000000000000..a5ee2af22368 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBound/gen_type_bound.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_type_bound() -> () { + // A TypeBound. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBoundList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql new file mode 100644 index 000000000000..c5da29061531 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeBoundList x, int getNumberOfBounds +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfBounds = x.getNumberOfBounds() +select x, "getNumberOfBounds:", getNumberOfBounds diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql new file mode 100644 index 000000000000..d06ceb53fae9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeBoundList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getBound(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/gen_type_bound_list.rs b/rust/ql/test/extractor-tests/generated/TypeBoundList/gen_type_bound_list.rs new file mode 100644 index 000000000000..aa2c2992225c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/gen_type_bound_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_type_bound_list() -> () { + // A TypeBoundList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeParam/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql new file mode 100644 index 000000000000..d81ec72681cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql @@ -0,0 +1,15 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + TypeParam x, int getNumberOfAttrs, string hasDefaultType, string hasName, string hasTypeBoundList +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasDefaultType() then hasDefaultType = "yes" else hasDefaultType = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasDefaultType:", hasDefaultType, "hasName:", + hasName, "hasTypeBoundList:", hasTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql new file mode 100644 index 000000000000..fdbefc1b5bdb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeParam x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql new file mode 100644 index 000000000000..8afef31826af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getDefaultType() diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql new file mode 100644 index 000000000000..37b18a8b39c5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql new file mode 100644 index 000000000000..b496a7793a6d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TypeParam x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/gen_type_param.rs b/rust/ql/test/extractor-tests/generated/TypeParam/gen_type_param.rs new file mode 100644 index 000000000000..6d5dbf5dd39b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/gen_type_param.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_type_param() -> () { + // A TypeParam. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Union/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Union/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Union/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Union/Union.ql b/rust/ql/test/extractor-tests/generated/Union/Union.ql new file mode 100644 index 000000000000..4f3d288b0c26 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union.ql @@ -0,0 +1,19 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Union x, int getNumberOfAttrs, string hasGenericParamList, string hasName, + string hasRecordFieldList, string hasVisibility, string hasWhereClause +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + (if x.hasRecordFieldList() then hasRecordFieldList = "yes" else hasRecordFieldList = "no") and + (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and + if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, + "hasName:", hasName, "hasRecordFieldList:", hasRecordFieldList, "hasVisibility:", hasVisibility, + "hasWhereClause:", hasWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql new file mode 100644 index 000000000000..a4ae6761d233 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Union x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql new file mode 100644 index 000000000000..e9ba2bbeef6d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Union x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getName.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getName.ql new file mode 100644 index 000000000000..e452a2ff63e1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Union x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.ql new file mode 100644 index 000000000000..3248a16d2861 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Union x +where toBeTested(x) and not x.isUnknown() +select x, x.getRecordFieldList() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql new file mode 100644 index 000000000000..5b1688250a51 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Union x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql new file mode 100644 index 000000000000..083aea2ba017 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Union x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Union/gen_union.rs b/rust/ql/test/extractor-tests/generated/Union/gen_union.rs new file mode 100644 index 000000000000..ef74acf7f60c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Union/gen_union.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_union() -> () { + // A Union. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Use/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Use/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Use/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Use/Use.ql b/rust/ql/test/extractor-tests/generated/Use/Use.ql new file mode 100644 index 000000000000..1a03f16786ba --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Use/Use.ql @@ -0,0 +1,13 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Use x, int getNumberOfAttrs, string hasUseTree, string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasUseTree() then hasUseTree = "yes" else hasUseTree = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasUseTree:", hasUseTree, "hasVisibility:", + hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql new file mode 100644 index 000000000000..35b975fa0e64 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Use x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql new file mode 100644 index 000000000000..863d1617d409 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Use x +where toBeTested(x) and not x.isUnknown() +select x, x.getUseTree() diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql new file mode 100644 index 000000000000..122499de5818 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Use x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Use/gen_use.rs b/rust/ql/test/extractor-tests/generated/Use/gen_use.rs new file mode 100644 index 000000000000..c61de79f9ff0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Use/gen_use.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_use() -> () { + // A Use. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql new file mode 100644 index 000000000000..e536bed9de03 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql @@ -0,0 +1,12 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UseTree x, string hasPath, string hasRename, string hasUseTreeList +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + (if x.hasRename() then hasRename = "yes" else hasRename = "no") and + if x.hasUseTreeList() then hasUseTreeList = "yes" else hasUseTreeList = "no" +select x, "hasPath:", hasPath, "hasRename:", hasRename, "hasUseTreeList:", hasUseTreeList diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql new file mode 100644 index 000000000000..74f892d46f88 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UseTree x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql new file mode 100644 index 000000000000..754d167eefdf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UseTree x +where toBeTested(x) and not x.isUnknown() +select x, x.getRename() diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql new file mode 100644 index 000000000000..5e57b7a6b695 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UseTree x +where toBeTested(x) and not x.isUnknown() +select x, x.getUseTreeList() diff --git a/rust/ql/test/extractor-tests/generated/UseTree/gen_use_tree.rs b/rust/ql/test/extractor-tests/generated/UseTree/gen_use_tree.rs new file mode 100644 index 000000000000..f0a87b1a650c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTree/gen_use_tree.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_use_tree() -> () { + // A UseTree. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/UseTreeList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/UseTreeList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql new file mode 100644 index 000000000000..ebcfc59a58f8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UseTreeList x, int getNumberOfUseTrees +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfUseTrees = x.getNumberOfUseTrees() +select x, "getNumberOfUseTrees:", getNumberOfUseTrees diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql new file mode 100644 index 000000000000..dc7262d7ab5f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UseTreeList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getUseTree(index) diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/gen_use_tree_list.rs b/rust/ql/test/extractor-tests/generated/UseTreeList/gen_use_tree_list.rs new file mode 100644 index 000000000000..dfbdef694084 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTreeList/gen_use_tree_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_use_tree_list() -> () { + // A UseTreeList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Variant/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Variant/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant.ql new file mode 100644 index 000000000000..2cbcd20cbf06 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant.ql @@ -0,0 +1,17 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + Variant x, int getNumberOfAttrs, string hasExpr, string hasFieldList, string hasName, + string hasVisibility +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + (if x.hasFieldList() then hasFieldList = "yes" else hasFieldList = "no") and + (if x.hasName() then hasName = "yes" else hasName = "no") and + if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasFieldList:", hasFieldList, + "hasName:", hasName, "hasVisibility:", hasVisibility diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql new file mode 100644 index 000000000000..99972ef847dc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Variant x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.ql new file mode 100644 index 000000000000..3836c782dc96 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Variant x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql new file mode 100644 index 000000000000..e1bae7650bac --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Variant x +where toBeTested(x) and not x.isUnknown() +select x, x.getFieldList() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql new file mode 100644 index 000000000000..73f4ff33e403 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Variant x +where toBeTested(x) and not x.isUnknown() +select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql new file mode 100644 index 000000000000..7edb649fbdaa --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Variant x +where toBeTested(x) and not x.isUnknown() +select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Variant/gen_variant.rs b/rust/ql/test/extractor-tests/generated/Variant/gen_variant.rs new file mode 100644 index 000000000000..37e7506e2bcc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/gen_variant.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_variant() -> () { + // A Variant. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/VariantList/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/VariantList/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/VariantList/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql new file mode 100644 index 000000000000..213e4d447dc4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from VariantList x, int getNumberOfVariants +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfVariants = x.getNumberOfVariants() +select x, "getNumberOfVariants:", getNumberOfVariants diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql b/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql new file mode 100644 index 000000000000..fe1800104a3f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from VariantList x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getVariant(index) diff --git a/rust/ql/test/extractor-tests/generated/VariantList/gen_variant_list.rs b/rust/ql/test/extractor-tests/generated/VariantList/gen_variant_list.rs new file mode 100644 index 000000000000..c13f6430cc65 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/VariantList/gen_variant_list.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_variant_list() -> () { + // A VariantList. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/Visibility/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql new file mode 100644 index 000000000000..adf0833c12c6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Visibility x, string hasPath +where + toBeTested(x) and + not x.isUnknown() and + if x.hasPath() then hasPath = "yes" else hasPath = "no" +select x, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql b/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql new file mode 100644 index 000000000000..0f0b641d2129 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from Visibility x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/Visibility/gen_visibility.rs b/rust/ql/test/extractor-tests/generated/Visibility/gen_visibility.rs new file mode 100644 index 000000000000..5dbc762f3e73 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Visibility/gen_visibility.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_visibility() -> () { + // A Visibility. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/WhereClause/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql new file mode 100644 index 000000000000..891b8d55fc22 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhereClause x, int getNumberOfPredicates +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfPredicates = x.getNumberOfPredicates() +select x, "getNumberOfPredicates:", getNumberOfPredicates diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql new file mode 100644 index 000000000000..4b0c8ab7b7dc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhereClause x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getPredicate(index) diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/gen_where_clause.rs b/rust/ql/test/extractor-tests/generated/WhereClause/gen_where_clause.rs new file mode 100644 index 000000000000..ef389c9ee4f4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhereClause/gen_where_clause.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_where_clause() -> () { + // A WhereClause. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql new file mode 100644 index 000000000000..40d5072725d1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql @@ -0,0 +1,15 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from + WherePred x, string hasGenericParamList, string hasLifetime, string hasTy, string hasTypeBoundList +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and + (if x.hasTy() then hasTy = "yes" else hasTy = "no") and + if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" +select x, "hasGenericParamList:", hasGenericParamList, "hasLifetime:", hasLifetime, "hasTy:", hasTy, + "hasTypeBoundList:", hasTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql new file mode 100644 index 000000000000..ef15cd7f4f8e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WherePred x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql new file mode 100644 index 000000000000..a0bd226ca4fe --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WherePred x +where toBeTested(x) and not x.isUnknown() +select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.ql new file mode 100644 index 000000000000..bbb432ddbe7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WherePred x +where toBeTested(x) and not x.isUnknown() +select x, x.getTy() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql new file mode 100644 index 000000000000..0f269fa91406 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WherePred x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/gen_where_pred.rs b/rust/ql/test/extractor-tests/generated/WherePred/gen_where_pred.rs new file mode 100644 index 000000000000..781d4697e20a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/gen_where_pred.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_where_pred() -> () { + // A WherePred. For example: + todo!() +} diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt deleted file mode 100644 index 7f96b17b1f3c..000000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen, do not edit - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql new file mode 100644 index 000000000000..ceb095e9d201 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql @@ -0,0 +1,14 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhileExpr x, int getNumberOfAttrs, string hasCondition, string hasLabel, string hasLoopBody +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasCondition() then hasCondition = "yes" else hasCondition = "no") and + (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and + if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no" +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasCondition:", hasCondition, "hasLabel:", + hasLabel, "hasLoopBody:", hasLoopBody diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql new file mode 100644 index 000000000000..eeb05dcc0b0b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhileExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql new file mode 100644 index 000000000000..184dc6f8a7c6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhileExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getCondition() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql new file mode 100644 index 000000000000..59865e97014f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhileExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql new file mode 100644 index 000000000000..3d19f2e73412 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhileExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLoopBody() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/gen_while_expr.rs b/rust/ql/test/extractor-tests/generated/WhileExpr/gen_while_expr.rs new file mode 100644 index 000000000000..5078a8a794f5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/gen_while_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen, do not edit + +fn test_while_expr() -> () { + // A WhileExpr. For example: + todo!() +} From 69a172c7ba76f20577d0b9d15dc9b3db916e9881 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 20 Sep 2024 11:14:06 +0200 Subject: [PATCH 065/162] Rust: accept trivial expected output --- rust/ql/test/extractor-tests/generated/Abi/Abi.expected | 0 .../extractor-tests/generated/Abi/Abi_getAbiString.expected | 0 .../ql/test/extractor-tests/generated/ArgList/ArgList.expected | 0 .../extractor-tests/generated/ArgList/ArgList_getArg.expected | 0 .../extractor-tests/generated/ArrayType/ArrayType.expected | 0 .../generated/ArrayType/ArrayType_getConstArg.expected | 0 .../generated/ArrayType/ArrayType_getTy.expected | 0 .../generated/AssocItemList/AssocItemList.expected | 0 .../AssocItemList/AssocItemList_getAssocItem.expected | 0 .../generated/AssocItemList/AssocItemList_getAttr.expected | 0 .../generated/AssocTypeArg/AssocTypeArg.expected | 0 .../generated/AssocTypeArg/AssocTypeArg_getConstArg.expected | 0 .../AssocTypeArg/AssocTypeArg_getGenericArgList.expected | 0 .../generated/AssocTypeArg/AssocTypeArg_getNameRef.expected | 0 .../generated/AssocTypeArg/AssocTypeArg_getParamList.expected | 0 .../generated/AssocTypeArg/AssocTypeArg_getRetType.expected | 0 .../AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.expected | 0 .../generated/AssocTypeArg/AssocTypeArg_getTy.expected | 0 .../AssocTypeArg/AssocTypeArg_getTypeBoundList.expected | 0 rust/ql/test/extractor-tests/generated/Attr/Attr.expected | 0 .../test/extractor-tests/generated/Attr/Attr_getMeta.expected | 0 .../generated/ClosureBinder/ClosureBinder.expected | 0 .../ClosureBinder/ClosureBinder_getGenericParamList.expected | 0 rust/ql/test/extractor-tests/generated/Const/Const.expected | 0 .../extractor-tests/generated/Const/Const_getAttr.expected | 0 .../extractor-tests/generated/Const/Const_getBody.expected | 0 .../extractor-tests/generated/Const/Const_getName.expected | 0 .../test/extractor-tests/generated/Const/Const_getTy.expected | 0 .../generated/Const/Const_getVisibility.expected | 0 .../test/extractor-tests/generated/ConstArg/ConstArg.expected | 0 .../generated/ConstArg/ConstArg_getExpr.expected | 0 .../extractor-tests/generated/ConstParam/ConstParam.expected | 0 .../generated/ConstParam/ConstParam_getAttr.expected | 0 .../generated/ConstParam/ConstParam_getDefaultVal.expected | 0 .../generated/ConstParam/ConstParam_getName.expected | 0 .../generated/ConstParam/ConstParam_getTy.expected | 0 .../generated/DynTraitType/DynTraitType.expected | 0 .../DynTraitType/DynTraitType_getTypeBoundList.expected | 0 rust/ql/test/extractor-tests/generated/Enum/Enum.expected | 0 .../test/extractor-tests/generated/Enum/Enum_getAttr.expected | 0 .../generated/Enum/Enum_getGenericParamList.expected | 0 .../test/extractor-tests/generated/Enum/Enum_getName.expected | 0 .../generated/Enum/Enum_getVariantList.expected | 0 .../extractor-tests/generated/Enum/Enum_getVisibility.expected | 0 .../generated/Enum/Enum_getWhereClause.expected | 0 .../extractor-tests/generated/ExternBlock/ExternBlock.expected | 0 .../generated/ExternBlock/ExternBlock_getAbi.expected | 0 .../generated/ExternBlock/ExternBlock_getAttr.expected | 0 .../ExternBlock/ExternBlock_getExternItemList.expected | 0 .../extractor-tests/generated/ExternCrate/ExternCrate.expected | 0 .../generated/ExternCrate/ExternCrate_getAttr.expected | 0 .../generated/ExternCrate/ExternCrate_getNameRef.expected | 0 .../generated/ExternCrate/ExternCrate_getRename.expected | 0 .../generated/ExternCrate/ExternCrate_getVisibility.expected | 0 .../generated/ExternItemList/ExternItemList.expected | 0 .../generated/ExternItemList/ExternItemList_getAttr.expected | 0 .../ExternItemList/ExternItemList_getExternItem.expected | 0 .../extractor-tests/generated/FnPtrType/FnPtrType.expected | 0 .../generated/FnPtrType/FnPtrType_getAbi.expected | 0 .../generated/FnPtrType/FnPtrType_getParamList.expected | 0 .../generated/FnPtrType/FnPtrType_getRetType.expected | 0 .../ql/test/extractor-tests/generated/ForExpr/ForExpr.expected | 0 .../extractor-tests/generated/ForExpr/ForExpr_getAttr.expected | 0 .../generated/ForExpr/ForExpr_getIterable.expected | 0 .../generated/ForExpr/ForExpr_getLabel.expected | 0 .../generated/ForExpr/ForExpr_getLoopBody.expected | 0 .../extractor-tests/generated/ForExpr/ForExpr_getPat.expected | 0 .../ql/test/extractor-tests/generated/ForType/ForType.expected | 0 .../generated/ForType/ForType_getGenericParamList.expected | 0 .../extractor-tests/generated/ForType/ForType_getTy.expected | 0 .../generated/FormatArgsArg/FormatArgsArg.expected | 0 .../generated/FormatArgsArg/FormatArgsArg_getExpr.expected | 0 .../generated/FormatArgsArg/FormatArgsArg_getName.expected | 0 .../generated/FormatArgsExpr/FormatArgsExpr.expected | 0 .../generated/FormatArgsExpr/FormatArgsExpr_getArg.expected | 0 .../generated/FormatArgsExpr/FormatArgsExpr_getAttr.expected | 0 .../FormatArgsExpr/FormatArgsExpr_getTemplate.expected | 0 .../generated/GenericParamList/GenericParamList.expected | 0 .../GenericParamList/GenericParamList_getGenericParam.expected | 0 rust/ql/test/extractor-tests/generated/Impl/Impl.expected | 0 .../generated/Impl/Impl_getAssocItemList.expected | 0 .../test/extractor-tests/generated/Impl/Impl_getAttr.expected | 0 .../generated/Impl/Impl_getGenericParamList.expected | 0 .../extractor-tests/generated/Impl/Impl_getSelfTy.expected | 0 .../test/extractor-tests/generated/Impl/Impl_getTrait.expected | 0 .../extractor-tests/generated/Impl/Impl_getVisibility.expected | 0 .../generated/Impl/Impl_getWhereClause.expected | 0 .../generated/ImplTraitType/ImplTraitType.expected | 0 .../ImplTraitType/ImplTraitType_getTypeBoundList.expected | 0 .../extractor-tests/generated/InferType/InferType.expected | 0 .../test/extractor-tests/generated/ItemList/ItemList.expected | 0 .../generated/ItemList/ItemList_getAttr.expected | 0 .../generated/ItemList/ItemList_getItem.expected | 0 .../ql/test/extractor-tests/generated/LetElse/LetElse.expected | 0 .../generated/LetElse/LetElse_getBlockExpr.expected | 0 .../test/extractor-tests/generated/Lifetime/Lifetime.expected | 0 .../generated/Lifetime/Lifetime_getText.expected | 0 .../extractor-tests/generated/LifetimeArg/LifetimeArg.expected | 0 .../generated/LifetimeArg/LifetimeArg_getLifetime.expected | 0 .../generated/LifetimeParam/LifetimeParam.expected | 0 .../generated/LifetimeParam/LifetimeParam_getAttr.expected | 0 .../generated/LifetimeParam/LifetimeParam_getLifetime.expected | 0 .../LifetimeParam/LifetimeParam_getTypeBoundList.expected | 0 .../extractor-tests/generated/MacroCall/MacroCall.expected | 1 + .../generated/MacroCall/MacroCall_getAttr.expected | 0 .../generated/MacroCall/MacroCall_getPath.expected | 1 + .../generated/MacroCall/MacroCall_getTokenTree.expected | 1 + .../test/extractor-tests/generated/MacroDef/MacroDef.expected | 0 .../generated/MacroDef/MacroDef_getArgs.expected | 0 .../generated/MacroDef/MacroDef_getAttr.expected | 0 .../generated/MacroDef/MacroDef_getBody.expected | 0 .../generated/MacroDef/MacroDef_getName.expected | 0 .../generated/MacroDef/MacroDef_getVisibility.expected | 0 .../extractor-tests/generated/MacroExpr/MacroExpr.expected | 1 + .../generated/MacroExpr/MacroExpr_getMacroCall.expected | 1 + .../test/extractor-tests/generated/MacroPat/MacroPat.expected | 0 .../generated/MacroPat/MacroPat_getMacroCall.expected | 0 .../extractor-tests/generated/MacroRules/MacroRules.expected | 0 .../generated/MacroRules/MacroRules_getAttr.expected | 0 .../generated/MacroRules/MacroRules_getName.expected | 0 .../generated/MacroRules/MacroRules_getTokenTree.expected | 0 .../generated/MacroRules/MacroRules_getVisibility.expected | 0 .../extractor-tests/generated/MacroType/MacroType.expected | 0 .../generated/MacroType/MacroType_getMacroCall.expected | 0 .../generated/MatchArmList/MatchArmList.expected | 0 .../generated/MatchArmList/MatchArmList_getArm.expected | 0 .../generated/MatchArmList/MatchArmList_getAttr.expected | 0 .../extractor-tests/generated/MatchGuard/MatchGuard.expected | 0 .../generated/MatchGuard/MatchGuard_getCondition.expected | 0 rust/ql/test/extractor-tests/generated/Meta/Meta.expected | 0 .../test/extractor-tests/generated/Meta/Meta_getExpr.expected | 0 .../test/extractor-tests/generated/Meta/Meta_getPath.expected | 0 .../extractor-tests/generated/Meta/Meta_getTokenTree.expected | 0 rust/ql/test/extractor-tests/generated/Name/Name.expected | 3 +++ .../test/extractor-tests/generated/Name/Name_getText.expected | 3 +++ .../ql/test/extractor-tests/generated/NameRef/NameRef.expected | 1 + .../extractor-tests/generated/NameRef/NameRef_getText.expected | 1 + .../extractor-tests/generated/NeverType/NeverType.expected | 0 rust/ql/test/extractor-tests/generated/Param/Param.expected | 0 .../extractor-tests/generated/Param/Param_getAttr.expected | 0 .../test/extractor-tests/generated/Param/Param_getPat.expected | 0 .../test/extractor-tests/generated/Param/Param_getTy.expected | 0 .../extractor-tests/generated/ParamList/ParamList.expected | 1 + .../generated/ParamList/ParamList_getParam.expected | 0 .../generated/ParamList/ParamList_getSelfParam.expected | 0 .../extractor-tests/generated/ParenExpr/ParenExpr.expected | 0 .../generated/ParenExpr/ParenExpr_getAttr.expected | 0 .../generated/ParenExpr/ParenExpr_getExpr.expected | 0 .../test/extractor-tests/generated/ParenPat/ParenPat.expected | 0 .../generated/ParenPat/ParenPat_getPat.expected | 0 .../extractor-tests/generated/ParenType/ParenType.expected | 0 .../generated/ParenType/ParenType_getTy.expected | 0 .../extractor-tests/generated/PathSegment/PathSegment.expected | 1 + .../PathSegment/PathSegment_getGenericArgList.expected | 0 .../generated/PathSegment/PathSegment_getNameRef.expected | 1 + .../generated/PathSegment/PathSegment_getParamList.expected | 0 .../generated/PathSegment/PathSegment_getPathType.expected | 0 .../generated/PathSegment/PathSegment_getRetType.expected | 0 .../PathSegment/PathSegment_getReturnTypeSyntax.expected | 0 .../generated/PathSegment/PathSegment_getTy.expected | 0 .../test/extractor-tests/generated/PathType/PathType.expected | 0 .../generated/PathType/PathType_getPath.expected | 0 .../ql/test/extractor-tests/generated/PtrType/PtrType.expected | 0 .../extractor-tests/generated/PtrType/PtrType_getTy.expected | 0 .../generated/RecordExprFieldList/RecordExprFieldList.expected | 0 .../RecordExprFieldList/RecordExprFieldList_getAttr.expected | 0 .../RecordExprFieldList/RecordExprFieldList_getField.expected | 0 .../RecordExprFieldList/RecordExprFieldList_getSpread.expected | 0 .../extractor-tests/generated/RecordField/RecordField.expected | 0 .../generated/RecordField/RecordField_getAttr.expected | 0 .../generated/RecordField/RecordField_getName.expected | 0 .../generated/RecordField/RecordField_getTy.expected | 0 .../generated/RecordField/RecordField_getVisibility.expected | 0 .../generated/RecordFieldList/RecordFieldList.expected | 0 .../RecordFieldList/RecordFieldList_getField.expected | 0 .../generated/RecordPatFieldList/RecordPatFieldList.expected | 0 .../RecordPatFieldList/RecordPatFieldList_getField.expected | 0 .../RecordPatFieldList/RecordPatFieldList_getRestPat.expected | 0 .../ql/test/extractor-tests/generated/RefType/RefType.expected | 0 .../generated/RefType/RefType_getLifetime.expected | 0 .../extractor-tests/generated/RefType/RefType_getTy.expected | 0 rust/ql/test/extractor-tests/generated/Rename/Rename.expected | 0 .../extractor-tests/generated/Rename/Rename_getName.expected | 0 .../ql/test/extractor-tests/generated/RestPat/RestPat.expected | 0 .../extractor-tests/generated/RestPat/RestPat_getAttr.expected | 0 .../ql/test/extractor-tests/generated/RetType/RetType.expected | 1 + .../extractor-tests/generated/RetType/RetType_getTy.expected | 1 + .../generated/ReturnTypeSyntax/ReturnTypeSyntax.expected | 0 .../extractor-tests/generated/SelfParam/SelfParam.expected | 0 .../generated/SelfParam/SelfParam_getAttr.expected | 0 .../generated/SelfParam/SelfParam_getLifetime.expected | 0 .../generated/SelfParam/SelfParam_getName.expected | 0 .../generated/SelfParam/SelfParam_getTy.expected | 0 .../extractor-tests/generated/SliceType/SliceType.expected | 0 .../generated/SliceType/SliceType_getTy.expected | 0 .../extractor-tests/generated/SourceFile/SourceFile.expected | 2 ++ .../generated/SourceFile/SourceFile_getAttr.expected | 0 .../generated/SourceFile/SourceFile_getItem.expected | 3 +++ rust/ql/test/extractor-tests/generated/Static/Static.expected | 0 .../extractor-tests/generated/Static/Static_getAttr.expected | 0 .../extractor-tests/generated/Static/Static_getBody.expected | 0 .../extractor-tests/generated/Static/Static_getName.expected | 0 .../extractor-tests/generated/Static/Static_getTy.expected | 0 .../generated/Static/Static_getVisibility.expected | 0 .../test/extractor-tests/generated/StmtList/StmtList.expected | 1 + .../generated/StmtList/StmtList_getAttr.expected | 0 .../generated/StmtList/StmtList_getStatement.expected | 0 .../generated/StmtList/StmtList_getTailExpr.expected | 1 + rust/ql/test/extractor-tests/generated/Struct/Struct.expected | 0 .../extractor-tests/generated/Struct/Struct_getAttr.expected | 0 .../generated/Struct/Struct_getFieldList.expected | 0 .../generated/Struct/Struct_getGenericParamList.expected | 0 .../extractor-tests/generated/Struct/Struct_getName.expected | 0 .../generated/Struct/Struct_getVisibility.expected | 0 .../generated/Struct/Struct_getWhereClause.expected | 0 .../extractor-tests/generated/TokenTree/TokenTree.expected | 1 + rust/ql/test/extractor-tests/generated/Trait/Trait.expected | 0 .../generated/Trait/Trait_getAssocItemList.expected | 0 .../extractor-tests/generated/Trait/Trait_getAttr.expected | 0 .../generated/Trait/Trait_getGenericParamList.expected | 0 .../extractor-tests/generated/Trait/Trait_getName.expected | 0 .../generated/Trait/Trait_getTypeBoundList.expected | 0 .../generated/Trait/Trait_getVisibility.expected | 0 .../generated/Trait/Trait_getWhereClause.expected | 0 .../extractor-tests/generated/TraitAlias/TraitAlias.expected | 0 .../generated/TraitAlias/TraitAlias_getAttr.expected | 0 .../TraitAlias/TraitAlias_getGenericParamList.expected | 0 .../generated/TraitAlias/TraitAlias_getName.expected | 0 .../generated/TraitAlias/TraitAlias_getTypeBoundList.expected | 0 .../generated/TraitAlias/TraitAlias_getVisibility.expected | 0 .../generated/TraitAlias/TraitAlias_getWhereClause.expected | 0 .../ql/test/extractor-tests/generated/TryExpr/TryExpr.expected | 0 .../extractor-tests/generated/TryExpr/TryExpr_getAttr.expected | 0 .../extractor-tests/generated/TryExpr/TryExpr_getExpr.expected | 0 .../extractor-tests/generated/TupleField/TupleField.expected | 0 .../generated/TupleField/TupleField_getAttr.expected | 0 .../generated/TupleField/TupleField_getTy.expected | 0 .../generated/TupleField/TupleField_getVisibility.expected | 0 .../generated/TupleFieldList/TupleFieldList.expected | 0 .../generated/TupleFieldList/TupleFieldList_getField.expected | 0 .../extractor-tests/generated/TupleType/TupleType.expected | 1 + .../generated/TupleType/TupleType_getField.expected | 0 .../extractor-tests/generated/TypeAlias/TypeAlias.expected | 0 .../generated/TypeAlias/TypeAlias_getAttr.expected | 0 .../generated/TypeAlias/TypeAlias_getGenericParamList.expected | 0 .../generated/TypeAlias/TypeAlias_getName.expected | 0 .../generated/TypeAlias/TypeAlias_getTy.expected | 0 .../generated/TypeAlias/TypeAlias_getTypeBoundList.expected | 0 .../generated/TypeAlias/TypeAlias_getVisibility.expected | 0 .../generated/TypeAlias/TypeAlias_getWhereClause.expected | 0 .../ql/test/extractor-tests/generated/TypeArg/TypeArg.expected | 0 .../extractor-tests/generated/TypeArg/TypeArg_getTy.expected | 0 .../extractor-tests/generated/TypeBound/TypeBound.expected | 0 .../generated/TypeBound/TypeBound_getGenericParamList.expected | 0 .../generated/TypeBound/TypeBound_getLifetime.expected | 0 .../generated/TypeBound/TypeBound_getTy.expected | 0 .../generated/TypeBoundList/TypeBoundList.expected | 0 .../generated/TypeBoundList/TypeBoundList_getBound.expected | 0 .../extractor-tests/generated/TypeParam/TypeParam.expected | 0 .../generated/TypeParam/TypeParam_getAttr.expected | 0 .../generated/TypeParam/TypeParam_getDefaultType.expected | 0 .../generated/TypeParam/TypeParam_getName.expected | 0 .../generated/TypeParam/TypeParam_getTypeBoundList.expected | 0 rust/ql/test/extractor-tests/generated/Union/Union.expected | 0 .../extractor-tests/generated/Union/Union_getAttr.expected | 0 .../generated/Union/Union_getGenericParamList.expected | 0 .../extractor-tests/generated/Union/Union_getName.expected | 0 .../generated/Union/Union_getRecordFieldList.expected | 0 .../generated/Union/Union_getVisibility.expected | 0 .../generated/Union/Union_getWhereClause.expected | 0 rust/ql/test/extractor-tests/generated/Use/Use.expected | 0 .../ql/test/extractor-tests/generated/Use/Use_getAttr.expected | 0 .../test/extractor-tests/generated/Use/Use_getUseTree.expected | 0 .../extractor-tests/generated/Use/Use_getVisibility.expected | 0 .../ql/test/extractor-tests/generated/UseTree/UseTree.expected | 0 .../extractor-tests/generated/UseTree/UseTree_getPath.expected | 0 .../generated/UseTree/UseTree_getRename.expected | 0 .../generated/UseTree/UseTree_getUseTreeList.expected | 0 .../extractor-tests/generated/UseTreeList/UseTreeList.expected | 0 .../generated/UseTreeList/UseTreeList_getUseTree.expected | 0 .../ql/test/extractor-tests/generated/Variant/Variant.expected | 0 .../extractor-tests/generated/Variant/Variant_getAttr.expected | 0 .../extractor-tests/generated/Variant/Variant_getExpr.expected | 0 .../generated/Variant/Variant_getFieldList.expected | 0 .../extractor-tests/generated/Variant/Variant_getName.expected | 0 .../generated/Variant/Variant_getVisibility.expected | 0 .../extractor-tests/generated/VariantList/VariantList.expected | 0 .../generated/VariantList/VariantList_getVariant.expected | 0 .../extractor-tests/generated/Visibility/Visibility.expected | 0 .../generated/Visibility/Visibility_getPath.expected | 0 .../extractor-tests/generated/WhereClause/WhereClause.expected | 0 .../generated/WhereClause/WhereClause_getPredicate.expected | 0 .../extractor-tests/generated/WherePred/WherePred.expected | 0 .../generated/WherePred/WherePred_getGenericParamList.expected | 0 .../generated/WherePred/WherePred_getLifetime.expected | 0 .../generated/WherePred/WherePred_getTy.expected | 0 .../generated/WherePred/WherePred_getTypeBoundList.expected | 0 .../extractor-tests/generated/WhileExpr/WhileExpr.expected | 0 .../generated/WhileExpr/WhileExpr_getAttr.expected | 0 .../generated/WhileExpr/WhileExpr_getCondition.expected | 0 .../generated/WhileExpr/WhileExpr_getLabel.expected | 0 .../generated/WhileExpr/WhileExpr_getLoopBody.expected | 0 302 files changed, 27 insertions(+) create mode 100644 rust/ql/test/extractor-tests/generated/Abi/Abi.expected create mode 100644 rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Attr/Attr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const.expected create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.expected create mode 100644 rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.expected create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.expected create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.expected create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForType/ForType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.expected create mode 100644 rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/InferType/InferType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.expected create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroType/MacroType.expected create mode 100644 rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.expected create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta.expected create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/Name/Name.expected create mode 100644 rust/ql/test/extractor-tests/generated/Name/Name_getText.expected create mode 100644 rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected create mode 100644 rust/ql/test/extractor-tests/generated/NeverType/NeverType.expected create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param.expected create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/Param/Param_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenType/ParenType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathType/PathType.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/PtrType/PtrType.expected create mode 100644 rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefType/RefType.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/Rename/Rename.expected create mode 100644 rust/ql/test/extractor-tests/generated/Rename/Rename_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RetType/RetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.expected create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/SliceType/SliceType.expected create mode 100644 rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static.expected create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getBody.expected create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.expected create mode 100644 rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleType/TupleType.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use.expected create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.expected create mode 100644 rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.expected create mode 100644 rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected create mode 100644 rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.expected create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant.expected create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.expected create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getName.expected create mode 100644 rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected create mode 100644 rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.expected create mode 100644 rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected create mode 100644 rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.expected create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.expected create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.expected create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.expected create mode 100644 rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.expected diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi.expected b/rust/ql/test/extractor-tests/generated/Abi/Abi.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.expected b/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.expected b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.expected b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.expected b/rust/ql/test/extractor-tests/generated/ArrayType/ArrayType_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.expected b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.expected b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAssocItem.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.expected b/rust/ql/test/extractor-tests/generated/AssocItemList/AssocItemList_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getNameRef.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr.expected b/rust/ql/test/extractor-tests/generated/Attr/Attr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.expected b/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const.expected b/rust/ql/test/extractor-tests/generated/Const/Const.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getBody.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getBody.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getName.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getTy.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.expected b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.expected b/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getNameRef.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.expected b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.expected b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.expected b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.expected b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.expected b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.expected b/rust/ql/test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForType/ForType.expected b/rust/ql/test/extractor-tests/generated/ForType/ForType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/ForType/ForType_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.expected b/rust/ql/test/extractor-tests/generated/ForType/ForType_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.expected b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.expected b/rust/ql/test/extractor-tests/generated/FormatArgsArg/FormatArgsArg_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.expected b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.expected b/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/InferType/InferType.expected b/rust/ql/test/extractor-tests/generated/InferType/InferType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.expected b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.expected b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.expected b/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.expected b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.expected b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected new file mode 100644 index 000000000000..bbe8097850f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected @@ -0,0 +1 @@ +| gen_macro_call.rs:5:5:5:11 | MacroCall | getNumberOfAttrs: | 0 | hasPath: | yes | hasTokenTree: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected new file mode 100644 index 000000000000..f029d3ea015e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected @@ -0,0 +1 @@ +| gen_macro_call.rs:5:5:5:11 | MacroCall | gen_macro_call.rs:5:5:5:8 | Path | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected new file mode 100644 index 000000000000..5f92a68536c1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected @@ -0,0 +1 @@ +| gen_macro_call.rs:5:5:5:11 | MacroCall | gen_macro_call.rs:5:10:5:11 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected new file mode 100644 index 000000000000..79f6d26b811b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected @@ -0,0 +1 @@ +| gen_macro_expr.rs:5:5:5:11 | MacroExpr | hasMacroCall: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected new file mode 100644 index 000000000000..5a635cabcbe1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected @@ -0,0 +1 @@ +| gen_macro_expr.rs:5:5:5:11 | MacroExpr | gen_macro_expr.rs:5:5:5:11 | MacroCall | diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroType/MacroType.expected b/rust/ql/test/extractor-tests/generated/MacroType/MacroType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroType/MacroType_getMacroCall.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.expected b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.expected b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.expected b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Name/Name.expected b/rust/ql/test/extractor-tests/generated/Name/Name.expected new file mode 100644 index 000000000000..5a4e3270939b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Name/Name.expected @@ -0,0 +1,3 @@ +| gen_name.rs:3:4:3:12 | Name | hasText: | yes | +| lib.rs:2:5:2:12 | Name | hasText: | yes | +| lib.rs:3:5:3:7 | Name | hasText: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Name/Name_getText.expected b/rust/ql/test/extractor-tests/generated/Name/Name_getText.expected new file mode 100644 index 000000000000..70cc00fa56bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Name/Name_getText.expected @@ -0,0 +1,3 @@ +| gen_name.rs:3:4:3:12 | Name | test_name | +| lib.rs:2:5:2:12 | Name | gen_name | +| lib.rs:3:5:3:7 | Name | lib | diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected new file mode 100644 index 000000000000..d4215cca0724 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected @@ -0,0 +1 @@ +| gen_name_ref.rs:5:5:5:8 | NameRef | hasText: | yes | diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected new file mode 100644 index 000000000000..23cbafe4d304 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected @@ -0,0 +1 @@ +| gen_name_ref.rs:5:5:5:8 | NameRef | todo | diff --git a/rust/ql/test/extractor-tests/generated/NeverType/NeverType.expected b/rust/ql/test/extractor-tests/generated/NeverType/NeverType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Param/Param.expected b/rust/ql/test/extractor-tests/generated/Param/Param.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.expected b/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getPat.expected b/rust/ql/test/extractor-tests/generated/Param/Param_getPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getTy.expected b/rust/ql/test/extractor-tests/generated/Param/Param_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected new file mode 100644 index 000000000000..e966a16e13c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected @@ -0,0 +1 @@ +| gen_param_list.rs:3:19:3:20 | ParamList | getNumberOfParams: | 0 | hasSelfParam: | no | diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.expected b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.expected b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.expected b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenType/ParenType.expected b/rust/ql/test/extractor-tests/generated/ParenType/ParenType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.expected b/rust/ql/test/extractor-tests/generated/ParenType/ParenType_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected new file mode 100644 index 000000000000..da8b58acd2d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected @@ -0,0 +1 @@ +| gen_path_segment.rs:5:5:5:8 | PathSegment | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected new file mode 100644 index 000000000000..e81802b78635 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected @@ -0,0 +1 @@ +| gen_path_segment.rs:5:5:5:8 | PathSegment | gen_path_segment.rs:5:5:5:8 | NameRef | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType.expected b/rust/ql/test/extractor-tests/generated/PathType/PathType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.expected b/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PtrType/PtrType.expected b/rust/ql/test/extractor-tests/generated/PtrType/PtrType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.expected b/rust/ql/test/extractor-tests/generated/PtrType/PtrType_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.expected b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.expected b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.expected b/rust/ql/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField.expected b/rust/ql/test/extractor-tests/generated/RecordField/RecordField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.expected b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.expected b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.expected b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.expected b/rust/ql/test/extractor-tests/generated/RecordField/RecordField_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.expected b/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.expected b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.expected b/rust/ql/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RefType/RefType.expected b/rust/ql/test/extractor-tests/generated/RefType/RefType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.expected b/rust/ql/test/extractor-tests/generated/RefType/RefType_getLifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.expected b/rust/ql/test/extractor-tests/generated/RefType/RefType_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename.expected b/rust/ql/test/extractor-tests/generated/Rename/Rename.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.expected b/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.expected b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RetType/RetType.expected b/rust/ql/test/extractor-tests/generated/RetType/RetType.expected new file mode 100644 index 000000000000..726fcffd1d65 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RetType/RetType.expected @@ -0,0 +1 @@ +| gen_ret_type.rs:3:20:3:24 | RetType | hasTy: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.expected b/rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.expected new file mode 100644 index 000000000000..e8e62fa58ec5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RetType/RetType_getTy.expected @@ -0,0 +1 @@ +| gen_ret_type.rs:3:20:3:24 | RetType | gen_ret_type.rs:3:23:3:24 | TupleType | diff --git a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.expected b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SliceType/SliceType.expected b/rust/ql/test/extractor-tests/generated/SliceType/SliceType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.expected b/rust/ql/test/extractor-tests/generated/SliceType/SliceType_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected new file mode 100644 index 000000000000..4abf0fd0df11 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected @@ -0,0 +1,2 @@ +| gen_source_file.rs:1:1:6:2 | SourceFile | getNumberOfAttrs: | 0 | getNumberOfItems: | 1 | +| lib.rs:1:1:3:9 | SourceFile | getNumberOfAttrs: | 0 | getNumberOfItems: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected new file mode 100644 index 000000000000..10429cbab437 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected @@ -0,0 +1,3 @@ +| gen_source_file.rs:1:1:6:2 | SourceFile | 0 | gen_source_file.rs:3:1:6:1 | test_source_file | +| lib.rs:1:1:3:9 | SourceFile | 0 | lib.rs:2:1:2:20 | Module | +| lib.rs:1:1:3:9 | SourceFile | 1 | lib.rs:3:1:3:8 | Module | diff --git a/rust/ql/test/extractor-tests/generated/Static/Static.expected b/rust/ql/test/extractor-tests/generated/Static/Static.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getBody.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getBody.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getName.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getTy.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected new file mode 100644 index 000000000000..201b91c921f2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected @@ -0,0 +1 @@ +| gen_stmt_list.rs:3:27:6:1 | StmtList | getNumberOfAttrs: | 0 | getNumberOfStatements: | 0 | hasTailExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected new file mode 100644 index 000000000000..007a65f8439c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected @@ -0,0 +1 @@ +| gen_stmt_list.rs:3:27:6:1 | StmtList | gen_stmt_list.rs:5:5:5:11 | MacroExpr | diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.expected b/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.expected new file mode 100644 index 000000000000..b13382221bb8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.expected @@ -0,0 +1 @@ +| gen_token_tree.rs:5:10:5:11 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TupleType/TupleType.expected b/rust/ql/test/extractor-tests/generated/TupleType/TupleType.expected new file mode 100644 index 000000000000..40f8dde93022 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleType/TupleType.expected @@ -0,0 +1 @@ +| gen_tuple_type.rs:3:25:3:26 | TupleType | getNumberOfFields: | 0 | diff --git a/rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.expected b/rust/ql/test/extractor-tests/generated/TupleType/TupleType_getField.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.expected b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.expected b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union.expected b/rust/ql/test/extractor-tests/generated/Union/Union.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getName.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getRecordFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use.expected b/rust/ql/test/extractor-tests/generated/Use/Use.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.expected b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.expected b/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.expected b/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.expected b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTy.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.expected new file mode 100644 index 000000000000..e69de29bb2d1 From 81e99bf1bbde20a1212f589e8a1d7b9829a03893 Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Fri, 20 Sep 2024 15:05:51 +0100 Subject: [PATCH 066/162] Add tests --- ...const_compare.py => test_const_compare.py} | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) rename python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/{test_string_const_compare.py => test_const_compare.py} (88%) diff --git a/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_string_const_compare.py b/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py similarity index 88% rename from python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_string_const_compare.py rename to python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py index f1b01f4f84a5..ca6e9f0de191 100644 --- a/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_string_const_compare.py +++ b/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py @@ -85,6 +85,27 @@ def test_in_local_variable(): else: ensure_tainted(ts) # $ tainted +def test_is_none(): + ts = TAINTED_STRING + if ts is None: + ensure_not_tainted(ts) + else: + ensure_tainted(ts) # $ tainted + +def test_is_not_none(): + ts = TAINTED_STRING + if ts is not None: + ensure_tainted(ts) # $ tainted + else: + ensure_not_tainted(ts) + +def test_in_list_with_constants(): + ts = TAINTED_STRING + if ts in ["safe", None, 3, False]: + ensure_not_tainted(ts) + else: + ensure_tainted(ts) # $ tainted + SAFE = ["safe", "also_safe"] @@ -184,6 +205,9 @@ def test_eq_thorugh_func(): test_in_set() test_in_local_variable() test_in_global_variable() +test_is_none() +test_is_not_none() +test_in_list_with_constants() make_modification("unsafe") test_in_modified_global_variable() test_in_unsafe1(["unsafe", "foo"]) From c74b6be1360229309967e6b95ca6836e6b712700 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 20 Sep 2024 16:00:48 +0200 Subject: [PATCH 067/162] Rust/Codegen: allow to "detach" property emission By using the `rust.detach` pragma on a property, we make that property not appear in the generated struct as a field, and provide instead a `generated::Class::emit_property` function that can be used to emit the corresponding TRAP entry independently. --- misc/codegen/generators/rustgen.py | 25 ++++++++++++++++---- misc/codegen/lib/rust.py | 10 ++++++++ misc/codegen/lib/schemadefs.py | 1 + misc/codegen/templates/rust_classes.mustache | 10 ++++++++ 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/misc/codegen/generators/rustgen.py b/misc/codegen/generators/rustgen.py index 5d981197b375..f4c977c0fdbe 100644 --- a/misc/codegen/generators/rustgen.py +++ b/misc/codegen/generators/rustgen.py @@ -72,13 +72,28 @@ def __init__(self, data: schema.Schema): def _get_class(self, name: str) -> rust.Class: cls = self._classmap[name] + properties = [ + (c, p) + for c, p in _get_properties(cls, self._classmap) + if "rust_skip" not in p.pragmas and not p.synth + ] + fields = [] + detached_fields = [] + for c, p in properties: + if "rust_detach" in p.pragmas: + # only generate detached fields in the actual class defining them, not the derived ones + if c is cls: + # TODO lift this restriction if required (requires change in dbschemegen as well) + assert c.derived or not p.is_single, \ + f"property {p.name} in concrete class marked as detached but not optional" + detached_fields.append(_get_field(c, p)) + elif not cls.derived: + # for non-detached ones, only generate fields in the concrete classes + fields.append(_get_field(c, p)) return rust.Class( name=name, - fields=[ - _get_field(c, p) - for c, p in _get_properties(cls, self._classmap) - if "rust_skip" not in p.pragmas and not p.synth - ] if not cls.derived else [], + fields=fields, + detached_fields=detached_fields, ancestors=sorted(set(a.name for a in _get_ancestors(cls, self._classmap))), entry_table=inflection.tableize(cls.name) if not cls.derived else None, ) diff --git a/misc/codegen/lib/rust.py b/misc/codegen/lib/rust.py index e4ec8e871c20..4c34952311c9 100644 --- a/misc/codegen/lib/rust.py +++ b/misc/codegen/lib/rust.py @@ -1,6 +1,7 @@ import dataclasses import re import typing +import inflection # taken from https://doc.rust-lang.org/reference/keywords.html keywords = { @@ -106,12 +107,17 @@ def is_single(self): def is_label(self): return self.base_type == "trap::Label" + @property + def singular_field_name(self) -> str: + return inflection.singularize(self.field_name.rstrip("_")) + @dataclasses.dataclass class Class: name: str entry_table: str | None = None fields: list[Field] = dataclasses.field(default_factory=list) + detached_fields: list[Field] = dataclasses.field(default_factory=list) ancestors: list[str] = dataclasses.field(default_factory=list) @property @@ -128,6 +134,10 @@ def single_field_entries(self) -> dict[str, list[dict]]: ret.setdefault(f.table_name, []).append(f) return [{"table_name": k, "fields": v} for k, v in ret.items()] + @property + def has_detached_fields(self) -> bool: + return bool(self.detached_fields) + @dataclasses.dataclass class ClassList: diff --git a/misc/codegen/lib/schemadefs.py b/misc/codegen/lib/schemadefs.py index 151d5ac98435..5e26e40a2c0b 100644 --- a/misc/codegen/lib/schemadefs.py +++ b/misc/codegen/lib/schemadefs.py @@ -239,6 +239,7 @@ def f(cls: type) -> type: cpp.add(_Pragma("skip")) +rust.add(_Pragma("detach")) rust.add(_Pragma("skip_doc_test")) rust.add(_ParametrizedClassPragma("doc_test_signature", lambda signature: signature)) diff --git a/misc/codegen/templates/rust_classes.mustache b/misc/codegen/templates/rust_classes.mustache index 94dd957da029..0fa29b1eb690 100644 --- a/misc/codegen/templates/rust_classes.mustache +++ b/misc/codegen/templates/rust_classes.mustache @@ -59,6 +59,16 @@ pub struct {{name}} { _unused: () } {{/is_entry}} +{{#has_detached_fields}} + +impl {{name}} { +{{#detached_fields}} + pub fn emit_{{singular_field_name}}(id: trap::Label, {{#is_repeated}}{{^is_unordered}}i: usize, {{/is_unordered}}{{/is_repeated}}value: {{base_type}}, out: &mut trap::Writer) { + out.add_tuple("{{table_name}}", vec![id.into(), {{#is_repeated}}{{^is_unordered}}i.into(), {{/is_unordered}}{{/is_repeated}}value.into()]); + } +{{/detached_fields}} +} +{{/has_detached_fields}} impl trap::TrapClass for {{name}} { fn class_name() -> &'static str { "{{name}}" } From 3a1e50dcf9f1026c43e7a2c608853716253764c1 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 19 Sep 2024 13:30:17 +0200 Subject: [PATCH 068/162] Dataflow: Simplify diff-informed implementation and tweak flag name. --- .../cpp/dataflow/internal/DataFlowImpl1.qll | 8 +- .../cpp/dataflow/internal/DataFlowImpl2.qll | 8 +- .../cpp/dataflow/internal/DataFlowImpl3.qll | 8 +- .../cpp/dataflow/internal/DataFlowImpl4.qll | 8 +- .../dataflow/internal/DataFlowImplLocal.qll | 8 +- .../ir/dataflow/internal/DataFlowImpl1.qll | 8 +- .../ir/dataflow/internal/DataFlowImpl2.qll | 8 +- .../ir/dataflow/internal/DataFlowImpl3.qll | 8 +- .../ir/dataflow/internal/DataFlowImpl4.qll | 8 +- .../dataflow/internal/DataFlowImpl1.qll | 8 +- .../dataflow/internal/DataFlowImpl2.qll | 8 +- .../dataflow/internal/DataFlowImpl3.qll | 8 +- .../dataflow/internal/DataFlowImpl4.qll | 8 +- .../dataflow/internal/DataFlowImpl5.qll | 8 +- .../go/dataflow/internal/DataFlowImpl1.qll | 8 +- .../go/dataflow/internal/DataFlowImpl2.qll | 8 +- .../java/dataflow/internal/DataFlowImpl1.qll | 8 +- .../java/dataflow/internal/DataFlowImpl2.qll | 8 +- .../java/dataflow/internal/DataFlowImpl3.qll | 8 +- .../java/dataflow/internal/DataFlowImpl4.qll | 8 +- .../java/dataflow/internal/DataFlowImpl5.qll | 8 +- .../java/dataflow/internal/DataFlowImpl6.qll | 8 +- .../dataflow/new/internal/DataFlowImpl1.qll | 8 +- .../dataflow/new/internal/DataFlowImpl2.qll | 8 +- .../dataflow/new/internal/DataFlowImpl3.qll | 8 +- .../dataflow/new/internal/DataFlowImpl4.qll | 8 +- .../ruby/dataflow/internal/DataFlowImpl1.qll | 8 +- .../ruby/dataflow/internal/DataFlowImpl2.qll | 8 +- shared/dataflow/codeql/dataflow/DataFlow.qll | 24 +- .../codeql/dataflow/TaintTracking.qll | 6 +- .../codeql/dataflow/internal/DataFlowImpl.qll | 245 +++++++----------- .../swift/dataflow/internal/DataFlowImpl1.qll | 8 +- 32 files changed, 142 insertions(+), 365 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 1db3402b7469..ce964917e970 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 1db3402b7469..ce964917e970 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 1db3402b7469..ce964917e970 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 1db3402b7469..ce964917e970 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 1db3402b7469..ce964917e970 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 1db3402b7469..ce964917e970 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 1db3402b7469..ce964917e970 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 1db3402b7469..ce964917e970 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 1db3402b7469..ce964917e970 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 1db3402b7469..ce964917e970 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll index 1db3402b7469..ce964917e970 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I diff --git a/shared/dataflow/codeql/dataflow/DataFlow.qll b/shared/dataflow/codeql/dataflow/DataFlow.qll index a9ff849d3cc3..01bd0e5ea963 100644 --- a/shared/dataflow/codeql/dataflow/DataFlow.qll +++ b/shared/dataflow/codeql/dataflow/DataFlow.qll @@ -433,10 +433,15 @@ module Configs Lang> { default predicate includeHiddenNodes() { none() } /** - * Holds to filter out data flows whose source and sink are both not in the - * `AlertFiltering` location range. + * Holds if sources and sinks should be filtered to only include those that + * may lead to a flow path with either a source or a sink in the location + * range given by `AlertFiltering`. This only has an effect when running + * in diff-informed incremental mode. + * + * This flag should only be applied to flow configurations whose results + * are used directly in a query result. */ - default predicate filterForSourceOrSinkAlerts() { none() } + default predicate observeDiffInformedIncrementalMode() { none() } } /** An input configuration for data flow using flow state. */ @@ -555,10 +560,15 @@ module Configs Lang> { default predicate includeHiddenNodes() { none() } /** - * Holds to filter out data flows whose source and sink are both not in the - * `AlertFiltering` location range. + * Holds if sources and sinks should be filtered to only include those that + * may lead to a flow path with either a source or a sink in the location + * range given by `AlertFiltering`. This only has an effect when running + * in diff-informed incremental mode. + * + * This flag should only be applied to flow configurations whose results + * are used directly in a query result. */ - default predicate filterForSourceOrSinkAlerts() { none() } + default predicate observeDiffInformedIncrementalMode() { none() } } } @@ -637,7 +647,6 @@ module DataFlowMake Lang> { module Global implements GlobalFlowSig { private module C implements FullStateConfigSig { import DefaultState - import FilteredSourceSink import Config predicate accessPathLimit = Config::accessPathLimit/0; @@ -660,7 +669,6 @@ module DataFlowMake Lang> { */ module GlobalWithState implements GlobalFlowSig { private module C implements FullStateConfigSig { - import FilteredStateSourceSink import Config predicate accessPathLimit = Config::accessPathLimit/0; diff --git a/shared/dataflow/codeql/dataflow/TaintTracking.qll b/shared/dataflow/codeql/dataflow/TaintTracking.qll index 3e4de6c6218c..343f8be041f5 100644 --- a/shared/dataflow/codeql/dataflow/TaintTracking.qll +++ b/shared/dataflow/codeql/dataflow/TaintTracking.qll @@ -60,8 +60,8 @@ module TaintFlowMake< Config::allowImplicitRead(node, c) or ( - Config::isFilteredSink(node) or - Config::isFilteredSink(node, _) or + Config::isSink(node) or + Config::isSink(node, _) or Config::isAdditionalFlowStep(node, _, _) or Config::isAdditionalFlowStep(node, _, _, _) ) and @@ -75,7 +75,6 @@ module TaintFlowMake< module Global implements DataFlow::GlobalFlowSig { private module Config0 implements DataFlowInternal::FullStateConfigSig { import DataFlowInternal::DefaultState - import DataFlowInternal::FilteredSourceSink import Config predicate isAdditionalFlowStep( @@ -102,7 +101,6 @@ module TaintFlowMake< */ module GlobalWithState implements DataFlow::GlobalFlowSig { private module Config0 implements DataFlowInternal::FullStateConfigSig { - import DataFlowInternal::FilteredStateSourceSink import Config predicate isAdditionalFlowStep( diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index c4da42ebf973..de9974abda8d 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -126,28 +126,15 @@ module MakeImpl Lang> { predicate includeHiddenNodes(); /** - * Holds to filter out data flows whose source and sink are both not in the - * `AlertFiltering` location range. - */ - predicate filterForSourceOrSinkAlerts(); - - /** - * Holds if `source` is a relevant data flow source with the given initial - * `state` and passes filtering per `filterForSourceOrSinkAlerts`. - */ - predicate isFilteredSource(Node source, FlowState state); - - /** - * Holds if `sink` is a relevant data flow sink accepting `state` and passes - * filtering per `filterForSourceOrSinkAlerts`. - */ - predicate isFilteredSink(Node sink, FlowState state); - - /** - * Holds if `sink` is a relevant data flow sink for any state and passes - * filtering per `filterForSourceOrSinkAlerts`. + * Holds if sources and sinks should be filtered to only include those that + * may lead to a flow path with either a source or a sink in the location + * range given by `AlertFiltering`. This only has an effect when running + * in diff-informed incremental mode. + * + * This flag should only be applied to flow configurations whose results + * are used directly in a query result. */ - predicate isFilteredSink(Node sink); + predicate observeDiffInformedIncrementalMode(); } /** @@ -171,112 +158,6 @@ module MakeImpl Lang> { } } - /** - * Provide `isFilteredSource` and `isFilteredSink` implementations given a `ConfigSig`. - */ - module FilteredSourceSink { - private import codeql.util.AlertFiltering - - private module AlertFiltering = AlertFilteringImpl; - - private class FlowState = Unit; - - pragma[noinline] - private predicate hasFilteredSource() { - exists(Node n | Config::isSource(n) | AlertFiltering::filterByLocation(n.getLocation())) - } - - pragma[noinline] - private predicate hasFilteredSink() { - exists(Node n | Config::isSink(n) | AlertFiltering::filterByLocation(n.getLocation())) - } - - predicate isFilteredSource(Node source, FlowState state) { - Config::isSource(source) and - exists(state) and - ( - not Config::filterForSourceOrSinkAlerts() or - // If there are filtered sinks, we need to pass through all sources to preserve all alerts - // with filtered sinks. Otherwise the only alerts of interest are those with filtered - // sources, so we can perform the source filtering right here. - hasFilteredSink() or - AlertFiltering::filterByLocation(source.getLocation()) - ) - } - - predicate isFilteredSink(Node sink, FlowState state) { isFilteredSink(sink) and exists(state) } - - predicate isFilteredSink(Node sink) { - Config::isSink(sink) and - ( - // If there are filtered sources, we need to pass through all sinks to preserve all alerts - // with filtered sources. Otherwise the only alerts of interest are those with filtered - // sinks, so we can perform the sink filtering right here. - hasFilteredSource() or - AlertFiltering::filterByLocation(sink.getLocation()) - ) - } - } - - /** - * Provide `isFilteredSource` and `isFilteredSink` implementations given a `StateConfigSig`. - */ - module FilteredStateSourceSink { - private import codeql.util.AlertFiltering - - private module AlertFiltering = AlertFilteringImpl; - - private class FlowState = Config::FlowState; - - pragma[noinline] - private predicate hasFilteredSource() { - exists(Node n | Config::isSource(n, _) | AlertFiltering::filterByLocation(n.getLocation())) - } - - pragma[noinline] - private predicate hasFilteredSink() { - exists(Node n | - Config::isSink(n, _) or - Config::isSink(n) - | - AlertFiltering::filterByLocation(n.getLocation()) - ) - } - - predicate isFilteredSource(Node source, FlowState state) { - Config::isSource(source, state) and - ( - // If there are filtered sinks, we need to pass through all sources to preserve all alerts - // with filtered sinks. Otherwise the only alerts of interest are those with filtered - // sources, so we can perform the source filtering right here. - hasFilteredSink() or - AlertFiltering::filterByLocation(source.getLocation()) - ) - } - - predicate isFilteredSink(Node sink, FlowState state) { - Config::isSink(sink, state) and - ( - // If there are filtered sources, we need to pass through all sinks to preserve all alerts - // with filtered sources. Otherwise the only alerts of interest are those with filtered - // sinks, so we can perform the sink filtering right here. - hasFilteredSource() or - AlertFiltering::filterByLocation(sink.getLocation()) - ) - } - - predicate isFilteredSink(Node sink) { - Config::isSink(sink) and - ( - // If there are filtered sources, we need to pass through all sinks to preserve all alerts - // with filtered sources. Otherwise the only alerts of interest are those with filtered - // sinks, so we can perform the sink filtering right here. - hasFilteredSource() or - AlertFiltering::filterByLocation(sink.getLocation()) - ) - } - } - /** * Constructs a data flow computation given a full input configuration. */ @@ -376,11 +257,75 @@ module MakeImpl Lang> { ReturnKindExt getKind() { result = pos.getKind() } } + private module SourceSinkFiltering { + private import codeql.util.AlertFiltering + + private module AlertFiltering = AlertFilteringImpl; + + pragma[nomagic] + private predicate isFilteredSource(Node source) { + Config::isSource(source, _) and + if Config::observeDiffInformedIncrementalMode() + then AlertFiltering::filterByLocation(source.getLocation()) + else any() + } + + pragma[nomagic] + private predicate isFilteredSink(Node sink) { + ( + Config::isSink(sink, _) or + Config::isSink(sink) + ) and + if Config::observeDiffInformedIncrementalMode() + then AlertFiltering::filterByLocation(sink.getLocation()) + else any() + } + + private predicate hasFilteredSource() { isFilteredSource(_) } + + private predicate hasFilteredSink() { isFilteredSink(_) } + + predicate isRelevantSource(Node source, FlowState state) { + // If there are filtered sinks, we need to pass through all sources to preserve all alerts + // with filtered sinks. Otherwise the only alerts of interest are those with filtered + // sources, so we can perform the source filtering right here. + Config::isSource(source, state) and + ( + isFilteredSource(source) or + hasFilteredSink() + ) + } + + predicate isRelevantSink(Node sink, FlowState state) { + // If there are filtered sources, we need to pass through all sinks to preserve all alerts + // with filtered sources. Otherwise the only alerts of interest are those with filtered + // sinks, so we can perform the sink filtering right here. + Config::isSink(sink, state) and + ( + isFilteredSink(sink) or + hasFilteredSource() + ) + } + + predicate isRelevantSink(Node sink) { + // If there are filtered sources, we need to pass through all sinks to preserve all alerts + // with filtered sources. Otherwise the only alerts of interest are those with filtered + // sinks, so we can perform the sink filtering right here. + Config::isSink(sink) and + ( + isFilteredSink(sink) or + hasFilteredSource() + ) + } + } + + private import SourceSinkFiltering + private predicate inBarrier(NodeEx node) { exists(Node n | node.asNode() = n and Config::isBarrierIn(n) and - Config::isFilteredSource(n, _) + isRelevantSource(n, _) ) } @@ -389,7 +334,7 @@ module MakeImpl Lang> { exists(Node n | node.asNode() = n and Config::isBarrierIn(n, state) and - Config::isFilteredSource(n, state) + isRelevantSource(n, state) ) } @@ -398,9 +343,9 @@ module MakeImpl Lang> { node.asNodeOrImplicitRead() = n and Config::isBarrierOut(n) | - Config::isFilteredSink(n, _) + isRelevantSink(n, _) or - Config::isFilteredSink(n) + isRelevantSink(n) ) } @@ -410,9 +355,9 @@ module MakeImpl Lang> { node.asNodeOrImplicitRead() = n and Config::isBarrierOut(n, state) | - Config::isFilteredSink(n, state) + isRelevantSink(n, state) or - Config::isFilteredSink(n) + isRelevantSink(n) ) } @@ -422,11 +367,11 @@ module MakeImpl Lang> { Config::isBarrier(n) or Config::isBarrierIn(n) and - not Config::isFilteredSource(n, _) + not isRelevantSource(n, _) or Config::isBarrierOut(n) and - not Config::isFilteredSink(n, _) and - not Config::isFilteredSink(n) + not isRelevantSink(n, _) and + not isRelevantSink(n) ) } @@ -436,24 +381,24 @@ module MakeImpl Lang> { Config::isBarrier(n, state) or Config::isBarrierIn(n, state) and - not Config::isFilteredSource(n, state) + not isRelevantSource(n, state) or Config::isBarrierOut(n, state) and - not Config::isFilteredSink(n, state) and - not Config::isFilteredSink(n) + not isRelevantSink(n, state) and + not isRelevantSink(n) ) } pragma[nomagic] private predicate sourceNode(NodeEx node, FlowState state) { - Config::isFilteredSource(node.asNode(), state) and + isRelevantSource(node.asNode(), state) and not fullBarrier(node) and not stateBarrier(node, state) } pragma[nomagic] private predicate sinkNodeWithState(NodeEx node, FlowState state) { - Config::isFilteredSink(node.asNodeOrImplicitRead(), state) and + isRelevantSink(node.asNodeOrImplicitRead(), state) and not fullBarrier(node) and not stateBarrier(node, state) } @@ -859,7 +804,7 @@ module MakeImpl Lang> { additional predicate sinkNode(NodeEx node, FlowState state) { fwdFlow(node) and fwdFlowState(state) and - Config::isFilteredSink(node.asNodeOrImplicitRead()) + isRelevantSink(node.asNodeOrImplicitRead()) or fwdFlow(node) and fwdFlowState(state) and @@ -3076,7 +3021,7 @@ module MakeImpl Lang> { NodeEx toNormalSinkNodeEx() { exists(Node n | pragma[only_bind_out](node.asNodeOrImplicitRead()) = n and - (Config::isFilteredSink(n) or Config::isFilteredSink(n, _)) and + (isRelevantSink(n) or isRelevantSink(n, _)) and result.asNode() = n ) } @@ -4922,15 +4867,15 @@ module MakeImpl Lang> { } private predicate interestingCallableSrc(DataFlowCallable c) { - exists(Node n | Config::isFilteredSource(n, _) and c = getNodeEnclosingCallable(n)) + exists(Node n | isRelevantSource(n, _) and c = getNodeEnclosingCallable(n)) or exists(DataFlowCallable mid | interestingCallableSrc(mid) and callableStep(mid, c)) } private predicate interestingCallableSink(DataFlowCallable c) { exists(Node n | c = getNodeEnclosingCallable(n) | - Config::isFilteredSink(n, _) or - Config::isFilteredSink(n) + isRelevantSink(n, _) or + isRelevantSink(n) ) or exists(DataFlowCallable mid | interestingCallableSink(mid) and callableStep(c, mid)) @@ -4957,7 +4902,7 @@ module MakeImpl Lang> { or exists(Node n | ce1 = TCallableSrc() and - Config::isFilteredSource(n, _) and + isRelevantSource(n, _) and ce2 = TCallable(getNodeEnclosingCallable(n)) ) or @@ -4965,8 +4910,8 @@ module MakeImpl Lang> { ce2 = TCallableSink() and ce1 = TCallable(getNodeEnclosingCallable(n)) | - Config::isFilteredSink(n, _) or - Config::isFilteredSink(n) + isRelevantSink(n, _) or + isRelevantSink(n) ) } @@ -5030,7 +4975,7 @@ module MakeImpl Lang> { private predicate revSinkNode(NodeEx node, FlowState state) { sinkNodeWithState(node, state) or - Config::isFilteredSink(node.asNodeOrImplicitRead()) and + isRelevantSink(node.asNodeOrImplicitRead()) and relevantState(state) and not fullBarrier(node) and not stateBarrier(node, state) diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll index 1db3402b7469..ce964917e970 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll @@ -284,13 +284,7 @@ deprecated private module Config implements FullStateConfigSig { predicate includeHiddenNodes() { any(Configuration config).includeHiddenNodes() } - predicate filterForSourceOrSinkAlerts() { none() } - - predicate isFilteredSource(Node source, FlowState state) { isSource(source, state) } - - predicate isFilteredSink(Node sink, FlowState state) { isSink(sink, state) } - - predicate isFilteredSink(Node sink) { isSink(sink) } + predicate observeDiffInformedIncrementalMode() { none() } } deprecated private import Impl as I From 7aa2816570fb661a54607ebf913a5ffb40f23956 Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Fri, 20 Sep 2024 15:19:54 +0100 Subject: [PATCH 069/162] Add changenote --- python/ql/lib/change-notes/2024-09-20-const-compare-gaurd.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 python/ql/lib/change-notes/2024-09-20-const-compare-gaurd.md diff --git a/python/ql/lib/change-notes/2024-09-20-const-compare-gaurd.md b/python/ql/lib/change-notes/2024-09-20-const-compare-gaurd.md new file mode 100644 index 000000000000..2adb7fa82a88 --- /dev/null +++ b/python/ql/lib/change-notes/2024-09-20-const-compare-gaurd.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The common sanitizer guard `StringConstCompareBarrier` has been renamed to `ConstCompareBarrier` and expanded to cover comparisons with other constant values such as `None`. This may result in fewer false positive results for several queries. \ No newline at end of file From 75ec8ce58ef869d76ba45558c4be366fa252aa34 Mon Sep 17 00:00:00 2001 From: Chuan-kai Lin Date: Fri, 20 Sep 2024 07:09:37 -0700 Subject: [PATCH 070/162] Java: apply query alert restrictions --- .../semmle/code/java/security/AndroidIntentRedirectionQuery.qll | 2 ++ .../java/security/ExternallyControlledFormatStringQuery.qll | 2 ++ .../ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll | 2 ++ .../semmle/code/java/security/ImplicitPendingIntentsQuery.qll | 2 ++ .../semmle/code/java/security/InsecureBeanValidationQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/InsecureLdapAuthQuery.qll | 2 ++ .../lib/semmle/code/java/security/InsecureRandomnessQuery.qll | 2 ++ .../lib/semmle/code/java/security/InsufficientKeySizeQuery.qll | 2 ++ .../code/java/security/IntentUriPermissionManipulationQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll | 2 ++ .../semmle/code/java/security/MissingJWTSignatureCheckQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll | 2 ++ .../lib/semmle/code/java/security/NumericCastTaintedQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll | 2 ++ .../lib/semmle/code/java/security/PartialPathTraversalQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll | 2 ++ .../ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll | 2 ++ .../code/java/security/StaticInitializationVectorQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll | 2 ++ .../ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll | 2 ++ .../code/java/security/UnsafeContentUriResolutionQuery.qll | 2 ++ .../semmle/code/java/security/UnsafeDeserializationQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll | 2 ++ .../semmle/code/java/security/WebviewDebuggingEnabledQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/XssQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll | 2 ++ java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll | 2 ++ .../semmle/code/java/security/regexp/RegexInjectionQuery.qll | 2 ++ 36 files changed, 72 insertions(+) diff --git a/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll b/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll index b179a4f92e07..0943fe8feaf7 100644 --- a/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll @@ -18,6 +18,8 @@ module IntentRedirectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(IntentRedirectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks the flow of tainted Intents being used to start Android components. */ diff --git a/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll b/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll index 606e31a07cb7..4c8639010e2c 100644 --- a/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll @@ -23,6 +23,8 @@ module ExternallyControlledFormatStringConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node.getType() instanceof NumericType or node.getType() instanceof BooleanType } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll index f625807470df..b2ab5464e235 100644 --- a/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll @@ -17,6 +17,8 @@ module FragmentInjectionTaintConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { any(FragmentInjectionAdditionalTaintStep c).step(n1, n2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll index 3af836cac97a..8151755f69fc 100644 --- a/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll @@ -17,6 +17,8 @@ module GroovyInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { any(GroovyInjectionAdditionalTaintStep c).step(fromNode, toNode) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll index 0a8e0686549d..a57f643d8176 100644 --- a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll @@ -48,6 +48,8 @@ module ImplicitPendingIntentStartConfig implements DataFlow::StateConfigSig { node.getType().(Array).getElementType() instanceof TypeIntent and c instanceof DataFlow::ArrayContent } + + predicate observeDiffInformedIncrementalMode() { any() } } module ImplicitPendingIntentStartFlow = diff --git a/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll index 1ad0677ca615..be42e09a1cce 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll @@ -49,6 +49,8 @@ module BeanValidationConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { sink instanceof BeanValidationSink } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow from user input to the argument of a method that builds constraint error messages. */ diff --git a/java/ql/lib/semmle/code/java/security/InsecureLdapAuthQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureLdapAuthQuery.qll index 498a9401071a..94d80b9b37b0 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureLdapAuthQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureLdapAuthQuery.qll @@ -22,6 +22,8 @@ module InsecureLdapUrlConfig implements DataFlow::ConfigSig { succ.asExpr() = ma.getQualifier() ) } + + predicate observeDiffInformedIncrementalMode() { any() } } module InsecureLdapUrlFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll index 423046b6746e..77da25d35866 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll @@ -96,6 +96,8 @@ module InsecureRandomnessConfig implements DataFlow::ConfigSig { n2.asExpr() = c ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll b/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll index e08cd50cdb3f..876b2efd8409 100644 --- a/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll @@ -16,6 +16,8 @@ module KeySizeConfig implements DataFlow::StateConfigSig { predicate isSink(DataFlow::Node sink, KeySizeState state) { sink.(InsufficientKeySizeSink).hasState(state) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks key sizes used in cryptographic algorithms. */ diff --git a/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll b/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll index 740ce24bf62b..855694b299b6 100644 --- a/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll @@ -23,6 +23,8 @@ module IntentUriPermissionManipulationConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(IntentUriPermissionManipulationAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll index de49560e7792..bf87df361b3c 100644 --- a/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll @@ -51,6 +51,8 @@ module JexlInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(JexlInjectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll index 3c1f4b8e68eb..167d56732cd3 100644 --- a/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll @@ -23,6 +23,8 @@ module JndiInjectionFlowConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(JndiInjectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unvalidated user input that is used in JNDI lookup */ diff --git a/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll index 5c055c005167..b6daea4b4738 100644 --- a/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/LdapInjectionQuery.qll @@ -17,6 +17,8 @@ module LdapInjectionFlowConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { any(LdapInjectionAdditionalTaintStep a).step(pred, succ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow from remote sources to LDAP injection vulnerabilities. */ diff --git a/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll b/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll index eaa4c6320c1d..4f1f614dbc42 100644 --- a/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll +++ b/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll @@ -16,6 +16,8 @@ module MissingJwtSignatureCheckConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(JwtParserWithInsecureParseAdditionalFlowStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } module MissingJwtSignatureCheckFlow = DataFlow::Global; diff --git a/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll index 4bf81804f827..da5bcb6931bc 100644 --- a/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll @@ -19,6 +19,8 @@ module MvelInjectionFlowConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(MvelInjectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unsafe user input that is used to construct and evaluate a MVEL expression. */ diff --git a/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll b/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll index b6bd505c38b8..2dd3cf89add5 100644 --- a/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll +++ b/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll @@ -102,6 +102,8 @@ module NumericCastFlowConfig implements DataFlow::ConfigSig { } predicate isBarrierIn(DataFlow::Node node) { isSource(node) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll index 3acf18c453ce..a25b257574b6 100644 --- a/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll @@ -18,6 +18,8 @@ module OgnlInjectionFlowConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(OgnlInjectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unvalidated user input that is used in OGNL EL evaluation. */ diff --git a/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll b/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll index c4c3e6b093cb..e4d2d60b92e9 100644 --- a/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll @@ -17,6 +17,8 @@ module PartialPathTraversalFromRemoteConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node node) { any(PartialPathTraversalMethodCall ma).getQualifier() = node.asExpr() } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unsafe user input that is used to validate against path traversal, but is insufficient and remains vulnerable to Partial Path Traversal. */ diff --git a/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll b/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll index e8415cc19786..f929e97a8ff3 100644 --- a/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll +++ b/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll @@ -28,6 +28,8 @@ module RequestForgeryConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node instanceof RequestForgerySanitizer } predicate isBarrierIn(DataFlow::Node node) { isSource(node) } + + predicate observeDiffInformedIncrementalMode() { any() } } module RequestForgeryFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll b/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll index 40e1ec1b4dbb..7c43d32a407e 100644 --- a/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ResponseSplittingQuery.qll @@ -31,6 +31,8 @@ module ResponseSplittingConfig implements DataFlow::ConfigSig { ) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll b/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll index 66e4a0537d2c..8fed05f2186b 100644 --- a/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll +++ b/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll @@ -20,6 +20,8 @@ module RsaWithoutOaepConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { exists(CryptoAlgoSpec cr | sink.asExpr() = cr.getAlgoSpec()) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Flow for finding RSA ciphers initialized without using OAEP padding. */ diff --git a/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll index 848aae8da30a..55e8eb94f83f 100644 --- a/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll @@ -18,6 +18,8 @@ module SpelInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(SpelExpressionInjectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unsafe user input that is used to construct and evaluate a SpEL expression. */ diff --git a/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll b/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll index 9ba848d1e0df..282133ec5c67 100644 --- a/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll +++ b/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll @@ -126,6 +126,8 @@ module StaticInitializationVectorConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof StaticInitializationVectorSource } predicate isSink(DataFlow::Node sink) { sink instanceof EncryptionInitializationSink } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks the flow from a static initialization vector to the initialization of a cipher */ diff --git a/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll b/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll index c396b48a7b88..6be7b4dc83fb 100644 --- a/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll @@ -72,6 +72,8 @@ module TaintedPathConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { any(TaintedPathAdditionalTaintStep s).step(n1, n2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow from remote sources to the creation of a path. */ diff --git a/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll index a9595b0f6f19..536c8f33dafb 100644 --- a/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll @@ -16,6 +16,8 @@ module TemplateInjectionFlowConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(TemplateInjectionAdditionalTaintStep a).isAdditionalTaintStep(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks server-side template injection (SST) vulnerabilities */ diff --git a/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll index db629143d5ce..8c214d59b9eb 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll @@ -20,6 +20,8 @@ module UnsafeContentResolutionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(ContentUriResolutionAdditionalTaintStep s).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Taint-tracking flow to find paths from remote sources to content URI resolutions. */ diff --git a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll index 739b2713780b..de9a920446d5 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll @@ -325,6 +325,8 @@ private module UnsafeDeserializationConfig implements DataFlow::ConfigSig { } predicate isBarrier(DataFlow::Node node) { isUnsafeDeserializationSanitizer(node) } + + predicate observeDiffInformedIncrementalMode() { any() } } module UnsafeDeserializationFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll b/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll index 2ca38d695512..48c8e50bfaf4 100644 --- a/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UrlForwardQuery.qll @@ -195,6 +195,8 @@ module UrlForwardFlowConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node instanceof UrlForwardBarrier } DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll b/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll index 675937985c48..fff546fc5030 100644 --- a/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UrlRedirectQuery.qll @@ -13,6 +13,8 @@ module UrlRedirectConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof UrlRedirectSink } predicate isBarrier(DataFlow::Node node) { node instanceof UrlRedirectSanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll b/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll index 8e5b177268df..90e47521bf04 100644 --- a/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll +++ b/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll @@ -44,6 +44,8 @@ module WebviewDebugEnabledConfig implements DataFlow::ConfigSig { or node.getEnclosingCallable().getDeclaringType() instanceof NonSecurityTestClass } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll index 38dc1ff993c4..6c541f66940e 100644 --- a/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XPathInjectionQuery.qll @@ -12,6 +12,8 @@ module XPathInjectionConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { sink instanceof XPathInjectionSink } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll index d437ca860d5f..304ec3327a17 100644 --- a/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll @@ -20,6 +20,8 @@ module XsltInjectionFlowConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(XsltInjectionAdditionalTaintStep c).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/XssQuery.qll b/java/ql/lib/semmle/code/java/security/XssQuery.qll index 6fec86a78dd6..dba80ecc1391 100644 --- a/java/ql/lib/semmle/code/java/security/XssQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XssQuery.qll @@ -20,6 +20,8 @@ module XssConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(XssAdditionalTaintStep s).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow from remote sources to cross site scripting vulnerabilities. */ diff --git a/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll b/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll index 58b1e5bfed1a..da092d2e11f3 100644 --- a/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll @@ -18,6 +18,8 @@ module XxeConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { any(XxeAdditionalTaintStep s).step(n1, n2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll b/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll index 0055670d895c..9e2e5e4a6c7e 100644 --- a/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll @@ -43,6 +43,8 @@ module ZipSlipConfig implements DataFlow::ConfigSig { node instanceof SimpleTypeSanitizer or node instanceof PathInjectionSanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow from archive entries to file creation. */ diff --git a/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll index 887100618196..81246814dc21 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll @@ -14,6 +14,8 @@ module RegexInjectionConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof RegexInjectionSink } predicate isBarrier(DataFlow::Node node) { node instanceof RegexInjectionSanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** From 45d9d8a25a1e2a9a53c04866d9ee24f58dc93c46 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 20 Sep 2024 15:07:19 +0200 Subject: [PATCH 071/162] Address comments --- rust/schema/annotations.py | 237 ------------------------------------- 1 file changed, 237 deletions(-) diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 349be3938512..eb32921a0c43 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -23,16 +23,12 @@ class _: """ The base class for expressions. """ - pass - @annotate(Pat) class _: """ The base class for patterns. """ - pass - @annotate(Label) class _: @@ -52,8 +48,6 @@ class _: """ The base class for statements. """ - pass - @annotate(TypeRef) class _: @@ -65,8 +59,6 @@ class _: let z: Option; ``` """ - pass - @annotate(Path) class _: @@ -76,8 +68,6 @@ class _: foo::bar; ``` """ - pass - @annotate(GenericArgList) class _: @@ -87,8 +77,6 @@ class _: x.foo::(42); ``` """ - pass - @annotate(Function) @rust.doc_test_signature(None) @@ -170,19 +158,6 @@ class _: """ -# @annotate(ConstExpr) -# @rust.doc_test_signature("() -> bool") -# class _: -# """ -# A `const` block expression. For example: -# ```rust -# if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { -# return false; -# } -# ``` -# """ - - @annotate(LoopExpr) class _: """ @@ -534,28 +509,6 @@ class _: [1; 10]; ``` """ - pass - - -# @annotate(ElementListExpr) -# class _: -# """ -# An element list expression. For example: -# ```rust -# [1, 2, 3, 4, 5]; -# [1, 2, 3, 4, 5][0] = 6; -# ``` -# """ - - -# @annotate(RepeatExpr) -# class _: -# """ -# A repeat expression. For example: -# ```rust -# [1; 10]; -# ``` -# """ @annotate(LiteralExpr) @@ -573,8 +526,6 @@ class _: true; ``` """ - pass - @annotate(UnderscoreExpr) class _: @@ -584,8 +535,6 @@ class _: _ = 42; ``` """ - pass - @annotate(OffsetOfExpr) class _: @@ -646,8 +595,6 @@ class _: let _ = 42; ``` """ - pass - @annotate(TuplePat) class _: @@ -827,8 +774,6 @@ class _: todo!() ``` """ - pass - @annotate(ArgList) class _: """ @@ -837,8 +782,6 @@ class _: todo!() ``` """ - pass - @annotate(ArrayType) class _: """ @@ -847,8 +790,6 @@ class _: todo!() ``` """ - pass - @annotate(AssocItem) class _: """ @@ -857,8 +798,6 @@ class _: todo!() ``` """ - pass - @annotate(AssocItemList) class _: """ @@ -867,8 +806,6 @@ class _: todo!() ``` """ - pass - @annotate(AssocTypeArg) class _: """ @@ -877,8 +814,6 @@ class _: todo!() ``` """ - pass - @annotate(Attr) class _: """ @@ -887,8 +822,6 @@ class _: todo!() ``` """ - pass - @annotate(ClosureBinder) class _: """ @@ -897,8 +830,6 @@ class _: todo!() ``` """ - pass - @annotate(Const) class _: """ @@ -907,8 +838,6 @@ class _: todo!() ``` """ - pass - @annotate(ConstArg) class _: """ @@ -917,8 +846,6 @@ class _: todo!() ``` """ - pass - @annotate(ConstParam) class _: """ @@ -927,8 +854,6 @@ class _: todo!() ``` """ - pass - @annotate(DynTraitType) class _: """ @@ -937,8 +862,6 @@ class _: todo!() ``` """ - pass - @annotate(Enum) class _: """ @@ -947,8 +870,6 @@ class _: todo!() ``` """ - pass - @annotate(ExternBlock) class _: """ @@ -957,8 +878,6 @@ class _: todo!() ``` """ - pass - @annotate(ExternCrate) class _: """ @@ -967,8 +886,6 @@ class _: todo!() ``` """ - pass - @annotate(ExternItem) class _: """ @@ -977,8 +894,6 @@ class _: todo!() ``` """ - pass - @annotate(ExternItemList) class _: """ @@ -987,8 +902,6 @@ class _: todo!() ``` """ - pass - @annotate(FieldList) class _: """ @@ -997,8 +910,6 @@ class _: todo!() ``` """ - pass - @annotate(FnPtrType) class _: """ @@ -1007,8 +918,6 @@ class _: todo!() ``` """ - pass - @annotate(ForExpr) class _: """ @@ -1017,8 +926,6 @@ class _: todo!() ``` """ - pass - @annotate(ForType) class _: """ @@ -1027,8 +934,6 @@ class _: todo!() ``` """ - pass - @annotate(FormatArgsArg) class _: """ @@ -1037,8 +942,6 @@ class _: todo!() ``` """ - pass - @annotate(FormatArgsExpr) class _: """ @@ -1047,8 +950,6 @@ class _: todo!() ``` """ - pass - @annotate(GenericArg) class _: """ @@ -1057,8 +958,6 @@ class _: todo!() ``` """ - pass - @annotate(GenericParam) class _: """ @@ -1067,8 +966,6 @@ class _: todo!() ``` """ - pass - @annotate(GenericParamList) class _: """ @@ -1077,8 +974,6 @@ class _: todo!() ``` """ - pass - @annotate(Impl) class _: """ @@ -1087,8 +982,6 @@ class _: todo!() ``` """ - pass - @annotate(ImplTraitType) class _: """ @@ -1097,8 +990,6 @@ class _: todo!() ``` """ - pass - @annotate(InferType) class _: """ @@ -1107,8 +998,6 @@ class _: todo!() ``` """ - pass - @annotate(Item) class _: """ @@ -1117,8 +1006,6 @@ class _: todo!() ``` """ - pass - @annotate(ItemList) class _: """ @@ -1127,8 +1014,6 @@ class _: todo!() ``` """ - pass - @annotate(LetElse) class _: """ @@ -1137,8 +1022,6 @@ class _: todo!() ``` """ - pass - @annotate(Lifetime) class _: """ @@ -1147,8 +1030,6 @@ class _: todo!() ``` """ - pass - @annotate(LifetimeArg) class _: """ @@ -1157,8 +1038,6 @@ class _: todo!() ``` """ - pass - @annotate(LifetimeParam) class _: """ @@ -1167,8 +1046,6 @@ class _: todo!() ``` """ - pass - @annotate(MacroCall) class _: """ @@ -1177,8 +1054,6 @@ class _: todo!() ``` """ - pass - @annotate(MacroDef) class _: """ @@ -1187,8 +1062,6 @@ class _: todo!() ``` """ - pass - @annotate(MacroExpr) class _: """ @@ -1197,8 +1070,6 @@ class _: todo!() ``` """ - pass - @annotate(MacroPat) class _: """ @@ -1207,8 +1078,6 @@ class _: todo!() ``` """ - pass - @annotate(MacroRules) class _: """ @@ -1217,8 +1086,6 @@ class _: todo!() ``` """ - pass - @annotate(MacroType) class _: """ @@ -1227,8 +1094,6 @@ class _: todo!() ``` """ - pass - @annotate(MatchArmList) class _: """ @@ -1237,8 +1102,6 @@ class _: todo!() ``` """ - pass - @annotate(MatchGuard) class _: """ @@ -1247,8 +1110,6 @@ class _: todo!() ``` """ - pass - @annotate(Meta) class _: """ @@ -1257,8 +1118,6 @@ class _: todo!() ``` """ - pass - @annotate(Name) class _: """ @@ -1267,8 +1126,6 @@ class _: todo!() ``` """ - pass - @annotate(NameRef) class _: """ @@ -1277,8 +1134,6 @@ class _: todo!() ``` """ - pass - @annotate(NeverType) class _: """ @@ -1287,8 +1142,6 @@ class _: todo!() ``` """ - pass - @annotate(Param) class _: """ @@ -1297,8 +1150,6 @@ class _: todo!() ``` """ - pass - @annotate(ParamList) class _: """ @@ -1307,8 +1158,6 @@ class _: todo!() ``` """ - pass - @annotate(ParenExpr) class _: """ @@ -1317,8 +1166,6 @@ class _: todo!() ``` """ - pass - @annotate(ParenPat) class _: """ @@ -1327,8 +1174,6 @@ class _: todo!() ``` """ - pass - @annotate(ParenType) class _: """ @@ -1337,8 +1182,6 @@ class _: todo!() ``` """ - pass - @annotate(PathSegment) class _: """ @@ -1347,8 +1190,6 @@ class _: todo!() ``` """ - pass - @annotate(PathType) class _: """ @@ -1357,8 +1198,6 @@ class _: todo!() ``` """ - pass - @annotate(PtrType) class _: """ @@ -1367,8 +1206,6 @@ class _: todo!() ``` """ - pass - @annotate(RecordExprFieldList) class _: """ @@ -1377,8 +1214,6 @@ class _: todo!() ``` """ - pass - @annotate(RecordField) class _: """ @@ -1387,8 +1222,6 @@ class _: todo!() ``` """ - pass - @annotate(RecordFieldList) class _: """ @@ -1397,8 +1230,6 @@ class _: todo!() ``` """ - pass - @annotate(RecordPatFieldList) class _: """ @@ -1407,8 +1238,6 @@ class _: todo!() ``` """ - pass - @annotate(RefType) class _: """ @@ -1417,8 +1246,6 @@ class _: todo!() ``` """ - pass - @annotate(Rename) class _: """ @@ -1427,8 +1254,6 @@ class _: todo!() ``` """ - pass - @annotate(RestPat) class _: """ @@ -1437,8 +1262,6 @@ class _: todo!() ``` """ - pass - @annotate(RetType) class _: """ @@ -1447,8 +1270,6 @@ class _: todo!() ``` """ - pass - @annotate(ReturnTypeSyntax) class _: """ @@ -1457,8 +1278,6 @@ class _: todo!() ``` """ - pass - @annotate(SelfParam) class _: """ @@ -1467,8 +1286,6 @@ class _: todo!() ``` """ - pass - @annotate(SliceType) class _: """ @@ -1477,8 +1294,6 @@ class _: todo!() ``` """ - pass - @annotate(SourceFile) class _: """ @@ -1487,8 +1302,6 @@ class _: todo!() ``` """ - pass - @annotate(Static) class _: """ @@ -1497,8 +1310,6 @@ class _: todo!() ``` """ - pass - @annotate(StmtList) class _: """ @@ -1507,8 +1318,6 @@ class _: todo!() ``` """ - pass - @annotate(Struct) class _: """ @@ -1517,8 +1326,6 @@ class _: todo!() ``` """ - pass - @annotate(TokenTree) class _: """ @@ -1527,8 +1334,6 @@ class _: todo!() ``` """ - pass - @annotate(Trait) class _: """ @@ -1537,8 +1342,6 @@ class _: todo!() ``` """ - pass - @annotate(TraitAlias) class _: """ @@ -1547,8 +1350,6 @@ class _: todo!() ``` """ - pass - @annotate(TryExpr) class _: """ @@ -1557,8 +1358,6 @@ class _: todo!() ``` """ - pass - @annotate(TupleField) class _: """ @@ -1567,8 +1366,6 @@ class _: todo!() ``` """ - pass - @annotate(TupleFieldList) class _: """ @@ -1577,8 +1374,6 @@ class _: todo!() ``` """ - pass - @annotate(TupleType) class _: """ @@ -1587,8 +1382,6 @@ class _: todo!() ``` """ - pass - @annotate(TypeAlias) class _: """ @@ -1597,8 +1390,6 @@ class _: todo!() ``` """ - pass - @annotate(TypeArg) class _: """ @@ -1607,8 +1398,6 @@ class _: todo!() ``` """ - pass - @annotate(TypeBound) class _: """ @@ -1617,8 +1406,6 @@ class _: todo!() ``` """ - pass - @annotate(TypeBoundList) class _: """ @@ -1627,8 +1414,6 @@ class _: todo!() ``` """ - pass - @annotate(TypeParam) class _: """ @@ -1637,8 +1422,6 @@ class _: todo!() ``` """ - pass - @annotate(Union) class _: """ @@ -1647,8 +1430,6 @@ class _: todo!() ``` """ - pass - @annotate(Use) class _: """ @@ -1657,8 +1438,6 @@ class _: todo!() ``` """ - pass - @annotate(UseTree) class _: """ @@ -1667,8 +1446,6 @@ class _: todo!() ``` """ - pass - @annotate(UseTreeList) class _: """ @@ -1677,8 +1454,6 @@ class _: todo!() ``` """ - pass - @annotate(Variant) class _: """ @@ -1687,8 +1462,6 @@ class _: todo!() ``` """ - pass - @annotate(VariantList) class _: """ @@ -1697,8 +1470,6 @@ class _: todo!() ``` """ - pass - @annotate(Visibility) class _: """ @@ -1707,8 +1478,6 @@ class _: todo!() ``` """ - pass - @annotate(WhereClause) class _: """ @@ -1717,8 +1486,6 @@ class _: todo!() ``` """ - pass - @annotate(WherePred) class _: """ @@ -1727,8 +1494,6 @@ class _: todo!() ``` """ - pass - @annotate(WhileExpr) class _: """ @@ -1737,5 +1502,3 @@ class _: todo!() ``` """ - pass - From 7b4137fbc81cbc768eb87dd342fe8b25cdcf1c00 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 20 Sep 2024 15:32:08 +0200 Subject: [PATCH 072/162] Rust: generate the extractor --- rust/extractor/src/main.rs | 45 +- rust/extractor/src/translate.rs | 2178 +------------------- rust/extractor/src/translate/base.rs | 86 + rust/extractor/src/translate/generated.rs | 2185 +++++++++++++++++++++ rust/generate-schema/src/main.rs | 35 +- 5 files changed, 2338 insertions(+), 2191 deletions(-) create mode 100644 rust/extractor/src/translate/base.rs create mode 100644 rust/extractor/src/translate/generated.rs diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs index 160421456626..f7bcedfd8c21 100644 --- a/rust/extractor/src/main.rs +++ b/rust/extractor/src/main.rs @@ -1,11 +1,43 @@ use anyhow::Context; use ra_ap_ide_db::line_index::LineIndex; +use ra_ap_parser::Edition; mod archive; mod config; pub mod generated; mod translate; pub mod trap; +use ra_ap_syntax::ast::SourceFile; +use ra_ap_syntax::AstNode; +pub fn extract( + archiver: &archive::Archiver, + traps: &trap::TrapFileProvider, + file: std::path::PathBuf, +) -> anyhow::Result<()> { + let file = std::path::absolute(&file).unwrap_or(file); + let file = std::fs::canonicalize(&file).unwrap_or(file); + archiver.archive(&file); + let input = std::fs::read(&file)?; + let input = String::from_utf8(input)?; + let line_index = LineIndex::new(&input); + let display_path = file.to_string_lossy(); + let mut trap = traps.create("source", &file); + let label = trap.emit_file(&file); + let mut translator = translate::Translator::new(trap, label, line_index); + + let parse = ra_ap_syntax::ast::SourceFile::parse(&input, Edition::CURRENT); + for err in parse.errors() { + let (start, _) = translator.location(err.range()); + log::warn!("{}:{}:{}: {}", display_path, start.line, start.col, err); + } + if let Some(ast) = SourceFile::cast(parse.syntax_node()) { + translator.emit_source_file(ast); + translator.trap.commit()? + } else { + log::warn!("Skipped {}", display_path); + } + Ok(()) +} fn main() -> anyhow::Result<()> { let cfg = config::Config::extract().context("failed to load configuration")?; stderrlog::new() @@ -18,18 +50,7 @@ fn main() -> anyhow::Result<()> { root: cfg.source_archive_dir, }; for file in cfg.inputs { - let file = std::path::absolute(&file).unwrap_or(file); - let file = std::fs::canonicalize(&file).unwrap_or(file); - archiver.archive(&file); - let input = std::fs::read(&file)?; - let input = String::from_utf8(input)?; - let line_index = LineIndex::new(&input); - let display_path = file.to_string_lossy(); - let mut trap = traps.create("source", &file); - let label = trap.emit_file(&file); - translate::SourceFileTranslator::new(trap, label, line_index) - .extract(&display_path, &input) - .context("writing trap file")?; + extract(&archiver, &traps, file)?; } Ok(()) diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 3e415db0e7cc..cf8c9c670204 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -1,2176 +1,4 @@ -use crate::generated; -use crate::trap::{Label, TrapClass, TrapFile, TrapId}; -use codeql_extractor::trap::{self}; -use ra_ap_ide_db::line_index::LineIndex; -use ra_ap_syntax::ast::{ - HasArgList, HasAttrs, HasGenericArgs, HasGenericParams, HasLoopBody, HasModuleItem, HasName, - HasTypeBounds, HasVisibility, RangeItem, -}; -use ra_ap_syntax::{ast, AstNode, Edition, SourceFile, TextSize}; +mod base; +mod generated; -pub struct SourceFileTranslator { - trap: TrapFile, - label: trap::Label, - line_index: LineIndex, -} - -trait TextValue { - fn try_get_text(&self) -> Option; -} - -impl TextValue for ast::Lifetime { - fn try_get_text(&self) -> Option { - self.text().to_string().into() - } -} -impl TextValue for ast::Name { - fn try_get_text(&self) -> Option { - self.text().to_string().into() - } -} -impl TextValue for ast::Literal { - fn try_get_text(&self) -> Option { - self.token().text().to_string().into() - } -} -impl TextValue for ast::NameRef { - fn try_get_text(&self) -> Option { - self.text().to_string().into() - } -} -impl TextValue for ast::Abi { - fn try_get_text(&self) -> Option { - self.abi_string().map(|x| x.to_string()) - } -} - -impl TextValue for ast::BinExpr { - fn try_get_text(&self) -> Option { - self.op_token().map(|x| x.text().to_string()) - } -} -impl TextValue for ast::PrefixExpr { - fn try_get_text(&self) -> Option { - self.op_token().map(|x| x.text().to_string()) - } -} -impl TextValue for ast::RangeExpr { - fn try_get_text(&self) -> Option { - self.op_token().map(|x| x.text().to_string()) - } -} -impl TextValue for ast::RangePat { - fn try_get_text(&self) -> Option { - self.op_token().map(|x| x.text().to_string()) - } -} -impl SourceFileTranslator { - pub fn new(trap: TrapFile, label: trap::Label, line_index: LineIndex) -> SourceFileTranslator { - SourceFileTranslator { - trap, - label, - line_index, - } - } - pub fn extract(&mut self, path: &str, input: &str) -> Result<(), std::io::Error> { - let parse = ra_ap_syntax::ast::SourceFile::parse(input, Edition::CURRENT); - for err in parse.errors() { - let start = self.line_index.line_col(err.range().start()); - log::warn!("{}:{}:{}: {}", path, start.line + 1, start.col + 1, err); - } - if let Some(ast) = SourceFile::cast(parse.syntax_node()) { - self.emit_source_file(ast); - } else { - log::warn!("Skipped {}", path); - } - self.trap.commit() - } - fn emit_else_branch(&mut self, node: ast::ElseBranch) -> Label { - match node { - ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).into(), - ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).into(), - } - } - fn emit_location(&mut self, label: Label, node: impl AstNode) { - let range = node.syntax().text_range(); - let start = self.line_index.line_col(range.start()); - let end = self.line_index.line_col( - range - .end() - .checked_sub(TextSize::new(1)) - .unwrap_or(range.end()), - ); - self.trap.emit_location(self.label, label, start, end) - } - fn emit_assoc_item(&mut self, node: ast::AssocItem) -> Label { - match node { - ast::AssocItem::Const(inner) => self.emit_const(inner).into(), - ast::AssocItem::Fn(inner) => self.emit_fn(inner).into(), - ast::AssocItem::MacroCall(inner) => self.emit_macro_call(inner).into(), - ast::AssocItem::TypeAlias(inner) => self.emit_type_alias(inner).into(), - } - } - - fn emit_expr(&mut self, node: ast::Expr) -> Label { - match node { - ast::Expr::ArrayExpr(inner) => self.emit_array_expr(inner).into(), - ast::Expr::AsmExpr(inner) => self.emit_asm_expr(inner).into(), - ast::Expr::AwaitExpr(inner) => self.emit_await_expr(inner).into(), - ast::Expr::BecomeExpr(inner) => self.emit_become_expr(inner).into(), - ast::Expr::BinExpr(inner) => self.emit_bin_expr(inner).into(), - ast::Expr::BlockExpr(inner) => self.emit_block_expr(inner).into(), - ast::Expr::BreakExpr(inner) => self.emit_break_expr(inner).into(), - ast::Expr::CallExpr(inner) => self.emit_call_expr(inner).into(), - ast::Expr::CastExpr(inner) => self.emit_cast_expr(inner).into(), - ast::Expr::ClosureExpr(inner) => self.emit_closure_expr(inner).into(), - ast::Expr::ContinueExpr(inner) => self.emit_continue_expr(inner).into(), - ast::Expr::FieldExpr(inner) => self.emit_field_expr(inner).into(), - ast::Expr::ForExpr(inner) => self.emit_for_expr(inner).into(), - ast::Expr::FormatArgsExpr(inner) => self.emit_format_args_expr(inner).into(), - ast::Expr::IfExpr(inner) => self.emit_if_expr(inner).into(), - ast::Expr::IndexExpr(inner) => self.emit_index_expr(inner).into(), - ast::Expr::LetExpr(inner) => self.emit_let_expr(inner).into(), - ast::Expr::Literal(inner) => self.emit_literal(inner).into(), - ast::Expr::LoopExpr(inner) => self.emit_loop_expr(inner).into(), - ast::Expr::MacroExpr(inner) => self.emit_macro_expr(inner).into(), - ast::Expr::MatchExpr(inner) => self.emit_match_expr(inner).into(), - ast::Expr::MethodCallExpr(inner) => self.emit_method_call_expr(inner).into(), - ast::Expr::OffsetOfExpr(inner) => self.emit_offset_of_expr(inner).into(), - ast::Expr::ParenExpr(inner) => self.emit_paren_expr(inner).into(), - ast::Expr::PathExpr(inner) => self.emit_path_expr(inner).into(), - ast::Expr::PrefixExpr(inner) => self.emit_prefix_expr(inner).into(), - ast::Expr::RangeExpr(inner) => self.emit_range_expr(inner).into(), - ast::Expr::RecordExpr(inner) => self.emit_record_expr(inner).into(), - ast::Expr::RefExpr(inner) => self.emit_ref_expr(inner).into(), - ast::Expr::ReturnExpr(inner) => self.emit_return_expr(inner).into(), - ast::Expr::TryExpr(inner) => self.emit_try_expr(inner).into(), - ast::Expr::TupleExpr(inner) => self.emit_tuple_expr(inner).into(), - ast::Expr::UnderscoreExpr(inner) => self.emit_underscore_expr(inner).into(), - ast::Expr::WhileExpr(inner) => self.emit_while_expr(inner).into(), - ast::Expr::YeetExpr(inner) => self.emit_yeet_expr(inner).into(), - ast::Expr::YieldExpr(inner) => self.emit_yield_expr(inner).into(), - } - } - - fn emit_extern_item(&mut self, node: ast::ExternItem) -> Label { - match node { - ast::ExternItem::Fn(inner) => self.emit_fn(inner).into(), - ast::ExternItem::MacroCall(inner) => self.emit_macro_call(inner).into(), - ast::ExternItem::Static(inner) => self.emit_static(inner).into(), - ast::ExternItem::TypeAlias(inner) => self.emit_type_alias(inner).into(), - } - } - - fn emit_field_list(&mut self, node: ast::FieldList) -> Label { - match node { - ast::FieldList::RecordFieldList(inner) => self.emit_record_field_list(inner).into(), - ast::FieldList::TupleFieldList(inner) => self.emit_tuple_field_list(inner).into(), - } - } - - fn emit_generic_arg(&mut self, node: ast::GenericArg) -> Label { - match node { - ast::GenericArg::AssocTypeArg(inner) => self.emit_assoc_type_arg(inner).into(), - ast::GenericArg::ConstArg(inner) => self.emit_const_arg(inner).into(), - ast::GenericArg::LifetimeArg(inner) => self.emit_lifetime_arg(inner).into(), - ast::GenericArg::TypeArg(inner) => self.emit_type_arg(inner).into(), - } - } - - fn emit_generic_param(&mut self, node: ast::GenericParam) -> Label { - match node { - ast::GenericParam::ConstParam(inner) => self.emit_const_param(inner).into(), - ast::GenericParam::LifetimeParam(inner) => self.emit_lifetime_param(inner).into(), - ast::GenericParam::TypeParam(inner) => self.emit_type_param(inner).into(), - } - } - - fn emit_pat(&mut self, node: ast::Pat) -> Label { - match node { - ast::Pat::BoxPat(inner) => self.emit_box_pat(inner).into(), - ast::Pat::ConstBlockPat(inner) => self.emit_const_block_pat(inner).into(), - ast::Pat::IdentPat(inner) => self.emit_ident_pat(inner).into(), - ast::Pat::LiteralPat(inner) => self.emit_literal_pat(inner).into(), - ast::Pat::MacroPat(inner) => self.emit_macro_pat(inner).into(), - ast::Pat::OrPat(inner) => self.emit_or_pat(inner).into(), - ast::Pat::ParenPat(inner) => self.emit_paren_pat(inner).into(), - ast::Pat::PathPat(inner) => self.emit_path_pat(inner).into(), - ast::Pat::RangePat(inner) => self.emit_range_pat(inner).into(), - ast::Pat::RecordPat(inner) => self.emit_record_pat(inner).into(), - ast::Pat::RefPat(inner) => self.emit_ref_pat(inner).into(), - ast::Pat::RestPat(inner) => self.emit_rest_pat(inner).into(), - ast::Pat::SlicePat(inner) => self.emit_slice_pat(inner).into(), - ast::Pat::TuplePat(inner) => self.emit_tuple_pat(inner).into(), - ast::Pat::TupleStructPat(inner) => self.emit_tuple_struct_pat(inner).into(), - ast::Pat::WildcardPat(inner) => self.emit_wildcard_pat(inner).into(), - } - } - - fn emit_stmt(&mut self, node: ast::Stmt) -> Label { - match node { - ast::Stmt::ExprStmt(inner) => self.emit_expr_stmt(inner).into(), - ast::Stmt::Item(inner) => self.emit_item(inner).into(), - ast::Stmt::LetStmt(inner) => self.emit_let_stmt(inner).into(), - } - } - - fn emit_type(&mut self, node: ast::Type) -> Label { - match node { - ast::Type::ArrayType(inner) => self.emit_array_type(inner).into(), - ast::Type::DynTraitType(inner) => self.emit_dyn_trait_type(inner).into(), - ast::Type::FnPtrType(inner) => self.emit_fn_ptr_type(inner).into(), - ast::Type::ForType(inner) => self.emit_for_type(inner).into(), - ast::Type::ImplTraitType(inner) => self.emit_impl_trait_type(inner).into(), - ast::Type::InferType(inner) => self.emit_infer_type(inner).into(), - ast::Type::MacroType(inner) => self.emit_macro_type(inner).into(), - ast::Type::NeverType(inner) => self.emit_never_type(inner).into(), - ast::Type::ParenType(inner) => self.emit_paren_type(inner).into(), - ast::Type::PathType(inner) => self.emit_path_type(inner).into(), - ast::Type::PtrType(inner) => self.emit_ptr_type(inner).into(), - ast::Type::RefType(inner) => self.emit_ref_type(inner).into(), - ast::Type::SliceType(inner) => self.emit_slice_type(inner).into(), - ast::Type::TupleType(inner) => self.emit_tuple_type(inner).into(), - } - } - - fn emit_item(&mut self, node: ast::Item) -> Label { - match node { - ast::Item::Const(inner) => self.emit_const(inner).into(), - ast::Item::Enum(inner) => self.emit_enum(inner).into(), - ast::Item::ExternBlock(inner) => self.emit_extern_block(inner).into(), - ast::Item::ExternCrate(inner) => self.emit_extern_crate(inner).into(), - ast::Item::Fn(inner) => self.emit_fn(inner).into(), - ast::Item::Impl(inner) => self.emit_impl(inner).into(), - ast::Item::MacroCall(inner) => self.emit_macro_call(inner).into(), - ast::Item::MacroDef(inner) => self.emit_macro_def(inner).into(), - ast::Item::MacroRules(inner) => self.emit_macro_rules(inner).into(), - ast::Item::Module(inner) => self.emit_module(inner).into(), - ast::Item::Static(inner) => self.emit_static(inner).into(), - ast::Item::Struct(inner) => self.emit_struct(inner).into(), - ast::Item::Trait(inner) => self.emit_trait(inner).into(), - ast::Item::TraitAlias(inner) => self.emit_trait_alias(inner).into(), - ast::Item::TypeAlias(inner) => self.emit_type_alias(inner).into(), - ast::Item::Union(inner) => self.emit_union(inner).into(), - ast::Item::Use(inner) => self.emit_use(inner).into(), - } - } - - fn emit_abi(&mut self, node: ast::Abi) -> Label { - let abi_string = node.try_get_text(); - let label = self.trap.emit(generated::Abi { - id: TrapId::Star, - abi_string, - }); - self.emit_location(label, node); - label - } - - fn emit_arg_list(&mut self, node: ast::ArgList) -> Label { - let args = node.args().map(|x| self.emit_expr(x)).collect(); - let label = self.trap.emit(generated::ArgList { - id: TrapId::Star, - args, - }); - self.emit_location(label, node); - label - } - - fn emit_array_expr(&mut self, node: ast::ArrayExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let exprs = node.exprs().map(|x| self.emit_expr(x)).collect(); - let label = self.trap.emit(generated::ArrayExpr { - id: TrapId::Star, - attrs, - exprs, - }); - self.emit_location(label, node); - label - } - - fn emit_array_type(&mut self, node: ast::ArrayType) -> Label { - let const_arg = node.const_arg().map(|x| self.emit_const_arg(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::ArrayType { - id: TrapId::Star, - const_arg, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_asm_expr(&mut self, node: ast::AsmExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::AsmExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_assoc_item_list( - &mut self, - node: ast::AssocItemList, - ) -> Label { - let assoc_items = node - .assoc_items() - .map(|x| self.emit_assoc_item(x)) - .collect(); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = self.trap.emit(generated::AssocItemList { - id: TrapId::Star, - assoc_items, - attrs, - }); - self.emit_location(label, node); - label - } - - fn emit_assoc_type_arg(&mut self, node: ast::AssocTypeArg) -> Label { - let const_arg = node.const_arg().map(|x| self.emit_const_arg(x)); - let generic_arg_list = node - .generic_arg_list() - .map(|x| self.emit_generic_arg_list(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let return_type_syntax = node - .return_type_syntax() - .map(|x| self.emit_return_type_syntax(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let label = self.trap.emit(generated::AssocTypeArg { - id: TrapId::Star, - const_arg, - generic_arg_list, - name_ref, - param_list, - ret_type, - return_type_syntax, - ty, - type_bound_list, - }); - self.emit_location(label, node); - label - } - - fn emit_attr(&mut self, node: ast::Attr) -> Label { - let meta = node.meta().map(|x| self.emit_meta(x)); - let label = self.trap.emit(generated::Attr { - id: TrapId::Star, - meta, - }); - self.emit_location(label, node); - label - } - - fn emit_await_expr(&mut self, node: ast::AwaitExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::AwaitExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_become_expr(&mut self, node: ast::BecomeExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::BecomeExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_bin_expr(&mut self, node: ast::BinExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lhs = node.lhs().map(|x| self.emit_expr(x)); - let operator_name = node.try_get_text(); - let rhs = node.rhs().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::BinaryExpr { - id: TrapId::Star, - attrs, - lhs, - operator_name, - rhs, - }); - self.emit_location(label, node); - label - } - - fn emit_block_expr(&mut self, node: ast::BlockExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = node.label().map(|x| self.emit_label(x)); - let stmt_list = node.stmt_list().map(|x| self.emit_stmt_list(x)); - let label = self.trap.emit(generated::BlockExpr { - id: TrapId::Star, - attrs, - label, - stmt_list, - }); - self.emit_location(label, node); - label - } - - fn emit_box_pat(&mut self, node: ast::BoxPat) -> Label { - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::BoxPat { - id: TrapId::Star, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_break_expr(&mut self, node: ast::BreakExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let label = self.trap.emit(generated::BreakExpr { - id: TrapId::Star, - attrs, - expr, - lifetime, - }); - self.emit_location(label, node); - label - } - - fn emit_call_expr(&mut self, node: ast::CallExpr) -> Label { - let arg_list = node.arg_list().map(|x| self.emit_arg_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::CallExpr { - id: TrapId::Star, - arg_list, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_cast_expr(&mut self, node: ast::CastExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::CastExpr { - id: TrapId::Star, - attrs, - expr, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_closure_binder(&mut self, node: ast::ClosureBinder) -> Label { - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let label = self.trap.emit(generated::ClosureBinder { - id: TrapId::Star, - generic_param_list, - }); - self.emit_location(label, node); - label - } - - fn emit_closure_expr(&mut self, node: ast::ClosureExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_expr(x)); - let closure_binder = node.closure_binder().map(|x| self.emit_closure_binder(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let label = self.trap.emit(generated::ClosureExpr { - id: TrapId::Star, - attrs, - body, - closure_binder, - param_list, - ret_type, - }); - self.emit_location(label, node); - label - } - - fn emit_const(&mut self, node: ast::Const) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_expr(x)); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::Const { - id: TrapId::Star, - attrs, - body, - name, - ty, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_const_arg(&mut self, node: ast::ConstArg) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::ConstArg { - id: TrapId::Star, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_const_block_pat( - &mut self, - node: ast::ConstBlockPat, - ) -> Label { - let block_expr = node.block_expr().map(|x| self.emit_block_expr(x)); - let label = self.trap.emit(generated::ConstBlockPat { - id: TrapId::Star, - block_expr, - }); - self.emit_location(label, node); - label - } - - fn emit_const_param(&mut self, node: ast::ConstParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let default_val = node.default_val().map(|x| self.emit_const_arg(x)); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::ConstParam { - id: TrapId::Star, - attrs, - default_val, - name, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_continue_expr(&mut self, node: ast::ContinueExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let label = self.trap.emit(generated::ContinueExpr { - id: TrapId::Star, - attrs, - lifetime, - }); - self.emit_location(label, node); - label - } - - fn emit_dyn_trait_type(&mut self, node: ast::DynTraitType) -> Label { - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let label = self.trap.emit(generated::DynTraitType { - id: TrapId::Star, - type_bound_list, - }); - self.emit_location(label, node); - label - } - - fn emit_enum(&mut self, node: ast::Enum) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let variant_list = node.variant_list().map(|x| self.emit_variant_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::Enum { - id: TrapId::Star, - attrs, - generic_param_list, - name, - variant_list, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_expr_stmt(&mut self, node: ast::ExprStmt) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::ExprStmt { - id: TrapId::Star, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_extern_block(&mut self, node: ast::ExternBlock) -> Label { - let abi = node.abi().map(|x| self.emit_abi(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let extern_item_list = node - .extern_item_list() - .map(|x| self.emit_extern_item_list(x)); - let label = self.trap.emit(generated::ExternBlock { - id: TrapId::Star, - abi, - attrs, - extern_item_list, - }); - self.emit_location(label, node); - label - } - - fn emit_extern_crate(&mut self, node: ast::ExternCrate) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let rename = node.rename().map(|x| self.emit_rename(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::ExternCrate { - id: TrapId::Star, - attrs, - name_ref, - rename, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_extern_item_list( - &mut self, - node: ast::ExternItemList, - ) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let extern_items = node - .extern_items() - .map(|x| self.emit_extern_item(x)) - .collect(); - let label = self.trap.emit(generated::ExternItemList { - id: TrapId::Star, - attrs, - extern_items, - }); - self.emit_location(label, node); - label - } - - fn emit_field_expr(&mut self, node: ast::FieldExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let label = self.trap.emit(generated::FieldExpr { - id: TrapId::Star, - attrs, - expr, - name_ref, - }); - self.emit_location(label, node); - label - } - - fn emit_fn(&mut self, node: ast::Fn) -> Label { - let abi = node.abi().map(|x| self.emit_abi(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_block_expr(x)); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::Function { - id: TrapId::Star, - abi, - attrs, - body, - generic_param_list, - name, - param_list, - ret_type, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_fn_ptr_type(&mut self, node: ast::FnPtrType) -> Label { - let abi = node.abi().map(|x| self.emit_abi(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let label = self.trap.emit(generated::FnPtrType { - id: TrapId::Star, - abi, - param_list, - ret_type, - }); - self.emit_location(label, node); - label - } - - fn emit_for_expr(&mut self, node: ast::ForExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let iterable = node.iterable().map(|x| self.emit_expr(x)); - let label = node.label().map(|x| self.emit_label(x)); - let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::ForExpr { - id: TrapId::Star, - attrs, - iterable, - label, - loop_body, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_for_type(&mut self, node: ast::ForType) -> Label { - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::ForType { - id: TrapId::Star, - generic_param_list, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_format_args_arg( - &mut self, - node: ast::FormatArgsArg, - ) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); - let name = node.name().map(|x| self.emit_name(x)); - let label = self.trap.emit(generated::FormatArgsArg { - id: TrapId::Star, - expr, - name, - }); - self.emit_location(label, node); - label - } - - fn emit_format_args_expr( - &mut self, - node: ast::FormatArgsExpr, - ) -> Label { - let args = node.args().map(|x| self.emit_format_args_arg(x)).collect(); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let template = node.template().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::FormatArgsExpr { - id: TrapId::Star, - args, - attrs, - template, - }); - self.emit_location(label, node); - label - } - - fn emit_generic_arg_list( - &mut self, - node: ast::GenericArgList, - ) -> Label { - let generic_args = node - .generic_args() - .map(|x| self.emit_generic_arg(x)) - .collect(); - let label = self.trap.emit(generated::GenericArgList { - id: TrapId::Star, - generic_args, - }); - self.emit_location(label, node); - label - } - - fn emit_generic_param_list( - &mut self, - node: ast::GenericParamList, - ) -> Label { - let generic_params = node - .generic_params() - .map(|x| self.emit_generic_param(x)) - .collect(); - let label = self.trap.emit(generated::GenericParamList { - id: TrapId::Star, - generic_params, - }); - self.emit_location(label, node); - label - } - - fn emit_ident_pat(&mut self, node: ast::IdentPat) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name = node.name().map(|x| self.emit_name(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::IdentPat { - id: TrapId::Star, - attrs, - name, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_if_expr(&mut self, node: ast::IfExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let condition = node.condition().map(|x| self.emit_expr(x)); - let else_ = node.else_branch().map(|x| self.emit_else_branch(x)); - let then = node.then_branch().map(|x| self.emit_block_expr(x)); - let label = self.trap.emit(generated::IfExpr { - id: TrapId::Star, - attrs, - condition, - else_, - then, - }); - self.emit_location(label, node); - label - } - - fn emit_impl(&mut self, node: ast::Impl) -> Label { - let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let self_ty = node.self_ty().map(|x| self.emit_type(x)); - let trait_ = node.trait_().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::Impl { - id: TrapId::Star, - assoc_item_list, - attrs, - generic_param_list, - self_ty, - trait_, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_impl_trait_type( - &mut self, - node: ast::ImplTraitType, - ) -> Label { - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let label = self.trap.emit(generated::ImplTraitType { - id: TrapId::Star, - type_bound_list, - }); - self.emit_location(label, node); - label - } - - fn emit_index_expr(&mut self, node: ast::IndexExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let base = node.base().map(|x| self.emit_expr(x)); - let index = node.index().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::IndexExpr { - id: TrapId::Star, - attrs, - base, - index, - }); - self.emit_location(label, node); - label - } - - fn emit_infer_type(&mut self, node: ast::InferType) -> Label { - let label = self.trap.emit(generated::InferType { id: TrapId::Star }); - self.emit_location(label, node); - label - } - - fn emit_item_list(&mut self, node: ast::ItemList) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let items = node.items().map(|x| self.emit_item(x)).collect(); - let label = self.trap.emit(generated::ItemList { - id: TrapId::Star, - attrs, - items, - }); - self.emit_location(label, node); - label - } - - fn emit_label(&mut self, node: ast::Label) -> Label { - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let label = self.trap.emit(generated::Label { - id: TrapId::Star, - lifetime, - }); - self.emit_location(label, node); - label - } - - fn emit_let_else(&mut self, node: ast::LetElse) -> Label { - let block_expr = node.block_expr().map(|x| self.emit_block_expr(x)); - let label = self.trap.emit(generated::LetElse { - id: TrapId::Star, - block_expr, - }); - self.emit_location(label, node); - label - } - - fn emit_let_expr(&mut self, node: ast::LetExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::LetExpr { - id: TrapId::Star, - attrs, - expr, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_let_stmt(&mut self, node: ast::LetStmt) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let initializer = node.initializer().map(|x| self.emit_expr(x)); - let let_else = node.let_else().map(|x| self.emit_let_else(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::LetStmt { - id: TrapId::Star, - attrs, - initializer, - let_else, - pat, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_lifetime(&mut self, node: ast::Lifetime) -> Label { - let text = node.try_get_text(); - let label = self.trap.emit(generated::Lifetime { - id: TrapId::Star, - text, - }); - self.emit_location(label, node); - label - } - - fn emit_lifetime_arg(&mut self, node: ast::LifetimeArg) -> Label { - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let label = self.trap.emit(generated::LifetimeArg { - id: TrapId::Star, - lifetime, - }); - self.emit_location(label, node); - label - } - - fn emit_lifetime_param(&mut self, node: ast::LifetimeParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let label = self.trap.emit(generated::LifetimeParam { - id: TrapId::Star, - attrs, - lifetime, - type_bound_list, - }); - self.emit_location(label, node); - label - } - - fn emit_literal(&mut self, node: ast::Literal) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let text_value = node.try_get_text(); - let label = self.trap.emit(generated::LiteralExpr { - id: TrapId::Star, - attrs, - text_value, - }); - self.emit_location(label, node); - label - } - - fn emit_literal_pat(&mut self, node: ast::LiteralPat) -> Label { - let literal = node.literal().map(|x| self.emit_literal(x)); - let label = self.trap.emit(generated::LiteralPat { - id: TrapId::Star, - literal, - }); - self.emit_location(label, node); - label - } - - fn emit_loop_expr(&mut self, node: ast::LoopExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = node.label().map(|x| self.emit_label(x)); - let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); - let label = self.trap.emit(generated::LoopExpr { - id: TrapId::Star, - attrs, - label, - loop_body, - }); - self.emit_location(label, node); - label - } - - fn emit_macro_call(&mut self, node: ast::MacroCall) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let path = node.path().map(|x| self.emit_path(x)); - let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); - let label = self.trap.emit(generated::MacroCall { - id: TrapId::Star, - attrs, - path, - token_tree, - }); - self.emit_location(label, node); - label - } - - fn emit_macro_def(&mut self, node: ast::MacroDef) -> Label { - let args = node.args().map(|x| self.emit_token_tree(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_token_tree(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::MacroDef { - id: TrapId::Star, - args, - attrs, - body, - name, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_macro_expr(&mut self, node: ast::MacroExpr) -> Label { - let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); - let label = self.trap.emit(generated::MacroExpr { - id: TrapId::Star, - macro_call, - }); - self.emit_location(label, node); - label - } - - fn emit_macro_pat(&mut self, node: ast::MacroPat) -> Label { - let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); - let label = self.trap.emit(generated::MacroPat { - id: TrapId::Star, - macro_call, - }); - self.emit_location(label, node); - label - } - - fn emit_macro_rules(&mut self, node: ast::MacroRules) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name = node.name().map(|x| self.emit_name(x)); - let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::MacroRules { - id: TrapId::Star, - attrs, - name, - token_tree, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_macro_type(&mut self, node: ast::MacroType) -> Label { - let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); - let label = self.trap.emit(generated::MacroType { - id: TrapId::Star, - macro_call, - }); - self.emit_location(label, node); - label - } - - fn emit_match_arm(&mut self, node: ast::MatchArm) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let guard = node.guard().map(|x| self.emit_match_guard(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::MatchArm { - id: TrapId::Star, - attrs, - expr, - guard, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_match_arm_list(&mut self, node: ast::MatchArmList) -> Label { - let arms = node.arms().map(|x| self.emit_match_arm(x)).collect(); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = self.trap.emit(generated::MatchArmList { - id: TrapId::Star, - arms, - attrs, - }); - self.emit_location(label, node); - label - } - - fn emit_match_expr(&mut self, node: ast::MatchExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let match_arm_list = node.match_arm_list().map(|x| self.emit_match_arm_list(x)); - let label = self.trap.emit(generated::MatchExpr { - id: TrapId::Star, - attrs, - expr, - match_arm_list, - }); - self.emit_location(label, node); - label - } - - fn emit_match_guard(&mut self, node: ast::MatchGuard) -> Label { - let condition = node.condition().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::MatchGuard { - id: TrapId::Star, - condition, - }); - self.emit_location(label, node); - label - } - - fn emit_meta(&mut self, node: ast::Meta) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); - let path = node.path().map(|x| self.emit_path(x)); - let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); - let label = self.trap.emit(generated::Meta { - id: TrapId::Star, - expr, - path, - token_tree, - }); - self.emit_location(label, node); - label - } - - fn emit_method_call_expr( - &mut self, - node: ast::MethodCallExpr, - ) -> Label { - let arg_list = node.arg_list().map(|x| self.emit_arg_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_arg_list = node - .generic_arg_list() - .map(|x| self.emit_generic_arg_list(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let receiver = node.receiver().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::MethodCallExpr { - id: TrapId::Star, - arg_list, - attrs, - generic_arg_list, - name_ref, - receiver, - }); - self.emit_location(label, node); - label - } - - fn emit_module(&mut self, node: ast::Module) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let item_list = node.item_list().map(|x| self.emit_item_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::Module { - id: TrapId::Star, - attrs, - item_list, - name, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_name(&mut self, node: ast::Name) -> Label { - let text = node.try_get_text(); - let label = self.trap.emit(generated::Name { - id: TrapId::Star, - text, - }); - self.emit_location(label, node); - label - } - - fn emit_name_ref(&mut self, node: ast::NameRef) -> Label { - let text = node.try_get_text(); - let label = self.trap.emit(generated::NameRef { - id: TrapId::Star, - text, - }); - self.emit_location(label, node); - label - } - - fn emit_never_type(&mut self, node: ast::NeverType) -> Label { - let label = self.trap.emit(generated::NeverType { id: TrapId::Star }); - self.emit_location(label, node); - label - } - - fn emit_offset_of_expr(&mut self, node: ast::OffsetOfExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let fields = node.fields().map(|x| self.emit_name_ref(x)).collect(); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::OffsetOfExpr { - id: TrapId::Star, - attrs, - fields, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_or_pat(&mut self, node: ast::OrPat) -> Label { - let pats = node.pats().map(|x| self.emit_pat(x)).collect(); - let label = self.trap.emit(generated::OrPat { - id: TrapId::Star, - pats, - }); - self.emit_location(label, node); - label - } - - fn emit_param(&mut self, node: ast::Param) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let pat = node.pat().map(|x| self.emit_pat(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::Param { - id: TrapId::Star, - attrs, - pat, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_param_list(&mut self, node: ast::ParamList) -> Label { - let params = node.params().map(|x| self.emit_param(x)).collect(); - let self_param = node.self_param().map(|x| self.emit_self_param(x)); - let label = self.trap.emit(generated::ParamList { - id: TrapId::Star, - params, - self_param, - }); - self.emit_location(label, node); - label - } - - fn emit_paren_expr(&mut self, node: ast::ParenExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::ParenExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_paren_pat(&mut self, node: ast::ParenPat) -> Label { - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::ParenPat { - id: TrapId::Star, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_paren_type(&mut self, node: ast::ParenType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::ParenType { - id: TrapId::Star, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_path(&mut self, node: ast::Path) -> Label { - let qualifier = node.qualifier().map(|x| self.emit_path(x)); - let part = node.segment().map(|x| self.emit_path_segment(x)); - let label = self.trap.emit(generated::Path { - id: TrapId::Star, - qualifier, - part, - }); - self.emit_location(label, node); - label - } - - fn emit_path_expr(&mut self, node: ast::PathExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let path = node.path().map(|x| self.emit_path(x)); - let label = self.trap.emit(generated::PathExpr { - id: TrapId::Star, - attrs, - path, - }); - self.emit_location(label, node); - label - } - - fn emit_path_pat(&mut self, node: ast::PathPat) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let label = self.trap.emit(generated::PathPat { - id: TrapId::Star, - path, - }); - self.emit_location(label, node); - label - } - - fn emit_path_segment(&mut self, node: ast::PathSegment) -> Label { - let generic_arg_list = node - .generic_arg_list() - .map(|x| self.emit_generic_arg_list(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let path_type = node.path_type().map(|x| self.emit_path_type(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let return_type_syntax = node - .return_type_syntax() - .map(|x| self.emit_return_type_syntax(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::PathSegment { - id: TrapId::Star, - generic_arg_list, - name_ref, - param_list, - path_type, - ret_type, - return_type_syntax, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_path_type(&mut self, node: ast::PathType) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let label = self.trap.emit(generated::PathType { - id: TrapId::Star, - path, - }); - self.emit_location(label, node); - label - } - - fn emit_prefix_expr(&mut self, node: ast::PrefixExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let operator_name = node.try_get_text(); - let label = self.trap.emit(generated::PrefixExpr { - id: TrapId::Star, - attrs, - expr, - operator_name, - }); - self.emit_location(label, node); - label - } - - fn emit_ptr_type(&mut self, node: ast::PtrType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::PtrType { - id: TrapId::Star, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_range_expr(&mut self, node: ast::RangeExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let end = node.end().map(|x| self.emit_expr(x)); - let operator_name = node.try_get_text(); - let start = node.start().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::RangeExpr { - id: TrapId::Star, - attrs, - end, - operator_name, - start, - }); - self.emit_location(label, node); - label - } - - fn emit_range_pat(&mut self, node: ast::RangePat) -> Label { - let end = node.end().map(|x| self.emit_pat(x)); - let operator_name = node.try_get_text(); - let start = node.start().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::RangePat { - id: TrapId::Star, - end, - operator_name, - start, - }); - self.emit_location(label, node); - label - } - - fn emit_record_expr(&mut self, node: ast::RecordExpr) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let record_expr_field_list = node - .record_expr_field_list() - .map(|x| self.emit_record_expr_field_list(x)); - let label = self.trap.emit(generated::RecordExpr { - id: TrapId::Star, - path, - record_expr_field_list, - }); - self.emit_location(label, node); - label - } - - fn emit_record_expr_field( - &mut self, - node: ast::RecordExprField, - ) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let label = self.trap.emit(generated::RecordExprField { - id: TrapId::Star, - attrs, - expr, - name_ref, - }); - self.emit_location(label, node); - label - } - - fn emit_record_expr_field_list( - &mut self, - node: ast::RecordExprFieldList, - ) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let fields = node - .fields() - .map(|x| self.emit_record_expr_field(x)) - .collect(); - let spread = node.spread().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::RecordExprFieldList { - id: TrapId::Star, - attrs, - fields, - spread, - }); - self.emit_location(label, node); - label - } - - fn emit_record_field(&mut self, node: ast::RecordField) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::RecordField { - id: TrapId::Star, - attrs, - name, - ty, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_record_field_list( - &mut self, - node: ast::RecordFieldList, - ) -> Label { - let fields = node.fields().map(|x| self.emit_record_field(x)).collect(); - let label = self.trap.emit(generated::RecordFieldList { - id: TrapId::Star, - fields, - }); - self.emit_location(label, node); - label - } - - fn emit_record_pat(&mut self, node: ast::RecordPat) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let record_pat_field_list = node - .record_pat_field_list() - .map(|x| self.emit_record_pat_field_list(x)); - let label = self.trap.emit(generated::RecordPat { - id: TrapId::Star, - path, - record_pat_field_list, - }); - self.emit_location(label, node); - label - } - - fn emit_record_pat_field( - &mut self, - node: ast::RecordPatField, - ) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::RecordPatField { - id: TrapId::Star, - attrs, - name_ref, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_record_pat_field_list( - &mut self, - node: ast::RecordPatFieldList, - ) -> Label { - let fields = node - .fields() - .map(|x| self.emit_record_pat_field(x)) - .collect(); - let rest_pat = node.rest_pat().map(|x| self.emit_rest_pat(x)); - let label = self.trap.emit(generated::RecordPatFieldList { - id: TrapId::Star, - fields, - rest_pat, - }); - self.emit_location(label, node); - label - } - - fn emit_ref_expr(&mut self, node: ast::RefExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::RefExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_ref_pat(&mut self, node: ast::RefPat) -> Label { - let pat = node.pat().map(|x| self.emit_pat(x)); - let label = self.trap.emit(generated::RefPat { - id: TrapId::Star, - pat, - }); - self.emit_location(label, node); - label - } - - fn emit_ref_type(&mut self, node: ast::RefType) -> Label { - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::RefType { - id: TrapId::Star, - lifetime, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_rename(&mut self, node: ast::Rename) -> Label { - let name = node.name().map(|x| self.emit_name(x)); - let label = self.trap.emit(generated::Rename { - id: TrapId::Star, - name, - }); - self.emit_location(label, node); - label - } - - fn emit_rest_pat(&mut self, node: ast::RestPat) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = self.trap.emit(generated::RestPat { - id: TrapId::Star, - attrs, - }); - self.emit_location(label, node); - label - } - - fn emit_ret_type(&mut self, node: ast::RetType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::RetType { - id: TrapId::Star, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_return_expr(&mut self, node: ast::ReturnExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::ReturnExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_return_type_syntax( - &mut self, - node: ast::ReturnTypeSyntax, - ) -> Label { - let label = self - .trap - .emit(generated::ReturnTypeSyntax { id: TrapId::Star }); - self.emit_location(label, node); - label - } - - fn emit_self_param(&mut self, node: ast::SelfParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::SelfParam { - id: TrapId::Star, - attrs, - lifetime, - name, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_slice_pat(&mut self, node: ast::SlicePat) -> Label { - let pats = node.pats().map(|x| self.emit_pat(x)).collect(); - let label = self.trap.emit(generated::SlicePat { - id: TrapId::Star, - pats, - }); - self.emit_location(label, node); - label - } - - fn emit_slice_type(&mut self, node: ast::SliceType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::SliceType { - id: TrapId::Star, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_source_file(&mut self, node: ast::SourceFile) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let items = node.items().map(|x| self.emit_item(x)).collect(); - let label = self.trap.emit(generated::SourceFile { - id: TrapId::Star, - attrs, - items, - }); - self.emit_location(label, node); - label - } - - fn emit_static(&mut self, node: ast::Static) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_expr(x)); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::Static { - id: TrapId::Star, - attrs, - body, - name, - ty, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_stmt_list(&mut self, node: ast::StmtList) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let statements = node.statements().map(|x| self.emit_stmt(x)).collect(); - let tail_expr = node.tail_expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::StmtList { - id: TrapId::Star, - attrs, - statements, - tail_expr, - }); - self.emit_location(label, node); - label - } - - fn emit_struct(&mut self, node: ast::Struct) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let field_list = node.field_list().map(|x| self.emit_field_list(x)); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::Struct { - id: TrapId::Star, - attrs, - field_list, - generic_param_list, - name, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_token_tree(&mut self, node: ast::TokenTree) -> Label { - let label = self.trap.emit(generated::TokenTree { id: TrapId::Star }); - self.emit_location(label, node); - label - } - - fn emit_trait(&mut self, node: ast::Trait) -> Label { - let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::Trait { - id: TrapId::Star, - assoc_item_list, - attrs, - generic_param_list, - name, - type_bound_list, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_trait_alias(&mut self, node: ast::TraitAlias) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::TraitAlias { - id: TrapId::Star, - attrs, - generic_param_list, - name, - type_bound_list, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_try_expr(&mut self, node: ast::TryExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::TryExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_tuple_expr(&mut self, node: ast::TupleExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let fields = node.fields().map(|x| self.emit_expr(x)).collect(); - let label = self.trap.emit(generated::TupleExpr { - id: TrapId::Star, - attrs, - fields, - }); - self.emit_location(label, node); - label - } - - fn emit_tuple_field(&mut self, node: ast::TupleField) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::TupleField { - id: TrapId::Star, - attrs, - ty, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_tuple_field_list( - &mut self, - node: ast::TupleFieldList, - ) -> Label { - let fields = node.fields().map(|x| self.emit_tuple_field(x)).collect(); - let label = self.trap.emit(generated::TupleFieldList { - id: TrapId::Star, - fields, - }); - self.emit_location(label, node); - label - } - - fn emit_tuple_pat(&mut self, node: ast::TuplePat) -> Label { - let fields = node.fields().map(|x| self.emit_pat(x)).collect(); - let label = self.trap.emit(generated::TuplePat { - id: TrapId::Star, - fields, - }); - self.emit_location(label, node); - label - } - - fn emit_tuple_struct_pat( - &mut self, - node: ast::TupleStructPat, - ) -> Label { - let fields = node.fields().map(|x| self.emit_pat(x)).collect(); - let path = node.path().map(|x| self.emit_path(x)); - let label = self.trap.emit(generated::TupleStructPat { - id: TrapId::Star, - fields, - path, - }); - self.emit_location(label, node); - label - } - - fn emit_tuple_type(&mut self, node: ast::TupleType) -> Label { - let fields = node.fields().map(|x| self.emit_type(x)).collect(); - let label = self.trap.emit(generated::TupleType { - id: TrapId::Star, - fields, - }); - self.emit_location(label, node); - label - } - - fn emit_type_alias(&mut self, node: ast::TypeAlias) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::TypeAlias { - id: TrapId::Star, - attrs, - generic_param_list, - name, - ty, - type_bound_list, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_type_arg(&mut self, node: ast::TypeArg) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::TypeArg { - id: TrapId::Star, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_type_bound(&mut self, node: ast::TypeBound) -> Label { - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let label = self.trap.emit(generated::TypeBound { - id: TrapId::Star, - generic_param_list, - lifetime, - ty, - }); - self.emit_location(label, node); - label - } - - fn emit_type_bound_list( - &mut self, - node: ast::TypeBoundList, - ) -> Label { - let bounds = node.bounds().map(|x| self.emit_type_bound(x)).collect(); - let label = self.trap.emit(generated::TypeBoundList { - id: TrapId::Star, - bounds, - }); - self.emit_location(label, node); - label - } - - fn emit_type_param(&mut self, node: ast::TypeParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let default_type = node.default_type().map(|x| self.emit_type(x)); - let name = node.name().map(|x| self.emit_name(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let label = self.trap.emit(generated::TypeParam { - id: TrapId::Star, - attrs, - default_type, - name, - type_bound_list, - }); - self.emit_location(label, node); - label - } - - fn emit_underscore_expr( - &mut self, - node: ast::UnderscoreExpr, - ) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = self.trap.emit(generated::UnderscoreExpr { - id: TrapId::Star, - attrs, - }); - self.emit_location(label, node); - label - } - - fn emit_union(&mut self, node: ast::Union) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let record_field_list = node - .record_field_list() - .map(|x| self.emit_record_field_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); - let label = self.trap.emit(generated::Union { - id: TrapId::Star, - attrs, - generic_param_list, - name, - record_field_list, - visibility, - where_clause, - }); - self.emit_location(label, node); - label - } - - fn emit_use(&mut self, node: ast::Use) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let use_tree = node.use_tree().map(|x| self.emit_use_tree(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::Use { - id: TrapId::Star, - attrs, - use_tree, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_use_tree(&mut self, node: ast::UseTree) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let rename = node.rename().map(|x| self.emit_rename(x)); - let use_tree_list = node.use_tree_list().map(|x| self.emit_use_tree_list(x)); - let label = self.trap.emit(generated::UseTree { - id: TrapId::Star, - path, - rename, - use_tree_list, - }); - self.emit_location(label, node); - label - } - - fn emit_use_tree_list(&mut self, node: ast::UseTreeList) -> Label { - let use_trees = node.use_trees().map(|x| self.emit_use_tree(x)).collect(); - let label = self.trap.emit(generated::UseTreeList { - id: TrapId::Star, - use_trees, - }); - self.emit_location(label, node); - label - } - - fn emit_variant(&mut self, node: ast::Variant) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let field_list = node.field_list().map(|x| self.emit_field_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let label = self.trap.emit(generated::Variant { - id: TrapId::Star, - attrs, - expr, - field_list, - name, - visibility, - }); - self.emit_location(label, node); - label - } - - fn emit_variant_list(&mut self, node: ast::VariantList) -> Label { - let variants = node.variants().map(|x| self.emit_variant(x)).collect(); - let label = self.trap.emit(generated::VariantList { - id: TrapId::Star, - variants, - }); - self.emit_location(label, node); - label - } - - fn emit_visibility(&mut self, node: ast::Visibility) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let label = self.trap.emit(generated::Visibility { - id: TrapId::Star, - path, - }); - self.emit_location(label, node); - label - } - - fn emit_where_clause(&mut self, node: ast::WhereClause) -> Label { - let predicates = node.predicates().map(|x| self.emit_where_pred(x)).collect(); - let label = self.trap.emit(generated::WhereClause { - id: TrapId::Star, - predicates, - }); - self.emit_location(label, node); - label - } - - fn emit_where_pred(&mut self, node: ast::WherePred) -> Label { - let generic_param_list = node - .generic_param_list() - .map(|x| self.emit_generic_param_list(x)); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let label = self.trap.emit(generated::WherePred { - id: TrapId::Star, - generic_param_list, - lifetime, - ty, - type_bound_list, - }); - self.emit_location(label, node); - label - } - - fn emit_while_expr(&mut self, node: ast::WhileExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let condition = node.condition().map(|x| self.emit_expr(x)); - let label = node.label().map(|x| self.emit_label(x)); - let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); - let label = self.trap.emit(generated::WhileExpr { - id: TrapId::Star, - attrs, - condition, - label, - loop_body, - }); - self.emit_location(label, node); - label - } - - fn emit_wildcard_pat(&mut self, node: ast::WildcardPat) -> Label { - let label = self.trap.emit(generated::WildcardPat { id: TrapId::Star }); - self.emit_location(label, node); - label - } - - fn emit_yeet_expr(&mut self, node: ast::YeetExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::YeetExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } - - fn emit_yield_expr(&mut self, node: ast::YieldExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let label = self.trap.emit(generated::YieldExpr { - id: TrapId::Star, - attrs, - expr, - }); - self.emit_location(label, node); - label - } -} +pub use base::Translator; diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs new file mode 100644 index 000000000000..b0d42b1dbee3 --- /dev/null +++ b/rust/extractor/src/translate/base.rs @@ -0,0 +1,86 @@ +use crate::trap::TrapFile; +use crate::trap::{Label, TrapClass}; +use codeql_extractor::trap::{self}; +use ra_ap_ide_db::line_index::{LineCol, LineIndex}; +use ra_ap_syntax::ast::RangeItem; +use ra_ap_syntax::TextSize; +use ra_ap_syntax::{ast, TextRange}; +pub trait TextValue { + fn try_get_text(&self) -> Option; +} + +impl TextValue for ast::Lifetime { + fn try_get_text(&self) -> Option { + self.text().to_string().into() + } +} +impl TextValue for ast::Name { + fn try_get_text(&self) -> Option { + self.text().to_string().into() + } +} +impl TextValue for ast::Literal { + fn try_get_text(&self) -> Option { + self.token().text().to_string().into() + } +} +impl TextValue for ast::NameRef { + fn try_get_text(&self) -> Option { + self.text().to_string().into() + } +} +impl TextValue for ast::Abi { + fn try_get_text(&self) -> Option { + self.abi_string().map(|x| x.to_string()) + } +} + +impl TextValue for ast::BinExpr { + fn try_get_text(&self) -> Option { + self.op_token().map(|x| x.text().to_string()) + } +} +impl TextValue for ast::PrefixExpr { + fn try_get_text(&self) -> Option { + self.op_token().map(|x| x.text().to_string()) + } +} +impl TextValue for ast::RangeExpr { + fn try_get_text(&self) -> Option { + self.op_token().map(|x| x.text().to_string()) + } +} +impl TextValue for ast::RangePat { + fn try_get_text(&self) -> Option { + self.op_token().map(|x| x.text().to_string()) + } +} +pub struct Translator { + pub trap: TrapFile, + label: trap::Label, + line_index: LineIndex, +} + +impl Translator { + pub fn new(trap: TrapFile, label: trap::Label, line_index: LineIndex) -> Translator { + Translator { + trap, + label, + line_index, + } + } + pub fn location(&self, range: TextRange) -> (LineCol, LineCol) { + let start = self.line_index.line_col(range.start()); + let end = self.line_index.line_col( + range + .end() + .checked_sub(TextSize::new(1)) + .unwrap_or(range.end()), + ); + (start, end) + } + pub fn emit_location(&mut self, label: Label, node: impl ast::AstNode) { + let (start, end) = self.location(node.syntax().text_range()); + self.trap.emit_location(self.label, label, start, end) + } +} diff --git a/rust/extractor/src/translate/generated.rs b/rust/extractor/src/translate/generated.rs new file mode 100644 index 000000000000..5220599779bb --- /dev/null +++ b/rust/extractor/src/translate/generated.rs @@ -0,0 +1,2185 @@ +use super::base::{TextValue, Translator}; +use crate::generated; +use crate::trap::{Label, TrapId}; +use ra_ap_syntax::ast; +use ra_ap_syntax::ast::{ + HasArgList, HasAttrs, HasGenericArgs, HasGenericParams, HasLoopBody, HasModuleItem, HasName, + HasTypeBounds, HasVisibility, RangeItem, +}; + +impl Translator { + fn emit_else_branch(&mut self, node: ast::ElseBranch) -> Label { + match node { + ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).into(), + ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).into(), + } + } + + pub(crate) fn emit_assoc_item(&mut self, node: ast::AssocItem) -> Label { + match node { + ast::AssocItem::Const(inner) => self.emit_const(inner).into(), + ast::AssocItem::Fn(inner) => self.emit_fn(inner).into(), + ast::AssocItem::MacroCall(inner) => self.emit_macro_call(inner).into(), + ast::AssocItem::TypeAlias(inner) => self.emit_type_alias(inner).into(), + } + } + + pub(crate) fn emit_expr(&mut self, node: ast::Expr) -> Label { + match node { + ast::Expr::ArrayExpr(inner) => self.emit_array_expr(inner).into(), + ast::Expr::AsmExpr(inner) => self.emit_asm_expr(inner).into(), + ast::Expr::AwaitExpr(inner) => self.emit_await_expr(inner).into(), + ast::Expr::BecomeExpr(inner) => self.emit_become_expr(inner).into(), + ast::Expr::BinExpr(inner) => self.emit_bin_expr(inner).into(), + ast::Expr::BlockExpr(inner) => self.emit_block_expr(inner).into(), + ast::Expr::BreakExpr(inner) => self.emit_break_expr(inner).into(), + ast::Expr::CallExpr(inner) => self.emit_call_expr(inner).into(), + ast::Expr::CastExpr(inner) => self.emit_cast_expr(inner).into(), + ast::Expr::ClosureExpr(inner) => self.emit_closure_expr(inner).into(), + ast::Expr::ContinueExpr(inner) => self.emit_continue_expr(inner).into(), + ast::Expr::FieldExpr(inner) => self.emit_field_expr(inner).into(), + ast::Expr::ForExpr(inner) => self.emit_for_expr(inner).into(), + ast::Expr::FormatArgsExpr(inner) => self.emit_format_args_expr(inner).into(), + ast::Expr::IfExpr(inner) => self.emit_if_expr(inner).into(), + ast::Expr::IndexExpr(inner) => self.emit_index_expr(inner).into(), + ast::Expr::LetExpr(inner) => self.emit_let_expr(inner).into(), + ast::Expr::Literal(inner) => self.emit_literal(inner).into(), + ast::Expr::LoopExpr(inner) => self.emit_loop_expr(inner).into(), + ast::Expr::MacroExpr(inner) => self.emit_macro_expr(inner).into(), + ast::Expr::MatchExpr(inner) => self.emit_match_expr(inner).into(), + ast::Expr::MethodCallExpr(inner) => self.emit_method_call_expr(inner).into(), + ast::Expr::OffsetOfExpr(inner) => self.emit_offset_of_expr(inner).into(), + ast::Expr::ParenExpr(inner) => self.emit_paren_expr(inner).into(), + ast::Expr::PathExpr(inner) => self.emit_path_expr(inner).into(), + ast::Expr::PrefixExpr(inner) => self.emit_prefix_expr(inner).into(), + ast::Expr::RangeExpr(inner) => self.emit_range_expr(inner).into(), + ast::Expr::RecordExpr(inner) => self.emit_record_expr(inner).into(), + ast::Expr::RefExpr(inner) => self.emit_ref_expr(inner).into(), + ast::Expr::ReturnExpr(inner) => self.emit_return_expr(inner).into(), + ast::Expr::TryExpr(inner) => self.emit_try_expr(inner).into(), + ast::Expr::TupleExpr(inner) => self.emit_tuple_expr(inner).into(), + ast::Expr::UnderscoreExpr(inner) => self.emit_underscore_expr(inner).into(), + ast::Expr::WhileExpr(inner) => self.emit_while_expr(inner).into(), + ast::Expr::YeetExpr(inner) => self.emit_yeet_expr(inner).into(), + ast::Expr::YieldExpr(inner) => self.emit_yield_expr(inner).into(), + } + } + + pub(crate) fn emit_extern_item( + &mut self, + node: ast::ExternItem, + ) -> Label { + match node { + ast::ExternItem::Fn(inner) => self.emit_fn(inner).into(), + ast::ExternItem::MacroCall(inner) => self.emit_macro_call(inner).into(), + ast::ExternItem::Static(inner) => self.emit_static(inner).into(), + ast::ExternItem::TypeAlias(inner) => self.emit_type_alias(inner).into(), + } + } + + pub(crate) fn emit_field_list(&mut self, node: ast::FieldList) -> Label { + match node { + ast::FieldList::RecordFieldList(inner) => self.emit_record_field_list(inner).into(), + ast::FieldList::TupleFieldList(inner) => self.emit_tuple_field_list(inner).into(), + } + } + + pub(crate) fn emit_generic_arg( + &mut self, + node: ast::GenericArg, + ) -> Label { + match node { + ast::GenericArg::AssocTypeArg(inner) => self.emit_assoc_type_arg(inner).into(), + ast::GenericArg::ConstArg(inner) => self.emit_const_arg(inner).into(), + ast::GenericArg::LifetimeArg(inner) => self.emit_lifetime_arg(inner).into(), + ast::GenericArg::TypeArg(inner) => self.emit_type_arg(inner).into(), + } + } + + pub(crate) fn emit_generic_param( + &mut self, + node: ast::GenericParam, + ) -> Label { + match node { + ast::GenericParam::ConstParam(inner) => self.emit_const_param(inner).into(), + ast::GenericParam::LifetimeParam(inner) => self.emit_lifetime_param(inner).into(), + ast::GenericParam::TypeParam(inner) => self.emit_type_param(inner).into(), + } + } + + pub(crate) fn emit_pat(&mut self, node: ast::Pat) -> Label { + match node { + ast::Pat::BoxPat(inner) => self.emit_box_pat(inner).into(), + ast::Pat::ConstBlockPat(inner) => self.emit_const_block_pat(inner).into(), + ast::Pat::IdentPat(inner) => self.emit_ident_pat(inner).into(), + ast::Pat::LiteralPat(inner) => self.emit_literal_pat(inner).into(), + ast::Pat::MacroPat(inner) => self.emit_macro_pat(inner).into(), + ast::Pat::OrPat(inner) => self.emit_or_pat(inner).into(), + ast::Pat::ParenPat(inner) => self.emit_paren_pat(inner).into(), + ast::Pat::PathPat(inner) => self.emit_path_pat(inner).into(), + ast::Pat::RangePat(inner) => self.emit_range_pat(inner).into(), + ast::Pat::RecordPat(inner) => self.emit_record_pat(inner).into(), + ast::Pat::RefPat(inner) => self.emit_ref_pat(inner).into(), + ast::Pat::RestPat(inner) => self.emit_rest_pat(inner).into(), + ast::Pat::SlicePat(inner) => self.emit_slice_pat(inner).into(), + ast::Pat::TuplePat(inner) => self.emit_tuple_pat(inner).into(), + ast::Pat::TupleStructPat(inner) => self.emit_tuple_struct_pat(inner).into(), + ast::Pat::WildcardPat(inner) => self.emit_wildcard_pat(inner).into(), + } + } + + pub(crate) fn emit_stmt(&mut self, node: ast::Stmt) -> Label { + match node { + ast::Stmt::ExprStmt(inner) => self.emit_expr_stmt(inner).into(), + ast::Stmt::Item(inner) => self.emit_item(inner).into(), + ast::Stmt::LetStmt(inner) => self.emit_let_stmt(inner).into(), + } + } + + pub(crate) fn emit_type(&mut self, node: ast::Type) -> Label { + match node { + ast::Type::ArrayType(inner) => self.emit_array_type(inner).into(), + ast::Type::DynTraitType(inner) => self.emit_dyn_trait_type(inner).into(), + ast::Type::FnPtrType(inner) => self.emit_fn_ptr_type(inner).into(), + ast::Type::ForType(inner) => self.emit_for_type(inner).into(), + ast::Type::ImplTraitType(inner) => self.emit_impl_trait_type(inner).into(), + ast::Type::InferType(inner) => self.emit_infer_type(inner).into(), + ast::Type::MacroType(inner) => self.emit_macro_type(inner).into(), + ast::Type::NeverType(inner) => self.emit_never_type(inner).into(), + ast::Type::ParenType(inner) => self.emit_paren_type(inner).into(), + ast::Type::PathType(inner) => self.emit_path_type(inner).into(), + ast::Type::PtrType(inner) => self.emit_ptr_type(inner).into(), + ast::Type::RefType(inner) => self.emit_ref_type(inner).into(), + ast::Type::SliceType(inner) => self.emit_slice_type(inner).into(), + ast::Type::TupleType(inner) => self.emit_tuple_type(inner).into(), + } + } + + pub(crate) fn emit_item(&mut self, node: ast::Item) -> Label { + match node { + ast::Item::Const(inner) => self.emit_const(inner).into(), + ast::Item::Enum(inner) => self.emit_enum(inner).into(), + ast::Item::ExternBlock(inner) => self.emit_extern_block(inner).into(), + ast::Item::ExternCrate(inner) => self.emit_extern_crate(inner).into(), + ast::Item::Fn(inner) => self.emit_fn(inner).into(), + ast::Item::Impl(inner) => self.emit_impl(inner).into(), + ast::Item::MacroCall(inner) => self.emit_macro_call(inner).into(), + ast::Item::MacroDef(inner) => self.emit_macro_def(inner).into(), + ast::Item::MacroRules(inner) => self.emit_macro_rules(inner).into(), + ast::Item::Module(inner) => self.emit_module(inner).into(), + ast::Item::Static(inner) => self.emit_static(inner).into(), + ast::Item::Struct(inner) => self.emit_struct(inner).into(), + ast::Item::Trait(inner) => self.emit_trait(inner).into(), + ast::Item::TraitAlias(inner) => self.emit_trait_alias(inner).into(), + ast::Item::TypeAlias(inner) => self.emit_type_alias(inner).into(), + ast::Item::Union(inner) => self.emit_union(inner).into(), + ast::Item::Use(inner) => self.emit_use(inner).into(), + } + } + + pub(crate) fn emit_abi(&mut self, node: ast::Abi) -> Label { + let abi_string = node.try_get_text(); + let label = self.trap.emit(generated::Abi { + id: TrapId::Star, + abi_string, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_arg_list(&mut self, node: ast::ArgList) -> Label { + let args = node.args().map(|x| self.emit_expr(x)).collect(); + let label = self.trap.emit(generated::ArgList { + id: TrapId::Star, + args, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_array_expr(&mut self, node: ast::ArrayExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let exprs = node.exprs().map(|x| self.emit_expr(x)).collect(); + let label = self.trap.emit(generated::ArrayExpr { + id: TrapId::Star, + attrs, + exprs, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_array_type(&mut self, node: ast::ArrayType) -> Label { + let const_arg = node.const_arg().map(|x| self.emit_const_arg(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::ArrayType { + id: TrapId::Star, + const_arg, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_asm_expr(&mut self, node: ast::AsmExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::AsmExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_assoc_item_list( + &mut self, + node: ast::AssocItemList, + ) -> Label { + let assoc_items = node + .assoc_items() + .map(|x| self.emit_assoc_item(x)) + .collect(); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let label = self.trap.emit(generated::AssocItemList { + id: TrapId::Star, + assoc_items, + attrs, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_assoc_type_arg( + &mut self, + node: ast::AssocTypeArg, + ) -> Label { + let const_arg = node.const_arg().map(|x| self.emit_const_arg(x)); + let generic_arg_list = node + .generic_arg_list() + .map(|x| self.emit_generic_arg_list(x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let return_type_syntax = node + .return_type_syntax() + .map(|x| self.emit_return_type_syntax(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let label = self.trap.emit(generated::AssocTypeArg { + id: TrapId::Star, + const_arg, + generic_arg_list, + name_ref, + param_list, + ret_type, + return_type_syntax, + ty, + type_bound_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_attr(&mut self, node: ast::Attr) -> Label { + let meta = node.meta().map(|x| self.emit_meta(x)); + let label = self.trap.emit(generated::Attr { + id: TrapId::Star, + meta, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_await_expr(&mut self, node: ast::AwaitExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::AwaitExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_become_expr( + &mut self, + node: ast::BecomeExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::BecomeExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_bin_expr(&mut self, node: ast::BinExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let lhs = node.lhs().map(|x| self.emit_expr(x)); + let operator_name = node.try_get_text(); + let rhs = node.rhs().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::BinaryExpr { + id: TrapId::Star, + attrs, + lhs, + operator_name, + rhs, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_block_expr(&mut self, node: ast::BlockExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let label = node.label().map(|x| self.emit_label(x)); + let stmt_list = node.stmt_list().map(|x| self.emit_stmt_list(x)); + let label = self.trap.emit(generated::BlockExpr { + id: TrapId::Star, + attrs, + label, + stmt_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_box_pat(&mut self, node: ast::BoxPat) -> Label { + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::BoxPat { + id: TrapId::Star, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_break_expr(&mut self, node: ast::BreakExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let label = self.trap.emit(generated::BreakExpr { + id: TrapId::Star, + attrs, + expr, + lifetime, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_call_expr(&mut self, node: ast::CallExpr) -> Label { + let arg_list = node.arg_list().map(|x| self.emit_arg_list(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::CallExpr { + id: TrapId::Star, + arg_list, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_cast_expr(&mut self, node: ast::CastExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::CastExpr { + id: TrapId::Star, + attrs, + expr, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_closure_binder( + &mut self, + node: ast::ClosureBinder, + ) -> Label { + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let label = self.trap.emit(generated::ClosureBinder { + id: TrapId::Star, + generic_param_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_closure_expr( + &mut self, + node: ast::ClosureExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let body = node.body().map(|x| self.emit_expr(x)); + let closure_binder = node.closure_binder().map(|x| self.emit_closure_binder(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let label = self.trap.emit(generated::ClosureExpr { + id: TrapId::Star, + attrs, + body, + closure_binder, + param_list, + ret_type, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_const(&mut self, node: ast::Const) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let body = node.body().map(|x| self.emit_expr(x)); + let name = node.name().map(|x| self.emit_name(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::Const { + id: TrapId::Star, + attrs, + body, + name, + ty, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_const_arg(&mut self, node: ast::ConstArg) -> Label { + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::ConstArg { + id: TrapId::Star, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_const_block_pat( + &mut self, + node: ast::ConstBlockPat, + ) -> Label { + let block_expr = node.block_expr().map(|x| self.emit_block_expr(x)); + let label = self.trap.emit(generated::ConstBlockPat { + id: TrapId::Star, + block_expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_const_param( + &mut self, + node: ast::ConstParam, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let default_val = node.default_val().map(|x| self.emit_const_arg(x)); + let name = node.name().map(|x| self.emit_name(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::ConstParam { + id: TrapId::Star, + attrs, + default_val, + name, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_continue_expr( + &mut self, + node: ast::ContinueExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let label = self.trap.emit(generated::ContinueExpr { + id: TrapId::Star, + attrs, + lifetime, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_dyn_trait_type( + &mut self, + node: ast::DynTraitType, + ) -> Label { + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let label = self.trap.emit(generated::DynTraitType { + id: TrapId::Star, + type_bound_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_enum(&mut self, node: ast::Enum) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let variant_list = node.variant_list().map(|x| self.emit_variant_list(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::Enum { + id: TrapId::Star, + attrs, + generic_param_list, + name, + variant_list, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_expr_stmt(&mut self, node: ast::ExprStmt) -> Label { + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::ExprStmt { + id: TrapId::Star, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_extern_block( + &mut self, + node: ast::ExternBlock, + ) -> Label { + let abi = node.abi().map(|x| self.emit_abi(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let extern_item_list = node + .extern_item_list() + .map(|x| self.emit_extern_item_list(x)); + let label = self.trap.emit(generated::ExternBlock { + id: TrapId::Star, + abi, + attrs, + extern_item_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_extern_crate( + &mut self, + node: ast::ExternCrate, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let rename = node.rename().map(|x| self.emit_rename(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::ExternCrate { + id: TrapId::Star, + attrs, + name_ref, + rename, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_extern_item_list( + &mut self, + node: ast::ExternItemList, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let extern_items = node + .extern_items() + .map(|x| self.emit_extern_item(x)) + .collect(); + let label = self.trap.emit(generated::ExternItemList { + id: TrapId::Star, + attrs, + extern_items, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_field_expr(&mut self, node: ast::FieldExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let label = self.trap.emit(generated::FieldExpr { + id: TrapId::Star, + attrs, + expr, + name_ref, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_fn(&mut self, node: ast::Fn) -> Label { + let abi = node.abi().map(|x| self.emit_abi(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let body = node.body().map(|x| self.emit_block_expr(x)); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::Function { + id: TrapId::Star, + abi, + attrs, + body, + generic_param_list, + name, + param_list, + ret_type, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_fn_ptr_type(&mut self, node: ast::FnPtrType) -> Label { + let abi = node.abi().map(|x| self.emit_abi(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let label = self.trap.emit(generated::FnPtrType { + id: TrapId::Star, + abi, + param_list, + ret_type, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_for_expr(&mut self, node: ast::ForExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let iterable = node.iterable().map(|x| self.emit_expr(x)); + let label = node.label().map(|x| self.emit_label(x)); + let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::ForExpr { + id: TrapId::Star, + attrs, + iterable, + label, + loop_body, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_for_type(&mut self, node: ast::ForType) -> Label { + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::ForType { + id: TrapId::Star, + generic_param_list, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_format_args_arg( + &mut self, + node: ast::FormatArgsArg, + ) -> Label { + let expr = node.expr().map(|x| self.emit_expr(x)); + let name = node.name().map(|x| self.emit_name(x)); + let label = self.trap.emit(generated::FormatArgsArg { + id: TrapId::Star, + expr, + name, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_format_args_expr( + &mut self, + node: ast::FormatArgsExpr, + ) -> Label { + let args = node.args().map(|x| self.emit_format_args_arg(x)).collect(); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let template = node.template().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::FormatArgsExpr { + id: TrapId::Star, + args, + attrs, + template, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_generic_arg_list( + &mut self, + node: ast::GenericArgList, + ) -> Label { + let generic_args = node + .generic_args() + .map(|x| self.emit_generic_arg(x)) + .collect(); + let label = self.trap.emit(generated::GenericArgList { + id: TrapId::Star, + generic_args, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_generic_param_list( + &mut self, + node: ast::GenericParamList, + ) -> Label { + let generic_params = node + .generic_params() + .map(|x| self.emit_generic_param(x)) + .collect(); + let label = self.trap.emit(generated::GenericParamList { + id: TrapId::Star, + generic_params, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_ident_pat(&mut self, node: ast::IdentPat) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let name = node.name().map(|x| self.emit_name(x)); + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::IdentPat { + id: TrapId::Star, + attrs, + name, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_if_expr(&mut self, node: ast::IfExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let condition = node.condition().map(|x| self.emit_expr(x)); + let else_ = node.else_branch().map(|x| self.emit_else_branch(x)); + let then = node.then_branch().map(|x| self.emit_block_expr(x)); + let label = self.trap.emit(generated::IfExpr { + id: TrapId::Star, + attrs, + condition, + else_, + then, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_impl(&mut self, node: ast::Impl) -> Label { + let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let self_ty = node.self_ty().map(|x| self.emit_type(x)); + let trait_ = node.trait_().map(|x| self.emit_type(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::Impl { + id: TrapId::Star, + assoc_item_list, + attrs, + generic_param_list, + self_ty, + trait_, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_impl_trait_type( + &mut self, + node: ast::ImplTraitType, + ) -> Label { + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let label = self.trap.emit(generated::ImplTraitType { + id: TrapId::Star, + type_bound_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_index_expr(&mut self, node: ast::IndexExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let base = node.base().map(|x| self.emit_expr(x)); + let index = node.index().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::IndexExpr { + id: TrapId::Star, + attrs, + base, + index, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_infer_type(&mut self, node: ast::InferType) -> Label { + let label = self.trap.emit(generated::InferType { id: TrapId::Star }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_item_list(&mut self, node: ast::ItemList) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let items = node.items().map(|x| self.emit_item(x)).collect(); + let label = self.trap.emit(generated::ItemList { + id: TrapId::Star, + attrs, + items, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_label(&mut self, node: ast::Label) -> Label { + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let label = self.trap.emit(generated::Label { + id: TrapId::Star, + lifetime, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_let_else(&mut self, node: ast::LetElse) -> Label { + let block_expr = node.block_expr().map(|x| self.emit_block_expr(x)); + let label = self.trap.emit(generated::LetElse { + id: TrapId::Star, + block_expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_let_expr(&mut self, node: ast::LetExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::LetExpr { + id: TrapId::Star, + attrs, + expr, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_let_stmt(&mut self, node: ast::LetStmt) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let initializer = node.initializer().map(|x| self.emit_expr(x)); + let let_else = node.let_else().map(|x| self.emit_let_else(x)); + let pat = node.pat().map(|x| self.emit_pat(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::LetStmt { + id: TrapId::Star, + attrs, + initializer, + let_else, + pat, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_lifetime(&mut self, node: ast::Lifetime) -> Label { + let text = node.try_get_text(); + let label = self.trap.emit(generated::Lifetime { + id: TrapId::Star, + text, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_lifetime_arg( + &mut self, + node: ast::LifetimeArg, + ) -> Label { + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let label = self.trap.emit(generated::LifetimeArg { + id: TrapId::Star, + lifetime, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_lifetime_param( + &mut self, + node: ast::LifetimeParam, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let label = self.trap.emit(generated::LifetimeParam { + id: TrapId::Star, + attrs, + lifetime, + type_bound_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_literal(&mut self, node: ast::Literal) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let text_value = node.try_get_text(); + let label = self.trap.emit(generated::LiteralExpr { + id: TrapId::Star, + attrs, + text_value, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_literal_pat( + &mut self, + node: ast::LiteralPat, + ) -> Label { + let literal = node.literal().map(|x| self.emit_literal(x)); + let label = self.trap.emit(generated::LiteralPat { + id: TrapId::Star, + literal, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_loop_expr(&mut self, node: ast::LoopExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let label = node.label().map(|x| self.emit_label(x)); + let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); + let label = self.trap.emit(generated::LoopExpr { + id: TrapId::Star, + attrs, + label, + loop_body, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_macro_call(&mut self, node: ast::MacroCall) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let path = node.path().map(|x| self.emit_path(x)); + let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); + let label = self.trap.emit(generated::MacroCall { + id: TrapId::Star, + attrs, + path, + token_tree, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_macro_def(&mut self, node: ast::MacroDef) -> Label { + let args = node.args().map(|x| self.emit_token_tree(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let body = node.body().map(|x| self.emit_token_tree(x)); + let name = node.name().map(|x| self.emit_name(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::MacroDef { + id: TrapId::Star, + args, + attrs, + body, + name, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_macro_expr(&mut self, node: ast::MacroExpr) -> Label { + let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); + let label = self.trap.emit(generated::MacroExpr { + id: TrapId::Star, + macro_call, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_macro_pat(&mut self, node: ast::MacroPat) -> Label { + let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); + let label = self.trap.emit(generated::MacroPat { + id: TrapId::Star, + macro_call, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_macro_rules( + &mut self, + node: ast::MacroRules, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let name = node.name().map(|x| self.emit_name(x)); + let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::MacroRules { + id: TrapId::Star, + attrs, + name, + token_tree, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_macro_type(&mut self, node: ast::MacroType) -> Label { + let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); + let label = self.trap.emit(generated::MacroType { + id: TrapId::Star, + macro_call, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_match_arm(&mut self, node: ast::MatchArm) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let guard = node.guard().map(|x| self.emit_match_guard(x)); + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::MatchArm { + id: TrapId::Star, + attrs, + expr, + guard, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_match_arm_list( + &mut self, + node: ast::MatchArmList, + ) -> Label { + let arms = node.arms().map(|x| self.emit_match_arm(x)).collect(); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let label = self.trap.emit(generated::MatchArmList { + id: TrapId::Star, + arms, + attrs, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_match_expr(&mut self, node: ast::MatchExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let match_arm_list = node.match_arm_list().map(|x| self.emit_match_arm_list(x)); + let label = self.trap.emit(generated::MatchExpr { + id: TrapId::Star, + attrs, + expr, + match_arm_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_match_guard( + &mut self, + node: ast::MatchGuard, + ) -> Label { + let condition = node.condition().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::MatchGuard { + id: TrapId::Star, + condition, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_meta(&mut self, node: ast::Meta) -> Label { + let expr = node.expr().map(|x| self.emit_expr(x)); + let path = node.path().map(|x| self.emit_path(x)); + let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); + let label = self.trap.emit(generated::Meta { + id: TrapId::Star, + expr, + path, + token_tree, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_method_call_expr( + &mut self, + node: ast::MethodCallExpr, + ) -> Label { + let arg_list = node.arg_list().map(|x| self.emit_arg_list(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_arg_list = node + .generic_arg_list() + .map(|x| self.emit_generic_arg_list(x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let receiver = node.receiver().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::MethodCallExpr { + id: TrapId::Star, + arg_list, + attrs, + generic_arg_list, + name_ref, + receiver, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_module(&mut self, node: ast::Module) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let item_list = node.item_list().map(|x| self.emit_item_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::Module { + id: TrapId::Star, + attrs, + item_list, + name, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_name(&mut self, node: ast::Name) -> Label { + let text = node.try_get_text(); + let label = self.trap.emit(generated::Name { + id: TrapId::Star, + text, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_name_ref(&mut self, node: ast::NameRef) -> Label { + let text = node.try_get_text(); + let label = self.trap.emit(generated::NameRef { + id: TrapId::Star, + text, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_never_type(&mut self, node: ast::NeverType) -> Label { + let label = self.trap.emit(generated::NeverType { id: TrapId::Star }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_offset_of_expr( + &mut self, + node: ast::OffsetOfExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let fields = node.fields().map(|x| self.emit_name_ref(x)).collect(); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::OffsetOfExpr { + id: TrapId::Star, + attrs, + fields, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_or_pat(&mut self, node: ast::OrPat) -> Label { + let pats = node.pats().map(|x| self.emit_pat(x)).collect(); + let label = self.trap.emit(generated::OrPat { + id: TrapId::Star, + pats, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_param(&mut self, node: ast::Param) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let pat = node.pat().map(|x| self.emit_pat(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::Param { + id: TrapId::Star, + attrs, + pat, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_param_list(&mut self, node: ast::ParamList) -> Label { + let params = node.params().map(|x| self.emit_param(x)).collect(); + let self_param = node.self_param().map(|x| self.emit_self_param(x)); + let label = self.trap.emit(generated::ParamList { + id: TrapId::Star, + params, + self_param, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_paren_expr(&mut self, node: ast::ParenExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::ParenExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_paren_pat(&mut self, node: ast::ParenPat) -> Label { + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::ParenPat { + id: TrapId::Star, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_paren_type(&mut self, node: ast::ParenType) -> Label { + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::ParenType { + id: TrapId::Star, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_path(&mut self, node: ast::Path) -> Label { + let qualifier = node.qualifier().map(|x| self.emit_path(x)); + let part = node.segment().map(|x| self.emit_path_segment(x)); + let label = self.trap.emit(generated::Path { + id: TrapId::Star, + qualifier, + part, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_path_expr(&mut self, node: ast::PathExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let path = node.path().map(|x| self.emit_path(x)); + let label = self.trap.emit(generated::PathExpr { + id: TrapId::Star, + attrs, + path, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_path_pat(&mut self, node: ast::PathPat) -> Label { + let path = node.path().map(|x| self.emit_path(x)); + let label = self.trap.emit(generated::PathPat { + id: TrapId::Star, + path, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_path_segment( + &mut self, + node: ast::PathSegment, + ) -> Label { + let generic_arg_list = node + .generic_arg_list() + .map(|x| self.emit_generic_arg_list(x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(x)); + let path_type = node.path_type().map(|x| self.emit_path_type(x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let return_type_syntax = node + .return_type_syntax() + .map(|x| self.emit_return_type_syntax(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::PathSegment { + id: TrapId::Star, + generic_arg_list, + name_ref, + param_list, + path_type, + ret_type, + return_type_syntax, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_path_type(&mut self, node: ast::PathType) -> Label { + let path = node.path().map(|x| self.emit_path(x)); + let label = self.trap.emit(generated::PathType { + id: TrapId::Star, + path, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_prefix_expr( + &mut self, + node: ast::PrefixExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let operator_name = node.try_get_text(); + let label = self.trap.emit(generated::PrefixExpr { + id: TrapId::Star, + attrs, + expr, + operator_name, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_ptr_type(&mut self, node: ast::PtrType) -> Label { + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::PtrType { + id: TrapId::Star, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_range_expr(&mut self, node: ast::RangeExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let end = node.end().map(|x| self.emit_expr(x)); + let operator_name = node.try_get_text(); + let start = node.start().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::RangeExpr { + id: TrapId::Star, + attrs, + end, + operator_name, + start, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_range_pat(&mut self, node: ast::RangePat) -> Label { + let end = node.end().map(|x| self.emit_pat(x)); + let operator_name = node.try_get_text(); + let start = node.start().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::RangePat { + id: TrapId::Star, + end, + operator_name, + start, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_expr( + &mut self, + node: ast::RecordExpr, + ) -> Label { + let path = node.path().map(|x| self.emit_path(x)); + let record_expr_field_list = node + .record_expr_field_list() + .map(|x| self.emit_record_expr_field_list(x)); + let label = self.trap.emit(generated::RecordExpr { + id: TrapId::Star, + path, + record_expr_field_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_expr_field( + &mut self, + node: ast::RecordExprField, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let label = self.trap.emit(generated::RecordExprField { + id: TrapId::Star, + attrs, + expr, + name_ref, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_expr_field_list( + &mut self, + node: ast::RecordExprFieldList, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let fields = node + .fields() + .map(|x| self.emit_record_expr_field(x)) + .collect(); + let spread = node.spread().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::RecordExprFieldList { + id: TrapId::Star, + attrs, + fields, + spread, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_field( + &mut self, + node: ast::RecordField, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let name = node.name().map(|x| self.emit_name(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::RecordField { + id: TrapId::Star, + attrs, + name, + ty, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_field_list( + &mut self, + node: ast::RecordFieldList, + ) -> Label { + let fields = node.fields().map(|x| self.emit_record_field(x)).collect(); + let label = self.trap.emit(generated::RecordFieldList { + id: TrapId::Star, + fields, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_pat(&mut self, node: ast::RecordPat) -> Label { + let path = node.path().map(|x| self.emit_path(x)); + let record_pat_field_list = node + .record_pat_field_list() + .map(|x| self.emit_record_pat_field_list(x)); + let label = self.trap.emit(generated::RecordPat { + id: TrapId::Star, + path, + record_pat_field_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_pat_field( + &mut self, + node: ast::RecordPatField, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::RecordPatField { + id: TrapId::Star, + attrs, + name_ref, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_record_pat_field_list( + &mut self, + node: ast::RecordPatFieldList, + ) -> Label { + let fields = node + .fields() + .map(|x| self.emit_record_pat_field(x)) + .collect(); + let rest_pat = node.rest_pat().map(|x| self.emit_rest_pat(x)); + let label = self.trap.emit(generated::RecordPatFieldList { + id: TrapId::Star, + fields, + rest_pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_ref_expr(&mut self, node: ast::RefExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::RefExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_ref_pat(&mut self, node: ast::RefPat) -> Label { + let pat = node.pat().map(|x| self.emit_pat(x)); + let label = self.trap.emit(generated::RefPat { + id: TrapId::Star, + pat, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_ref_type(&mut self, node: ast::RefType) -> Label { + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::RefType { + id: TrapId::Star, + lifetime, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_rename(&mut self, node: ast::Rename) -> Label { + let name = node.name().map(|x| self.emit_name(x)); + let label = self.trap.emit(generated::Rename { + id: TrapId::Star, + name, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_rest_pat(&mut self, node: ast::RestPat) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let label = self.trap.emit(generated::RestPat { + id: TrapId::Star, + attrs, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_ret_type(&mut self, node: ast::RetType) -> Label { + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::RetType { + id: TrapId::Star, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_return_expr( + &mut self, + node: ast::ReturnExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::ReturnExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_return_type_syntax( + &mut self, + node: ast::ReturnTypeSyntax, + ) -> Label { + let label = self + .trap + .emit(generated::ReturnTypeSyntax { id: TrapId::Star }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_self_param(&mut self, node: ast::SelfParam) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let name = node.name().map(|x| self.emit_name(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::SelfParam { + id: TrapId::Star, + attrs, + lifetime, + name, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_slice_pat(&mut self, node: ast::SlicePat) -> Label { + let pats = node.pats().map(|x| self.emit_pat(x)).collect(); + let label = self.trap.emit(generated::SlicePat { + id: TrapId::Star, + pats, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_slice_type(&mut self, node: ast::SliceType) -> Label { + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::SliceType { + id: TrapId::Star, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_source_file( + &mut self, + node: ast::SourceFile, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let items = node.items().map(|x| self.emit_item(x)).collect(); + let label = self.trap.emit(generated::SourceFile { + id: TrapId::Star, + attrs, + items, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_static(&mut self, node: ast::Static) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let body = node.body().map(|x| self.emit_expr(x)); + let name = node.name().map(|x| self.emit_name(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::Static { + id: TrapId::Star, + attrs, + body, + name, + ty, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_stmt_list(&mut self, node: ast::StmtList) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let statements = node.statements().map(|x| self.emit_stmt(x)).collect(); + let tail_expr = node.tail_expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::StmtList { + id: TrapId::Star, + attrs, + statements, + tail_expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_struct(&mut self, node: ast::Struct) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let field_list = node.field_list().map(|x| self.emit_field_list(x)); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::Struct { + id: TrapId::Star, + attrs, + field_list, + generic_param_list, + name, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_token_tree(&mut self, node: ast::TokenTree) -> Label { + let label = self.trap.emit(generated::TokenTree { id: TrapId::Star }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_trait(&mut self, node: ast::Trait) -> Label { + let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(x)); + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::Trait { + id: TrapId::Star, + assoc_item_list, + attrs, + generic_param_list, + name, + type_bound_list, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_trait_alias( + &mut self, + node: ast::TraitAlias, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::TraitAlias { + id: TrapId::Star, + attrs, + generic_param_list, + name, + type_bound_list, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_try_expr(&mut self, node: ast::TryExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::TryExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_tuple_expr(&mut self, node: ast::TupleExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let fields = node.fields().map(|x| self.emit_expr(x)).collect(); + let label = self.trap.emit(generated::TupleExpr { + id: TrapId::Star, + attrs, + fields, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_tuple_field( + &mut self, + node: ast::TupleField, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let ty = node.ty().map(|x| self.emit_type(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::TupleField { + id: TrapId::Star, + attrs, + ty, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_tuple_field_list( + &mut self, + node: ast::TupleFieldList, + ) -> Label { + let fields = node.fields().map(|x| self.emit_tuple_field(x)).collect(); + let label = self.trap.emit(generated::TupleFieldList { + id: TrapId::Star, + fields, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_tuple_pat(&mut self, node: ast::TuplePat) -> Label { + let fields = node.fields().map(|x| self.emit_pat(x)).collect(); + let label = self.trap.emit(generated::TuplePat { + id: TrapId::Star, + fields, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_tuple_struct_pat( + &mut self, + node: ast::TupleStructPat, + ) -> Label { + let fields = node.fields().map(|x| self.emit_pat(x)).collect(); + let path = node.path().map(|x| self.emit_path(x)); + let label = self.trap.emit(generated::TupleStructPat { + id: TrapId::Star, + fields, + path, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_tuple_type(&mut self, node: ast::TupleType) -> Label { + let fields = node.fields().map(|x| self.emit_type(x)).collect(); + let label = self.trap.emit(generated::TupleType { + id: TrapId::Star, + fields, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_type_alias(&mut self, node: ast::TypeAlias) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::TypeAlias { + id: TrapId::Star, + attrs, + generic_param_list, + name, + ty, + type_bound_list, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_type_arg(&mut self, node: ast::TypeArg) -> Label { + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::TypeArg { + id: TrapId::Star, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_type_bound(&mut self, node: ast::TypeBound) -> Label { + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let label = self.trap.emit(generated::TypeBound { + id: TrapId::Star, + generic_param_list, + lifetime, + ty, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_type_bound_list( + &mut self, + node: ast::TypeBoundList, + ) -> Label { + let bounds = node.bounds().map(|x| self.emit_type_bound(x)).collect(); + let label = self.trap.emit(generated::TypeBoundList { + id: TrapId::Star, + bounds, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_type_param(&mut self, node: ast::TypeParam) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let default_type = node.default_type().map(|x| self.emit_type(x)); + let name = node.name().map(|x| self.emit_name(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let label = self.trap.emit(generated::TypeParam { + id: TrapId::Star, + attrs, + default_type, + name, + type_bound_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_underscore_expr( + &mut self, + node: ast::UnderscoreExpr, + ) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let label = self.trap.emit(generated::UnderscoreExpr { + id: TrapId::Star, + attrs, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_union(&mut self, node: ast::Union) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let record_field_list = node + .record_field_list() + .map(|x| self.emit_record_field_list(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let label = self.trap.emit(generated::Union { + id: TrapId::Star, + attrs, + generic_param_list, + name, + record_field_list, + visibility, + where_clause, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_use(&mut self, node: ast::Use) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let use_tree = node.use_tree().map(|x| self.emit_use_tree(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::Use { + id: TrapId::Star, + attrs, + use_tree, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_use_tree(&mut self, node: ast::UseTree) -> Label { + let path = node.path().map(|x| self.emit_path(x)); + let rename = node.rename().map(|x| self.emit_rename(x)); + let use_tree_list = node.use_tree_list().map(|x| self.emit_use_tree_list(x)); + let label = self.trap.emit(generated::UseTree { + id: TrapId::Star, + path, + rename, + use_tree_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_use_tree_list( + &mut self, + node: ast::UseTreeList, + ) -> Label { + let use_trees = node.use_trees().map(|x| self.emit_use_tree(x)).collect(); + let label = self.trap.emit(generated::UseTreeList { + id: TrapId::Star, + use_trees, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_variant(&mut self, node: ast::Variant) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let field_list = node.field_list().map(|x| self.emit_field_list(x)); + let name = node.name().map(|x| self.emit_name(x)); + let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let label = self.trap.emit(generated::Variant { + id: TrapId::Star, + attrs, + expr, + field_list, + name, + visibility, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_variant_list( + &mut self, + node: ast::VariantList, + ) -> Label { + let variants = node.variants().map(|x| self.emit_variant(x)).collect(); + let label = self.trap.emit(generated::VariantList { + id: TrapId::Star, + variants, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_visibility( + &mut self, + node: ast::Visibility, + ) -> Label { + let path = node.path().map(|x| self.emit_path(x)); + let label = self.trap.emit(generated::Visibility { + id: TrapId::Star, + path, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_where_clause( + &mut self, + node: ast::WhereClause, + ) -> Label { + let predicates = node.predicates().map(|x| self.emit_where_pred(x)).collect(); + let label = self.trap.emit(generated::WhereClause { + id: TrapId::Star, + predicates, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_where_pred(&mut self, node: ast::WherePred) -> Label { + let generic_param_list = node + .generic_param_list() + .map(|x| self.emit_generic_param_list(x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + let ty = node.ty().map(|x| self.emit_type(x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + let label = self.trap.emit(generated::WherePred { + id: TrapId::Star, + generic_param_list, + lifetime, + ty, + type_bound_list, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_while_expr(&mut self, node: ast::WhileExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let condition = node.condition().map(|x| self.emit_expr(x)); + let label = node.label().map(|x| self.emit_label(x)); + let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); + let label = self.trap.emit(generated::WhileExpr { + id: TrapId::Star, + attrs, + condition, + label, + loop_body, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_wildcard_pat( + &mut self, + node: ast::WildcardPat, + ) -> Label { + let label = self.trap.emit(generated::WildcardPat { id: TrapId::Star }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_yeet_expr(&mut self, node: ast::YeetExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::YeetExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } + + pub(crate) fn emit_yield_expr(&mut self, node: ast::YieldExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(x)); + let label = self.trap.emit(generated::YieldExpr { + id: TrapId::Star, + attrs, + expr, + }); + self.emit_location(label, node); + label + } +} diff --git a/rust/generate-schema/src/main.rs b/rust/generate-schema/src/main.rs index 084faa51039e..0e0424c66d3c 100644 --- a/rust/generate-schema/src/main.rs +++ b/rust/generate-schema/src/main.rs @@ -402,14 +402,32 @@ fn get_fields(node: &AstNodeSrc) -> Vec { fn write_extractor(grammar: &AstSrc) -> std::io::Result { let mut buf: Vec = Vec::new(); + writeln!( + buf, + "use crate::generated; +use super::base::{{TextValue, Translator}}; +use crate::trap::{{Label, TrapId}}; +use ra_ap_syntax::ast; +use ra_ap_syntax::ast::{{ + HasArgList, HasAttrs, HasGenericArgs, HasGenericParams, HasLoopBody, HasModuleItem, HasName, + HasTypeBounds, HasVisibility, RangeItem, +}}; +impl Translator {{ + fn emit_else_branch(&mut self, node: ast::ElseBranch) -> Label {{ + match node {{ + ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).into(), + ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).into(), + }} + }}\n" + )?; for node in &grammar.enums { let type_name = &node.name; let class_name = class_name(&node.name); writeln!( buf, - " fn emit_{}(&mut self, node: ast::{}) -> Label {{", + " pub(crate) fn emit_{}(&mut self, node: ast::{}) -> Label {{", to_lower_snake_case(type_name), type_name, class_name @@ -434,7 +452,7 @@ fn write_extractor(grammar: &AstSrc) -> std::io::Result { writeln!( buf, - " fn emit_{}(&mut self, node: ast::{}) -> Label {{", + " pub(crate) fn emit_{}(&mut self, node: ast::{}) -> Label {{", to_lower_snake_case(type_name), type_name, class_name @@ -491,6 +509,7 @@ fn write_extractor(grammar: &AstSrc) -> std::io::Result { writeln!(buf, " }}\n")?; } + writeln!(buf, "}}")?; Ok(String::from_utf8_lossy(&buf).into_owned()) } @@ -523,13 +542,21 @@ fn main() -> std::io::Result<()> { }); let schema = write_schema(&grammar, super_types)?; let schema_path = PathBuf::from("../schema/ast.py"); - let extractor = write_extractor(&grammar)?; - print!("{}", extractor); codegen::ensure_file_contents( crate::flags::CodegenType::Grammar, &schema_path, &schema, false, ); + + let extractor = write_extractor(&grammar)?; + let extractor_path = PathBuf::from("../extractor/src/translate/generated.rs"); + codegen::ensure_file_contents( + crate::flags::CodegenType::Grammar, + &extractor_path, + &extractor, + false, + ); + Ok(()) } From bb44a2fc8ca094560d98d1503bdd75360b7d45ed Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Sat, 21 Sep 2024 13:38:41 +0100 Subject: [PATCH 073/162] Populate pkgInfoMapping for test packages if relevant --- go/extractor/extractor.go | 2 +- go/extractor/toolchain/toolchain.go | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index a42e56866baa..81e7e99dee54 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -131,7 +131,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool) if os.Getenv("CODEQL_EXTRACTOR_GO_FAST_PACKAGE_INFO") != "false" { log.Printf("Running go list to resolve package and module directories.") // get all packages information - pkgInfos, err = toolchain.GetPkgsInfo(patterns, true, modFlags...) + pkgInfos, err = toolchain.GetPkgsInfo(patterns, true, extractTests, modFlags...) if err != nil { log.Fatalf("Error getting dependency package or module directories: %v.", err) } diff --git a/go/extractor/toolchain/toolchain.go b/go/extractor/toolchain/toolchain.go index 029390432376..046f9af65b2f 100644 --- a/go/extractor/toolchain/toolchain.go +++ b/go/extractor/toolchain/toolchain.go @@ -223,7 +223,7 @@ type PkgInfo struct { // GetPkgsInfo gets the absolute module and package root directories for the packages matched by the // patterns `patterns`. It passes to `go list` the flags specified by `flags`. If `includingDeps` // is true, all dependencies will also be included. -func GetPkgsInfo(patterns []string, includingDeps bool, flags ...string) (map[string]PkgInfo, error) { +func GetPkgsInfo(patterns []string, includingDeps bool, extractTests bool, flags ...string) (map[string]PkgInfo, error) { // enable module mode so that we can find a module root if it exists, even if go module support is // disabled by a build if includingDeps { @@ -231,6 +231,10 @@ func GetPkgsInfo(patterns []string, includingDeps bool, flags ...string) (map[st flags = append(flags, "-deps") } + if extractTests { + flags = append(flags, "-test") + } + // using -json overrides -f format output, err := RunList("", patterns, append(flags, "-json")...) if err != nil { @@ -272,6 +276,12 @@ func GetPkgsInfo(patterns []string, includingDeps bool, flags ...string) (map[st PkgDir: pkgAbsDir, ModDir: modAbsDir, } + + if extractTests && strings.Contains(pkgInfo.ImportPath, " [") { + // Assume " [" is the start of a qualifier, and index the package by its base name + baseImportPath := strings.Split(pkgInfo.ImportPath, " [")[0] + pkgInfoMapping[baseImportPath] = pkgInfoMapping[pkgInfo.ImportPath] + } } return pkgInfoMapping, nil } From e528a08794bf990fe4d3f35a84b914274fb5f6a4 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Sat, 21 Sep 2024 22:11:13 +0100 Subject: [PATCH 074/162] Autoformat --- go/ql/integration-tests/go-mod-sample/src/test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ql/integration-tests/go-mod-sample/src/test.go b/go/ql/integration-tests/go-mod-sample/src/test.go index 71f2a463011a..c3f0f284d4a8 100644 --- a/go/ql/integration-tests/go-mod-sample/src/test.go +++ b/go/ql/integration-tests/go-mod-sample/src/test.go @@ -12,5 +12,5 @@ func test() { } func PublicFunction() int { - return 1 + return 1 } From 535db988239430f8fa6d9209117351d8ea2686a6 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 23 Sep 2024 11:21:55 +0200 Subject: [PATCH 075/162] Python: Minor simplification of `ActiveThreatModelSource` Co-authored-by: Taus --- python/ql/lib/semmle/python/Concepts.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index a5a7b8f5b9ac..50506439dfba 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -58,11 +58,11 @@ module ThreatModelSource { /** * A data flow source that is enabled in the current threat model configuration. */ -class ActiveThreatModelSource extends DataFlow::Node { +class ActiveThreatModelSource extends ThreatModelSource { ActiveThreatModelSource() { exists(string kind | currentThreatModel(kind) and - this.(ThreatModelSource).getThreatModel() = kind + this.getThreatModel() = kind ) } } From 48f9e0efe57056aa10a308795df53e67b7e91334 Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Mon, 23 Sep 2024 10:55:29 +0100 Subject: [PATCH 076/162] Adress review comments: Add missing deprecation + additional test case --- .../python/security/dataflow/UrlRedirectCustomizations.qll | 7 +++++-- .../tainttracking/commonSanitizer/test_const_compare.py | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll index 5a351eb9ab40..76302f7f2fb6 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll @@ -140,12 +140,15 @@ module UrlRedirect { } /** - * A comparison with a constant string, considered as a sanitizer-guard. + * A comparison with a constant, considered as a sanitizer-guard. */ - class StringConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { + class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { override predicate sanitizes(FlowState state) { // sanitize all flow states any() } } + + /** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */ + deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard; } diff --git a/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py b/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py index ca6e9f0de191..2e7fff62c0d7 100644 --- a/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py +++ b/python/ql/test/library-tests/dataflow/tainttracking/commonSanitizer/test_const_compare.py @@ -106,6 +106,11 @@ def test_in_list_with_constants(): else: ensure_tainted(ts) # $ tainted + if ts in ["safe", not_constant(), None]: + ensure_tainted(ts) # $ tainted + +def not_constant(): + return "x" SAFE = ["safe", "also_safe"] From 209f9ec93dcd9a4f6479493f5a7f33ed4ebbb953 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 23 Sep 2024 15:20:18 +0100 Subject: [PATCH 077/162] Amend comments per review --- go/codeql-extractor.yml | 4 ++-- go/extractor/cli/go-extractor/go-extractor.go | 2 ++ go/extractor/toolchain/toolchain.go | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go/codeql-extractor.yml b/go/codeql-extractor.yml index e3333ec7c06d..f21c0ed7466d 100644 --- a/go/codeql-extractor.yml +++ b/go/codeql-extractor.yml @@ -21,9 +21,9 @@ file_types: legacy_qltest_extraction: true options: extract_tests: - title: Whether to include Go test files and functions in the CodeQL database. + title: Whether to include Go test files in the CodeQL database. description: > - A value indicating whether Go test files and functions should be included in the CodeQL database. + A value indicating whether Go test files should be included in the CodeQL database. The default is 'false'. type: string pattern: "^(false|true)$" diff --git a/go/extractor/cli/go-extractor/go-extractor.go b/go/extractor/cli/go-extractor/go-extractor.go index 142a950d9f12..425af6cd55d8 100644 --- a/go/extractor/cli/go-extractor/go-extractor.go +++ b/go/extractor/cli/go-extractor/go-extractor.go @@ -21,6 +21,8 @@ func usage() { fmt.Fprintf(os.Stderr, "--help Print this help.\n") } +// extractTests is set (a) if we were manually commanded to extract tests via the relevant +// environment variable / extractor option, or (b) we're mimicking a `go test` command. func parseFlags(args []string, mimic bool, extractTests bool) ([]string, []string, bool) { i := 0 buildFlags := []string{} diff --git a/go/extractor/toolchain/toolchain.go b/go/extractor/toolchain/toolchain.go index 046f9af65b2f..119e3782f6f6 100644 --- a/go/extractor/toolchain/toolchain.go +++ b/go/extractor/toolchain/toolchain.go @@ -232,6 +232,7 @@ func GetPkgsInfo(patterns []string, includingDeps bool, extractTests bool, flags } if extractTests { + // Without the `-test` flag, test packages would be omitted from the `go list` output. flags = append(flags, "-test") } From 01aa63e17070e1cb7f0cd705ec885125ce2068f2 Mon Sep 17 00:00:00 2001 From: Kevin Stubbings Date: Mon, 23 Sep 2024 16:47:10 -0700 Subject: [PATCH 078/162] Add tests --- .../ql/test/experimental/meta/ConceptsTest.qll | 16 +++++++++++++++- .../frameworks/fastapi/middleware.py | 10 ++++++++++ .../frameworks/starlette/Middleware.py | 11 +++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 python/ql/test/library-tests/frameworks/fastapi/middleware.py create mode 100644 python/ql/test/library-tests/frameworks/starlette/Middleware.py diff --git a/python/ql/test/experimental/meta/ConceptsTest.qll b/python/ql/test/experimental/meta/ConceptsTest.qll index a53171de88ac..05d60f92e21b 100644 --- a/python/ql/test/experimental/meta/ConceptsTest.qll +++ b/python/ql/test/experimental/meta/ConceptsTest.qll @@ -632,13 +632,27 @@ module XmlParsingTest implements TestSig { } } +module CorsMiddlewareTest implements TestSig { + string getARelevantTag() { result = "CorsMiddleware" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + exists(location.getFile().getRelativePath()) and + exists(Http::Server::CorsMiddleware cm | + location = cm.getLocation() and + element = cm.toString() and + value = cm.getMiddlewareName().toString() and + tag = "CorsMiddleware" + ) + } +} + import MakeTest, MergeTests5, MergeTests5>, + MergeTests3>, MergeTests5, MergeTests5 Date: Tue, 24 Sep 2024 00:20:17 +0000 Subject: [PATCH 079/162] Add changed framework coverage reports --- java/documentation/library-coverage/coverage.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/documentation/library-coverage/coverage.csv b/java/documentation/library-coverage/coverage.csv index d9c920f443c3..5978894130b4 100644 --- a/java/documentation/library-coverage/coverage.csv +++ b/java/documentation/library-coverage/coverage.csv @@ -233,7 +233,7 @@ org.springframework.beans,,,30,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3 org.springframework.boot.jdbc,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,, org.springframework.cache,,,13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13 org.springframework.context,,,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3, -org.springframework.core.io,17,,5,,,,,,,,,,,,,,,,,,,,,,,,16,,,,,,,,,1,,,,,,,,,,,,,,,5, +org.springframework.core.io,17,,6,,,,,,,,,,,,,,,,,,,,,,,,16,,,,,,,,,1,,,,,,,,,,,,,,,6, org.springframework.data.repository,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1 org.springframework.http,14,,77,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,67,10 org.springframework.jdbc.core,19,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,19,,,,,,,,,,,,,, @@ -248,7 +248,7 @@ org.springframework.util,10,,142,,,,,,,,,,,,,,,,,,,,,,,,10,,,,,,,,,,,,,,,,,,,,,, org.springframework.validation,,,13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13, org.springframework.web.client,13,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,,,,,,,,,,,,,,3,, org.springframework.web.context.request,,8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,8,, -org.springframework.web.multipart,,12,13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,12,13, +org.springframework.web.multipart,,12,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,12,12, org.springframework.web.portlet,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,,,,,,,,,,, org.springframework.web.reactive.function.client,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,,,,,,,,,,,,,,,, org.springframework.web.servlet,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,,,,,,,,,,, From 6ae03e67e666bbd28d139fdf36dbf4bf6e68bd6f Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 11:20:57 +0200 Subject: [PATCH 080/162] Rust: Add case for `ParenExpr` in CFG --- .../internal/ControlFlowGraphImpl.qll | 6 ++- .../library-tests/controlflow/Cfg.expected | 50 +++++++++++++++++++ shared/controlflow/codeql/controlflow/Cfg.qll | 10 +++- 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index bde6ecdc6631..6c9d59800038 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -5,7 +5,7 @@ import codeql.controlflow.Cfg private import SuccessorType as ST private import Scope as Scope -module CfgInput implements InputSig { +private module CfgInput implements InputSig { private import rust as Rust private import Completion as C private import Splitting as S @@ -387,6 +387,10 @@ class MethodCallExprTree extends StandardPostOrderTree instanceof MethodCallExpr class OffsetOfExprTree extends LeafTree instanceof OffsetOfExpr { } +class ParenExprTree extends StandardPostOrderTree, ParenExpr { + override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getExpr() } +} + // This covers all patterns as they all extend `Pat` class PatExprTree extends LeafTree instanceof Pat { } diff --git a/rust/ql/test/library-tests/controlflow/Cfg.expected b/rust/ql/test/library-tests/controlflow/Cfg.expected index 87361682296c..15ba80b1515e 100644 --- a/rust/ql/test/library-tests/controlflow/Cfg.expected +++ b/rust/ql/test/library-tests/controlflow/Cfg.expected @@ -149,6 +149,49 @@ | test.rs:79:28:81:9 | BlockExpr | test.rs:79:9:81:9 | IfExpr | | | test.rs:80:13:80:13 | PathExpr | test.rs:79:28:81:9 | BlockExpr | | | test.rs:82:9:82:9 | LiteralExpr | test.rs:78:43:83:5 | BlockExpr | | +| test.rs:85:5:91:5 | enter test_nested_if | test.rs:86:16:86:16 | PathExpr | | +| test.rs:85:5:91:5 | exit test_nested_if (normal) | test.rs:85:5:91:5 | exit test_nested_if | | +| test.rs:85:38:91:5 | BlockExpr | test.rs:85:5:91:5 | exit test_nested_if (normal) | | +| test.rs:86:9:90:9 | IfExpr | test.rs:85:38:91:5 | BlockExpr | | +| test.rs:86:12:86:48 | ParenExpr | test.rs:87:13:87:13 | LiteralExpr | true | +| test.rs:86:12:86:48 | ParenExpr | test.rs:89:13:89:13 | LiteralExpr | false | +| test.rs:86:13:86:47 | IfExpr | test.rs:86:12:86:48 | ParenExpr | | +| test.rs:86:16:86:16 | PathExpr | test.rs:86:20:86:20 | LiteralExpr | | +| test.rs:86:16:86:20 | BinaryExpr | test.rs:86:24:86:24 | PathExpr | true | +| test.rs:86:16:86:20 | BinaryExpr | test.rs:86:41:86:41 | PathExpr | false | +| test.rs:86:20:86:20 | LiteralExpr | test.rs:86:16:86:20 | BinaryExpr | | +| test.rs:86:22:86:32 | BlockExpr | test.rs:86:13:86:47 | IfExpr | | +| test.rs:86:24:86:24 | PathExpr | test.rs:86:29:86:30 | LiteralExpr | | +| test.rs:86:24:86:30 | BinaryExpr | test.rs:86:22:86:32 | BlockExpr | | +| test.rs:86:28:86:30 | PrefixExpr | test.rs:86:24:86:30 | BinaryExpr | | +| test.rs:86:29:86:30 | LiteralExpr | test.rs:86:28:86:30 | PrefixExpr | | +| test.rs:86:39:86:47 | BlockExpr | test.rs:86:13:86:47 | IfExpr | | +| test.rs:86:41:86:41 | PathExpr | test.rs:86:45:86:46 | LiteralExpr | | +| test.rs:86:41:86:46 | BinaryExpr | test.rs:86:39:86:47 | BlockExpr | | +| test.rs:86:45:86:46 | LiteralExpr | test.rs:86:41:86:46 | BinaryExpr | | +| test.rs:86:50:88:9 | BlockExpr | test.rs:86:9:90:9 | IfExpr | | +| test.rs:87:13:87:13 | LiteralExpr | test.rs:86:50:88:9 | BlockExpr | | +| test.rs:88:16:90:9 | BlockExpr | test.rs:86:9:90:9 | IfExpr | | +| test.rs:89:13:89:13 | LiteralExpr | test.rs:88:16:90:9 | BlockExpr | | +| test.rs:93:5:99:5 | enter test_nested_if_match | test.rs:94:19:94:19 | PathExpr | | +| test.rs:93:5:99:5 | exit test_nested_if_match (normal) | test.rs:93:5:99:5 | exit test_nested_if_match | | +| test.rs:93:44:99:5 | BlockExpr | test.rs:93:5:99:5 | exit test_nested_if_match (normal) | | +| test.rs:94:9:98:9 | IfExpr | test.rs:93:44:99:5 | BlockExpr | | +| test.rs:94:12:94:46 | ParenExpr | test.rs:95:13:95:13 | LiteralExpr | true | +| test.rs:94:12:94:46 | ParenExpr | test.rs:97:13:97:13 | LiteralExpr | false | +| test.rs:94:13:94:45 | MatchExpr | test.rs:94:12:94:46 | ParenExpr | | +| test.rs:94:19:94:19 | PathExpr | test.rs:94:23:94:23 | LiteralPat | | +| test.rs:94:23:94:23 | LiteralPat | test.rs:94:13:94:45 | MatchExpr | no-match | +| test.rs:94:23:94:23 | LiteralPat | test.rs:94:28:94:31 | LiteralExpr | match | +| test.rs:94:23:94:23 | LiteralPat | test.rs:94:34:94:34 | WildcardPat | no-match | +| test.rs:94:28:94:31 | LiteralExpr | test.rs:94:13:94:45 | MatchExpr | | +| test.rs:94:34:94:34 | WildcardPat | test.rs:94:13:94:45 | MatchExpr | no-match | +| test.rs:94:34:94:34 | WildcardPat | test.rs:94:39:94:43 | LiteralExpr | match | +| test.rs:94:39:94:43 | LiteralExpr | test.rs:94:13:94:45 | MatchExpr | | +| test.rs:94:48:96:9 | BlockExpr | test.rs:94:9:98:9 | IfExpr | | +| test.rs:95:13:95:13 | LiteralExpr | test.rs:94:48:96:9 | BlockExpr | | +| test.rs:96:16:98:9 | BlockExpr | test.rs:94:9:98:9 | IfExpr | | +| test.rs:97:13:97:13 | LiteralExpr | test.rs:96:16:98:9 | BlockExpr | | | test.rs:105:5:108:5 | enter test_and_operator | test.rs:106:9:106:28 | LetStmt | | | test.rs:105:5:108:5 | exit test_and_operator (normal) | test.rs:105:5:108:5 | exit test_and_operator | | | test.rs:105:61:108:5 | BlockExpr | test.rs:105:5:108:5 | exit test_and_operator (normal) | | @@ -181,8 +224,15 @@ | test.rs:116:9:116:36 | LetStmt | test.rs:116:17:116:35 | BinaryExpr | | | test.rs:116:13:116:13 | IdentPat | test.rs:117:9:117:9 | PathExpr | match, no-match | | test.rs:116:17:116:17 | PathExpr | test.rs:116:13:116:13 | IdentPat | true | +| test.rs:116:17:116:17 | PathExpr | test.rs:116:23:116:23 | PathExpr | false | | test.rs:116:17:116:30 | BinaryExpr | test.rs:116:17:116:17 | PathExpr | | | test.rs:116:17:116:35 | BinaryExpr | test.rs:116:17:116:30 | BinaryExpr | | +| test.rs:116:22:116:30 | ParenExpr | test.rs:116:13:116:13 | IdentPat | true | +| test.rs:116:22:116:30 | ParenExpr | test.rs:116:35:116:35 | PathExpr | false | +| test.rs:116:23:116:23 | PathExpr | test.rs:116:28:116:29 | LiteralExpr | | +| test.rs:116:23:116:29 | BinaryExpr | test.rs:116:22:116:30 | ParenExpr | | +| test.rs:116:28:116:29 | LiteralExpr | test.rs:116:23:116:29 | BinaryExpr | | +| test.rs:116:35:116:35 | PathExpr | test.rs:116:13:116:13 | IdentPat | | | test.rs:117:9:117:9 | PathExpr | test.rs:115:61:118:5 | BlockExpr | | | test.rs:122:1:128:1 | enter test_match | test.rs:123:11:123:21 | PathExpr | | | test.rs:122:1:128:1 | exit test_match (normal) | test.rs:122:1:128:1 | exit test_match | | diff --git a/shared/controlflow/codeql/controlflow/Cfg.qll b/shared/controlflow/codeql/controlflow/Cfg.qll index 0bd857e91c0e..a6ce96be71d3 100644 --- a/shared/controlflow/codeql/controlflow/Cfg.qll +++ b/shared/controlflow/codeql/controlflow/Cfg.qll @@ -1273,8 +1273,14 @@ module Make Input> { string getOrderDisambiguation() { result = "" } } - import TestOutput - import Mermaid + private module Output = TestOutput; + + import Output::Mermaid + + query predicate edges(RelevantNode pred, RelevantNode succ, string attr, string val) { + attr = "semmle.label" and + Output::edges(pred, succ, val) + } } /** Provides a set of consistency queries. */ From 3b753da74efff9c2133bc5c84efc0afa15f3a574 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 12:12:25 +0200 Subject: [PATCH 081/162] Rust: Expose `SuccessorType` and sub classes --- .../rust/controlflow/ControlFlowGraph.qll | 14 ++++++ .../rust/controlflow/internal/Completion.qll | 2 +- .../internal/ControlFlowGraphImpl.qll | 9 ++-- .../controlflow/internal/SuccessorType.qll | 45 +++++++++---------- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/ControlFlowGraph.qll b/rust/ql/lib/codeql/rust/controlflow/ControlFlowGraph.qll index e8e6e5f98c9d..18159ccea748 100644 --- a/rust/ql/lib/codeql/rust/controlflow/ControlFlowGraph.qll +++ b/rust/ql/lib/codeql/rust/controlflow/ControlFlowGraph.qll @@ -9,6 +9,20 @@ private import BasicBlocks final class CfgScope = Scope::CfgScope; +final class SuccessorType = SuccessorTypeImpl; + +final class NormalSuccessor = NormalSuccessorImpl; + +final class ConditionalSuccessor = ConditionalSuccessorImpl; + +final class BooleanSuccessor = BooleanSuccessorImpl; + +final class MatchSuccessor = MatchSuccessorImpl; + +final class LoopJumpSuccessor = LoopJumpSuccessorImpl; + +final class ReturnSuccessor = ReturnSuccessorImpl; + /** * A control flow node. * diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll b/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll index 99b36e10c847..2e168c0abd54 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll @@ -3,7 +3,7 @@ private import codeql.rust.controlflow.ControlFlowGraph private import rust private import SuccessorType -private newtype TCompletion = +newtype TCompletion = TSimpleCompletion() or TBooleanCompletion(Boolean b) or TMatchCompletion(Boolean isMatch) or diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index 6c9d59800038..7f2321461288 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -1,9 +1,8 @@ private import rust import codeql.controlflow.Cfg import Completion -import codeql.controlflow.Cfg -private import SuccessorType as ST private import Scope as Scope +private import codeql.rust.controlflow.ControlFlowGraph as Cfg private module CfgInput implements InputSig { private import rust as Rust @@ -29,7 +28,7 @@ private module CfgInput implements InputSig { class Split = S::Split; - class SuccessorType = ST::SuccessorType; + class SuccessorType = Cfg::SuccessorType; /** Gets a successor type that matches completion `c`. */ SuccessorType getAMatchingSuccessorType(Completion c) { result = c.getAMatchingSuccessorType() } @@ -37,13 +36,13 @@ private module CfgInput implements InputSig { /** * Hold if `c` represents simple (normal) evaluation of a statement or an expression. */ - predicate successorTypeIsSimple(SuccessorType t) { t instanceof ST::NormalSuccessor } + predicate successorTypeIsSimple(SuccessorType t) { t instanceof Cfg::NormalSuccessor } /** Holds if `t` is an abnormal exit type out of a CFG scope. */ predicate isAbnormalExitType(SuccessorType t) { none() } /** Hold if `t` represents a conditional successor type. */ - predicate successorTypeIsCondition(SuccessorType t) { t instanceof ST::BooleanSuccessor } + predicate successorTypeIsCondition(SuccessorType t) { t instanceof Cfg::BooleanSuccessor } /** Gets the maximum number of splits allowed for a given node. */ int maxSplits() { result = 0 } diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll b/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll index f7743e7275e3..036552c716c2 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll @@ -1,5 +1,6 @@ private import rust private import codeql.util.Boolean +private import Completion newtype TLoopJumpType = TContinueJump() or @@ -14,36 +15,34 @@ newtype TSuccessorType = TSuccessorSuccessor() or TBooleanSuccessor(Boolean b) or TMatchSuccessor(Boolean b) or - TLoopSuccessor(TLoopJumpType kind, TLabelType label) or + TLoopSuccessor(TLoopJumpType kind, TLabelType label) { exists(TLoopCompletion(kind, label)) } or TReturnSuccessor() /** The type of a control flow successor. */ -abstract private class SuccessorTypeImpl extends TSuccessorType { +abstract class SuccessorTypeImpl extends TSuccessorType { /** Gets a textual representation of successor type. */ abstract string toString(); } -final class SuccessorType = SuccessorTypeImpl; - /** A normal control flow successor. */ -final class NormalSuccessor extends SuccessorTypeImpl, TSuccessorSuccessor { - final override string toString() { result = "successor" } +class NormalSuccessorImpl extends SuccessorTypeImpl, TSuccessorSuccessor { + override string toString() { result = "successor" } } /** A conditional control flow successor. */ -abstract private class ConditionalSuccessor extends SuccessorTypeImpl { +abstract class ConditionalSuccessorImpl extends SuccessorTypeImpl { boolean value; bindingset[value] - ConditionalSuccessor() { any() } + ConditionalSuccessorImpl() { any() } /** Gets the Boolean value of this successor. */ - final boolean getValue() { result = value } + boolean getValue() { result = value } } /** A Boolean control flow successor for a boolean conditon. */ -final class BooleanSuccessor extends ConditionalSuccessor, TBooleanSuccessor { - BooleanSuccessor() { this = TBooleanSuccessor(value) } +class BooleanSuccessorImpl extends ConditionalSuccessorImpl, TBooleanSuccessor { + BooleanSuccessorImpl() { this = TBooleanSuccessor(value) } override string toString() { result = this.getValue().toString() } } @@ -51,8 +50,8 @@ final class BooleanSuccessor extends ConditionalSuccessor, TBooleanSuccessor { /** * A control flow successor of a pattern match. */ -final class MatchSuccessor extends ConditionalSuccessor, TMatchSuccessor { - MatchSuccessor() { this = TMatchSuccessor(value) } +class MatchSuccessorImpl extends ConditionalSuccessorImpl, TMatchSuccessor { + MatchSuccessorImpl() { this = TMatchSuccessor(value) } override string toString() { if this.getValue() = true then result = "match" else result = "no-match" @@ -62,20 +61,20 @@ final class MatchSuccessor extends ConditionalSuccessor, TMatchSuccessor { /** * A control flow successor of a loop control flow expression, `continue` or `break`. */ -final class LoopJumpSuccessor extends SuccessorTypeImpl, TLoopSuccessor { - final private TLoopJumpType getKind() { this = TLoopSuccessor(result, _) } +class LoopJumpSuccessorImpl extends SuccessorTypeImpl, TLoopSuccessor { + private TLoopJumpType getKind() { this = TLoopSuccessor(result, _) } - final private TLabelType getLabelType() { this = TLoopSuccessor(_, result) } + private TLabelType getLabelType() { this = TLoopSuccessor(_, result) } - final predicate hasLabel() { this.getLabelType() = TLabel(_) } + predicate hasLabel() { this.getLabelType() = TLabel(_) } - final string getLabelName() { this = TLoopSuccessor(_, TLabel(result)) } + string getLabelName() { this = TLoopSuccessor(_, TLabel(result)) } - final predicate isContinue() { this.getKind() = TContinueJump() } + predicate isContinue() { this.getKind() = TContinueJump() } - final predicate isBreak() { this.getKind() = TBreakJump() } + predicate isBreak() { this.getKind() = TBreakJump() } - final override string toString() { + override string toString() { exists(string kind, string label | (if this.isContinue() then kind = "continue" else kind = "break") and (if this.hasLabel() then label = "(" + this.getLabelName() + ")" else label = "") and @@ -87,6 +86,6 @@ final class LoopJumpSuccessor extends SuccessorTypeImpl, TLoopSuccessor { /** * A `return` control flow successor. */ -final class ReturnSuccessor extends SuccessorTypeImpl, TReturnSuccessor { - final override string toString() { result = "return" } +class ReturnSuccessorImpl extends SuccessorTypeImpl, TReturnSuccessor { + override string toString() { result = "return" } } From 5f3663018ee698f93855b72c0d0536f51d44d10c Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 13:09:33 +0200 Subject: [PATCH 082/162] Rust: Remove spurious CFG edges in match expressions --- .../internal/ControlFlowGraphImpl.qll | 13 +++++++---- .../rust/elements/internal/MatchExprImpl.qll | 23 +++++++++++++++++-- .../library-tests/controlflow/Cfg.expected | 5 ---- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index 7f2321461288..a13f5b27e76d 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -356,24 +356,27 @@ class MatchArmTree extends ControlFlowTree instanceof MatchArm { class MatchExprTree extends PostOrderTree instanceof MatchExpr { override predicate propagatesAbnormal(AstNode child) { - child = [super.getExpr(), super.getMatchArmList().getAnArm().getExpr()] + child = [super.getExpr(), super.getAnArm().getExpr()] } override predicate first(AstNode node) { first(super.getExpr(), node) } override predicate succ(AstNode pred, AstNode succ, Completion c) { // Edge from the scrutinee to the first arm. - last(super.getExpr(), pred, c) and succ = super.getMatchArmList().getArm(0).getPat() + last(super.getExpr(), pred, c) and succ = super.getArm(0).getPat() or // Edge from a failed match/guard in one arm to the beginning of the next arm. exists(int i | - last(super.getMatchArmList().getArm(i), pred, c) and - first(super.getMatchArmList().getArm(i + 1), succ) and + last(super.getArm(i), pred, c) and + first(super.getArm(i + 1), succ) and c.(ConditionalCompletion).failed() ) or // Edge from the end of each arm to the match expression. - last(super.getMatchArmList().getArm(_), pred, c) and succ = this and completionIsNormal(c) + last(super.getArm(_).getExpr(), pred, c) and succ = this and completionIsNormal(c) + or + // Edge from the end of last arm to the match expression. + last(super.getLastArm().getExpr(), pred, c) and succ = this and completionIsNormal(c) } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll index fd2cb793ca81..590c6d61a46b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `MatchExpr`. * @@ -27,5 +26,25 @@ module Impl { * } * ``` */ - class MatchExpr extends Generated::MatchExpr { } + class MatchExpr extends Generated::MatchExpr { + /** + * Gets the `index`th arm of this match expression. + */ + MatchArm getArm(int index) { result = this.getMatchArmList().getArm(index) } + + /** + * Gets any of the arms of this match expression. + */ + MatchArm getAnArm() { result = this.getArm(_) } + + /** + * Gets the number of arms of this match expression. + */ + int getNumberOfArms() { result = count(int i | exists(this.getArm(i))) } + + /** + * Gets the last arm of this match expression. + */ + MatchArm getLastArm() { result = this.getArm(this.getNumberOfArms() - 1) } + } } diff --git a/rust/ql/test/library-tests/controlflow/Cfg.expected b/rust/ql/test/library-tests/controlflow/Cfg.expected index 15ba80b1515e..93e6defe9923 100644 --- a/rust/ql/test/library-tests/controlflow/Cfg.expected +++ b/rust/ql/test/library-tests/controlflow/Cfg.expected @@ -181,11 +181,9 @@ | test.rs:94:12:94:46 | ParenExpr | test.rs:97:13:97:13 | LiteralExpr | false | | test.rs:94:13:94:45 | MatchExpr | test.rs:94:12:94:46 | ParenExpr | | | test.rs:94:19:94:19 | PathExpr | test.rs:94:23:94:23 | LiteralPat | | -| test.rs:94:23:94:23 | LiteralPat | test.rs:94:13:94:45 | MatchExpr | no-match | | test.rs:94:23:94:23 | LiteralPat | test.rs:94:28:94:31 | LiteralExpr | match | | test.rs:94:23:94:23 | LiteralPat | test.rs:94:34:94:34 | WildcardPat | no-match | | test.rs:94:28:94:31 | LiteralExpr | test.rs:94:13:94:45 | MatchExpr | | -| test.rs:94:34:94:34 | WildcardPat | test.rs:94:13:94:45 | MatchExpr | no-match | | test.rs:94:34:94:34 | WildcardPat | test.rs:94:39:94:43 | LiteralExpr | match | | test.rs:94:39:94:43 | LiteralExpr | test.rs:94:13:94:45 | MatchExpr | | | test.rs:94:48:96:9 | BlockExpr | test.rs:94:9:98:9 | IfExpr | | @@ -239,16 +237,13 @@ | test.rs:122:44:128:1 | BlockExpr | test.rs:122:1:128:1 | exit test_match (normal) | | | test.rs:123:5:127:5 | MatchExpr | test.rs:122:44:128:1 | BlockExpr | | | test.rs:123:11:123:21 | PathExpr | test.rs:124:9:124:23 | TupleStructPat | | -| test.rs:124:9:124:23 | TupleStructPat | test.rs:123:5:127:5 | MatchExpr | no-match | | test.rs:124:9:124:23 | TupleStructPat | test.rs:124:28:124:28 | PathExpr | match | | test.rs:124:9:124:23 | TupleStructPat | test.rs:125:9:125:23 | TupleStructPat | no-match | | test.rs:124:28:124:28 | PathExpr | test.rs:124:32:124:33 | LiteralExpr | | | test.rs:124:32:124:33 | LiteralExpr | test.rs:124:28:124:33 | BinaryExpr | | -| test.rs:125:9:125:23 | TupleStructPat | test.rs:123:5:127:5 | MatchExpr | no-match | | test.rs:125:9:125:23 | TupleStructPat | test.rs:125:28:125:28 | PathExpr | match | | test.rs:125:9:125:23 | TupleStructPat | test.rs:126:9:126:20 | PathPat | no-match | | test.rs:125:28:125:28 | PathExpr | test.rs:123:5:127:5 | MatchExpr | | -| test.rs:126:9:126:20 | PathPat | test.rs:123:5:127:5 | MatchExpr | no-match | | test.rs:126:9:126:20 | PathPat | test.rs:126:25:126:25 | LiteralExpr | match | | test.rs:126:25:126:25 | LiteralExpr | test.rs:123:5:127:5 | MatchExpr | | | test.rs:131:5:136:5 | enter test_infinite_loop | test.rs:132:9:134:9 | ExprStmt | | From 8d8bbd5b129c8fc66fd76475bde2c87a632e2e78 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 13:25:57 +0200 Subject: [PATCH 083/162] Rust: Run codegen --- rust/ql/.generated.list | 1 - rust/ql/.gitattributes | 1 - rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 0d4ebbc8fe3b..10ba5b76aae1 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -287,7 +287,6 @@ lib/codeql/rust/elements/internal/MatchArmImpl.qll 065dff16fc70b51924eb4db57be12 lib/codeql/rust/elements/internal/MatchArmListConstructor.qll 8bc5ac978fe1158ef70d0ac06bdad9e02aadd657decb64abcc4ea03f6715a87a 4604ab0e524d0de6e19c16711b713f2090c95a8708909816a2b046f1bd83fe24 lib/codeql/rust/elements/internal/MatchArmListImpl.qll 896c6f1650e7ceb60d0b3d90e2b95fe7f8dc529203ddfec58edb063fa9b2871f a668fed1eb68806abfb021913786168d124de47b25da470e7b57f56bf8556891 lib/codeql/rust/elements/internal/MatchExprConstructor.qll 0355ca543a0f9ad56697bc2e1e2511fa3f233bc1f6344d9e1c2369106901c696 78622807a1c4bff61b751c715639510146c7a713e0c4f63246e9a2cf302f4875 -lib/codeql/rust/elements/internal/MatchExprImpl.qll 2f933805bbe6f2676501c1c72ce1dbcffb0acff34883fa7b423b1a20eaf58afb 56f1c727f327717afc48c1dc505241d56c46e84094395ca32a33824cf64ebdce lib/codeql/rust/elements/internal/MatchGuardConstructor.qll d4cae02d2902fe8d3cb6b9c2796137863f41f55840f6623935a1c99df43f28d8 0c89f2ca71a2fd5a3f365291e784cb779e34ba0542d9285515e1856424cec60d lib/codeql/rust/elements/internal/MatchGuardImpl.qll 77453be572769507e6515e622e6c874a875464c2ade8bcd89ef447bdc4649062 86cdf08b0ac5ff9a865ab52eae535d8c4e7d341bc79d422e123af5b8f593ad22 lib/codeql/rust/elements/internal/MetaConstructor.qll 49ab9aafdcab7785fc5fc9fb8f7c5bb0ae76cf85d0d259c4b3ac4b0eccbbeb56 bc11aef22661077e398b6ca75e3701fd8d0ac94a0e96dc556a6f6de4089d8b8c diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 8c303421256b..ca6d0ee9bdc4 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -289,7 +289,6 @@ /lib/codeql/rust/elements/internal/MatchArmListConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/MatchArmListImpl.qll linguist-generated /lib/codeql/rust/elements/internal/MatchExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/MatchExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/MatchGuardConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/MatchGuardImpl.qll linguist-generated /lib/codeql/rust/elements/internal/MetaConstructor.qll linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll index 590c6d61a46b..4028aad275ee 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll @@ -11,6 +11,7 @@ private import codeql.rust.elements.internal.generated.MatchExpr * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A match expression. For example: * ```rust From d14e77ba488bd3a186712bbc09b213b52a8081d2 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 24 Sep 2024 14:09:23 +0200 Subject: [PATCH 084/162] Address comments --- rust/extractor/src/main.rs | 2 +- rust/extractor/src/translate/.gitattributes | 1 + rust/extractor/src/translate/generated.rs | 2 ++ rust/generate-schema/src/main.rs | 7 ++++++- rust/schema/.gitattributes | 1 + rust/schema/ast.py | 2 ++ 6 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 rust/extractor/src/translate/.gitattributes create mode 100644 rust/schema/.gitattributes diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs index f7bcedfd8c21..0300e3c1f3b0 100644 --- a/rust/extractor/src/main.rs +++ b/rust/extractor/src/main.rs @@ -9,7 +9,7 @@ pub mod trap; use ra_ap_syntax::ast::SourceFile; use ra_ap_syntax::AstNode; -pub fn extract( +fn extract( archiver: &archive::Archiver, traps: &trap::TrapFileProvider, file: std::path::PathBuf, diff --git a/rust/extractor/src/translate/.gitattributes b/rust/extractor/src/translate/.gitattributes new file mode 100644 index 000000000000..d408bf18300f --- /dev/null +++ b/rust/extractor/src/translate/.gitattributes @@ -0,0 +1 @@ +/generated.rs linguist-generated diff --git a/rust/extractor/src/translate/generated.rs b/rust/extractor/src/translate/generated.rs index 5220599779bb..561bfbb1f0d4 100644 --- a/rust/extractor/src/translate/generated.rs +++ b/rust/extractor/src/translate/generated.rs @@ -1,3 +1,5 @@ +//! Generated by `cargo generate-schema`, do not edit by hand. + use super::base::{TextValue, Translator}; use crate::generated; use crate::trap::{Label, TrapId}; diff --git a/rust/generate-schema/src/main.rs b/rust/generate-schema/src/main.rs index 0e0424c66d3c..956e2b1c0422 100644 --- a/rust/generate-schema/src/main.rs +++ b/rust/generate-schema/src/main.rs @@ -53,6 +53,10 @@ fn write_schema( super_types: BTreeMap>, ) -> std::io::Result { let mut buf: Vec = Vec::new(); + writeln!( + buf, + "# Generated by `cargo generate-schema`, do not edit by hand.\n" + )?; writeln!(buf, "from .prelude import *\n")?; for node in &grammar.enums { @@ -404,7 +408,8 @@ fn write_extractor(grammar: &AstSrc) -> std::io::Result { let mut buf: Vec = Vec::new(); writeln!( buf, - "use crate::generated; + "//! Generated by `cargo generate-schema`, do not edit by hand.\n +use crate::generated; use super::base::{{TextValue, Translator}}; use crate::trap::{{Label, TrapId}}; use ra_ap_syntax::ast; diff --git a/rust/schema/.gitattributes b/rust/schema/.gitattributes new file mode 100644 index 000000000000..515346ca14c5 --- /dev/null +++ b/rust/schema/.gitattributes @@ -0,0 +1 @@ +/ast.py linguist-generated diff --git a/rust/schema/ast.py b/rust/schema/ast.py index 671f89473344..13eb54e7acf3 100644 --- a/rust/schema/ast.py +++ b/rust/schema/ast.py @@ -1,3 +1,5 @@ +# Generated by `cargo generate-schema`, do not edit by hand. + from .prelude import * class AssocItem(AstNode): From 6a67bd52a961fc40e4bec7b3e66cd4b013e2063d Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 12 Sep 2024 17:04:21 +0100 Subject: [PATCH 085/162] Add tests for MaD inheritance --- .../dataflow/ExternalFlowInheritance/go.mod | 5 + ...dingAndOverridingI1_subtypes_true.expected | 40 +++++++ ...ddingAndOverridingI1_subtypes_true.ext.yml | 16 +++ ...tEmbeddingAndOverridingI1_subtypes_true.ql | 20 ++++ ...d_StructEmbeddingI1_subtypes_true.expected | 40 +++++++ ...ad_StructEmbeddingI1_subtypes_true.ext.yml | 16 +++ .../mad_StructEmbeddingI1_subtypes_true.ql | 18 +++ .../mad_i1_subtypes_false.expected | 10 ++ .../mad_i1_subtypes_false.ext.yml | 16 +++ .../mad_i1_subtypes_false.ql | 18 +++ .../mad_i1_subtypes_true.expected | 40 +++++++ .../mad_i1_subtypes_true.ext.yml | 16 +++ .../mad_i1_subtypes_true.ql | 18 +++ .../mad_i2_subtypes_false.expected | 10 ++ .../mad_i2_subtypes_false.ext.yml | 16 +++ .../mad_i2_subtypes_false.ql | 18 +++ .../mad_i2_subtypes_true.expected | 22 ++++ .../mad_i2_subtypes_true.ext.yml | 16 +++ .../mad_i2_subtypes_true.ql | 18 +++ .../mad_s1_subtypes_false.expected | 10 ++ .../mad_s1_subtypes_false.ext.yml | 16 +++ .../mad_s1_subtypes_false.ql | 18 +++ .../mad_s1_subtypes_true.expected | 10 ++ .../mad_s1_subtypes_true.ext.yml | 16 +++ .../mad_s1_subtypes_true.ql | 18 +++ .../ExternalFlowInheritance/ql_i1.expected | 10 ++ .../dataflow/ExternalFlowInheritance/ql_i1.ql | 46 +++++++ .../ExternalFlowInheritance/ql_s1.expected | 16 +++ .../dataflow/ExternalFlowInheritance/ql_s1.ql | 46 +++++++ .../dataflow/ExternalFlowInheritance/test.go | 77 ++++++++++++ .../github.com/nonexistent/test/stub.go | 112 ++++++++++++++++++ .../vendor/modules.txt | 3 + 32 files changed, 771 insertions(+) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/go.mod create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/modules.txt diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/go.mod b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/go.mod new file mode 100644 index 000000000000..57813acac558 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/go.mod @@ -0,0 +1,5 @@ +module semmle.go.Packages + +go 1.21 + +require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.expected new file mode 100644 index 000000000000..369f3c666035 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.expected @@ -0,0 +1,40 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:14:7:14:16 | call to Source | +| test.go:20:7:20:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:44:7:44:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:68:7:68:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:16:9:16:9 | y | +| test.go:22:9:22:9 | y | +| test.go:28:9:28:9 | y | +| test.go:34:9:34:9 | y | +| test.go:40:9:40:9 | y | +| test.go:46:9:46:9 | y | +| test.go:52:9:52:9 | y | +| test.go:58:9:58:9 | y | +| test.go:64:9:64:9 | y | +| test.go:70:9:70:9 | y | +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml new file mode 100644 index 000000000000..5b033d5574e3 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "StructEmbeddingAndOverridingI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "StructEmbeddingAndOverridingI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "StructEmbeddingAndOverridingI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql new file mode 100644 index 000000000000..c86d36f20f93 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql @@ -0,0 +1,20 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } +// predicate foo() { +// } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.expected new file mode 100644 index 000000000000..369f3c666035 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.expected @@ -0,0 +1,40 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:14:7:14:16 | call to Source | +| test.go:20:7:20:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:44:7:44:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:68:7:68:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:16:9:16:9 | y | +| test.go:22:9:22:9 | y | +| test.go:28:9:28:9 | y | +| test.go:34:9:34:9 | y | +| test.go:40:9:40:9 | y | +| test.go:46:9:46:9 | y | +| test.go:52:9:52:9 | y | +| test.go:58:9:58:9 | y | +| test.go:64:9:64:9 | y | +| test.go:70:9:70:9 | y | +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml new file mode 100644 index 000000000000..c24fadddd89b --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "StructEmbeddingI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "StructEmbeddingI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "StructEmbeddingI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected new file mode 100644 index 000000000000..1a6dc55986ca --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected @@ -0,0 +1,10 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:34:9:34:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ext.yml new file mode 100644 index 000000000000..11067b1760da --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "I1", False, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "I1", False, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "I1", False, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected new file mode 100644 index 000000000000..369f3c666035 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected @@ -0,0 +1,40 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:14:7:14:16 | call to Source | +| test.go:20:7:20:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:44:7:44:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:68:7:68:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:16:9:16:9 | y | +| test.go:22:9:22:9 | y | +| test.go:28:9:28:9 | y | +| test.go:34:9:34:9 | y | +| test.go:40:9:40:9 | y | +| test.go:46:9:46:9 | y | +| test.go:52:9:52:9 | y | +| test.go:58:9:58:9 | y | +| test.go:64:9:64:9 | y | +| test.go:70:9:70:9 | y | +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ext.yml new file mode 100644 index 000000000000..48c3a4daca8c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "I1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "I1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "I1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected new file mode 100644 index 000000000000..35fc35829a76 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected @@ -0,0 +1,10 @@ +invalidModelRow +paths +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +sources +| test.go:14:7:14:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +sinks +| test.go:16:9:16:9 | y | +| test.go:40:9:40:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ext.yml new file mode 100644 index 000000000000..8b01fd001766 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "I2", False, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "I2", False, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "I2", False, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected new file mode 100644 index 000000000000..9989b831c34c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected @@ -0,0 +1,22 @@ +invalidModelRow +paths +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:14:7:14:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:16:9:16:9 | y | +| test.go:28:9:28:9 | y | +| test.go:40:9:40:9 | y | +| test.go:52:9:52:9 | y | +| test.go:64:9:64:9 | y | +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ext.yml new file mode 100644 index 000000000000..d9fbc304b518 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "I2", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "I2", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "I2", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected new file mode 100644 index 000000000000..2b6a7e942283 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected @@ -0,0 +1,10 @@ +invalidModelRow +paths +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +sources +| test.go:20:7:20:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +sinks +| test.go:22:9:22:9 | y | +| test.go:58:9:58:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ext.yml new file mode 100644 index 000000000000..b0322a6ecd30 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "S1", False, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "S1", False, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "S1", False, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected new file mode 100644 index 000000000000..2b6a7e942283 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected @@ -0,0 +1,10 @@ +invalidModelRow +paths +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +sources +| test.go:20:7:20:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +sinks +| test.go:22:9:22:9 | y | +| test.go:58:9:58:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ext.yml new file mode 100644 index 000000000000..3adf2d35ca48 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "S1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "S1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "S1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected new file mode 100644 index 000000000000..1a6dc55986ca --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected @@ -0,0 +1,10 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:34:9:34:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql new file mode 100644 index 000000000000..bf113c3330c6 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql @@ -0,0 +1,46 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +class MySource extends RemoteFlowSource::Range instanceof DataFlow::Node { + MySource() { + exists(Method m | + m.hasQualifiedName("github.com/nonexistent/test", "I1", "Source") and + this = m.getACall().getResult() + ) + } +} + +class MyStep extends DataFlow::FunctionModel, Method { + MyStep() { this.hasQualifiedName("github.com/nonexistent/test", "I1", "Step") } + + override predicate hasDataFlow(FunctionInput input, FunctionOutput output) { + input.isParameter(0) and output.isResult() + } +} + +class MySink extends FileSystemAccess::Range, DataFlow::CallNode { + MySink() { + exists(Method m | + m.hasQualifiedName("github.com/nonexistent/test", "I1", "Sink") and + this = m.getACall() + ) + } + + override DataFlow::Node getAPathArgument() { result = this.getArgument(0) } +} + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected new file mode 100644 index 000000000000..5f186108a583 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected @@ -0,0 +1,16 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:20:7:20:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:22:9:22:9 | y | +| test.go:34:9:34:9 | y | +| test.go:58:9:58:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql new file mode 100644 index 000000000000..6d9371308efe --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql @@ -0,0 +1,46 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +class MySource extends RemoteFlowSource::Range instanceof DataFlow::Node { + MySource() { + exists(Method m | + m.hasQualifiedName("github.com/nonexistent/test", "S1", "Source") and + this = m.getACall().getResult() + ) + } +} + +class MyStep extends DataFlow::FunctionModel, Method { + MyStep() { this.hasQualifiedName("github.com/nonexistent/test", "S1", "Step") } + + override predicate hasDataFlow(FunctionInput input, FunctionOutput output) { + input.isParameter(0) and output.isResult() + } +} + +class MySink extends FileSystemAccess::Range, DataFlow::CallNode { + MySink() { + exists(Method m | + m.hasQualifiedName("github.com/nonexistent/test", "S1", "Sink") and + this = m.getACall() + ) + } + + override DataFlow::Node getAPathArgument() { result = this.getArgument(0) } +} + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go new file mode 100644 index 000000000000..87e6eab8532c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -0,0 +1,77 @@ +package main + +import ( + "github.com/nonexistent/test" +) + +func TestI1(t test.I1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestI2(t test.I2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestS1(t test.S1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestS2(t test.S2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingI1(t test.StructEmbeddingI1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingI2(t test.StructEmbeddingI2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingAndOverridingI1(t test.StructEmbeddingAndOverridingI1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingAndOverridingI2(t test.StructEmbeddingAndOverridingI2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingS1(t test.StructEmbeddingS1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingS2(t test.StructEmbeddingS2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingAndOverridingS1(t test.StructEmbeddingAndOverridingS1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestStructEmbeddingAndOverridingS2(t test.StructEmbeddingAndOverridingS2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go new file mode 100644 index 000000000000..9e5ec515b0bd --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go @@ -0,0 +1,112 @@ +package test + +// An interface +type I1 interface { + Source() interface{} + Step(interface{}) interface{} + Sink(interface{}) +} + +// An interface which is a subtype of I1 +type I2 interface { + Source() interface{} + Step(interface{}) interface{} + Sink(interface{}) + ExtraMethod() +} + +// A struct type implementing I1 +type S1 struct{} + +func (t *S1) Source() interface{} { + return nil +} + +func (t *S1) Sink(interface{}) {} + +func (t *S1) Step(val interface{}) interface{} { + return val +} + +// A struct type implementing I2 +type S2 struct{} + +func (t *S2) Source() interface{} { + return nil +} + +func (t *S2) Sink(interface{}) {} + +func (t *S2) Step(val interface{}) interface{} { + return val +} + +func (t *S2) ExtraMethod() {} + +// A struct type embedding I1 +type StructEmbeddingI1 struct{ I1 } + +// A struct type embedding I2 +type StructEmbeddingI2 struct{ I2 } + +// A struct type embedding I1 and "overriding" its methods +type StructEmbeddingAndOverridingI1 struct{ I1 } + +func (t *StructEmbeddingAndOverridingI1) Source() interface{} { + return nil +} + +func (t *StructEmbeddingAndOverridingI1) Sink(interface{}) {} + +func (t *StructEmbeddingAndOverridingI1) Step(val interface{}) interface{} { + return val +} + +// A struct type embedding I2 and "overriding" its methods +type StructEmbeddingAndOverridingI2 struct{ I2 } + +func (t *StructEmbeddingAndOverridingI2) Source() interface{} { + return nil +} + +func (t *StructEmbeddingAndOverridingI2) Sink(interface{}) {} + +func (t *StructEmbeddingAndOverridingI2) Step(val interface{}) interface{} { + return val +} + +func (t *StructEmbeddingAndOverridingI2) ExtraMethod() {} + +// A struct type embedding S1 +type StructEmbeddingS1 struct{ S1 } + +// A struct type embedding S2 +type StructEmbeddingS2 struct{ S2 } + +// A struct type embedding S1 and "overriding" its methods +type StructEmbeddingAndOverridingS1 struct{ S1 } + +func (t *StructEmbeddingAndOverridingS1) Source() interface{} { + return nil +} + +func (t *StructEmbeddingAndOverridingS1) Sink(interface{}) {} + +func (t *StructEmbeddingAndOverridingS1) Step(val interface{}) interface{} { + return val +} + +// A struct type embedding S2 and "overriding" its methods +type StructEmbeddingAndOverridingS2 struct{ S2 } + +func (t *StructEmbeddingAndOverridingS2) Source() interface{} { + return nil +} + +func (t *StructEmbeddingAndOverridingS2) Sink(interface{}) {} + +func (t *StructEmbeddingAndOverridingS2) Step(val interface{}) interface{} { + return val +} + +func (t *StructEmbeddingAndOverridingS2) ExtraMethod() {} diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/modules.txt b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/modules.txt new file mode 100644 index 000000000000..b62dbf8819b5 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/modules.txt @@ -0,0 +1,3 @@ +# github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 +## explicit +github.com/nonexistent/test From 37490de4a227e250ab4bce090b33ccf165933c21 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 26 Aug 2024 13:33:46 +0200 Subject: [PATCH 086/162] Data flow: Remove Boolean column from `TNodeImplicitRead` --- .../codeql/dataflow/internal/DataFlowImpl.qll | 71 +++++++++++++------ 1 file changed, 51 insertions(+), 20 deletions(-) diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index 85eef1434e21..742d68db9afd 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -166,9 +166,7 @@ module MakeImpl Lang> { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean hasRead) { - Config::allowImplicitRead(n, _) and hasRead = [false, true] - } or + TNodeImplicitRead(Node n) { Config::allowImplicitRead(n, _) } or TParamReturnNode(ParameterNode p, SndLevelScopeOption scope) { paramReturnNode(_, p, scope, _) } @@ -177,7 +175,7 @@ module MakeImpl Lang> { string toString() { result = this.asNode().toString() or - exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + exists(Node n | this.isImplicitReadNode(n) | result = n.toString() + " [Ext]") or result = this.asParamReturnNode().toString() + " [Return]" } @@ -185,17 +183,15 @@ module MakeImpl Lang> { Node asNode() { this = TNodeNormal(result) } /** Gets the corresponding Node if this is a normal node or its post-implicit read node. */ - Node asNodeOrImplicitRead() { - this = TNodeNormal(result) or this = TNodeImplicitRead(result, true) - } + Node asNodeOrImplicitRead() { this = TNodeNormal(result) or this = TNodeImplicitRead(result) } - predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } + predicate isImplicitReadNode(Node n) { this = TNodeImplicitRead(n) } ParameterNode asParamReturnNode() { this = TParamReturnNode(result, _) } Node projectToNode() { this = TNodeNormal(result) or - this = TNodeImplicitRead(result, _) or + this = TNodeImplicitRead(result) or this = TParamReturnNode(result, _) } @@ -439,13 +435,6 @@ module MakeImpl Lang> { stepFilter(node1, node2) ) or - exists(Node n | - node1.asNode() = n and - node2.isImplicitReadNode(n, false) and - not fullBarrier(node1) and - model = "" - ) - or exists(Node n1, Node n2, SndLevelScopeOption scope | node1.asNode() = n1 and node2 = TParamReturnNode(n2, scope) and @@ -524,9 +513,13 @@ module MakeImpl Lang> { stepFilter(node1, node2) or exists(Node n | - node2.isImplicitReadNode(n, true) and - node1.isImplicitReadNode(n, _) and + node2.isImplicitReadNode(n) and Config::allowImplicitRead(n, c) + | + node1.asNode() = n and + not fullBarrier(node1) + or + node1.isImplicitReadNode(n) ) } @@ -802,7 +795,7 @@ module MakeImpl Lang> { } additional predicate sinkNode(NodeEx node, FlowState state) { - fwdFlow(node) and + fwdFlow(pragma[only_bind_into](node)) and fwdFlowState(state) and isRelevantSink(node.asNodeOrImplicitRead()) or @@ -2910,14 +2903,50 @@ module MakeImpl Lang> { abstract PathNodeImpl getASuccessorImpl(string label); + pragma[nomagic] + PathNodeImpl getAnImplicitReadSuccessorAtSink(string label) { + exists(PathNodeMid readTarget | + result = this.getASuccessorImpl(label) and + localStep(this, readTarget, _) and + readTarget.getNodeEx().isImplicitReadNode(_) + | + // last implicit read, leaving the access path empty + result = readTarget.projectToSink(_) + or + // implicit read, leaving the access path non-empty + exists(result.getAnImplicitReadSuccessorAtSink(_)) and + result = readTarget + ) + } + private PathNodeImpl getASuccessorIfHidden(string label) { this.isHidden() and result = this.getASuccessorImpl(label) + or + result = this.getAnImplicitReadSuccessorAtSink(label) } private PathNodeImpl getASuccessorFromNonHidden(string label) { result = this.getASuccessorImpl(label) and - not this.isHidden() + not this.isHidden() and + // In cases like + // + // ``` + // x.Field = taint; + // Sink(x); + // ``` + // + // we only want the direct edge + // + // `[post update] x [Field]` -> `x` + // + // and not the two edges + // + // `[post update] x [Field]` -> `x [Field]` + // `x [Field]` -> `x` + // + // which the restriction below ensures. + not result = this.getAnImplicitReadSuccessorAtSink(label) or exists(string l1, string l2 | result = this.getASuccessorFromNonHidden(l1).getASuccessorIfHidden(l2) and @@ -3391,6 +3420,8 @@ module MakeImpl Lang> { private predicate localStepFromHidden(PathNodeImpl n1, PathNodeImpl n2) { n2 = localStep(n1) and n1.isHidden() + or + n2 = n1.getAnImplicitReadSuccessorAtSink(_) } bindingset[par, ret] From f287216060de667ae06665818baed52dde7742e3 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 27 Aug 2024 10:04:55 +0200 Subject: [PATCH 087/162] Update expected test output --- .../CommandInjectionRuntimeExecLocal.expected | 4 +- .../apache-commons-lang3/flow.expected | 104 +--- .../security/CWE-078/ExecTainted.expected | 8 +- .../flow-summaries/semantics.expected | 14 +- .../action_controller/params-flow.expected | 15 - .../LdapInjection/Ldapinjection.expected | 4 +- .../security/cwe-079/ReflectedXSS.expected | 8 +- .../security/cwe-079/StoredXSS.expected | 8 +- .../security/cwe-089/SqlInjection.expected | 12 +- .../CodeInjection/CodeInjection.expected | 4 +- .../security/cwe-117/LogInjection.expected | 11 +- .../RegExpInjection.expected | 8 +- .../cwe-134/TaintedFormatString.expected | 3 - .../dataflow/taint/core/Taint.expected | 23 +- .../CWE-078/CommandInjection.expected | 100 +--- .../CWE-311/CleartextStorageDatabase.expected | 444 +++++------------- .../CWE-321/HardcodedEncryptionKey.expected | 22 +- .../Security/CWE-757/InsecureTLS.expected | 70 +-- 18 files changed, 221 insertions(+), 641 deletions(-) diff --git a/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected b/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected index d9a25998db97..57820bb4d527 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected @@ -14,8 +14,7 @@ edges | RuntimeExecTest.java:25:66:25:71 | script : String | RuntimeExecTest.java:25:42:25:72 | {...} : String[] [[]] : String | provenance | | | RuntimeExecTest.java:31:17:31:29 | commandArray2 [post update] : String[] [[]] : String | RuntimeExecTest.java:32:43:32:55 | commandArray2 | provenance | Sink:MaD:1 | | RuntimeExecTest.java:31:36:31:41 | script : String | RuntimeExecTest.java:31:17:31:29 | commandArray2 [post update] : String[] [[]] : String | provenance | | -| RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | RuntimeExecTest.java:36:21:39:44 | toArray(...) : String[] [[]] : String | provenance | MaD:5 | -| RuntimeExecTest.java:36:21:39:44 | toArray(...) : String[] [[]] : String | RuntimeExecTest.java:36:21:39:44 | toArray(...) | provenance | Sink:MaD:1 | +| RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | RuntimeExecTest.java:36:21:39:44 | toArray(...) | provenance | MaD:5 | | RuntimeExecTest.java:38:25:38:59 | stream(...) : Stream [] : String | RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | provenance | MaD:4 | | RuntimeExecTest.java:38:39:38:58 | new String[] : String[] [[]] : String | RuntimeExecTest.java:38:25:38:59 | stream(...) : Stream [] : String | provenance | MaD:3 | | RuntimeExecTest.java:38:39:38:58 | {...} : String[] [[]] : String | RuntimeExecTest.java:38:39:38:58 | new String[] : String[] [[]] : String | provenance | | @@ -39,7 +38,6 @@ nodes | RuntimeExecTest.java:32:43:32:55 | commandArray2 | semmle.label | commandArray2 | | RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | semmle.label | concat(...) : Stream [] : String | | RuntimeExecTest.java:36:21:39:44 | toArray(...) | semmle.label | toArray(...) | -| RuntimeExecTest.java:36:21:39:44 | toArray(...) : String[] [[]] : String | semmle.label | toArray(...) : String[] [[]] : String | | RuntimeExecTest.java:38:25:38:59 | stream(...) : Stream [] : String | semmle.label | stream(...) : Stream [] : String | | RuntimeExecTest.java:38:39:38:58 | new String[] : String[] [[]] : String | semmle.label | new String[] : String[] [[]] : String | | RuntimeExecTest.java:38:39:38:58 | {...} : String[] [[]] : String | semmle.label | {...} : String[] [[]] : String | diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.expected b/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.expected index 9031c242a1c8..ac257eebe339 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.expected +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.expected @@ -682,62 +682,38 @@ edges | ArrayUtilsTest.java:20:33:20:56 | {...} : String[] [[]] : String | ArrayUtilsTest.java:59:32:59:45 | alreadyTainted : String[] [[]] : String | provenance | | | ArrayUtilsTest.java:20:33:20:56 | {...} : String[] [[]] : String | ArrayUtilsTest.java:63:29:63:42 | alreadyTainted : String[] [[]] : String | provenance | | | ArrayUtilsTest.java:20:48:20:54 | taint(...) : String | ArrayUtilsTest.java:20:33:20:56 | {...} : String[] [[]] : String | provenance | | -| ArrayUtilsTest.java:23:12:23:44 | add(...) : String[] [[]] : String | ArrayUtilsTest.java:23:12:23:44 | add(...) | provenance | | -| ArrayUtilsTest.java:23:37:23:43 | taint(...) : String | ArrayUtilsTest.java:23:12:23:44 | add(...) : String[] [[]] : String | provenance | MaD:32 | -| ArrayUtilsTest.java:24:12:24:53 | add(...) : String[] [[]] : String | ArrayUtilsTest.java:24:12:24:53 | add(...) | provenance | | -| ArrayUtilsTest.java:24:27:24:40 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:24:12:24:53 | add(...) : String[] [[]] : String | provenance | MaD:31 | -| ArrayUtilsTest.java:26:12:26:41 | add(...) : String[] [[]] : String | ArrayUtilsTest.java:26:12:26:41 | add(...) | provenance | | -| ArrayUtilsTest.java:26:34:26:40 | taint(...) : String | ArrayUtilsTest.java:26:12:26:41 | add(...) : String[] [[]] : String | provenance | MaD:33 | -| ArrayUtilsTest.java:27:12:27:50 | add(...) : String[] [[]] : String | ArrayUtilsTest.java:27:12:27:50 | add(...) | provenance | | -| ArrayUtilsTest.java:27:27:27:40 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:27:12:27:50 | add(...) : String[] [[]] : String | provenance | MaD:31 | -| ArrayUtilsTest.java:28:12:28:53 | addAll(...) : String[] [[]] : String | ArrayUtilsTest.java:28:12:28:53 | addAll(...) | provenance | | -| ArrayUtilsTest.java:28:12:28:53 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:28:12:28:53 | addAll(...) : String[] [[]] : String | provenance | MaD:34 | +| ArrayUtilsTest.java:23:37:23:43 | taint(...) : String | ArrayUtilsTest.java:23:12:23:44 | add(...) | provenance | MaD:32 | +| ArrayUtilsTest.java:24:27:24:40 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:24:12:24:53 | add(...) | provenance | MaD:31 | +| ArrayUtilsTest.java:26:34:26:40 | taint(...) : String | ArrayUtilsTest.java:26:12:26:41 | add(...) | provenance | MaD:33 | +| ArrayUtilsTest.java:27:27:27:40 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:27:12:27:50 | add(...) | provenance | MaD:31 | +| ArrayUtilsTest.java:28:12:28:53 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:28:12:28:53 | addAll(...) | provenance | MaD:34 | | ArrayUtilsTest.java:28:46:28:52 | taint(...) : String | ArrayUtilsTest.java:28:12:28:53 | new ..[] { .. } : Object[] [[]] : String | provenance | | -| ArrayUtilsTest.java:29:12:29:53 | addAll(...) : String[] [[]] : String | ArrayUtilsTest.java:29:12:29:53 | addAll(...) | provenance | | -| ArrayUtilsTest.java:29:12:29:53 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:29:12:29:53 | addAll(...) : String[] [[]] : String | provenance | MaD:34 | +| ArrayUtilsTest.java:29:12:29:53 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:29:12:29:53 | addAll(...) | provenance | MaD:34 | | ArrayUtilsTest.java:29:37:29:43 | taint(...) : String | ArrayUtilsTest.java:29:12:29:53 | new ..[] { .. } : Object[] [[]] : String | provenance | | -| ArrayUtilsTest.java:30:12:30:67 | addAll(...) : String[] [[]] : String | ArrayUtilsTest.java:30:12:30:67 | addAll(...) | provenance | | -| ArrayUtilsTest.java:30:30:30:43 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:30:12:30:67 | addAll(...) : String[] [[]] : String | provenance | MaD:34 | -| ArrayUtilsTest.java:31:12:31:46 | addFirst(...) : String[] [[]] : String | ArrayUtilsTest.java:31:12:31:46 | addFirst(...) | provenance | | -| ArrayUtilsTest.java:31:39:31:45 | taint(...) : String | ArrayUtilsTest.java:31:12:31:46 | addFirst(...) : String[] [[]] : String | provenance | MaD:36 | -| ArrayUtilsTest.java:32:12:32:55 | addFirst(...) : String[] [[]] : String | ArrayUtilsTest.java:32:12:32:55 | addFirst(...) | provenance | | -| ArrayUtilsTest.java:32:32:32:45 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:32:12:32:55 | addFirst(...) : String[] [[]] : String | provenance | MaD:35 | -| ArrayUtilsTest.java:33:12:33:43 | clone(...) : String[] [[]] : String | ArrayUtilsTest.java:33:12:33:43 | clone(...) | provenance | | -| ArrayUtilsTest.java:33:29:33:42 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:33:12:33:43 | clone(...) : String[] [[]] : String | provenance | MaD:37 | +| ArrayUtilsTest.java:30:30:30:43 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:30:12:30:67 | addAll(...) | provenance | MaD:34 | +| ArrayUtilsTest.java:31:39:31:45 | taint(...) : String | ArrayUtilsTest.java:31:12:31:46 | addFirst(...) | provenance | MaD:36 | +| ArrayUtilsTest.java:32:32:32:45 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:32:12:32:55 | addFirst(...) | provenance | MaD:35 | +| ArrayUtilsTest.java:33:29:33:42 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:33:12:33:43 | clone(...) | provenance | MaD:37 | | ArrayUtilsTest.java:34:27:34:40 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:34:12:34:44 | get(...) | provenance | MaD:38 | | ArrayUtilsTest.java:36:27:36:40 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:36:12:36:61 | get(...) | provenance | MaD:38 | | ArrayUtilsTest.java:38:37:38:43 | taint(...) : String | ArrayUtilsTest.java:38:12:38:44 | get(...) | provenance | MaD:39 | -| ArrayUtilsTest.java:40:12:40:67 | insert(...) : String[] [[]] : String | ArrayUtilsTest.java:40:12:40:67 | insert(...) | provenance | | -| ArrayUtilsTest.java:40:33:40:46 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:40:12:40:67 | insert(...) : String[] [[]] : String | provenance | MaD:40 | -| ArrayUtilsTest.java:41:12:41:57 | insert(...) : String[] [[]] : String | ArrayUtilsTest.java:41:12:41:57 | insert(...) | provenance | | -| ArrayUtilsTest.java:41:12:41:57 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:41:12:41:57 | insert(...) : String[] [[]] : String | provenance | MaD:40 | +| ArrayUtilsTest.java:40:33:40:46 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:40:12:40:67 | insert(...) | provenance | MaD:40 | +| ArrayUtilsTest.java:41:12:41:57 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:41:12:41:57 | insert(...) | provenance | MaD:40 | | ArrayUtilsTest.java:41:40:41:46 | taint(...) : String | ArrayUtilsTest.java:41:12:41:57 | new ..[] { .. } : Object[] [[]] : String | provenance | | -| ArrayUtilsTest.java:42:12:42:57 | insert(...) : String[] [[]] : String | ArrayUtilsTest.java:42:12:42:57 | insert(...) | provenance | | -| ArrayUtilsTest.java:42:12:42:57 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:42:12:42:57 | insert(...) : String[] [[]] : String | provenance | MaD:40 | +| ArrayUtilsTest.java:42:12:42:57 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:42:12:42:57 | insert(...) | provenance | MaD:40 | | ArrayUtilsTest.java:42:50:42:56 | taint(...) : String | ArrayUtilsTest.java:42:12:42:57 | new ..[] { .. } : Object[] [[]] : String | provenance | | -| ArrayUtilsTest.java:43:12:43:49 | nullToEmpty(...) : String[] [[]] : String | ArrayUtilsTest.java:43:12:43:49 | nullToEmpty(...) | provenance | | -| ArrayUtilsTest.java:43:35:43:48 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:43:12:43:49 | nullToEmpty(...) : String[] [[]] : String | provenance | MaD:42 | -| ArrayUtilsTest.java:44:12:44:65 | nullToEmpty(...) : String[] [[]] : String | ArrayUtilsTest.java:44:12:44:65 | nullToEmpty(...) | provenance | | -| ArrayUtilsTest.java:44:35:44:48 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:44:12:44:65 | nullToEmpty(...) : String[] [[]] : String | provenance | MaD:41 | -| ArrayUtilsTest.java:45:12:45:47 | remove(...) : String[] [[]] : String | ArrayUtilsTest.java:45:12:45:47 | remove(...) | provenance | | -| ArrayUtilsTest.java:45:30:45:43 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:45:12:45:47 | remove(...) : String[] [[]] : String | provenance | MaD:43 | -| ArrayUtilsTest.java:47:12:47:53 | removeAll(...) : String[] [[]] : String | ArrayUtilsTest.java:47:12:47:53 | removeAll(...) | provenance | | -| ArrayUtilsTest.java:47:33:47:46 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:47:12:47:53 | removeAll(...) : String[] [[]] : String | provenance | MaD:44 | -| ArrayUtilsTest.java:51:12:51:76 | removeAllOccurences(...) : String[] [[]] : String | ArrayUtilsTest.java:51:12:51:76 | removeAllOccurences(...) | provenance | | -| ArrayUtilsTest.java:51:43:51:56 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:51:12:51:76 | removeAllOccurences(...) : String[] [[]] : String | provenance | MaD:45 | -| ArrayUtilsTest.java:53:12:53:77 | removeAllOccurrences(...) : String[] [[]] : String | ArrayUtilsTest.java:53:12:53:77 | removeAllOccurrences(...) | provenance | | -| ArrayUtilsTest.java:53:44:53:57 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:53:12:53:77 | removeAllOccurrences(...) : String[] [[]] : String | provenance | MaD:46 | -| ArrayUtilsTest.java:55:12:55:70 | removeElement(...) : String[] [[]] : String | ArrayUtilsTest.java:55:12:55:70 | removeElement(...) | provenance | | -| ArrayUtilsTest.java:55:37:55:50 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:55:12:55:70 | removeElement(...) : String[] [[]] : String | provenance | MaD:47 | -| ArrayUtilsTest.java:56:12:56:58 | removeElements(...) : Object[] [[]] : String | ArrayUtilsTest.java:56:12:56:58 | removeElements(...) | provenance | | -| ArrayUtilsTest.java:56:38:56:51 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:56:12:56:58 | removeElements(...) : Object[] [[]] : String | provenance | MaD:48 | -| ArrayUtilsTest.java:59:12:59:52 | subarray(...) : String[] [[]] : String | ArrayUtilsTest.java:59:12:59:52 | subarray(...) | provenance | | -| ArrayUtilsTest.java:59:32:59:45 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:59:12:59:52 | subarray(...) : String[] [[]] : String | provenance | MaD:49 | -| ArrayUtilsTest.java:61:12:61:47 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:61:12:61:47 | toArray(...) : String[] [[]] : String | provenance | MaD:50 | -| ArrayUtilsTest.java:61:12:61:47 | toArray(...) : String[] [[]] : String | ArrayUtilsTest.java:61:12:61:47 | toArray(...) | provenance | | +| ArrayUtilsTest.java:43:35:43:48 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:43:12:43:49 | nullToEmpty(...) | provenance | MaD:42 | +| ArrayUtilsTest.java:44:35:44:48 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:44:12:44:65 | nullToEmpty(...) | provenance | MaD:41 | +| ArrayUtilsTest.java:45:30:45:43 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:45:12:45:47 | remove(...) | provenance | MaD:43 | +| ArrayUtilsTest.java:47:33:47:46 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:47:12:47:53 | removeAll(...) | provenance | MaD:44 | +| ArrayUtilsTest.java:51:43:51:56 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:51:12:51:76 | removeAllOccurences(...) | provenance | MaD:45 | +| ArrayUtilsTest.java:53:44:53:57 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:53:12:53:77 | removeAllOccurrences(...) | provenance | MaD:46 | +| ArrayUtilsTest.java:55:37:55:50 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:55:12:55:70 | removeElement(...) | provenance | MaD:47 | +| ArrayUtilsTest.java:56:38:56:51 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:56:12:56:58 | removeElements(...) | provenance | MaD:48 | +| ArrayUtilsTest.java:59:32:59:45 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:59:12:59:52 | subarray(...) | provenance | MaD:49 | +| ArrayUtilsTest.java:61:12:61:47 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:61:12:61:47 | toArray(...) | provenance | MaD:50 | | ArrayUtilsTest.java:61:40:61:46 | taint(...) : String | ArrayUtilsTest.java:61:12:61:47 | new ..[] { .. } : Object[] [[]] : String | provenance | | -| ArrayUtilsTest.java:62:12:62:47 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:62:12:62:47 | toArray(...) : String[] [[]] : String | provenance | MaD:50 | -| ArrayUtilsTest.java:62:12:62:47 | toArray(...) : String[] [[]] : String | ArrayUtilsTest.java:62:12:62:47 | toArray(...) | provenance | | +| ArrayUtilsTest.java:62:12:62:47 | new ..[] { .. } : Object[] [[]] : String | ArrayUtilsTest.java:62:12:62:47 | toArray(...) | provenance | MaD:50 | | ArrayUtilsTest.java:62:31:62:37 | taint(...) : String | ArrayUtilsTest.java:62:12:62:47 | new ..[] { .. } : Object[] [[]] : String | provenance | | | ArrayUtilsTest.java:63:12:63:43 | toMap(...) : Map [] : Object | ArrayUtilsTest.java:63:12:63:54 | get(...) | provenance | MaD:15 | | ArrayUtilsTest.java:63:29:63:42 | alreadyTainted : String[] [[]] : String | ArrayUtilsTest.java:63:12:63:43 | toMap(...) : Map [] : Object | provenance | MaD:51 | @@ -747,10 +723,8 @@ edges | ArrayUtilsTest.java:69:36:69:67 | toObject(...) : Integer[] [[]] : Number | ArrayUtilsTest.java:70:12:70:27 | taintedBoxedInts | provenance | | | ArrayUtilsTest.java:69:36:69:67 | toObject(...) : Integer[] [[]] : Number | ArrayUtilsTest.java:71:35:71:50 | taintedBoxedInts : Integer[] [[]] : Number | provenance | | | ArrayUtilsTest.java:69:56:69:66 | taintedInts : int[] [[]] : Number | ArrayUtilsTest.java:69:36:69:67 | toObject(...) : Integer[] [[]] : Number | provenance | MaD:53 | -| ArrayUtilsTest.java:71:12:71:51 | toPrimitive(...) : int[] [[]] : Number | ArrayUtilsTest.java:71:12:71:51 | toPrimitive(...) | provenance | | -| ArrayUtilsTest.java:71:35:71:50 | taintedBoxedInts : Integer[] [[]] : Number | ArrayUtilsTest.java:71:12:71:51 | toPrimitive(...) : int[] [[]] : Number | provenance | MaD:54 | -| ArrayUtilsTest.java:72:12:72:70 | toPrimitive(...) : int[] [[]] : Number | ArrayUtilsTest.java:72:12:72:70 | toPrimitive(...) | provenance | | -| ArrayUtilsTest.java:72:53:72:69 | taint(...) : Number | ArrayUtilsTest.java:72:12:72:70 | toPrimitive(...) : int[] [[]] : Number | provenance | MaD:55 | +| ArrayUtilsTest.java:71:35:71:50 | taintedBoxedInts : Integer[] [[]] : Number | ArrayUtilsTest.java:71:12:71:51 | toPrimitive(...) | provenance | MaD:54 | +| ArrayUtilsTest.java:72:53:72:69 | taint(...) : Number | ArrayUtilsTest.java:72:12:72:70 | toPrimitive(...) | provenance | MaD:55 | | MutableTest.java:11:39:11:66 | new MutableObject(...) : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | MutableTest.java:20:12:20:18 | tainted : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | provenance | | | MutableTest.java:11:39:11:66 | new MutableObject(...) : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | MutableTest.java:21:12:21:23 | taintedAlias : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | provenance | | | MutableTest.java:11:59:11:65 | taint(...) : String | MutableTest.java:11:39:11:66 | new MutableObject(...) : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | provenance | MaD:225 | @@ -3338,36 +3312,26 @@ nodes | ArrayUtilsTest.java:20:33:20:56 | {...} : String[] [[]] : String | semmle.label | {...} : String[] [[]] : String | | ArrayUtilsTest.java:20:48:20:54 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:23:12:23:44 | add(...) | semmle.label | add(...) | -| ArrayUtilsTest.java:23:12:23:44 | add(...) : String[] [[]] : String | semmle.label | add(...) : String[] [[]] : String | | ArrayUtilsTest.java:23:37:23:43 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:24:12:24:53 | add(...) | semmle.label | add(...) | -| ArrayUtilsTest.java:24:12:24:53 | add(...) : String[] [[]] : String | semmle.label | add(...) : String[] [[]] : String | | ArrayUtilsTest.java:24:27:24:40 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:26:12:26:41 | add(...) | semmle.label | add(...) | -| ArrayUtilsTest.java:26:12:26:41 | add(...) : String[] [[]] : String | semmle.label | add(...) : String[] [[]] : String | | ArrayUtilsTest.java:26:34:26:40 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:27:12:27:50 | add(...) | semmle.label | add(...) | -| ArrayUtilsTest.java:27:12:27:50 | add(...) : String[] [[]] : String | semmle.label | add(...) : String[] [[]] : String | | ArrayUtilsTest.java:27:27:27:40 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:28:12:28:53 | addAll(...) | semmle.label | addAll(...) | -| ArrayUtilsTest.java:28:12:28:53 | addAll(...) : String[] [[]] : String | semmle.label | addAll(...) : String[] [[]] : String | | ArrayUtilsTest.java:28:12:28:53 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | | ArrayUtilsTest.java:28:46:28:52 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:29:12:29:53 | addAll(...) | semmle.label | addAll(...) | -| ArrayUtilsTest.java:29:12:29:53 | addAll(...) : String[] [[]] : String | semmle.label | addAll(...) : String[] [[]] : String | | ArrayUtilsTest.java:29:12:29:53 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | | ArrayUtilsTest.java:29:37:29:43 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:30:12:30:67 | addAll(...) | semmle.label | addAll(...) | -| ArrayUtilsTest.java:30:12:30:67 | addAll(...) : String[] [[]] : String | semmle.label | addAll(...) : String[] [[]] : String | | ArrayUtilsTest.java:30:30:30:43 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:31:12:31:46 | addFirst(...) | semmle.label | addFirst(...) | -| ArrayUtilsTest.java:31:12:31:46 | addFirst(...) : String[] [[]] : String | semmle.label | addFirst(...) : String[] [[]] : String | | ArrayUtilsTest.java:31:39:31:45 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:32:12:32:55 | addFirst(...) | semmle.label | addFirst(...) | -| ArrayUtilsTest.java:32:12:32:55 | addFirst(...) : String[] [[]] : String | semmle.label | addFirst(...) : String[] [[]] : String | | ArrayUtilsTest.java:32:32:32:45 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:33:12:33:43 | clone(...) | semmle.label | clone(...) | -| ArrayUtilsTest.java:33:12:33:43 | clone(...) : String[] [[]] : String | semmle.label | clone(...) : String[] [[]] : String | | ArrayUtilsTest.java:33:29:33:42 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:34:12:34:44 | get(...) | semmle.label | get(...) | | ArrayUtilsTest.java:34:27:34:40 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | @@ -3376,50 +3340,36 @@ nodes | ArrayUtilsTest.java:38:12:38:44 | get(...) | semmle.label | get(...) | | ArrayUtilsTest.java:38:37:38:43 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:40:12:40:67 | insert(...) | semmle.label | insert(...) | -| ArrayUtilsTest.java:40:12:40:67 | insert(...) : String[] [[]] : String | semmle.label | insert(...) : String[] [[]] : String | | ArrayUtilsTest.java:40:33:40:46 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:41:12:41:57 | insert(...) | semmle.label | insert(...) | -| ArrayUtilsTest.java:41:12:41:57 | insert(...) : String[] [[]] : String | semmle.label | insert(...) : String[] [[]] : String | | ArrayUtilsTest.java:41:12:41:57 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | | ArrayUtilsTest.java:41:40:41:46 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:42:12:42:57 | insert(...) | semmle.label | insert(...) | -| ArrayUtilsTest.java:42:12:42:57 | insert(...) : String[] [[]] : String | semmle.label | insert(...) : String[] [[]] : String | | ArrayUtilsTest.java:42:12:42:57 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | | ArrayUtilsTest.java:42:50:42:56 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:43:12:43:49 | nullToEmpty(...) | semmle.label | nullToEmpty(...) | -| ArrayUtilsTest.java:43:12:43:49 | nullToEmpty(...) : String[] [[]] : String | semmle.label | nullToEmpty(...) : String[] [[]] : String | | ArrayUtilsTest.java:43:35:43:48 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:44:12:44:65 | nullToEmpty(...) | semmle.label | nullToEmpty(...) | -| ArrayUtilsTest.java:44:12:44:65 | nullToEmpty(...) : String[] [[]] : String | semmle.label | nullToEmpty(...) : String[] [[]] : String | | ArrayUtilsTest.java:44:35:44:48 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:45:12:45:47 | remove(...) | semmle.label | remove(...) | -| ArrayUtilsTest.java:45:12:45:47 | remove(...) : String[] [[]] : String | semmle.label | remove(...) : String[] [[]] : String | | ArrayUtilsTest.java:45:30:45:43 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:47:12:47:53 | removeAll(...) | semmle.label | removeAll(...) | -| ArrayUtilsTest.java:47:12:47:53 | removeAll(...) : String[] [[]] : String | semmle.label | removeAll(...) : String[] [[]] : String | | ArrayUtilsTest.java:47:33:47:46 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:51:12:51:76 | removeAllOccurences(...) | semmle.label | removeAllOccurences(...) | -| ArrayUtilsTest.java:51:12:51:76 | removeAllOccurences(...) : String[] [[]] : String | semmle.label | removeAllOccurences(...) : String[] [[]] : String | | ArrayUtilsTest.java:51:43:51:56 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:53:12:53:77 | removeAllOccurrences(...) | semmle.label | removeAllOccurrences(...) | -| ArrayUtilsTest.java:53:12:53:77 | removeAllOccurrences(...) : String[] [[]] : String | semmle.label | removeAllOccurrences(...) : String[] [[]] : String | | ArrayUtilsTest.java:53:44:53:57 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:55:12:55:70 | removeElement(...) | semmle.label | removeElement(...) | -| ArrayUtilsTest.java:55:12:55:70 | removeElement(...) : String[] [[]] : String | semmle.label | removeElement(...) : String[] [[]] : String | | ArrayUtilsTest.java:55:37:55:50 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:56:12:56:58 | removeElements(...) | semmle.label | removeElements(...) | -| ArrayUtilsTest.java:56:12:56:58 | removeElements(...) : Object[] [[]] : String | semmle.label | removeElements(...) : Object[] [[]] : String | | ArrayUtilsTest.java:56:38:56:51 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:59:12:59:52 | subarray(...) | semmle.label | subarray(...) | -| ArrayUtilsTest.java:59:12:59:52 | subarray(...) : String[] [[]] : String | semmle.label | subarray(...) : String[] [[]] : String | | ArrayUtilsTest.java:59:32:59:45 | alreadyTainted : String[] [[]] : String | semmle.label | alreadyTainted : String[] [[]] : String | | ArrayUtilsTest.java:61:12:61:47 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | | ArrayUtilsTest.java:61:12:61:47 | toArray(...) | semmle.label | toArray(...) | -| ArrayUtilsTest.java:61:12:61:47 | toArray(...) : String[] [[]] : String | semmle.label | toArray(...) : String[] [[]] : String | | ArrayUtilsTest.java:61:40:61:46 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:62:12:62:47 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | | ArrayUtilsTest.java:62:12:62:47 | toArray(...) | semmle.label | toArray(...) | -| ArrayUtilsTest.java:62:12:62:47 | toArray(...) : String[] [[]] : String | semmle.label | toArray(...) : String[] [[]] : String | | ArrayUtilsTest.java:62:31:62:37 | taint(...) : String | semmle.label | taint(...) : String | | ArrayUtilsTest.java:63:12:63:43 | toMap(...) : Map [] : Object | semmle.label | toMap(...) : Map [] : Object | | ArrayUtilsTest.java:63:12:63:54 | get(...) | semmle.label | get(...) | @@ -3430,10 +3380,8 @@ nodes | ArrayUtilsTest.java:69:56:69:66 | taintedInts : int[] [[]] : Number | semmle.label | taintedInts : int[] [[]] : Number | | ArrayUtilsTest.java:70:12:70:27 | taintedBoxedInts | semmle.label | taintedBoxedInts | | ArrayUtilsTest.java:71:12:71:51 | toPrimitive(...) | semmle.label | toPrimitive(...) | -| ArrayUtilsTest.java:71:12:71:51 | toPrimitive(...) : int[] [[]] : Number | semmle.label | toPrimitive(...) : int[] [[]] : Number | | ArrayUtilsTest.java:71:35:71:50 | taintedBoxedInts : Integer[] [[]] : Number | semmle.label | taintedBoxedInts : Integer[] [[]] : Number | | ArrayUtilsTest.java:72:12:72:70 | toPrimitive(...) | semmle.label | toPrimitive(...) | -| ArrayUtilsTest.java:72:12:72:70 | toPrimitive(...) : int[] [[]] : Number | semmle.label | toPrimitive(...) : int[] [[]] : Number | | ArrayUtilsTest.java:72:53:72:69 | taint(...) : Number | semmle.label | taint(...) : Number | | MutableTest.java:11:39:11:66 | new MutableObject(...) : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | semmle.label | new MutableObject(...) : MutableObject [org.apache.commons.lang3.mutable.MutableObject.value] : String | | MutableTest.java:11:59:11:65 | taint(...) : String | semmle.label | taint(...) : String | diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTainted.expected b/java/ql/test/query-tests/security/CWE-078/ExecTainted.expected index 703ca977c8e0..e65a61d76988 100644 --- a/java/ql/test/query-tests/security/CWE-078/ExecTainted.expected +++ b/java/ql/test/query-tests/security/CWE-078/ExecTainted.expected @@ -9,8 +9,7 @@ edges | Test.java:6:35:6:44 | arg : String | Test.java:10:61:10:73 | ... + ... : String | provenance | | | Test.java:6:35:6:44 | arg : String | Test.java:16:13:16:25 | ... + ... : String | provenance | | | Test.java:6:35:6:44 | arg : String | Test.java:22:15:22:27 | ... + ... : String | provenance | | -| Test.java:7:25:7:70 | new ..[] { .. } : String[] [[]] : String | Test.java:7:25:7:70 | new ..[] { .. } | provenance | Sink:MaD:2 | -| Test.java:7:44:7:69 | ... + ... : String | Test.java:7:25:7:70 | new ..[] { .. } : String[] [[]] : String | provenance | | +| Test.java:7:44:7:69 | ... + ... : String | Test.java:7:25:7:70 | new ..[] { .. } | provenance | Sink:MaD:2 | | Test.java:10:29:10:74 | {...} : String[] [[]] : String | Test.java:10:29:10:74 | new String[] | provenance | Sink:MaD:2 | | Test.java:10:61:10:73 | ... + ... : String | Test.java:10:29:10:74 | {...} : String[] [[]] : String | provenance | | | Test.java:16:5:16:7 | cmd [post update] : ArrayList [] : String | Test.java:18:29:18:31 | cmd | provenance | Sink:MaD:1 | @@ -18,8 +17,7 @@ edges | Test.java:22:5:22:8 | cmd1 [post update] : String[] [[]] : String | Test.java:24:29:24:32 | cmd1 | provenance | Sink:MaD:2 | | Test.java:22:15:22:27 | ... + ... : String | Test.java:22:5:22:8 | cmd1 [post update] : String[] [[]] : String | provenance | | | Test.java:28:38:28:47 | arg : String | Test.java:29:44:29:64 | ... + ... : String | provenance | | -| Test.java:29:25:29:65 | new ..[] { .. } : String[] [[]] : String | Test.java:29:25:29:65 | new ..[] { .. } | provenance | Sink:MaD:2 | -| Test.java:29:44:29:64 | ... + ... : String | Test.java:29:25:29:65 | new ..[] { .. } : String[] [[]] : String | provenance | | +| Test.java:29:44:29:64 | ... + ... : String | Test.java:29:25:29:65 | new ..[] { .. } | provenance | Sink:MaD:2 | | Test.java:57:27:57:39 | args : String[] | Test.java:60:20:60:22 | arg : String | provenance | | | Test.java:57:27:57:39 | args : String[] | Test.java:61:23:61:25 | arg : String | provenance | | | Test.java:60:20:60:22 | arg : String | Test.java:6:35:6:44 | arg : String | provenance | | @@ -31,7 +29,6 @@ models nodes | Test.java:6:35:6:44 | arg : String | semmle.label | arg : String | | Test.java:7:25:7:70 | new ..[] { .. } | semmle.label | new ..[] { .. } | -| Test.java:7:25:7:70 | new ..[] { .. } : String[] [[]] : String | semmle.label | new ..[] { .. } : String[] [[]] : String | | Test.java:7:44:7:69 | ... + ... : String | semmle.label | ... + ... : String | | Test.java:10:29:10:74 | new String[] | semmle.label | new String[] | | Test.java:10:29:10:74 | {...} : String[] [[]] : String | semmle.label | {...} : String[] [[]] : String | @@ -44,7 +41,6 @@ nodes | Test.java:24:29:24:32 | cmd1 | semmle.label | cmd1 | | Test.java:28:38:28:47 | arg : String | semmle.label | arg : String | | Test.java:29:25:29:65 | new ..[] { .. } | semmle.label | new ..[] { .. } | -| Test.java:29:25:29:65 | new ..[] { .. } : String[] [[]] : String | semmle.label | new ..[] { .. } : String[] [[]] : String | | Test.java:29:44:29:64 | ... + ... : String | semmle.label | ... + ... : String | | Test.java:57:27:57:39 | args : String[] | semmle.label | args : String[] | | Test.java:60:20:60:22 | arg : String | semmle.label | arg : String | diff --git a/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected b/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected index 63f33ab5b550..34093c8b8cd7 100644 --- a/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected +++ b/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected @@ -78,14 +78,10 @@ edges | semantics.rb:60:5:60:5 | a | semantics.rb:66:14:66:15 | &... | provenance | | | semantics.rb:60:9:60:18 | call to source | semantics.rb:60:5:60:5 | a | provenance | | | semantics.rb:60:9:60:18 | call to source | semantics.rb:60:5:60:5 | a | provenance | | -| semantics.rb:61:10:61:15 | call to s10 [element 0] | semantics.rb:61:10:61:15 | call to s10 | provenance | | | semantics.rb:61:14:61:14 | a | semantics.rb:61:10:61:15 | call to s10 | provenance | | | semantics.rb:61:14:61:14 | a | semantics.rb:61:10:61:15 | call to s10 | provenance | | -| semantics.rb:61:14:61:14 | a | semantics.rb:61:10:61:15 | call to s10 [element 0] | provenance | | -| semantics.rb:62:10:62:18 | call to s10 [element 1] | semantics.rb:62:10:62:18 | call to s10 | provenance | | | semantics.rb:62:17:62:17 | a | semantics.rb:62:10:62:18 | call to s10 | provenance | | | semantics.rb:62:17:62:17 | a | semantics.rb:62:10:62:18 | call to s10 | provenance | | -| semantics.rb:62:17:62:17 | a | semantics.rb:62:10:62:18 | call to s10 [element 1] | provenance | | | semantics.rb:63:19:63:19 | a | semantics.rb:63:10:63:20 | call to s10 | provenance | | | semantics.rb:63:19:63:19 | a | semantics.rb:63:10:63:20 | call to s10 | provenance | | | semantics.rb:64:27:64:27 | a | semantics.rb:64:10:64:28 | call to s10 | provenance | | @@ -192,10 +188,8 @@ edges | semantics.rb:126:5:126:5 | b | semantics.rb:129:17:129:17 | b | provenance | | | semantics.rb:126:9:126:18 | call to source | semantics.rb:126:5:126:5 | b | provenance | | | semantics.rb:126:9:126:18 | call to source | semantics.rb:126:5:126:5 | b | provenance | | -| semantics.rb:127:10:127:18 | call to s17 [element 0] | semantics.rb:127:10:127:18 | call to s17 | provenance | | -| semantics.rb:127:10:127:18 | call to s17 [element 1] | semantics.rb:127:10:127:18 | call to s17 | provenance | | -| semantics.rb:127:14:127:14 | a | semantics.rb:127:10:127:18 | call to s17 [element 0] | provenance | | -| semantics.rb:127:17:127:17 | b | semantics.rb:127:10:127:18 | call to s17 [element 1] | provenance | | +| semantics.rb:127:14:127:14 | a | semantics.rb:127:10:127:18 | call to s17 | provenance | | +| semantics.rb:127:17:127:17 | b | semantics.rb:127:10:127:18 | call to s17 | provenance | | | semantics.rb:128:10:128:18 | call to s17 [element 0] | semantics.rb:128:10:128:21 | ...[...] | provenance | | | semantics.rb:128:10:128:18 | call to s17 [element 0] | semantics.rb:128:10:128:21 | ...[...] | provenance | | | semantics.rb:128:14:128:14 | a | semantics.rb:128:10:128:18 | call to s17 [element 0] | provenance | | @@ -1191,12 +1185,10 @@ nodes | semantics.rb:60:9:60:18 | call to source | semmle.label | call to source | | semantics.rb:61:10:61:15 | call to s10 | semmle.label | call to s10 | | semantics.rb:61:10:61:15 | call to s10 | semmle.label | call to s10 | -| semantics.rb:61:10:61:15 | call to s10 [element 0] | semmle.label | call to s10 [element 0] | | semantics.rb:61:14:61:14 | a | semmle.label | a | | semantics.rb:61:14:61:14 | a | semmle.label | a | | semantics.rb:62:10:62:18 | call to s10 | semmle.label | call to s10 | | semantics.rb:62:10:62:18 | call to s10 | semmle.label | call to s10 | -| semantics.rb:62:10:62:18 | call to s10 [element 1] | semmle.label | call to s10 [element 1] | | semantics.rb:62:17:62:17 | a | semmle.label | a | | semantics.rb:62:17:62:17 | a | semmle.label | a | | semantics.rb:63:10:63:20 | call to s10 | semmle.label | call to s10 | @@ -1322,8 +1314,6 @@ nodes | semantics.rb:126:9:126:18 | call to source | semmle.label | call to source | | semantics.rb:126:9:126:18 | call to source | semmle.label | call to source | | semantics.rb:127:10:127:18 | call to s17 | semmle.label | call to s17 | -| semantics.rb:127:10:127:18 | call to s17 [element 0] | semmle.label | call to s17 [element 0] | -| semantics.rb:127:10:127:18 | call to s17 [element 1] | semmle.label | call to s17 [element 1] | | semantics.rb:127:14:127:14 | a | semmle.label | a | | semantics.rb:127:17:127:17 | b | semmle.label | b | | semantics.rb:128:10:128:18 | call to s17 [element 0] | semmle.label | call to s17 [element 0] | diff --git a/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.expected b/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.expected index f443f7669867..73f4ab1f46d8 100644 --- a/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.expected +++ b/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.expected @@ -56,28 +56,18 @@ edges | params_flow.rb:83:10:83:15 | call to params | params_flow.rb:83:10:83:27 | call to to_unsafe_h | provenance | | | params_flow.rb:87:10:87:15 | call to params | params_flow.rb:87:10:87:30 | call to to_unsafe_hash | provenance | | | params_flow.rb:91:10:91:15 | call to params | params_flow.rb:91:10:91:40 | call to transform_keys | provenance | | -| params_flow.rb:91:10:91:15 | call to params | params_flow.rb:91:10:91:40 | call to transform_keys [element] | provenance | | -| params_flow.rb:91:10:91:40 | call to transform_keys [element] | params_flow.rb:91:10:91:40 | call to transform_keys | provenance | | | params_flow.rb:95:10:95:15 | call to params | params_flow.rb:95:10:95:41 | call to transform_keys! | provenance | | | params_flow.rb:99:10:99:15 | call to params | params_flow.rb:99:10:99:42 | call to transform_values | provenance | | | params_flow.rb:103:10:103:15 | call to params | params_flow.rb:103:10:103:43 | call to transform_values! | provenance | | | params_flow.rb:107:10:107:15 | call to params | params_flow.rb:107:10:107:33 | call to values_at | provenance | | -| params_flow.rb:107:10:107:15 | call to params | params_flow.rb:107:10:107:33 | call to values_at [element 0] | provenance | | -| params_flow.rb:107:10:107:15 | call to params | params_flow.rb:107:10:107:33 | call to values_at [element 1] | provenance | | -| params_flow.rb:107:10:107:33 | call to values_at [element 0] | params_flow.rb:107:10:107:33 | call to values_at | provenance | | -| params_flow.rb:107:10:107:33 | call to values_at [element 1] | params_flow.rb:107:10:107:33 | call to values_at | provenance | | | params_flow.rb:111:10:111:15 | call to params | params_flow.rb:111:10:111:29 | call to merge | provenance | | -| params_flow.rb:112:10:112:29 | call to merge [element 0] | params_flow.rb:112:10:112:29 | call to merge | provenance | | | params_flow.rb:112:23:112:28 | call to params | params_flow.rb:112:10:112:29 | call to merge | provenance | | -| params_flow.rb:112:23:112:28 | call to params | params_flow.rb:112:10:112:29 | call to merge [element 0] | provenance | | | params_flow.rb:116:10:116:15 | call to params | params_flow.rb:116:10:116:37 | call to reverse_merge | provenance | | | params_flow.rb:117:31:117:36 | call to params | params_flow.rb:117:10:117:37 | call to reverse_merge | provenance | | | params_flow.rb:121:10:121:15 | call to params | params_flow.rb:121:10:121:43 | call to with_defaults | provenance | | | params_flow.rb:122:31:122:36 | call to params | params_flow.rb:122:10:122:37 | call to with_defaults | provenance | | | params_flow.rb:126:10:126:15 | call to params | params_flow.rb:126:10:126:30 | call to merge! | provenance | | -| params_flow.rb:127:10:127:30 | call to merge! [element 0] | params_flow.rb:127:10:127:30 | call to merge! | provenance | | | params_flow.rb:127:24:127:29 | call to params | params_flow.rb:127:10:127:30 | call to merge! | provenance | | -| params_flow.rb:127:24:127:29 | call to params | params_flow.rb:127:10:127:30 | call to merge! [element 0] | provenance | | | params_flow.rb:130:5:130:5 | [post] p | params_flow.rb:131:10:131:10 | p | provenance | | | params_flow.rb:130:5:130:5 | [post] p [element 0] | params_flow.rb:131:10:131:10 | p | provenance | | | params_flow.rb:130:14:130:19 | call to params | params_flow.rb:130:5:130:5 | [post] p | provenance | | @@ -199,7 +189,6 @@ nodes | params_flow.rb:87:10:87:30 | call to to_unsafe_hash | semmle.label | call to to_unsafe_hash | | params_flow.rb:91:10:91:15 | call to params | semmle.label | call to params | | params_flow.rb:91:10:91:40 | call to transform_keys | semmle.label | call to transform_keys | -| params_flow.rb:91:10:91:40 | call to transform_keys [element] | semmle.label | call to transform_keys [element] | | params_flow.rb:95:10:95:15 | call to params | semmle.label | call to params | | params_flow.rb:95:10:95:41 | call to transform_keys! | semmle.label | call to transform_keys! | | params_flow.rb:99:10:99:15 | call to params | semmle.label | call to params | @@ -208,12 +197,9 @@ nodes | params_flow.rb:103:10:103:43 | call to transform_values! | semmle.label | call to transform_values! | | params_flow.rb:107:10:107:15 | call to params | semmle.label | call to params | | params_flow.rb:107:10:107:33 | call to values_at | semmle.label | call to values_at | -| params_flow.rb:107:10:107:33 | call to values_at [element 0] | semmle.label | call to values_at [element 0] | -| params_flow.rb:107:10:107:33 | call to values_at [element 1] | semmle.label | call to values_at [element 1] | | params_flow.rb:111:10:111:15 | call to params | semmle.label | call to params | | params_flow.rb:111:10:111:29 | call to merge | semmle.label | call to merge | | params_flow.rb:112:10:112:29 | call to merge | semmle.label | call to merge | -| params_flow.rb:112:10:112:29 | call to merge [element 0] | semmle.label | call to merge [element 0] | | params_flow.rb:112:23:112:28 | call to params | semmle.label | call to params | | params_flow.rb:116:10:116:15 | call to params | semmle.label | call to params | | params_flow.rb:116:10:116:37 | call to reverse_merge | semmle.label | call to reverse_merge | @@ -226,7 +212,6 @@ nodes | params_flow.rb:126:10:126:15 | call to params | semmle.label | call to params | | params_flow.rb:126:10:126:30 | call to merge! | semmle.label | call to merge! | | params_flow.rb:127:10:127:30 | call to merge! | semmle.label | call to merge! | -| params_flow.rb:127:10:127:30 | call to merge! [element 0] | semmle.label | call to merge! [element 0] | | params_flow.rb:127:24:127:29 | call to params | semmle.label | call to params | | params_flow.rb:130:5:130:5 | [post] p | semmle.label | [post] p | | params_flow.rb:130:5:130:5 | [post] p [element 0] | semmle.label | [post] p [element 0] | diff --git a/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected b/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected index a69064a3d099..1eec0daa4c4c 100644 --- a/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected +++ b/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected @@ -6,9 +6,8 @@ edges | LdapInjection.rb:9:5:9:8 | name | LdapInjection.rb:33:88:33:91 | name | provenance | | | LdapInjection.rb:9:12:9:17 | call to params | LdapInjection.rb:9:12:9:29 | ...[...] | provenance | | | LdapInjection.rb:9:12:9:29 | ...[...] | LdapInjection.rb:9:5:9:8 | name | provenance | | -| LdapInjection.rb:33:87:33:92 | call to [] [element 0] | LdapInjection.rb:33:87:33:92 | call to [] | provenance | | +| LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:33:87:33:92 | call to [] | provenance | | | LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:33:87:33:92 | call to [] | provenance | Config | -| LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:33:87:33:92 | call to [] [element 0] | provenance | | | LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:37:41:37:44 | name | provenance | | | LdapInjection.rb:37:5:37:10 | filter | LdapInjection.rb:38:62:38:67 | filter | provenance | | | LdapInjection.rb:37:14:37:45 | call to eq | LdapInjection.rb:37:5:37:10 | filter | provenance | | @@ -23,7 +22,6 @@ nodes | LdapInjection.rb:25:23:25:49 | "ou=people,dc=#{...},dc=com" | semmle.label | "ou=people,dc=#{...},dc=com" | | LdapInjection.rb:29:62:29:73 | "cn=#{...}" | semmle.label | "cn=#{...}" | | LdapInjection.rb:33:87:33:92 | call to [] | semmle.label | call to [] | -| LdapInjection.rb:33:87:33:92 | call to [] [element 0] | semmle.label | call to [] [element 0] | | LdapInjection.rb:33:88:33:91 | name | semmle.label | name | | LdapInjection.rb:37:5:37:10 | filter | semmle.label | filter | | LdapInjection.rb:37:14:37:45 | call to eq | semmle.label | call to eq | diff --git a/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected b/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected index 067a0933e534..8434b2761e0b 100644 --- a/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected +++ b/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected @@ -36,14 +36,12 @@ edges | app/controllers/foo/bars_controller.rb:36:34:36:51 | ...[...] | app/controllers/foo/bars_controller.rb:36:5:36:52 | call to t | provenance | | | app/controllers/foo/bars_controller.rb:37:42:37:47 | call to params | app/controllers/foo/bars_controller.rb:37:42:37:59 | ...[...] | provenance | | | app/controllers/foo/bars_controller.rb:37:42:37:59 | ...[...] | app/controllers/foo/bars_controller.rb:37:5:37:60 | call to translate | provenance | | -| app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | -| app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | provenance | | +| app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | -| app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | app/views/foo/bars/show.html.erb:8:9:8:36 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:12:9:12:21 | call to local_assigns [element :display_text] | app/views/foo/bars/show.html.erb:12:9:12:26 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:17:15:17:27 | call to local_assigns [element :display_text] | app/views/foo/bars/show.html.erb:17:15:17:32 | ...[...] | provenance | | -| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | provenance | | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | | app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | provenance | | | app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | | app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | @@ -91,11 +89,9 @@ nodes | app/controllers/foo/bars_controller.rb:37:42:37:47 | call to params | semmle.label | call to params | | app/controllers/foo/bars_controller.rb:37:42:37:59 | ...[...] | semmle.label | ...[...] | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | semmle.label | call to display_text | -| app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | semmle.label | call to display_text [element] | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | semmle.label | call to local_assigns [element :display_text, element] | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | semmle.label | call to local_assigns [element :display_text] | | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | semmle.label | ...[...] | -| app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | semmle.label | ...[...] [element] | | app/views/foo/bars/show.html.erb:2:18:2:30 | @user_website | semmle.label | @user_website | | app/views/foo/bars/show.html.erb:5:9:5:20 | call to display_text | semmle.label | call to display_text | | app/views/foo/bars/show.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | semmle.label | call to local_assigns [element :display_text] | diff --git a/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected b/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected index d778dadc91b9..ac33b45f06fa 100644 --- a/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected +++ b/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected @@ -10,14 +10,12 @@ edges | app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:32:3:32:14 | call to display_text | provenance | | | app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:40:76:40:87 | call to display_text | provenance | | | app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | provenance | | -| app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | -| app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | provenance | | +| app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | -| app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | | app/views/foo/stores/show.html.erb:5:9:5:21 | call to local_assigns [element :display_text] | app/views/foo/stores/show.html.erb:5:9:5:36 | ...[...] | provenance | | | app/views/foo/stores/show.html.erb:9:9:9:21 | call to local_assigns [element :display_text] | app/views/foo/stores/show.html.erb:9:9:9:26 | ...[...] | provenance | | | app/views/foo/stores/show.html.erb:14:15:14:27 | call to local_assigns [element :display_text] | app/views/foo/stores/show.html.erb:14:15:14:32 | ...[...] | provenance | | -| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | provenance | | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | | app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | provenance | | | app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | | app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | @@ -33,11 +31,9 @@ nodes | app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | semmle.label | call to [] [element :display_text] | | app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | semmle.label | dt | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | semmle.label | call to display_text | -| app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | semmle.label | call to display_text [element] | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | semmle.label | call to local_assigns [element :display_text, element] | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | semmle.label | call to local_assigns [element :display_text] | | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | semmle.label | ...[...] | -| app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | semmle.label | ...[...] [element] | | app/views/foo/stores/show.html.erb:2:9:2:20 | call to display_text | semmle.label | call to display_text | | app/views/foo/stores/show.html.erb:5:9:5:21 | call to local_assigns [element :display_text] | semmle.label | call to local_assigns [element :display_text] | | app/views/foo/stores/show.html.erb:5:9:5:36 | ...[...] | semmle.label | ...[...] | diff --git a/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected b/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected index 38b5e8f7e12e..a4a254806aac 100644 --- a/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected +++ b/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected @@ -11,12 +11,10 @@ edges | ActiveRecordInjection.rb:50:29:50:39 | ...[...] | ActiveRecordInjection.rb:50:20:50:42 | "id = '#{...}'" | provenance | AdditionalTaintStep | | ActiveRecordInjection.rb:55:30:55:35 | call to params | ActiveRecordInjection.rb:55:30:55:40 | ...[...] | provenance | | | ActiveRecordInjection.rb:55:30:55:40 | ...[...] | ActiveRecordInjection.rb:55:21:55:43 | "id = '#{...}'" | provenance | AdditionalTaintStep | -| ActiveRecordInjection.rb:59:21:59:45 | call to [] [element 0] | ActiveRecordInjection.rb:59:21:59:45 | call to [] | provenance | | -| ActiveRecordInjection.rb:59:22:59:44 | "id = '#{...}'" | ActiveRecordInjection.rb:59:21:59:45 | call to [] [element 0] | provenance | | +| ActiveRecordInjection.rb:59:22:59:44 | "id = '#{...}'" | ActiveRecordInjection.rb:59:21:59:45 | call to [] | provenance | | | ActiveRecordInjection.rb:59:31:59:36 | call to params | ActiveRecordInjection.rb:59:31:59:41 | ...[...] | provenance | | | ActiveRecordInjection.rb:59:31:59:41 | ...[...] | ActiveRecordInjection.rb:59:22:59:44 | "id = '#{...}'" | provenance | AdditionalTaintStep | -| ActiveRecordInjection.rb:64:22:64:46 | call to [] [element 0] | ActiveRecordInjection.rb:64:22:64:46 | call to [] | provenance | | -| ActiveRecordInjection.rb:64:23:64:45 | "id = '#{...}'" | ActiveRecordInjection.rb:64:22:64:46 | call to [] [element 0] | provenance | | +| ActiveRecordInjection.rb:64:23:64:45 | "id = '#{...}'" | ActiveRecordInjection.rb:64:22:64:46 | call to [] | provenance | | | ActiveRecordInjection.rb:64:32:64:37 | call to params | ActiveRecordInjection.rb:64:32:64:42 | ...[...] | provenance | | | ActiveRecordInjection.rb:64:32:64:42 | ...[...] | ActiveRecordInjection.rb:64:23:64:45 | "id = '#{...}'" | provenance | AdditionalTaintStep | | ActiveRecordInjection.rb:69:21:69:26 | call to params | ActiveRecordInjection.rb:69:21:69:35 | ...[...] | provenance | | @@ -58,8 +56,7 @@ edges | ActiveRecordInjection.rb:136:11:136:17 | ...[...] | ActiveRecordInjection.rb:136:5:136:7 | uid | provenance | | | ActiveRecordInjection.rb:137:5:137:9 | uidEq | ActiveRecordInjection.rb:141:20:141:32 | ... + ... | provenance | | | ActiveRecordInjection.rb:137:5:137:9 | uidEq | ActiveRecordInjection.rb:141:28:141:32 | uidEq | provenance | | -| ActiveRecordInjection.rb:141:20:141:32 | ... + ... [element] | ActiveRecordInjection.rb:141:20:141:32 | ... + ... | provenance | | -| ActiveRecordInjection.rb:141:28:141:32 | uidEq | ActiveRecordInjection.rb:141:20:141:32 | ... + ... [element] | provenance | | +| ActiveRecordInjection.rb:141:28:141:32 | uidEq | ActiveRecordInjection.rb:141:20:141:32 | ... + ... | provenance | | | ActiveRecordInjection.rb:174:21:174:26 | call to params | ActiveRecordInjection.rb:174:21:174:44 | ...[...] | provenance | | | ActiveRecordInjection.rb:174:21:174:26 | call to params | ActiveRecordInjection.rb:174:21:174:44 | ...[...] | provenance | | | ActiveRecordInjection.rb:174:21:174:44 | ...[...] | ActiveRecordInjection.rb:27:22:27:30 | condition | provenance | | @@ -117,12 +114,10 @@ nodes | ActiveRecordInjection.rb:55:30:55:35 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:55:30:55:40 | ...[...] | semmle.label | ...[...] | | ActiveRecordInjection.rb:59:21:59:45 | call to [] | semmle.label | call to [] | -| ActiveRecordInjection.rb:59:21:59:45 | call to [] [element 0] | semmle.label | call to [] [element 0] | | ActiveRecordInjection.rb:59:22:59:44 | "id = '#{...}'" | semmle.label | "id = '#{...}'" | | ActiveRecordInjection.rb:59:31:59:36 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:59:31:59:41 | ...[...] | semmle.label | ...[...] | | ActiveRecordInjection.rb:64:22:64:46 | call to [] | semmle.label | call to [] | -| ActiveRecordInjection.rb:64:22:64:46 | call to [] [element 0] | semmle.label | call to [] [element 0] | | ActiveRecordInjection.rb:64:23:64:45 | "id = '#{...}'" | semmle.label | "id = '#{...}'" | | ActiveRecordInjection.rb:64:32:64:37 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:64:32:64:42 | ...[...] | semmle.label | ...[...] | @@ -186,7 +181,6 @@ nodes | ActiveRecordInjection.rb:136:11:136:17 | ...[...] | semmle.label | ...[...] | | ActiveRecordInjection.rb:137:5:137:9 | uidEq | semmle.label | uidEq | | ActiveRecordInjection.rb:141:20:141:32 | ... + ... | semmle.label | ... + ... | -| ActiveRecordInjection.rb:141:20:141:32 | ... + ... [element] | semmle.label | ... + ... [element] | | ActiveRecordInjection.rb:141:28:141:32 | uidEq | semmle.label | uidEq | | ActiveRecordInjection.rb:174:21:174:26 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:174:21:174:44 | ...[...] | semmle.label | ...[...] | diff --git a/ruby/ql/test/query-tests/security/cwe-094/CodeInjection/CodeInjection.expected b/ruby/ql/test/query-tests/security/cwe-094/CodeInjection/CodeInjection.expected index ca8345d92eeb..bc709a0e469d 100644 --- a/ruby/ql/test/query-tests/security/cwe-094/CodeInjection/CodeInjection.expected +++ b/ruby/ql/test/query-tests/security/cwe-094/CodeInjection/CodeInjection.expected @@ -26,8 +26,7 @@ edges | CodeInjection.rb:78:12:78:17 | call to params | CodeInjection.rb:78:12:78:24 | ...[...] | provenance | | | CodeInjection.rb:78:12:78:24 | ...[...] | CodeInjection.rb:78:5:78:8 | code | provenance | | | CodeInjection.rb:78:12:78:24 | ...[...] | CodeInjection.rb:78:5:78:8 | code | provenance | | -| CodeInjection.rb:86:10:86:25 | ... + ... [element] | CodeInjection.rb:86:10:86:37 | ... + ... [element] | provenance | | -| CodeInjection.rb:86:10:86:37 | ... + ... [element] | CodeInjection.rb:86:10:86:37 | ... + ... | provenance | | +| CodeInjection.rb:86:10:86:25 | ... + ... [element] | CodeInjection.rb:86:10:86:37 | ... + ... | provenance | | | CodeInjection.rb:86:22:86:25 | code | CodeInjection.rb:86:10:86:25 | ... + ... [element] | provenance | | | CodeInjection.rb:101:3:102:5 | self in index [@foo] | CodeInjection.rb:111:3:113:5 | self in baz [@foo] | provenance | | | CodeInjection.rb:101:3:102:5 | self in index [@foo] | CodeInjection.rb:111:3:113:5 | self in baz [@foo] | provenance | | @@ -74,7 +73,6 @@ nodes | CodeInjection.rb:80:16:80:19 | code | semmle.label | code | | CodeInjection.rb:86:10:86:25 | ... + ... [element] | semmle.label | ... + ... [element] | | CodeInjection.rb:86:10:86:37 | ... + ... | semmle.label | ... + ... | -| CodeInjection.rb:86:10:86:37 | ... + ... [element] | semmle.label | ... + ... [element] | | CodeInjection.rb:86:22:86:25 | code | semmle.label | code | | CodeInjection.rb:88:10:88:32 | "prefix_#{...}_suffix" | semmle.label | "prefix_#{...}_suffix" | | CodeInjection.rb:90:10:90:13 | code | semmle.label | code | diff --git a/ruby/ql/test/query-tests/security/cwe-117/LogInjection.expected b/ruby/ql/test/query-tests/security/cwe-117/LogInjection.expected index 573ec810a60a..4dbd42ac6c6d 100644 --- a/ruby/ql/test/query-tests/security/cwe-117/LogInjection.expected +++ b/ruby/ql/test/query-tests/security/cwe-117/LogInjection.expected @@ -5,23 +5,19 @@ edges | app/controllers/users_controller.rb:15:5:15:15 | unsanitized | app/controllers/users_controller.rb:23:20:23:30 | unsanitized | provenance | | | app/controllers/users_controller.rb:15:19:15:24 | call to params | app/controllers/users_controller.rb:15:19:15:30 | ...[...] | provenance | | | app/controllers/users_controller.rb:15:19:15:30 | ...[...] | app/controllers/users_controller.rb:15:5:15:15 | unsanitized | provenance | | -| app/controllers/users_controller.rb:17:19:17:41 | ... + ... [element] | app/controllers/users_controller.rb:17:19:17:41 | ... + ... | provenance | | -| app/controllers/users_controller.rb:17:31:17:41 | unsanitized | app/controllers/users_controller.rb:17:19:17:41 | ... + ... [element] | provenance | | +| app/controllers/users_controller.rb:17:31:17:41 | unsanitized | app/controllers/users_controller.rb:17:19:17:41 | ... + ... | provenance | | | app/controllers/users_controller.rb:23:20:23:30 | unsanitized | app/controllers/users_controller.rb:23:20:23:44 | call to sub | provenance | | | app/controllers/users_controller.rb:23:20:23:44 | call to sub | app/controllers/users_controller.rb:24:18:26:7 | do ... end [captured unsanitized2] | provenance | | | app/controllers/users_controller.rb:23:20:23:44 | call to sub | app/controllers/users_controller.rb:27:16:27:39 | ... + ... | provenance | | | app/controllers/users_controller.rb:23:20:23:44 | call to sub | app/controllers/users_controller.rb:27:28:27:39 | unsanitized2 | provenance | | | app/controllers/users_controller.rb:24:18:26:7 | do ... end [captured unsanitized2] | app/controllers/users_controller.rb:25:7:25:18 | unsanitized2 | provenance | heuristic-callback | -| app/controllers/users_controller.rb:27:16:27:39 | ... + ... [element] | app/controllers/users_controller.rb:27:16:27:39 | ... + ... | provenance | | -| app/controllers/users_controller.rb:27:28:27:39 | unsanitized2 | app/controllers/users_controller.rb:27:16:27:39 | ... + ... [element] | provenance | | +| app/controllers/users_controller.rb:27:28:27:39 | unsanitized2 | app/controllers/users_controller.rb:27:16:27:39 | ... + ... | provenance | | | app/controllers/users_controller.rb:33:19:33:25 | call to cookies | app/controllers/users_controller.rb:33:19:33:31 | ...[...] | provenance | | | app/controllers/users_controller.rb:33:19:33:31 | ...[...] | app/controllers/users_controller.rb:34:31:34:45 | { ... } [captured unsanitized] | provenance | | | app/controllers/users_controller.rb:33:19:33:31 | ...[...] | app/controllers/users_controller.rb:35:31:35:57 | { ... } [captured unsanitized] | provenance | | | app/controllers/users_controller.rb:34:31:34:45 | { ... } [captured unsanitized] | app/controllers/users_controller.rb:34:33:34:43 | unsanitized | provenance | heuristic-callback | | app/controllers/users_controller.rb:35:31:35:57 | { ... } [captured unsanitized] | app/controllers/users_controller.rb:35:45:35:55 | unsanitized | provenance | heuristic-callback | -| app/controllers/users_controller.rb:35:33:35:55 | ... + ... [element] | app/controllers/users_controller.rb:35:33:35:55 | ... + ... | provenance | | | app/controllers/users_controller.rb:35:45:35:55 | unsanitized | app/controllers/users_controller.rb:35:33:35:55 | ... + ... | provenance | | -| app/controllers/users_controller.rb:35:45:35:55 | unsanitized | app/controllers/users_controller.rb:35:33:35:55 | ... + ... [element] | provenance | | | app/controllers/users_controller.rb:49:19:49:24 | call to params | app/controllers/users_controller.rb:49:19:49:30 | ...[...] | provenance | | nodes | app/controllers/users_controller.rb:15:5:15:15 | unsanitized | semmle.label | unsanitized | @@ -29,14 +25,12 @@ nodes | app/controllers/users_controller.rb:15:19:15:30 | ...[...] | semmle.label | ...[...] | | app/controllers/users_controller.rb:16:19:16:29 | unsanitized | semmle.label | unsanitized | | app/controllers/users_controller.rb:17:19:17:41 | ... + ... | semmle.label | ... + ... | -| app/controllers/users_controller.rb:17:19:17:41 | ... + ... [element] | semmle.label | ... + ... [element] | | app/controllers/users_controller.rb:17:31:17:41 | unsanitized | semmle.label | unsanitized | | app/controllers/users_controller.rb:23:20:23:30 | unsanitized | semmle.label | unsanitized | | app/controllers/users_controller.rb:23:20:23:44 | call to sub | semmle.label | call to sub | | app/controllers/users_controller.rb:24:18:26:7 | do ... end [captured unsanitized2] | semmle.label | do ... end [captured unsanitized2] | | app/controllers/users_controller.rb:25:7:25:18 | unsanitized2 | semmle.label | unsanitized2 | | app/controllers/users_controller.rb:27:16:27:39 | ... + ... | semmle.label | ... + ... | -| app/controllers/users_controller.rb:27:16:27:39 | ... + ... [element] | semmle.label | ... + ... [element] | | app/controllers/users_controller.rb:27:28:27:39 | unsanitized2 | semmle.label | unsanitized2 | | app/controllers/users_controller.rb:33:19:33:25 | call to cookies | semmle.label | call to cookies | | app/controllers/users_controller.rb:33:19:33:31 | ...[...] | semmle.label | ...[...] | @@ -44,7 +38,6 @@ nodes | app/controllers/users_controller.rb:34:33:34:43 | unsanitized | semmle.label | unsanitized | | app/controllers/users_controller.rb:35:31:35:57 | { ... } [captured unsanitized] | semmle.label | { ... } [captured unsanitized] | | app/controllers/users_controller.rb:35:33:35:55 | ... + ... | semmle.label | ... + ... | -| app/controllers/users_controller.rb:35:33:35:55 | ... + ... [element] | semmle.label | ... + ... [element] | | app/controllers/users_controller.rb:35:45:35:55 | unsanitized | semmle.label | unsanitized | | app/controllers/users_controller.rb:49:19:49:24 | call to params | semmle.label | call to params | | app/controllers/users_controller.rb:49:19:49:30 | ...[...] | semmle.label | ...[...] | diff --git a/ruby/ql/test/query-tests/security/cwe-1333-regexp-injection/RegExpInjection.expected b/ruby/ql/test/query-tests/security/cwe-1333-regexp-injection/RegExpInjection.expected index a6c8636a5cfb..13643e2c07e5 100644 --- a/ruby/ql/test/query-tests/security/cwe-1333-regexp-injection/RegExpInjection.expected +++ b/ruby/ql/test/query-tests/security/cwe-1333-regexp-injection/RegExpInjection.expected @@ -12,14 +12,12 @@ edges | RegExpInjection.rb:22:5:22:8 | name | RegExpInjection.rb:23:30:23:33 | name | provenance | | | RegExpInjection.rb:22:12:22:17 | call to params | RegExpInjection.rb:22:12:22:24 | ...[...] | provenance | | | RegExpInjection.rb:22:12:22:24 | ...[...] | RegExpInjection.rb:22:5:22:8 | name | provenance | | -| RegExpInjection.rb:23:24:23:33 | ... + ... [element] | RegExpInjection.rb:23:24:23:33 | ... + ... | provenance | | -| RegExpInjection.rb:23:30:23:33 | name | RegExpInjection.rb:23:24:23:33 | ... + ... [element] | provenance | | +| RegExpInjection.rb:23:30:23:33 | name | RegExpInjection.rb:23:24:23:33 | ... + ... | provenance | | | RegExpInjection.rb:54:5:54:8 | name | RegExpInjection.rb:55:28:55:37 | ... + ... | provenance | | | RegExpInjection.rb:54:5:54:8 | name | RegExpInjection.rb:55:34:55:37 | name | provenance | | | RegExpInjection.rb:54:12:54:17 | call to params | RegExpInjection.rb:54:12:54:24 | ...[...] | provenance | | | RegExpInjection.rb:54:12:54:24 | ...[...] | RegExpInjection.rb:54:5:54:8 | name | provenance | | -| RegExpInjection.rb:55:28:55:37 | ... + ... [element] | RegExpInjection.rb:55:28:55:37 | ... + ... | provenance | | -| RegExpInjection.rb:55:34:55:37 | name | RegExpInjection.rb:55:28:55:37 | ... + ... [element] | provenance | | +| RegExpInjection.rb:55:34:55:37 | name | RegExpInjection.rb:55:28:55:37 | ... + ... | provenance | | nodes | RegExpInjection.rb:4:5:4:8 | name | semmle.label | name | | RegExpInjection.rb:4:12:4:17 | call to params | semmle.label | call to params | @@ -37,13 +35,11 @@ nodes | RegExpInjection.rb:22:12:22:17 | call to params | semmle.label | call to params | | RegExpInjection.rb:22:12:22:24 | ...[...] | semmle.label | ...[...] | | RegExpInjection.rb:23:24:23:33 | ... + ... | semmle.label | ... + ... | -| RegExpInjection.rb:23:24:23:33 | ... + ... [element] | semmle.label | ... + ... [element] | | RegExpInjection.rb:23:30:23:33 | name | semmle.label | name | | RegExpInjection.rb:54:5:54:8 | name | semmle.label | name | | RegExpInjection.rb:54:12:54:17 | call to params | semmle.label | call to params | | RegExpInjection.rb:54:12:54:24 | ...[...] | semmle.label | ...[...] | | RegExpInjection.rb:55:28:55:37 | ... + ... | semmle.label | ... + ... | -| RegExpInjection.rb:55:28:55:37 | ... + ... [element] | semmle.label | ... + ... [element] | | RegExpInjection.rb:55:34:55:37 | name | semmle.label | name | subpaths #select diff --git a/ruby/ql/test/query-tests/security/cwe-134/TaintedFormatString.expected b/ruby/ql/test/query-tests/security/cwe-134/TaintedFormatString.expected index 635dfaf82c01..104b9d3ada07 100644 --- a/ruby/ql/test/query-tests/security/cwe-134/TaintedFormatString.expected +++ b/ruby/ql/test/query-tests/security/cwe-134/TaintedFormatString.expected @@ -8,10 +8,8 @@ edges | tainted_format_string.rb:21:27:21:32 | call to params | tainted_format_string.rb:21:27:21:41 | ...[...] | provenance | | | tainted_format_string.rb:22:20:22:25 | call to params | tainted_format_string.rb:22:20:22:34 | ...[...] | provenance | | | tainted_format_string.rb:28:19:28:24 | call to params | tainted_format_string.rb:28:19:28:33 | ...[...] | provenance | | -| tainted_format_string.rb:33:12:33:46 | ... + ... [element] | tainted_format_string.rb:33:12:33:46 | ... + ... | provenance | | | tainted_format_string.rb:33:32:33:37 | call to params | tainted_format_string.rb:33:32:33:46 | ...[...] | provenance | | | tainted_format_string.rb:33:32:33:46 | ...[...] | tainted_format_string.rb:33:12:33:46 | ... + ... | provenance | | -| tainted_format_string.rb:33:32:33:46 | ...[...] | tainted_format_string.rb:33:12:33:46 | ... + ... [element] | provenance | | | tainted_format_string.rb:36:30:36:35 | call to params | tainted_format_string.rb:36:30:36:44 | ...[...] | provenance | | | tainted_format_string.rb:36:30:36:44 | ...[...] | tainted_format_string.rb:36:12:36:46 | "A log message: #{...}" | provenance | AdditionalTaintStep | | tainted_format_string.rb:39:22:39:27 | call to params | tainted_format_string.rb:39:22:39:36 | ...[...] | provenance | | @@ -38,7 +36,6 @@ nodes | tainted_format_string.rb:28:19:28:24 | call to params | semmle.label | call to params | | tainted_format_string.rb:28:19:28:33 | ...[...] | semmle.label | ...[...] | | tainted_format_string.rb:33:12:33:46 | ... + ... | semmle.label | ... + ... | -| tainted_format_string.rb:33:12:33:46 | ... + ... [element] | semmle.label | ... + ... [element] | | tainted_format_string.rb:33:32:33:37 | call to params | semmle.label | call to params | | tainted_format_string.rb:33:32:33:46 | ...[...] | semmle.label | ...[...] | | tainted_format_string.rb:36:12:36:46 | "A log message: #{...}" | semmle.label | "A log message: #{...}" | diff --git a/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected b/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected index c1b219288812..70cf2d3eaf00 100644 --- a/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected +++ b/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected @@ -2,9 +2,7 @@ edges | conversions.swift:33:16:33:26 | call to sourceInt() | conversions.swift:33:12:33:27 | call to Self.init(_:) | provenance | | | conversions.swift:34:18:34:28 | call to sourceInt() | conversions.swift:34:12:34:29 | call to Self.init(_:) | provenance | | | conversions.swift:35:18:35:28 | call to sourceInt() | conversions.swift:35:12:35:29 | call to Float.init(_:) | provenance | | -| conversions.swift:36:12:36:30 | call to String.init(_:) [Collection element] | conversions.swift:36:12:36:30 | call to String.init(_:) | provenance | | | conversions.swift:36:19:36:29 | call to sourceInt() | conversions.swift:36:12:36:30 | call to String.init(_:) | provenance | | -| conversions.swift:36:19:36:29 | call to sourceInt() | conversions.swift:36:12:36:30 | call to String.init(_:) [Collection element] | provenance | | | conversions.swift:37:12:37:30 | call to String.init(_:) | conversions.swift:37:12:37:32 | .utf8 | provenance | | | conversions.swift:37:19:37:29 | call to sourceInt() | conversions.swift:37:12:37:30 | call to String.init(_:) | provenance | | | conversions.swift:39:12:39:30 | [...] [Collection element] | conversions.swift:40:12:40:12 | arr | provenance | | @@ -13,13 +11,11 @@ edges | conversions.swift:39:12:39:30 | [...] [Collection element] | conversions.swift:43:20:43:20 | arr [Collection element] | provenance | | | conversions.swift:39:19:39:29 | call to sourceInt() | conversions.swift:39:12:39:30 | [...] [Collection element] | provenance | | | conversions.swift:41:12:41:12 | arr [Collection element] | conversions.swift:41:12:41:17 | ...[...] | provenance | | -| conversions.swift:42:12:42:23 | call to Array.init(_:) [Collection element] | conversions.swift:42:12:42:23 | call to Array.init(_:) | provenance | | -| conversions.swift:42:20:42:20 | arr [Collection element] | conversions.swift:42:12:42:23 | call to Array.init(_:) [Collection element] | provenance | | +| conversions.swift:42:20:42:20 | arr [Collection element] | conversions.swift:42:12:42:23 | call to Array.init(_:) | provenance | | | conversions.swift:43:12:43:23 | call to Array.init(_:) [Collection element] | conversions.swift:43:12:43:26 | ...[...] | provenance | | | conversions.swift:43:20:43:20 | arr [Collection element] | conversions.swift:43:12:43:23 | call to Array.init(_:) [Collection element] | provenance | | -| conversions.swift:44:12:44:39 | call to Array.init(_:) [Collection element] | conversions.swift:44:12:44:39 | call to Array.init(_:) | provenance | | | conversions.swift:44:20:44:33 | call to sourceString() | conversions.swift:44:20:44:35 | .utf8 | provenance | | -| conversions.swift:44:20:44:35 | .utf8 | conversions.swift:44:12:44:39 | call to Array.init(_:) [Collection element] | provenance | | +| conversions.swift:44:20:44:35 | .utf8 | conversions.swift:44:12:44:39 | call to Array.init(_:) | provenance | | | conversions.swift:45:12:45:39 | call to Array.init(_:) [Collection element] | conversions.swift:45:12:45:42 | ...[...] | provenance | | | conversions.swift:45:20:45:33 | call to sourceString() | conversions.swift:45:20:45:35 | .utf8 | provenance | | | conversions.swift:45:20:45:35 | .utf8 | conversions.swift:45:12:45:39 | call to Array.init(_:) [Collection element] | provenance | | @@ -49,19 +45,13 @@ edges | conversions.swift:80:12:80:22 | call to sourceInt() | conversions.swift:80:12:80:24 | .bigEndian | provenance | | | conversions.swift:109:18:109:30 | call to sourceFloat() | conversions.swift:109:12:109:31 | call to Float.init(_:) | provenance | | | conversions.swift:110:18:110:30 | call to sourceFloat() | conversions.swift:110:12:110:31 | call to UInt8.init(_:) | provenance | | -| conversions.swift:111:12:111:32 | call to String.init(_:) [Collection element] | conversions.swift:111:12:111:32 | call to String.init(_:) | provenance | | | conversions.swift:111:19:111:31 | call to sourceFloat() | conversions.swift:111:12:111:32 | call to String.init(_:) | provenance | | -| conversions.swift:111:19:111:31 | call to sourceFloat() | conversions.swift:111:12:111:32 | call to String.init(_:) [Collection element] | provenance | | | conversions.swift:112:12:112:32 | call to String.init(_:) | conversions.swift:112:12:112:34 | .utf8 | provenance | | | conversions.swift:112:19:112:31 | call to sourceFloat() | conversions.swift:112:12:112:32 | call to String.init(_:) | provenance | | -| conversions.swift:113:12:113:34 | call to String.init(_:) [Collection element] | conversions.swift:113:12:113:34 | call to String.init(_:) | provenance | | | conversions.swift:113:19:113:33 | call to sourceFloat80() | conversions.swift:113:12:113:34 | call to String.init(_:) | provenance | | -| conversions.swift:113:19:113:33 | call to sourceFloat80() | conversions.swift:113:12:113:34 | call to String.init(_:) [Collection element] | provenance | | | conversions.swift:114:12:114:34 | call to String.init(_:) | conversions.swift:114:12:114:36 | .utf8 | provenance | | | conversions.swift:114:19:114:33 | call to sourceFloat80() | conversions.swift:114:12:114:34 | call to String.init(_:) | provenance | | -| conversions.swift:115:12:115:33 | call to String.init(_:) [Collection element] | conversions.swift:115:12:115:33 | call to String.init(_:) | provenance | | | conversions.swift:115:19:115:32 | call to sourceDouble() | conversions.swift:115:12:115:33 | call to String.init(_:) | provenance | | -| conversions.swift:115:19:115:32 | call to sourceDouble() | conversions.swift:115:12:115:33 | call to String.init(_:) [Collection element] | provenance | | | conversions.swift:116:12:116:33 | call to String.init(_:) | conversions.swift:116:12:116:35 | .utf8 | provenance | | | conversions.swift:116:19:116:32 | call to sourceDouble() | conversions.swift:116:12:116:33 | call to String.init(_:) | provenance | | | conversions.swift:118:18:118:30 | call to sourceFloat() | conversions.swift:118:12:118:31 | call to Float.init(_:) | provenance | | @@ -76,9 +66,7 @@ edges | conversions.swift:129:12:129:25 | call to sourceDouble() | conversions.swift:129:12:129:27 | .significand | provenance | | | conversions.swift:130:12:130:23 | call to sourceUInt() | conversions.swift:130:12:130:25 | .byteSwapped | provenance | | | conversions.swift:131:12:131:25 | call to sourceUInt64() | conversions.swift:131:12:131:27 | .byteSwapped | provenance | | -| conversions.swift:136:12:136:33 | call to String.init(_:) [Collection element] | conversions.swift:136:12:136:33 | call to String.init(_:) | provenance | | | conversions.swift:136:19:136:32 | call to sourceString() | conversions.swift:136:12:136:33 | call to String.init(_:) | provenance | | -| conversions.swift:136:19:136:32 | call to sourceString() | conversions.swift:136:12:136:33 | call to String.init(_:) [Collection element] | provenance | | | conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:144:12:144:35 | call to MyString.init(_:) [some:0] | provenance | | | conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:145:12:145:12 | ms2 | provenance | | | conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:146:12:146:16 | .description | provenance | | @@ -251,7 +239,6 @@ nodes | conversions.swift:35:12:35:29 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | | conversions.swift:35:18:35:28 | call to sourceInt() | semmle.label | call to sourceInt() | | conversions.swift:36:12:36:30 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:36:12:36:30 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | conversions.swift:36:19:36:29 | call to sourceInt() | semmle.label | call to sourceInt() | | conversions.swift:37:12:37:30 | call to String.init(_:) | semmle.label | call to String.init(_:) | | conversions.swift:37:12:37:32 | .utf8 | semmle.label | .utf8 | @@ -262,13 +249,11 @@ nodes | conversions.swift:41:12:41:12 | arr [Collection element] | semmle.label | arr [Collection element] | | conversions.swift:41:12:41:17 | ...[...] | semmle.label | ...[...] | | conversions.swift:42:12:42:23 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | -| conversions.swift:42:12:42:23 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | | conversions.swift:42:20:42:20 | arr [Collection element] | semmle.label | arr [Collection element] | | conversions.swift:43:12:43:23 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | | conversions.swift:43:12:43:26 | ...[...] | semmle.label | ...[...] | | conversions.swift:43:20:43:20 | arr [Collection element] | semmle.label | arr [Collection element] | | conversions.swift:44:12:44:39 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | -| conversions.swift:44:12:44:39 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | | conversions.swift:44:20:44:33 | call to sourceString() | semmle.label | call to sourceString() | | conversions.swift:44:20:44:35 | .utf8 | semmle.label | .utf8 | | conversions.swift:45:12:45:39 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | @@ -321,19 +306,16 @@ nodes | conversions.swift:110:12:110:31 | call to UInt8.init(_:) | semmle.label | call to UInt8.init(_:) | | conversions.swift:110:18:110:30 | call to sourceFloat() | semmle.label | call to sourceFloat() | | conversions.swift:111:12:111:32 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:111:12:111:32 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | conversions.swift:111:19:111:31 | call to sourceFloat() | semmle.label | call to sourceFloat() | | conversions.swift:112:12:112:32 | call to String.init(_:) | semmle.label | call to String.init(_:) | | conversions.swift:112:12:112:34 | .utf8 | semmle.label | .utf8 | | conversions.swift:112:19:112:31 | call to sourceFloat() | semmle.label | call to sourceFloat() | | conversions.swift:113:12:113:34 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:113:12:113:34 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | conversions.swift:113:19:113:33 | call to sourceFloat80() | semmle.label | call to sourceFloat80() | | conversions.swift:114:12:114:34 | call to String.init(_:) | semmle.label | call to String.init(_:) | | conversions.swift:114:12:114:36 | .utf8 | semmle.label | .utf8 | | conversions.swift:114:19:114:33 | call to sourceFloat80() | semmle.label | call to sourceFloat80() | | conversions.swift:115:12:115:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:115:12:115:33 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | conversions.swift:115:19:115:32 | call to sourceDouble() | semmle.label | call to sourceDouble() | | conversions.swift:116:12:116:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | | conversions.swift:116:12:116:35 | .utf8 | semmle.label | .utf8 | @@ -364,7 +346,6 @@ nodes | conversions.swift:131:12:131:27 | .byteSwapped | semmle.label | .byteSwapped | | conversions.swift:135:12:135:25 | call to sourceString() | semmle.label | call to sourceString() | | conversions.swift:136:12:136:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:136:12:136:33 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | conversions.swift:136:19:136:32 | call to sourceString() | semmle.label | call to sourceString() | | conversions.swift:144:12:144:35 | call to MyString.init(_:) | semmle.label | call to MyString.init(_:) | | conversions.swift:144:12:144:35 | call to MyString.init(_:) [some:0] | semmle.label | call to MyString.init(_:) [some:0] | diff --git a/swift/ql/test/query-tests/Security/CWE-078/CommandInjection.expected b/swift/ql/test/query-tests/Security/CWE-078/CommandInjection.expected index 0fe8ae7b8685..6e6b86231495 100644 --- a/swift/ql/test/query-tests/Security/CWE-078/CommandInjection.expected +++ b/swift/ql/test/query-tests/Security/CWE-078/CommandInjection.expected @@ -14,8 +14,7 @@ edges | CommandInjection.swift:75:40:75:94 | call to String.init(contentsOf:) [some:0] | CommandInjection.swift:75:8:75:12 | let ...? [some:0] | provenance | | | CommandInjection.swift:75:40:75:94 | call to String.init(contentsOf:) [some:0] | CommandInjection.swift:75:40:75:94 | call to String.init(contentsOf:) [some:0, some:0] | provenance | | | CommandInjection.swift:75:40:75:94 | call to String.init(contentsOf:) [some:0] | CommandInjection.swift:84:43:84:43 | userControlledString [some:0] | provenance | | -| CommandInjection.swift:81:2:81:2 | [post] task1 [arguments, Collection element] | CommandInjection.swift:81:2:81:2 | [post] task1 | provenance | | -| CommandInjection.swift:81:20:81:47 | [...] [Collection element] | CommandInjection.swift:81:2:81:2 | [post] task1 [arguments, Collection element] | provenance | | +| CommandInjection.swift:81:20:81:47 | [...] [Collection element] | CommandInjection.swift:81:2:81:2 | [post] task1 | provenance | | | CommandInjection.swift:81:27:81:27 | userControlledString | CommandInjection.swift:81:20:81:47 | [...] [Collection element] | provenance | | | CommandInjection.swift:84:5:84:9 | let ...? [some:0] | CommandInjection.swift:84:9:84:9 | validatedString | provenance | | | CommandInjection.swift:84:9:84:9 | validatedString | CommandInjection.swift:87:31:87:31 | validatedString | provenance | | @@ -26,12 +25,10 @@ edges | CommandInjection.swift:84:43:84:43 | userControlledString | CommandInjection.swift:84:27:84:63 | call to validateCommand(_:) [some:0] | provenance | | | CommandInjection.swift:84:43:84:43 | userControlledString [some:0] | CommandInjection.swift:64:22:64:33 | command [some:0] | provenance | | | CommandInjection.swift:84:43:84:43 | userControlledString [some:0] | CommandInjection.swift:84:27:84:63 | call to validateCommand(_:) [some:0] | provenance | | -| CommandInjection.swift:87:6:87:6 | [post] task2 [arguments, Collection element] | CommandInjection.swift:87:6:87:6 | [post] task2 | provenance | | -| CommandInjection.swift:87:24:87:46 | [...] [Collection element] | CommandInjection.swift:87:6:87:6 | [post] task2 [arguments, Collection element] | provenance | | +| CommandInjection.swift:87:24:87:46 | [...] [Collection element] | CommandInjection.swift:87:6:87:6 | [post] task2 | provenance | | | CommandInjection.swift:87:31:87:31 | validatedString | CommandInjection.swift:87:24:87:46 | [...] [Collection element] | provenance | | | CommandInjection.swift:99:20:99:40 | arguments [Collection element] | CommandInjection.swift:100:20:100:20 | arguments [Collection element] | provenance | | -| CommandInjection.swift:100:3:100:3 | [post] self [arguments, Collection element] | CommandInjection.swift:100:3:100:3 | [post] self | provenance | | -| CommandInjection.swift:100:20:100:20 | arguments [Collection element] | CommandInjection.swift:100:3:100:3 | [post] self [arguments, Collection element] | provenance | | +| CommandInjection.swift:100:20:100:20 | arguments [Collection element] | CommandInjection.swift:100:3:100:3 | [post] self | provenance | | | CommandInjection.swift:105:8:105:12 | let ...? [some:0] | CommandInjection.swift:105:12:105:12 | userControlledString | provenance | | | CommandInjection.swift:105:12:105:12 | userControlledString | CommandInjection.swift:120:36:120:36 | userControlledString | provenance | | | CommandInjection.swift:105:12:105:12 | userControlledString | CommandInjection.swift:121:28:121:28 | userControlledString | provenance | | @@ -73,55 +70,42 @@ edges | CommandInjection.swift:105:40:105:94 | call to String.init(contentsOf:) | CommandInjection.swift:164:33:164:33 | userControlledString | provenance | | | CommandInjection.swift:105:40:105:94 | call to String.init(contentsOf:) | CommandInjection.swift:166:57:166:57 | userControlledString | provenance | | | CommandInjection.swift:105:40:105:94 | call to String.init(contentsOf:) [some:0] | CommandInjection.swift:105:8:105:12 | let ...? [some:0] | provenance | | -| CommandInjection.swift:120:2:120:2 | [post] task3 [executableURL] | CommandInjection.swift:120:2:120:2 | [post] task3 | provenance | | | CommandInjection.swift:120:24:120:56 | call to URL.init(string:) [some:0] | CommandInjection.swift:120:24:120:57 | ...! | provenance | | -| CommandInjection.swift:120:24:120:57 | ...! | CommandInjection.swift:120:2:120:2 | [post] task3 [executableURL] | provenance | | +| CommandInjection.swift:120:24:120:57 | ...! | CommandInjection.swift:120:2:120:2 | [post] task3 | provenance | | | CommandInjection.swift:120:36:120:36 | userControlledString | CommandInjection.swift:120:24:120:56 | call to URL.init(string:) [some:0] | provenance | | -| CommandInjection.swift:121:2:121:2 | [post] task3 [arguments, Collection element] | CommandInjection.swift:121:2:121:2 | [post] task3 | provenance | | -| CommandInjection.swift:121:20:121:48 | [...] [Collection element] | CommandInjection.swift:121:2:121:2 | [post] task3 [arguments, Collection element] | provenance | | +| CommandInjection.swift:121:20:121:48 | [...] [Collection element] | CommandInjection.swift:121:2:121:2 | [post] task3 | provenance | | | CommandInjection.swift:121:28:121:28 | userControlledString | CommandInjection.swift:121:20:121:48 | [...] [Collection element] | provenance | | -| CommandInjection.swift:125:2:125:2 | [post] task4 [executableURL] | CommandInjection.swift:125:2:125:2 | [post] task4 | provenance | | -| CommandInjection.swift:125:24:125:65 | call to URL.init(fileURLWithPath:) | CommandInjection.swift:125:2:125:2 | [post] task4 [executableURL] | provenance | | +| CommandInjection.swift:125:24:125:65 | call to URL.init(fileURLWithPath:) | CommandInjection.swift:125:2:125:2 | [post] task4 | provenance | | | CommandInjection.swift:125:45:125:45 | userControlledString | CommandInjection.swift:125:24:125:65 | call to URL.init(fileURLWithPath:) | provenance | | -| CommandInjection.swift:126:2:126:2 | [post] task4 [executableURL] | CommandInjection.swift:126:2:126:2 | [post] task4 | provenance | | | CommandInjection.swift:126:24:126:56 | call to URL.init(string:) [some:0] | CommandInjection.swift:126:24:126:57 | ...! | provenance | | -| CommandInjection.swift:126:24:126:57 | ...! | CommandInjection.swift:126:2:126:2 | [post] task4 [executableURL] | provenance | | +| CommandInjection.swift:126:24:126:57 | ...! | CommandInjection.swift:126:2:126:2 | [post] task4 | provenance | | | CommandInjection.swift:126:36:126:36 | userControlledString | CommandInjection.swift:126:24:126:56 | call to URL.init(string:) [some:0] | provenance | | -| CommandInjection.swift:127:2:127:2 | [post] task4 [arguments, Collection element] | CommandInjection.swift:127:2:127:2 | [post] task4 | provenance | | -| CommandInjection.swift:127:20:127:56 | [...] [Collection element] | CommandInjection.swift:127:2:127:2 | [post] task4 [arguments, Collection element] | provenance | | +| CommandInjection.swift:127:20:127:56 | [...] [Collection element] | CommandInjection.swift:127:2:127:2 | [post] task4 | provenance | | | CommandInjection.swift:127:28:127:36 | ... .+(_:_:) ... | CommandInjection.swift:127:20:127:56 | [...] [Collection element] | provenance | | -| CommandInjection.swift:131:2:131:7 | [post] ...? [executableURL] | CommandInjection.swift:131:2:131:7 | [post] ...? | provenance | | -| CommandInjection.swift:131:25:131:66 | call to URL.init(fileURLWithPath:) | CommandInjection.swift:131:2:131:7 | [post] ...? [executableURL] | provenance | | +| CommandInjection.swift:131:25:131:66 | call to URL.init(fileURLWithPath:) | CommandInjection.swift:131:2:131:7 | [post] ...? | provenance | | | CommandInjection.swift:131:46:131:46 | userControlledString | CommandInjection.swift:131:25:131:66 | call to URL.init(fileURLWithPath:) | provenance | | -| CommandInjection.swift:132:2:132:7 | [post] ...? [arguments, Collection element] | CommandInjection.swift:132:2:132:7 | [post] ...? | provenance | | -| CommandInjection.swift:132:21:132:42 | [...] [Collection element] | CommandInjection.swift:132:2:132:7 | [post] ...? [arguments, Collection element] | provenance | | +| CommandInjection.swift:132:21:132:42 | [...] [Collection element] | CommandInjection.swift:132:2:132:7 | [post] ...? | provenance | | | CommandInjection.swift:132:22:132:22 | userControlledString | CommandInjection.swift:132:21:132:42 | [...] [Collection element] | provenance | | -| CommandInjection.swift:136:2:136:2 | [post] task6 [executableURL] | CommandInjection.swift:136:2:136:2 | [post] task6 | provenance | | -| CommandInjection.swift:136:24:136:65 | call to URL.init(fileURLWithPath:) | CommandInjection.swift:136:2:136:2 | [post] task6 [executableURL] | provenance | | +| CommandInjection.swift:136:24:136:65 | call to URL.init(fileURLWithPath:) | CommandInjection.swift:136:2:136:2 | [post] task6 | provenance | | | CommandInjection.swift:136:45:136:45 | userControlledString | CommandInjection.swift:136:24:136:65 | call to URL.init(fileURLWithPath:) | provenance | | -| CommandInjection.swift:137:2:137:2 | [post] task6 [executableURL] | CommandInjection.swift:137:2:137:2 | [post] task6 | provenance | | | CommandInjection.swift:137:24:137:56 | call to URL.init(string:) [some:0] | CommandInjection.swift:137:24:137:57 | ...! | provenance | | -| CommandInjection.swift:137:24:137:57 | ...! | CommandInjection.swift:137:2:137:2 | [post] task6 [executableURL] | provenance | | +| CommandInjection.swift:137:24:137:57 | ...! | CommandInjection.swift:137:2:137:2 | [post] task6 | provenance | | | CommandInjection.swift:137:36:137:36 | userControlledString | CommandInjection.swift:137:24:137:56 | call to URL.init(string:) [some:0] | provenance | | -| CommandInjection.swift:138:2:138:2 | [post] task6 [arguments, Collection element] | CommandInjection.swift:138:2:138:2 | [post] task6 | provenance | | -| CommandInjection.swift:138:20:138:41 | [...] [Collection element] | CommandInjection.swift:138:2:138:2 | [post] task6 [arguments, Collection element] | provenance | | +| CommandInjection.swift:138:20:138:41 | [...] [Collection element] | CommandInjection.swift:138:2:138:2 | [post] task6 | provenance | | | CommandInjection.swift:138:21:138:21 | userControlledString | CommandInjection.swift:138:20:138:41 | [...] [Collection element] | provenance | | | CommandInjection.swift:139:21:139:42 | [...] [Collection element] | CommandInjection.swift:99:20:99:40 | arguments [Collection element] | provenance | | | CommandInjection.swift:139:22:139:22 | userControlledString | CommandInjection.swift:139:21:139:42 | [...] [Collection element] | provenance | | -| CommandInjection.swift:151:67:151:95 | [...] [Collection element] | CommandInjection.swift:151:67:151:95 | [...] | provenance | | -| CommandInjection.swift:151:75:151:75 | userControlledString | CommandInjection.swift:151:67:151:95 | [...] [Collection element] | provenance | | +| CommandInjection.swift:151:75:151:75 | userControlledString | CommandInjection.swift:151:67:151:95 | [...] | provenance | | | CommandInjection.swift:154:23:154:55 | call to URL.init(string:) [some:0] | CommandInjection.swift:154:23:154:56 | ...! | provenance | | | CommandInjection.swift:154:35:154:35 | userControlledString | CommandInjection.swift:154:23:154:55 | call to URL.init(string:) [some:0] | provenance | | -| CommandInjection.swift:155:62:155:90 | [...] [Collection element] | CommandInjection.swift:155:62:155:90 | [...] | provenance | | -| CommandInjection.swift:155:70:155:70 | userControlledString | CommandInjection.swift:155:62:155:90 | [...] [Collection element] | provenance | | +| CommandInjection.swift:155:70:155:70 | userControlledString | CommandInjection.swift:155:62:155:90 | [...] | provenance | | | CommandInjection.swift:160:41:160:73 | call to URL.init(string:) [some:0] | CommandInjection.swift:160:41:160:74 | ...! | provenance | | | CommandInjection.swift:160:53:160:53 | userControlledString | CommandInjection.swift:160:41:160:73 | call to URL.init(string:) [some:0] | provenance | | | CommandInjection.swift:163:40:163:72 | call to URL.init(string:) [some:0] | CommandInjection.swift:163:40:163:73 | ...! | provenance | | | CommandInjection.swift:163:40:163:72 | call to URL.init(string:) [some:0] | CommandInjection.swift:163:40:163:73 | ...! | provenance | | | CommandInjection.swift:163:40:163:73 | ...! | file://:0:0:0:0 | url | provenance | | | CommandInjection.swift:163:52:163:52 | userControlledString | CommandInjection.swift:163:40:163:72 | call to URL.init(string:) [some:0] | provenance | | -| CommandInjection.swift:164:32:164:53 | [...] [Collection element] | CommandInjection.swift:164:32:164:53 | [...] | provenance | | -| CommandInjection.swift:164:33:164:33 | userControlledString | CommandInjection.swift:164:32:164:53 | [...] [Collection element] | provenance | | +| CommandInjection.swift:164:33:164:33 | userControlledString | CommandInjection.swift:164:32:164:53 | [...] | provenance | | | CommandInjection.swift:166:45:166:77 | call to URL.init(string:) [some:0] | CommandInjection.swift:166:45:166:78 | ...! | provenance | | | CommandInjection.swift:166:45:166:77 | call to URL.init(string:) [some:0] | CommandInjection.swift:166:45:166:78 | ...! | provenance | | | CommandInjection.swift:166:45:166:78 | ...! | file://:0:0:0:0 | url | provenance | | @@ -129,12 +113,9 @@ edges | CommandInjection.swift:193:3:193:3 | newValue [Collection element] | CommandInjection.swift:194:19:194:19 | newValue [Collection element] | provenance | | | CommandInjection.swift:193:3:193:3 | newValue [Collection element] | CommandInjection.swift:195:20:195:20 | newValue [Collection element] | provenance | | | CommandInjection.swift:193:3:193:3 | newValue [Collection element] | CommandInjection.swift:196:19:196:19 | newValue [Collection element] | provenance | | -| CommandInjection.swift:194:4:194:4 | [post] getter for .p1 [arguments, Collection element] | CommandInjection.swift:194:4:194:4 | [post] getter for .p1 | provenance | | -| CommandInjection.swift:194:19:194:19 | newValue [Collection element] | CommandInjection.swift:194:4:194:4 | [post] getter for .p1 [arguments, Collection element] | provenance | | -| CommandInjection.swift:195:4:195:6 | [post] ...! [arguments, Collection element] | CommandInjection.swift:195:4:195:6 | [post] ...! | provenance | | -| CommandInjection.swift:195:20:195:20 | newValue [Collection element] | CommandInjection.swift:195:4:195:6 | [post] ...! [arguments, Collection element] | provenance | | -| CommandInjection.swift:196:4:196:4 | [post] ...! [arguments, Collection element] | CommandInjection.swift:196:4:196:4 | [post] ...! | provenance | | -| CommandInjection.swift:196:19:196:19 | newValue [Collection element] | CommandInjection.swift:196:4:196:4 | [post] ...! [arguments, Collection element] | provenance | | +| CommandInjection.swift:194:19:194:19 | newValue [Collection element] | CommandInjection.swift:194:4:194:4 | [post] getter for .p1 | provenance | | +| CommandInjection.swift:195:20:195:20 | newValue [Collection element] | CommandInjection.swift:195:4:195:6 | [post] ...! | provenance | | +| CommandInjection.swift:196:19:196:19 | newValue [Collection element] | CommandInjection.swift:196:4:196:4 | [post] ...! | provenance | | | CommandInjection.swift:201:9:201:13 | let ...? [some:0] | CommandInjection.swift:201:13:201:13 | userControlledString | provenance | | | CommandInjection.swift:201:13:201:13 | userControlledString | CommandInjection.swift:205:19:205:19 | userControlledString | provenance | | | CommandInjection.swift:201:13:201:13 | userControlledString | CommandInjection.swift:211:31:211:31 | userControlledString | provenance | | @@ -146,23 +127,17 @@ edges | CommandInjection.swift:205:18:205:39 | [...] [Collection element] | CommandInjection.swift:208:19:208:19 | tainted1 [Collection element] | provenance | | | CommandInjection.swift:205:18:205:39 | [...] [Collection element] | CommandInjection.swift:209:18:209:18 | tainted1 [Collection element] | provenance | | | CommandInjection.swift:205:19:205:19 | userControlledString | CommandInjection.swift:205:18:205:39 | [...] [Collection element] | provenance | | -| CommandInjection.swift:207:3:207:3 | [post] getter for .p1 [arguments, Collection element] | CommandInjection.swift:207:3:207:3 | [post] getter for .p1 | provenance | | -| CommandInjection.swift:207:18:207:18 | tainted1 [Collection element] | CommandInjection.swift:207:3:207:3 | [post] getter for .p1 [arguments, Collection element] | provenance | | -| CommandInjection.swift:208:3:208:5 | [post] ...! [arguments, Collection element] | CommandInjection.swift:208:3:208:5 | [post] ...! | provenance | | -| CommandInjection.swift:208:19:208:19 | tainted1 [Collection element] | CommandInjection.swift:208:3:208:5 | [post] ...! [arguments, Collection element] | provenance | | -| CommandInjection.swift:209:3:209:3 | [post] ...! [arguments, Collection element] | CommandInjection.swift:209:3:209:3 | [post] ...! | provenance | | -| CommandInjection.swift:209:18:209:18 | tainted1 [Collection element] | CommandInjection.swift:209:3:209:3 | [post] ...! [arguments, Collection element] | provenance | | +| CommandInjection.swift:207:18:207:18 | tainted1 [Collection element] | CommandInjection.swift:207:3:207:3 | [post] getter for .p1 | provenance | | +| CommandInjection.swift:208:19:208:19 | tainted1 [Collection element] | CommandInjection.swift:208:3:208:5 | [post] ...! | provenance | | +| CommandInjection.swift:209:18:209:18 | tainted1 [Collection element] | CommandInjection.swift:209:3:209:3 | [post] ...! | provenance | | | CommandInjection.swift:211:30:211:51 | [...] [Collection element] | CommandInjection.swift:213:18:213:18 | tainted2 [Collection element] | provenance | | | CommandInjection.swift:211:30:211:51 | [...] [Collection element] | CommandInjection.swift:214:19:214:19 | tainted2 [Collection element] | provenance | | | CommandInjection.swift:211:30:211:51 | [...] [Collection element] | CommandInjection.swift:215:18:215:18 | tainted2 [Collection element] | provenance | | | CommandInjection.swift:211:30:211:51 | [...] [Collection element] | CommandInjection.swift:217:13:217:13 | tainted2 [Collection element] | provenance | | | CommandInjection.swift:211:31:211:31 | userControlledString | CommandInjection.swift:211:30:211:51 | [...] [Collection element] | provenance | | -| CommandInjection.swift:213:3:213:3 | [post] getter for .p1 [arguments, Collection element] | CommandInjection.swift:213:3:213:3 | [post] getter for .p1 | provenance | | -| CommandInjection.swift:213:18:213:18 | tainted2 [Collection element] | CommandInjection.swift:213:3:213:3 | [post] getter for .p1 [arguments, Collection element] | provenance | | -| CommandInjection.swift:214:3:214:5 | [post] ...! [arguments, Collection element] | CommandInjection.swift:214:3:214:5 | [post] ...! | provenance | | -| CommandInjection.swift:214:19:214:19 | tainted2 [Collection element] | CommandInjection.swift:214:3:214:5 | [post] ...! [arguments, Collection element] | provenance | | -| CommandInjection.swift:215:3:215:3 | [post] ...! [arguments, Collection element] | CommandInjection.swift:215:3:215:3 | [post] ...! | provenance | | -| CommandInjection.swift:215:18:215:18 | tainted2 [Collection element] | CommandInjection.swift:215:3:215:3 | [post] ...! [arguments, Collection element] | provenance | | +| CommandInjection.swift:213:18:213:18 | tainted2 [Collection element] | CommandInjection.swift:213:3:213:3 | [post] getter for .p1 | provenance | | +| CommandInjection.swift:214:19:214:19 | tainted2 [Collection element] | CommandInjection.swift:214:3:214:5 | [post] ...! | provenance | | +| CommandInjection.swift:215:18:215:18 | tainted2 [Collection element] | CommandInjection.swift:215:3:215:3 | [post] ...! | provenance | | | CommandInjection.swift:217:13:217:13 | tainted2 [Collection element] | CommandInjection.swift:193:3:193:3 | newValue [Collection element] | provenance | | | file://:0:0:0:0 | url | file://:0:0:0:0 | url | provenance | | | file://:0:0:0:0 | url | file://:0:0:0:0 | url | provenance | | @@ -180,7 +155,6 @@ nodes | CommandInjection.swift:75:40:75:94 | call to String.init(contentsOf:) [some:0, some:0] | semmle.label | call to String.init(contentsOf:) [some:0, some:0] | | CommandInjection.swift:75:40:75:94 | call to String.init(contentsOf:) [some:0] | semmle.label | call to String.init(contentsOf:) [some:0] | | CommandInjection.swift:81:2:81:2 | [post] task1 | semmle.label | [post] task1 | -| CommandInjection.swift:81:2:81:2 | [post] task1 [arguments, Collection element] | semmle.label | [post] task1 [arguments, Collection element] | | CommandInjection.swift:81:20:81:47 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:81:27:81:27 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:84:5:84:9 | let ...? [some:0] | semmle.label | let ...? [some:0] | @@ -190,71 +164,57 @@ nodes | CommandInjection.swift:84:43:84:43 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:84:43:84:43 | userControlledString [some:0] | semmle.label | userControlledString [some:0] | | CommandInjection.swift:87:6:87:6 | [post] task2 | semmle.label | [post] task2 | -| CommandInjection.swift:87:6:87:6 | [post] task2 [arguments, Collection element] | semmle.label | [post] task2 [arguments, Collection element] | | CommandInjection.swift:87:24:87:46 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:87:31:87:31 | validatedString | semmle.label | validatedString | | CommandInjection.swift:99:20:99:40 | arguments [Collection element] | semmle.label | arguments [Collection element] | | CommandInjection.swift:100:3:100:3 | [post] self | semmle.label | [post] self | -| CommandInjection.swift:100:3:100:3 | [post] self [arguments, Collection element] | semmle.label | [post] self [arguments, Collection element] | | CommandInjection.swift:100:20:100:20 | arguments [Collection element] | semmle.label | arguments [Collection element] | | CommandInjection.swift:105:8:105:12 | let ...? [some:0] | semmle.label | let ...? [some:0] | | CommandInjection.swift:105:12:105:12 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:105:40:105:94 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | | CommandInjection.swift:105:40:105:94 | call to String.init(contentsOf:) [some:0] | semmle.label | call to String.init(contentsOf:) [some:0] | | CommandInjection.swift:120:2:120:2 | [post] task3 | semmle.label | [post] task3 | -| CommandInjection.swift:120:2:120:2 | [post] task3 [executableURL] | semmle.label | [post] task3 [executableURL] | | CommandInjection.swift:120:24:120:56 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | | CommandInjection.swift:120:24:120:57 | ...! | semmle.label | ...! | | CommandInjection.swift:120:36:120:36 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:121:2:121:2 | [post] task3 | semmle.label | [post] task3 | -| CommandInjection.swift:121:2:121:2 | [post] task3 [arguments, Collection element] | semmle.label | [post] task3 [arguments, Collection element] | | CommandInjection.swift:121:20:121:48 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:121:28:121:28 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:125:2:125:2 | [post] task4 | semmle.label | [post] task4 | -| CommandInjection.swift:125:2:125:2 | [post] task4 [executableURL] | semmle.label | [post] task4 [executableURL] | | CommandInjection.swift:125:24:125:65 | call to URL.init(fileURLWithPath:) | semmle.label | call to URL.init(fileURLWithPath:) | | CommandInjection.swift:125:45:125:45 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:126:2:126:2 | [post] task4 | semmle.label | [post] task4 | -| CommandInjection.swift:126:2:126:2 | [post] task4 [executableURL] | semmle.label | [post] task4 [executableURL] | | CommandInjection.swift:126:24:126:56 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | | CommandInjection.swift:126:24:126:57 | ...! | semmle.label | ...! | | CommandInjection.swift:126:36:126:36 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:127:2:127:2 | [post] task4 | semmle.label | [post] task4 | -| CommandInjection.swift:127:2:127:2 | [post] task4 [arguments, Collection element] | semmle.label | [post] task4 [arguments, Collection element] | | CommandInjection.swift:127:20:127:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:127:28:127:36 | ... .+(_:_:) ... | semmle.label | ... .+(_:_:) ... | | CommandInjection.swift:131:2:131:7 | [post] ...? | semmle.label | [post] ...? | -| CommandInjection.swift:131:2:131:7 | [post] ...? [executableURL] | semmle.label | [post] ...? [executableURL] | | CommandInjection.swift:131:25:131:66 | call to URL.init(fileURLWithPath:) | semmle.label | call to URL.init(fileURLWithPath:) | | CommandInjection.swift:131:46:131:46 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:132:2:132:7 | [post] ...? | semmle.label | [post] ...? | -| CommandInjection.swift:132:2:132:7 | [post] ...? [arguments, Collection element] | semmle.label | [post] ...? [arguments, Collection element] | | CommandInjection.swift:132:21:132:42 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:132:22:132:22 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:136:2:136:2 | [post] task6 | semmle.label | [post] task6 | -| CommandInjection.swift:136:2:136:2 | [post] task6 [executableURL] | semmle.label | [post] task6 [executableURL] | | CommandInjection.swift:136:24:136:65 | call to URL.init(fileURLWithPath:) | semmle.label | call to URL.init(fileURLWithPath:) | | CommandInjection.swift:136:45:136:45 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:137:2:137:2 | [post] task6 | semmle.label | [post] task6 | -| CommandInjection.swift:137:2:137:2 | [post] task6 [executableURL] | semmle.label | [post] task6 [executableURL] | | CommandInjection.swift:137:24:137:56 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | | CommandInjection.swift:137:24:137:57 | ...! | semmle.label | ...! | | CommandInjection.swift:137:36:137:36 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:138:2:138:2 | [post] task6 | semmle.label | [post] task6 | -| CommandInjection.swift:138:2:138:2 | [post] task6 [arguments, Collection element] | semmle.label | [post] task6 [arguments, Collection element] | | CommandInjection.swift:138:20:138:41 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:138:21:138:21 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:139:21:139:42 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:139:22:139:22 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:150:42:150:42 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:151:67:151:95 | [...] | semmle.label | [...] | -| CommandInjection.swift:151:67:151:95 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:151:75:151:75 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:154:23:154:55 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | | CommandInjection.swift:154:23:154:56 | ...! | semmle.label | ...! | | CommandInjection.swift:154:35:154:35 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:155:62:155:90 | [...] | semmle.label | [...] | -| CommandInjection.swift:155:62:155:90 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:155:70:155:70 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:160:41:160:73 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | | CommandInjection.swift:160:41:160:74 | ...! | semmle.label | ...! | @@ -264,7 +224,6 @@ nodes | CommandInjection.swift:163:40:163:73 | ...! | semmle.label | ...! | | CommandInjection.swift:163:52:163:52 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:164:32:164:53 | [...] | semmle.label | [...] | -| CommandInjection.swift:164:32:164:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:164:33:164:33 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:166:45:166:77 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | | CommandInjection.swift:166:45:166:78 | ...! | semmle.label | ...! | @@ -272,13 +231,10 @@ nodes | CommandInjection.swift:166:57:166:57 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:193:3:193:3 | newValue [Collection element] | semmle.label | newValue [Collection element] | | CommandInjection.swift:194:4:194:4 | [post] getter for .p1 | semmle.label | [post] getter for .p1 | -| CommandInjection.swift:194:4:194:4 | [post] getter for .p1 [arguments, Collection element] | semmle.label | [post] getter for .p1 [arguments, Collection element] | | CommandInjection.swift:194:19:194:19 | newValue [Collection element] | semmle.label | newValue [Collection element] | | CommandInjection.swift:195:4:195:6 | [post] ...! | semmle.label | [post] ...! | -| CommandInjection.swift:195:4:195:6 | [post] ...! [arguments, Collection element] | semmle.label | [post] ...! [arguments, Collection element] | | CommandInjection.swift:195:20:195:20 | newValue [Collection element] | semmle.label | newValue [Collection element] | | CommandInjection.swift:196:4:196:4 | [post] ...! | semmle.label | [post] ...! | -| CommandInjection.swift:196:4:196:4 | [post] ...! [arguments, Collection element] | semmle.label | [post] ...! [arguments, Collection element] | | CommandInjection.swift:196:19:196:19 | newValue [Collection element] | semmle.label | newValue [Collection element] | | CommandInjection.swift:201:9:201:13 | let ...? [some:0] | semmle.label | let ...? [some:0] | | CommandInjection.swift:201:13:201:13 | userControlledString | semmle.label | userControlledString | @@ -287,24 +243,18 @@ nodes | CommandInjection.swift:205:18:205:39 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:205:19:205:19 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:207:3:207:3 | [post] getter for .p1 | semmle.label | [post] getter for .p1 | -| CommandInjection.swift:207:3:207:3 | [post] getter for .p1 [arguments, Collection element] | semmle.label | [post] getter for .p1 [arguments, Collection element] | | CommandInjection.swift:207:18:207:18 | tainted1 [Collection element] | semmle.label | tainted1 [Collection element] | | CommandInjection.swift:208:3:208:5 | [post] ...! | semmle.label | [post] ...! | -| CommandInjection.swift:208:3:208:5 | [post] ...! [arguments, Collection element] | semmle.label | [post] ...! [arguments, Collection element] | | CommandInjection.swift:208:19:208:19 | tainted1 [Collection element] | semmle.label | tainted1 [Collection element] | | CommandInjection.swift:209:3:209:3 | [post] ...! | semmle.label | [post] ...! | -| CommandInjection.swift:209:3:209:3 | [post] ...! [arguments, Collection element] | semmle.label | [post] ...! [arguments, Collection element] | | CommandInjection.swift:209:18:209:18 | tainted1 [Collection element] | semmle.label | tainted1 [Collection element] | | CommandInjection.swift:211:30:211:51 | [...] [Collection element] | semmle.label | [...] [Collection element] | | CommandInjection.swift:211:31:211:31 | userControlledString | semmle.label | userControlledString | | CommandInjection.swift:213:3:213:3 | [post] getter for .p1 | semmle.label | [post] getter for .p1 | -| CommandInjection.swift:213:3:213:3 | [post] getter for .p1 [arguments, Collection element] | semmle.label | [post] getter for .p1 [arguments, Collection element] | | CommandInjection.swift:213:18:213:18 | tainted2 [Collection element] | semmle.label | tainted2 [Collection element] | | CommandInjection.swift:214:3:214:5 | [post] ...! | semmle.label | [post] ...! | -| CommandInjection.swift:214:3:214:5 | [post] ...! [arguments, Collection element] | semmle.label | [post] ...! [arguments, Collection element] | | CommandInjection.swift:214:19:214:19 | tainted2 [Collection element] | semmle.label | tainted2 [Collection element] | | CommandInjection.swift:215:3:215:3 | [post] ...! | semmle.label | [post] ...! | -| CommandInjection.swift:215:3:215:3 | [post] ...! [arguments, Collection element] | semmle.label | [post] ...! [arguments, Collection element] | | CommandInjection.swift:215:18:215:18 | tainted2 [Collection element] | semmle.label | tainted2 [Collection element] | | CommandInjection.swift:217:13:217:13 | tainted2 [Collection element] | semmle.label | tainted2 [Collection element] | | file://:0:0:0:0 | url | semmle.label | url | diff --git a/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected b/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected index 83fb7d9c1fe8..204e2486cc2f 100644 --- a/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected +++ b/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected @@ -21,35 +21,23 @@ edges | SQLite.swift:153:20:153:20 | mobilePhoneNumber | SQLite.swift:153:20:153:20 | [...] [Collection element] | provenance | | | SQLite.swift:154:23:154:23 | [...] [Collection element] | SQLite.swift:154:23:154:23 | [...] | provenance | | | SQLite.swift:154:23:154:23 | mobilePhoneNumber | SQLite.swift:154:23:154:23 | [...] [Collection element] | provenance | | -| SQLite.swift:158:32:158:54 | [...] [Collection element] | SQLite.swift:158:32:158:54 | [...] | provenance | | -| SQLite.swift:158:33:158:33 | mobilePhoneNumber | SQLite.swift:158:32:158:54 | [...] [Collection element] | provenance | | -| SQLite.swift:159:28:159:50 | [...] [Collection element] | SQLite.swift:159:28:159:50 | [...] | provenance | | -| SQLite.swift:159:29:159:29 | mobilePhoneNumber | SQLite.swift:159:28:159:50 | [...] [Collection element] | provenance | | -| SQLite.swift:160:31:160:53 | [...] [Collection element] | SQLite.swift:160:31:160:53 | [...] | provenance | | -| SQLite.swift:160:32:160:32 | mobilePhoneNumber | SQLite.swift:160:31:160:53 | [...] [Collection element] | provenance | | -| SQLite.swift:163:21:163:43 | [...] [Collection element] | SQLite.swift:163:21:163:43 | [...] | provenance | | -| SQLite.swift:163:22:163:22 | mobilePhoneNumber | SQLite.swift:163:21:163:43 | [...] [Collection element] | provenance | | -| SQLite.swift:164:20:164:42 | [...] [Collection element] | SQLite.swift:164:20:164:42 | [...] | provenance | | -| SQLite.swift:164:21:164:21 | mobilePhoneNumber | SQLite.swift:164:20:164:42 | [...] [Collection element] | provenance | | -| SQLite.swift:165:23:165:45 | [...] [Collection element] | SQLite.swift:165:23:165:45 | [...] | provenance | | -| SQLite.swift:165:24:165:24 | mobilePhoneNumber | SQLite.swift:165:23:165:45 | [...] [Collection element] | provenance | | -| SQLite.swift:169:32:169:70 | [...] [Collection element, Tuple element at index 1] | SQLite.swift:169:32:169:70 | [...] | provenance | | -| SQLite.swift:169:43:169:53 | (...) [Tuple element at index 1] | SQLite.swift:169:32:169:70 | [...] [Collection element, Tuple element at index 1] | provenance | | +| SQLite.swift:158:33:158:33 | mobilePhoneNumber | SQLite.swift:158:32:158:54 | [...] | provenance | | +| SQLite.swift:159:29:159:29 | mobilePhoneNumber | SQLite.swift:159:28:159:50 | [...] | provenance | | +| SQLite.swift:160:32:160:32 | mobilePhoneNumber | SQLite.swift:160:31:160:53 | [...] | provenance | | +| SQLite.swift:163:22:163:22 | mobilePhoneNumber | SQLite.swift:163:21:163:43 | [...] | provenance | | +| SQLite.swift:164:21:164:21 | mobilePhoneNumber | SQLite.swift:164:20:164:42 | [...] | provenance | | +| SQLite.swift:165:24:165:24 | mobilePhoneNumber | SQLite.swift:165:23:165:45 | [...] | provenance | | +| SQLite.swift:169:43:169:53 | (...) [Tuple element at index 1] | SQLite.swift:169:32:169:70 | [...] | provenance | | | SQLite.swift:169:53:169:53 | mobilePhoneNumber | SQLite.swift:169:43:169:53 | (...) [Tuple element at index 1] | provenance | | -| SQLite.swift:170:28:170:66 | [...] [Collection element, Tuple element at index 1] | SQLite.swift:170:28:170:66 | [...] | provenance | | -| SQLite.swift:170:39:170:49 | (...) [Tuple element at index 1] | SQLite.swift:170:28:170:66 | [...] [Collection element, Tuple element at index 1] | provenance | | +| SQLite.swift:170:39:170:49 | (...) [Tuple element at index 1] | SQLite.swift:170:28:170:66 | [...] | provenance | | | SQLite.swift:170:49:170:49 | mobilePhoneNumber | SQLite.swift:170:39:170:49 | (...) [Tuple element at index 1] | provenance | | -| SQLite.swift:171:31:171:69 | [...] [Collection element, Tuple element at index 1] | SQLite.swift:171:31:171:69 | [...] | provenance | | -| SQLite.swift:171:42:171:52 | (...) [Tuple element at index 1] | SQLite.swift:171:31:171:69 | [...] [Collection element, Tuple element at index 1] | provenance | | +| SQLite.swift:171:42:171:52 | (...) [Tuple element at index 1] | SQLite.swift:171:31:171:69 | [...] | provenance | | | SQLite.swift:171:52:171:52 | mobilePhoneNumber | SQLite.swift:171:42:171:52 | (...) [Tuple element at index 1] | provenance | | -| SQLite.swift:174:21:174:59 | [...] [Collection element, Tuple element at index 1] | SQLite.swift:174:21:174:59 | [...] | provenance | | -| SQLite.swift:174:32:174:42 | (...) [Tuple element at index 1] | SQLite.swift:174:21:174:59 | [...] [Collection element, Tuple element at index 1] | provenance | | +| SQLite.swift:174:32:174:42 | (...) [Tuple element at index 1] | SQLite.swift:174:21:174:59 | [...] | provenance | | | SQLite.swift:174:42:174:42 | mobilePhoneNumber | SQLite.swift:174:32:174:42 | (...) [Tuple element at index 1] | provenance | | -| SQLite.swift:175:20:175:58 | [...] [Collection element, Tuple element at index 1] | SQLite.swift:175:20:175:58 | [...] | provenance | | -| SQLite.swift:175:31:175:41 | (...) [Tuple element at index 1] | SQLite.swift:175:20:175:58 | [...] [Collection element, Tuple element at index 1] | provenance | | +| SQLite.swift:175:31:175:41 | (...) [Tuple element at index 1] | SQLite.swift:175:20:175:58 | [...] | provenance | | | SQLite.swift:175:41:175:41 | mobilePhoneNumber | SQLite.swift:175:31:175:41 | (...) [Tuple element at index 1] | provenance | | -| SQLite.swift:176:23:176:61 | [...] [Collection element, Tuple element at index 1] | SQLite.swift:176:23:176:61 | [...] | provenance | | -| SQLite.swift:176:34:176:44 | (...) [Tuple element at index 1] | SQLite.swift:176:23:176:61 | [...] [Collection element, Tuple element at index 1] | provenance | | +| SQLite.swift:176:34:176:44 | (...) [Tuple element at index 1] | SQLite.swift:176:23:176:61 | [...] | provenance | | | SQLite.swift:176:44:176:44 | mobilePhoneNumber | SQLite.swift:176:34:176:44 | (...) [Tuple element at index 1] | provenance | | | SQLite.swift:186:40:186:54 | ... <-(_:_:) ... | SQLite.swift:186:40:186:54 | [...] [Collection element] | provenance | | | SQLite.swift:186:40:186:54 | [...] [Collection element] | SQLite.swift:186:40:186:54 | [...] | provenance | | @@ -87,264 +75,173 @@ edges | sqlite3_c_api.swift:42:69:42:69 | medicalNotes | sqlite3_c_api.swift:46:27:46:27 | insertQuery | provenance | | | sqlite3_c_api.swift:43:49:43:49 | medicalNotes | sqlite3_c_api.swift:47:27:47:27 | updateQuery | provenance | | | testCoreData2.swift:23:13:23:13 | value | file://:0:0:0:0 | value | provenance | | -| testCoreData2.swift:37:2:37:2 | [post] obj [myValue] | testCoreData2.swift:37:2:37:2 | [post] obj | provenance | | -| testCoreData2.swift:37:16:37:16 | bankAccountNo | testCoreData2.swift:37:2:37:2 | [post] obj [myValue] | provenance | | -| testCoreData2.swift:39:2:39:2 | [post] obj [myBankAccountNumber] | testCoreData2.swift:39:2:39:2 | [post] obj | provenance | | -| testCoreData2.swift:39:28:39:28 | bankAccountNo | testCoreData2.swift:39:2:39:2 | [post] obj [myBankAccountNumber] | provenance | | -| testCoreData2.swift:41:2:41:2 | [post] obj [myBankAccountNumber2] | testCoreData2.swift:41:2:41:2 | [post] obj | provenance | | -| testCoreData2.swift:41:29:41:29 | bankAccountNo | testCoreData2.swift:41:2:41:2 | [post] obj [myBankAccountNumber2] | provenance | | -| testCoreData2.swift:43:2:43:2 | [post] obj [notStoredBankAccountNumber] | testCoreData2.swift:43:2:43:2 | [post] obj | provenance | | +| testCoreData2.swift:37:16:37:16 | bankAccountNo | testCoreData2.swift:37:2:37:2 | [post] obj | provenance | | +| testCoreData2.swift:39:28:39:28 | bankAccountNo | testCoreData2.swift:39:2:39:2 | [post] obj | provenance | | +| testCoreData2.swift:41:29:41:29 | bankAccountNo | testCoreData2.swift:41:2:41:2 | [post] obj | provenance | | | testCoreData2.swift:43:35:43:35 | bankAccountNo | testCoreData2.swift:23:13:23:13 | value | provenance | | -| testCoreData2.swift:43:35:43:35 | bankAccountNo | testCoreData2.swift:43:2:43:2 | [post] obj [notStoredBankAccountNumber] | provenance | | -| testCoreData2.swift:46:2:46:10 | [post] ...? [myValue] | testCoreData2.swift:46:2:46:10 | [post] ...? | provenance | | -| testCoreData2.swift:46:22:46:22 | bankAccountNo | testCoreData2.swift:46:2:46:10 | [post] ...? [myValue] | provenance | | -| testCoreData2.swift:48:2:48:10 | [post] ...? [myBankAccountNumber] | testCoreData2.swift:48:2:48:10 | [post] ...? | provenance | | -| testCoreData2.swift:48:34:48:34 | bankAccountNo | testCoreData2.swift:48:2:48:10 | [post] ...? [myBankAccountNumber] | provenance | | -| testCoreData2.swift:50:2:50:10 | [post] ...? [myBankAccountNumber2] | testCoreData2.swift:50:2:50:10 | [post] ...? | provenance | | -| testCoreData2.swift:50:35:50:35 | bankAccountNo | testCoreData2.swift:50:2:50:10 | [post] ...? [myBankAccountNumber2] | provenance | | -| testCoreData2.swift:52:2:52:10 | [post] ...? [notStoredBankAccountNumber] | testCoreData2.swift:52:2:52:10 | [post] ...? | provenance | | +| testCoreData2.swift:43:35:43:35 | bankAccountNo | testCoreData2.swift:43:2:43:2 | [post] obj | provenance | | +| testCoreData2.swift:46:22:46:22 | bankAccountNo | testCoreData2.swift:46:2:46:10 | [post] ...? | provenance | | +| testCoreData2.swift:48:34:48:34 | bankAccountNo | testCoreData2.swift:48:2:48:10 | [post] ...? | provenance | | +| testCoreData2.swift:50:35:50:35 | bankAccountNo | testCoreData2.swift:50:2:50:10 | [post] ...? | provenance | | | testCoreData2.swift:52:41:52:41 | bankAccountNo | testCoreData2.swift:23:13:23:13 | value | provenance | | -| testCoreData2.swift:52:41:52:41 | bankAccountNo | testCoreData2.swift:52:2:52:10 | [post] ...? [notStoredBankAccountNumber] | provenance | | -| testCoreData2.swift:57:3:57:3 | [post] obj [myBankAccountNumber] | testCoreData2.swift:57:3:57:3 | [post] obj | provenance | | -| testCoreData2.swift:57:29:57:29 | bankAccountNo | testCoreData2.swift:57:3:57:3 | [post] obj [myBankAccountNumber] | provenance | | -| testCoreData2.swift:60:4:60:4 | [post] obj [myBankAccountNumber] | testCoreData2.swift:60:4:60:4 | [post] obj | provenance | | -| testCoreData2.swift:60:30:60:30 | bankAccountNo | testCoreData2.swift:60:4:60:4 | [post] obj [myBankAccountNumber] | provenance | | -| testCoreData2.swift:62:4:62:4 | [post] obj [myBankAccountNumber] | testCoreData2.swift:62:4:62:4 | [post] obj | provenance | | -| testCoreData2.swift:62:30:62:30 | bankAccountNo | testCoreData2.swift:62:4:62:4 | [post] obj [myBankAccountNumber] | provenance | | -| testCoreData2.swift:65:3:65:3 | [post] obj [myBankAccountNumber] | testCoreData2.swift:65:3:65:3 | [post] obj | provenance | | -| testCoreData2.swift:65:29:65:29 | bankAccountNo | testCoreData2.swift:65:3:65:3 | [post] obj [myBankAccountNumber] | provenance | | +| testCoreData2.swift:52:41:52:41 | bankAccountNo | testCoreData2.swift:52:2:52:10 | [post] ...? | provenance | | +| testCoreData2.swift:57:29:57:29 | bankAccountNo | testCoreData2.swift:57:3:57:3 | [post] obj | provenance | | +| testCoreData2.swift:60:30:60:30 | bankAccountNo | testCoreData2.swift:60:4:60:4 | [post] obj | provenance | | +| testCoreData2.swift:62:30:62:30 | bankAccountNo | testCoreData2.swift:62:4:62:4 | [post] obj | provenance | | +| testCoreData2.swift:65:29:65:29 | bankAccountNo | testCoreData2.swift:65:3:65:3 | [post] obj | provenance | | | testCoreData2.swift:70:9:70:9 | self | file://:0:0:0:0 | self | provenance | | | testCoreData2.swift:70:9:70:9 | self [value] | file://:0:0:0:0 | self [value] | provenance | | | testCoreData2.swift:70:9:70:9 | value | file://:0:0:0:0 | value | provenance | | | testCoreData2.swift:71:9:71:9 | self | file://:0:0:0:0 | self | provenance | | -| testCoreData2.swift:79:2:79:2 | [post] dbObj [myValue] | testCoreData2.swift:79:2:79:2 | [post] dbObj | provenance | | -| testCoreData2.swift:79:18:79:28 | .bankAccountNo | testCoreData2.swift:79:2:79:2 | [post] dbObj [myValue] | provenance | | -| testCoreData2.swift:80:2:80:2 | [post] dbObj [myValue] | testCoreData2.swift:80:2:80:2 | [post] dbObj | provenance | | -| testCoreData2.swift:80:18:80:28 | ...! | testCoreData2.swift:80:2:80:2 | [post] dbObj [myValue] | provenance | | +| testCoreData2.swift:79:18:79:28 | .bankAccountNo | testCoreData2.swift:79:2:79:2 | [post] dbObj | provenance | | +| testCoreData2.swift:80:18:80:28 | ...! | testCoreData2.swift:80:2:80:2 | [post] dbObj | provenance | | | testCoreData2.swift:80:18:80:28 | .bankAccountNo2 | testCoreData2.swift:80:18:80:28 | ...! | provenance | | -| testCoreData2.swift:82:2:82:2 | [post] dbObj [myValue] | testCoreData2.swift:82:2:82:2 | [post] dbObj | provenance | | | testCoreData2.swift:82:18:82:18 | bankAccountNo | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:82:18:82:18 | bankAccountNo | testCoreData2.swift:82:18:82:32 | .value | provenance | Config | -| testCoreData2.swift:82:18:82:32 | .value | testCoreData2.swift:82:2:82:2 | [post] dbObj [myValue] | provenance | | -| testCoreData2.swift:83:2:83:2 | [post] dbObj [myValue] | testCoreData2.swift:83:2:83:2 | [post] dbObj | provenance | | +| testCoreData2.swift:82:18:82:32 | .value | testCoreData2.swift:82:2:82:2 | [post] dbObj | provenance | | | testCoreData2.swift:83:18:83:18 | bankAccountNo | testCoreData2.swift:71:9:71:9 | self | provenance | | | testCoreData2.swift:83:18:83:18 | bankAccountNo | testCoreData2.swift:83:18:83:32 | .value2 | provenance | Config | -| testCoreData2.swift:83:18:83:32 | ...! | testCoreData2.swift:83:2:83:2 | [post] dbObj [myValue] | provenance | | +| testCoreData2.swift:83:18:83:32 | ...! | testCoreData2.swift:83:2:83:2 | [post] dbObj | provenance | | | testCoreData2.swift:83:18:83:32 | .value2 | testCoreData2.swift:83:18:83:32 | ...! | provenance | | -| testCoreData2.swift:84:2:84:2 | [post] dbObj [myValue] | testCoreData2.swift:84:2:84:2 | [post] dbObj | provenance | | | testCoreData2.swift:84:18:84:18 | ...! | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:84:18:84:18 | ...! | testCoreData2.swift:84:18:84:33 | .value | provenance | Config | | testCoreData2.swift:84:18:84:18 | bankAccountNo2 | testCoreData2.swift:84:18:84:18 | ...! | provenance | | -| testCoreData2.swift:84:18:84:33 | .value | testCoreData2.swift:84:2:84:2 | [post] dbObj [myValue] | provenance | | -| testCoreData2.swift:85:2:85:2 | [post] dbObj [myValue] | testCoreData2.swift:85:2:85:2 | [post] dbObj | provenance | | +| testCoreData2.swift:84:18:84:33 | .value | testCoreData2.swift:84:2:84:2 | [post] dbObj | provenance | | | testCoreData2.swift:85:18:85:18 | ...! | testCoreData2.swift:71:9:71:9 | self | provenance | | | testCoreData2.swift:85:18:85:18 | ...! | testCoreData2.swift:85:18:85:33 | .value2 | provenance | Config | | testCoreData2.swift:85:18:85:18 | bankAccountNo2 | testCoreData2.swift:85:18:85:18 | ...! | provenance | | -| testCoreData2.swift:85:18:85:33 | ...! | testCoreData2.swift:85:2:85:2 | [post] dbObj [myValue] | provenance | | +| testCoreData2.swift:85:18:85:33 | ...! | testCoreData2.swift:85:2:85:2 | [post] dbObj | provenance | | | testCoreData2.swift:85:18:85:33 | .value2 | testCoreData2.swift:85:18:85:33 | ...! | provenance | | -| testCoreData2.swift:87:2:87:10 | [post] ...? [myValue] | testCoreData2.swift:87:2:87:10 | [post] ...? | provenance | | -| testCoreData2.swift:87:22:87:32 | .bankAccountNo | testCoreData2.swift:87:2:87:10 | [post] ...? [myValue] | provenance | | -| testCoreData2.swift:88:2:88:10 | [post] ...? [myValue] | testCoreData2.swift:88:2:88:10 | [post] ...? | provenance | | +| testCoreData2.swift:87:22:87:32 | .bankAccountNo | testCoreData2.swift:87:2:87:10 | [post] ...? | provenance | | | testCoreData2.swift:88:22:88:22 | bankAccountNo | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:88:22:88:22 | bankAccountNo | testCoreData2.swift:88:22:88:36 | .value | provenance | Config | -| testCoreData2.swift:88:22:88:36 | .value | testCoreData2.swift:88:2:88:10 | [post] ...? [myValue] | provenance | | -| testCoreData2.swift:89:2:89:10 | [post] ...? [myValue] | testCoreData2.swift:89:2:89:10 | [post] ...? | provenance | | +| testCoreData2.swift:88:22:88:36 | .value | testCoreData2.swift:88:2:88:10 | [post] ...? | provenance | | | testCoreData2.swift:89:22:89:22 | ...! | testCoreData2.swift:71:9:71:9 | self | provenance | | | testCoreData2.swift:89:22:89:22 | ...! | testCoreData2.swift:89:22:89:37 | .value2 | provenance | Config | | testCoreData2.swift:89:22:89:22 | bankAccountNo2 | testCoreData2.swift:89:22:89:22 | ...! | provenance | | -| testCoreData2.swift:89:22:89:37 | ...! | testCoreData2.swift:89:2:89:10 | [post] ...? [myValue] | provenance | | +| testCoreData2.swift:89:22:89:37 | ...! | testCoreData2.swift:89:2:89:10 | [post] ...? | provenance | | | testCoreData2.swift:89:22:89:37 | .value2 | testCoreData2.swift:89:22:89:37 | ...! | provenance | | | testCoreData2.swift:91:10:91:10 | bankAccountNo | testCoreData2.swift:92:10:92:10 | a | provenance | | | testCoreData2.swift:92:10:92:10 | a | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:92:10:92:10 | a | testCoreData2.swift:92:10:92:12 | .value | provenance | Config | | testCoreData2.swift:92:10:92:12 | .value | testCoreData2.swift:93:18:93:18 | b | provenance | | -| testCoreData2.swift:93:2:93:2 | [post] dbObj [myValue] | testCoreData2.swift:93:2:93:2 | [post] dbObj | provenance | | -| testCoreData2.swift:93:18:93:18 | b | testCoreData2.swift:93:2:93:2 | [post] dbObj [myValue] | provenance | | +| testCoreData2.swift:93:18:93:18 | b | testCoreData2.swift:93:2:93:2 | [post] dbObj | provenance | | | testCoreData2.swift:95:10:95:10 | bankAccountNo | testCoreData2.swift:97:12:97:12 | c | provenance | | | testCoreData2.swift:97:2:97:2 | [post] d [value] | testCoreData2.swift:98:18:98:18 | d [value] | provenance | | | testCoreData2.swift:97:12:97:12 | c | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:97:12:97:12 | c | testCoreData2.swift:97:12:97:14 | .value | provenance | Config | | testCoreData2.swift:97:12:97:14 | .value | testCoreData2.swift:70:9:70:9 | value | provenance | | | testCoreData2.swift:97:12:97:14 | .value | testCoreData2.swift:97:2:97:2 | [post] d [value] | provenance | | -| testCoreData2.swift:98:2:98:2 | [post] dbObj [myValue] | testCoreData2.swift:98:2:98:2 | [post] dbObj | provenance | | | testCoreData2.swift:98:18:98:18 | d [value] | testCoreData2.swift:70:9:70:9 | self [value] | provenance | | | testCoreData2.swift:98:18:98:18 | d [value] | testCoreData2.swift:98:18:98:20 | .value | provenance | | -| testCoreData2.swift:98:18:98:20 | .value | testCoreData2.swift:98:2:98:2 | [post] dbObj [myValue] | provenance | | +| testCoreData2.swift:98:18:98:20 | .value | testCoreData2.swift:98:2:98:2 | [post] dbObj | provenance | | | testCoreData2.swift:101:10:101:10 | bankAccountNo | testCoreData2.swift:103:13:103:13 | e | provenance | | | testCoreData2.swift:103:13:103:13 | e | testCoreData2.swift:104:18:104:18 | e | provenance | | -| testCoreData2.swift:104:2:104:2 | [post] dbObj [myValue] | testCoreData2.swift:104:2:104:2 | [post] dbObj | provenance | | | testCoreData2.swift:104:18:104:18 | e | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:104:18:104:18 | e | testCoreData2.swift:104:18:104:20 | .value | provenance | Config | | testCoreData2.swift:104:18:104:18 | e | testCoreData2.swift:105:18:105:18 | e | provenance | | -| testCoreData2.swift:104:18:104:20 | .value | testCoreData2.swift:104:2:104:2 | [post] dbObj [myValue] | provenance | | -| testCoreData2.swift:105:2:105:2 | [post] dbObj [myValue] | testCoreData2.swift:105:2:105:2 | [post] dbObj | provenance | | +| testCoreData2.swift:104:18:104:20 | .value | testCoreData2.swift:104:2:104:2 | [post] dbObj | provenance | | | testCoreData2.swift:105:18:105:18 | e | testCoreData2.swift:71:9:71:9 | self | provenance | | | testCoreData2.swift:105:18:105:18 | e | testCoreData2.swift:105:18:105:20 | .value2 | provenance | Config | -| testCoreData2.swift:105:18:105:20 | ...! | testCoreData2.swift:105:2:105:2 | [post] dbObj [myValue] | provenance | | +| testCoreData2.swift:105:18:105:20 | ...! | testCoreData2.swift:105:2:105:2 | [post] dbObj | provenance | | | testCoreData2.swift:105:18:105:20 | .value2 | testCoreData2.swift:105:18:105:20 | ...! | provenance | | | testCoreData.swift:18:19:18:26 | value | testCoreData.swift:19:12:19:12 | value | provenance | | | testCoreData.swift:31:3:31:3 | newValue | testCoreData.swift:32:13:32:13 | newValue | provenance | | | testCoreData.swift:61:25:61:25 | password | testCoreData.swift:18:19:18:26 | value | provenance | | -| testCoreData.swift:64:2:64:2 | [post] obj [myValue] | testCoreData.swift:64:2:64:2 | [post] obj | provenance | | | testCoreData.swift:64:16:64:16 | password | testCoreData.swift:31:3:31:3 | newValue | provenance | | -| testCoreData.swift:64:16:64:16 | password | testCoreData.swift:64:2:64:2 | [post] obj [myValue] | provenance | | +| testCoreData.swift:64:16:64:16 | password | testCoreData.swift:64:2:64:2 | [post] obj | provenance | | | testCoreData.swift:77:24:77:24 | x | testCoreData.swift:78:15:78:15 | x | provenance | | | testCoreData.swift:80:10:80:22 | call to getPassword() | testCoreData.swift:81:15:81:15 | y | provenance | | | testCoreData.swift:91:10:91:10 | passwd | testCoreData.swift:95:15:95:15 | x | provenance | | | testCoreData.swift:92:10:92:10 | passwd | testCoreData.swift:96:15:96:15 | y | provenance | | | testCoreData.swift:93:10:93:10 | passwd | testCoreData.swift:97:15:97:15 | z | provenance | | -| testGRDB.swift:73:56:73:65 | [...] [Collection element] | testGRDB.swift:73:56:73:65 | [...] | provenance | | -| testGRDB.swift:73:57:73:57 | password | testGRDB.swift:73:56:73:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:76:42:76:51 | [...] [Collection element] | testGRDB.swift:76:42:76:51 | [...] | provenance | | -| testGRDB.swift:76:43:76:43 | password | testGRDB.swift:76:42:76:51 | [...] [Collection element] | provenance | | -| testGRDB.swift:81:44:81:53 | [...] [Collection element] | testGRDB.swift:81:44:81:53 | [...] | provenance | | -| testGRDB.swift:81:45:81:45 | password | testGRDB.swift:81:44:81:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:83:44:83:53 | [...] [Collection element] | testGRDB.swift:83:44:83:53 | [...] | provenance | | -| testGRDB.swift:83:45:83:45 | password | testGRDB.swift:83:44:83:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:85:44:85:53 | [...] [Collection element] | testGRDB.swift:85:44:85:53 | [...] | provenance | | -| testGRDB.swift:85:45:85:45 | password | testGRDB.swift:85:44:85:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:87:44:87:53 | [...] [Collection element] | testGRDB.swift:87:44:87:53 | [...] | provenance | | -| testGRDB.swift:87:45:87:45 | password | testGRDB.swift:87:44:87:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:92:37:92:46 | [...] [Collection element] | testGRDB.swift:92:37:92:46 | [...] | provenance | | -| testGRDB.swift:92:38:92:38 | password | testGRDB.swift:92:37:92:46 | [...] [Collection element] | provenance | | -| testGRDB.swift:95:36:95:45 | [...] [Collection element] | testGRDB.swift:95:36:95:45 | [...] | provenance | | -| testGRDB.swift:95:37:95:37 | password | testGRDB.swift:95:36:95:45 | [...] [Collection element] | provenance | | -| testGRDB.swift:100:72:100:81 | [...] [Collection element] | testGRDB.swift:100:72:100:81 | [...] | provenance | | -| testGRDB.swift:100:73:100:73 | password | testGRDB.swift:100:72:100:81 | [...] [Collection element] | provenance | | -| testGRDB.swift:101:72:101:81 | [...] [Collection element] | testGRDB.swift:101:72:101:81 | [...] | provenance | | -| testGRDB.swift:101:73:101:73 | password | testGRDB.swift:101:72:101:81 | [...] [Collection element] | provenance | | -| testGRDB.swift:107:52:107:61 | [...] [Collection element] | testGRDB.swift:107:52:107:61 | [...] | provenance | | -| testGRDB.swift:107:53:107:53 | password | testGRDB.swift:107:52:107:61 | [...] [Collection element] | provenance | | -| testGRDB.swift:109:52:109:61 | [...] [Collection element] | testGRDB.swift:109:52:109:61 | [...] | provenance | | -| testGRDB.swift:109:53:109:53 | password | testGRDB.swift:109:52:109:61 | [...] [Collection element] | provenance | | -| testGRDB.swift:111:51:111:60 | [...] [Collection element] | testGRDB.swift:111:51:111:60 | [...] | provenance | | -| testGRDB.swift:111:52:111:52 | password | testGRDB.swift:111:51:111:60 | [...] [Collection element] | provenance | | -| testGRDB.swift:116:47:116:56 | [...] [Collection element] | testGRDB.swift:116:47:116:56 | [...] | provenance | | -| testGRDB.swift:116:48:116:48 | password | testGRDB.swift:116:47:116:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:118:47:118:56 | [...] [Collection element] | testGRDB.swift:118:47:118:56 | [...] | provenance | | -| testGRDB.swift:118:48:118:48 | password | testGRDB.swift:118:47:118:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:121:44:121:53 | [...] [Collection element] | testGRDB.swift:121:44:121:53 | [...] | provenance | | -| testGRDB.swift:121:45:121:45 | password | testGRDB.swift:121:44:121:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:123:44:123:53 | [...] [Collection element] | testGRDB.swift:123:44:123:53 | [...] | provenance | | -| testGRDB.swift:123:45:123:45 | password | testGRDB.swift:123:44:123:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:126:44:126:53 | [...] [Collection element] | testGRDB.swift:126:44:126:53 | [...] | provenance | | -| testGRDB.swift:126:45:126:45 | password | testGRDB.swift:126:44:126:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:128:44:128:53 | [...] [Collection element] | testGRDB.swift:128:44:128:53 | [...] | provenance | | -| testGRDB.swift:128:45:128:45 | password | testGRDB.swift:128:44:128:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:131:44:131:53 | [...] [Collection element] | testGRDB.swift:131:44:131:53 | [...] | provenance | | -| testGRDB.swift:131:45:131:45 | password | testGRDB.swift:131:44:131:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:133:44:133:53 | [...] [Collection element] | testGRDB.swift:133:44:133:53 | [...] | provenance | | -| testGRDB.swift:133:45:133:45 | password | testGRDB.swift:133:44:133:53 | [...] [Collection element] | provenance | | -| testGRDB.swift:138:68:138:77 | [...] [Collection element] | testGRDB.swift:138:68:138:77 | [...] | provenance | | -| testGRDB.swift:138:69:138:69 | password | testGRDB.swift:138:68:138:77 | [...] [Collection element] | provenance | | -| testGRDB.swift:140:68:140:77 | [...] [Collection element] | testGRDB.swift:140:68:140:77 | [...] | provenance | | -| testGRDB.swift:140:69:140:69 | password | testGRDB.swift:140:68:140:77 | [...] [Collection element] | provenance | | -| testGRDB.swift:143:65:143:74 | [...] [Collection element] | testGRDB.swift:143:65:143:74 | [...] | provenance | | -| testGRDB.swift:143:66:143:66 | password | testGRDB.swift:143:65:143:74 | [...] [Collection element] | provenance | | -| testGRDB.swift:145:65:145:74 | [...] [Collection element] | testGRDB.swift:145:65:145:74 | [...] | provenance | | -| testGRDB.swift:145:66:145:66 | password | testGRDB.swift:145:65:145:74 | [...] [Collection element] | provenance | | -| testGRDB.swift:148:65:148:74 | [...] [Collection element] | testGRDB.swift:148:65:148:74 | [...] | provenance | | -| testGRDB.swift:148:66:148:66 | password | testGRDB.swift:148:65:148:74 | [...] [Collection element] | provenance | | -| testGRDB.swift:150:65:150:74 | [...] [Collection element] | testGRDB.swift:150:65:150:74 | [...] | provenance | | -| testGRDB.swift:150:66:150:66 | password | testGRDB.swift:150:65:150:74 | [...] [Collection element] | provenance | | -| testGRDB.swift:153:65:153:74 | [...] [Collection element] | testGRDB.swift:153:65:153:74 | [...] | provenance | | -| testGRDB.swift:153:66:153:66 | password | testGRDB.swift:153:65:153:74 | [...] [Collection element] | provenance | | -| testGRDB.swift:155:65:155:74 | [...] [Collection element] | testGRDB.swift:155:65:155:74 | [...] | provenance | | -| testGRDB.swift:155:66:155:66 | password | testGRDB.swift:155:65:155:74 | [...] [Collection element] | provenance | | -| testGRDB.swift:160:59:160:68 | [...] [Collection element] | testGRDB.swift:160:59:160:68 | [...] | provenance | | -| testGRDB.swift:160:60:160:60 | password | testGRDB.swift:160:59:160:68 | [...] [Collection element] | provenance | | -| testGRDB.swift:161:50:161:59 | [...] [Collection element] | testGRDB.swift:161:50:161:59 | [...] | provenance | | -| testGRDB.swift:161:51:161:51 | password | testGRDB.swift:161:50:161:59 | [...] [Collection element] | provenance | | -| testGRDB.swift:164:59:164:68 | [...] [Collection element] | testGRDB.swift:164:59:164:68 | [...] | provenance | | -| testGRDB.swift:164:60:164:60 | password | testGRDB.swift:164:59:164:68 | [...] [Collection element] | provenance | | -| testGRDB.swift:165:50:165:59 | [...] [Collection element] | testGRDB.swift:165:50:165:59 | [...] | provenance | | -| testGRDB.swift:165:51:165:51 | password | testGRDB.swift:165:50:165:59 | [...] [Collection element] | provenance | | -| testGRDB.swift:169:56:169:65 | [...] [Collection element] | testGRDB.swift:169:56:169:65 | [...] | provenance | | -| testGRDB.swift:169:57:169:57 | password | testGRDB.swift:169:56:169:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:170:47:170:56 | [...] [Collection element] | testGRDB.swift:170:47:170:56 | [...] | provenance | | -| testGRDB.swift:170:48:170:48 | password | testGRDB.swift:170:47:170:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:173:56:173:65 | [...] [Collection element] | testGRDB.swift:173:56:173:65 | [...] | provenance | | -| testGRDB.swift:173:57:173:57 | password | testGRDB.swift:173:56:173:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:174:47:174:56 | [...] [Collection element] | testGRDB.swift:174:47:174:56 | [...] | provenance | | -| testGRDB.swift:174:48:174:48 | password | testGRDB.swift:174:47:174:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:178:56:178:65 | [...] [Collection element] | testGRDB.swift:178:56:178:65 | [...] | provenance | | -| testGRDB.swift:178:57:178:57 | password | testGRDB.swift:178:56:178:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:179:47:179:56 | [...] [Collection element] | testGRDB.swift:179:47:179:56 | [...] | provenance | | -| testGRDB.swift:179:48:179:48 | password | testGRDB.swift:179:47:179:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:182:56:182:65 | [...] [Collection element] | testGRDB.swift:182:56:182:65 | [...] | provenance | | -| testGRDB.swift:182:57:182:57 | password | testGRDB.swift:182:56:182:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:183:47:183:56 | [...] [Collection element] | testGRDB.swift:183:47:183:56 | [...] | provenance | | -| testGRDB.swift:183:48:183:48 | password | testGRDB.swift:183:47:183:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:187:56:187:65 | [...] [Collection element] | testGRDB.swift:187:56:187:65 | [...] | provenance | | -| testGRDB.swift:187:57:187:57 | password | testGRDB.swift:187:56:187:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:188:47:188:56 | [...] [Collection element] | testGRDB.swift:188:47:188:56 | [...] | provenance | | -| testGRDB.swift:188:48:188:48 | password | testGRDB.swift:188:47:188:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:191:56:191:65 | [...] [Collection element] | testGRDB.swift:191:56:191:65 | [...] | provenance | | -| testGRDB.swift:191:57:191:57 | password | testGRDB.swift:191:56:191:65 | [...] [Collection element] | provenance | | -| testGRDB.swift:192:47:192:56 | [...] [Collection element] | testGRDB.swift:192:47:192:56 | [...] | provenance | | -| testGRDB.swift:192:48:192:48 | password | testGRDB.swift:192:47:192:56 | [...] [Collection element] | provenance | | -| testGRDB.swift:198:29:198:38 | [...] [Collection element] | testGRDB.swift:198:29:198:38 | [...] | provenance | | -| testGRDB.swift:198:30:198:30 | password | testGRDB.swift:198:29:198:38 | [...] [Collection element] | provenance | | -| testGRDB.swift:201:23:201:32 | [...] [Collection element] | testGRDB.swift:201:23:201:32 | [...] | provenance | | -| testGRDB.swift:201:24:201:24 | password | testGRDB.swift:201:23:201:32 | [...] [Collection element] | provenance | | -| testGRDB.swift:206:66:206:75 | [...] [Collection element] | testGRDB.swift:206:66:206:75 | [...] | provenance | | -| testGRDB.swift:206:67:206:67 | password | testGRDB.swift:206:66:206:75 | [...] [Collection element] | provenance | | -| testGRDB.swift:208:80:208:89 | [...] [Collection element] | testGRDB.swift:208:80:208:89 | [...] | provenance | | -| testGRDB.swift:208:81:208:81 | password | testGRDB.swift:208:80:208:89 | [...] [Collection element] | provenance | | -| testGRDB.swift:210:84:210:93 | [...] [Collection element] | testGRDB.swift:210:84:210:93 | [...] | provenance | | -| testGRDB.swift:210:85:210:85 | password | testGRDB.swift:210:84:210:93 | [...] [Collection element] | provenance | | -| testGRDB.swift:212:98:212:107 | [...] [Collection element] | testGRDB.swift:212:98:212:107 | [...] | provenance | | -| testGRDB.swift:212:99:212:99 | password | testGRDB.swift:212:98:212:107 | [...] [Collection element] | provenance | | +| testGRDB.swift:73:57:73:57 | password | testGRDB.swift:73:56:73:65 | [...] | provenance | | +| testGRDB.swift:76:43:76:43 | password | testGRDB.swift:76:42:76:51 | [...] | provenance | | +| testGRDB.swift:81:45:81:45 | password | testGRDB.swift:81:44:81:53 | [...] | provenance | | +| testGRDB.swift:83:45:83:45 | password | testGRDB.swift:83:44:83:53 | [...] | provenance | | +| testGRDB.swift:85:45:85:45 | password | testGRDB.swift:85:44:85:53 | [...] | provenance | | +| testGRDB.swift:87:45:87:45 | password | testGRDB.swift:87:44:87:53 | [...] | provenance | | +| testGRDB.swift:92:38:92:38 | password | testGRDB.swift:92:37:92:46 | [...] | provenance | | +| testGRDB.swift:95:37:95:37 | password | testGRDB.swift:95:36:95:45 | [...] | provenance | | +| testGRDB.swift:100:73:100:73 | password | testGRDB.swift:100:72:100:81 | [...] | provenance | | +| testGRDB.swift:101:73:101:73 | password | testGRDB.swift:101:72:101:81 | [...] | provenance | | +| testGRDB.swift:107:53:107:53 | password | testGRDB.swift:107:52:107:61 | [...] | provenance | | +| testGRDB.swift:109:53:109:53 | password | testGRDB.swift:109:52:109:61 | [...] | provenance | | +| testGRDB.swift:111:52:111:52 | password | testGRDB.swift:111:51:111:60 | [...] | provenance | | +| testGRDB.swift:116:48:116:48 | password | testGRDB.swift:116:47:116:56 | [...] | provenance | | +| testGRDB.swift:118:48:118:48 | password | testGRDB.swift:118:47:118:56 | [...] | provenance | | +| testGRDB.swift:121:45:121:45 | password | testGRDB.swift:121:44:121:53 | [...] | provenance | | +| testGRDB.swift:123:45:123:45 | password | testGRDB.swift:123:44:123:53 | [...] | provenance | | +| testGRDB.swift:126:45:126:45 | password | testGRDB.swift:126:44:126:53 | [...] | provenance | | +| testGRDB.swift:128:45:128:45 | password | testGRDB.swift:128:44:128:53 | [...] | provenance | | +| testGRDB.swift:131:45:131:45 | password | testGRDB.swift:131:44:131:53 | [...] | provenance | | +| testGRDB.swift:133:45:133:45 | password | testGRDB.swift:133:44:133:53 | [...] | provenance | | +| testGRDB.swift:138:69:138:69 | password | testGRDB.swift:138:68:138:77 | [...] | provenance | | +| testGRDB.swift:140:69:140:69 | password | testGRDB.swift:140:68:140:77 | [...] | provenance | | +| testGRDB.swift:143:66:143:66 | password | testGRDB.swift:143:65:143:74 | [...] | provenance | | +| testGRDB.swift:145:66:145:66 | password | testGRDB.swift:145:65:145:74 | [...] | provenance | | +| testGRDB.swift:148:66:148:66 | password | testGRDB.swift:148:65:148:74 | [...] | provenance | | +| testGRDB.swift:150:66:150:66 | password | testGRDB.swift:150:65:150:74 | [...] | provenance | | +| testGRDB.swift:153:66:153:66 | password | testGRDB.swift:153:65:153:74 | [...] | provenance | | +| testGRDB.swift:155:66:155:66 | password | testGRDB.swift:155:65:155:74 | [...] | provenance | | +| testGRDB.swift:160:60:160:60 | password | testGRDB.swift:160:59:160:68 | [...] | provenance | | +| testGRDB.swift:161:51:161:51 | password | testGRDB.swift:161:50:161:59 | [...] | provenance | | +| testGRDB.swift:164:60:164:60 | password | testGRDB.swift:164:59:164:68 | [...] | provenance | | +| testGRDB.swift:165:51:165:51 | password | testGRDB.swift:165:50:165:59 | [...] | provenance | | +| testGRDB.swift:169:57:169:57 | password | testGRDB.swift:169:56:169:65 | [...] | provenance | | +| testGRDB.swift:170:48:170:48 | password | testGRDB.swift:170:47:170:56 | [...] | provenance | | +| testGRDB.swift:173:57:173:57 | password | testGRDB.swift:173:56:173:65 | [...] | provenance | | +| testGRDB.swift:174:48:174:48 | password | testGRDB.swift:174:47:174:56 | [...] | provenance | | +| testGRDB.swift:178:57:178:57 | password | testGRDB.swift:178:56:178:65 | [...] | provenance | | +| testGRDB.swift:179:48:179:48 | password | testGRDB.swift:179:47:179:56 | [...] | provenance | | +| testGRDB.swift:182:57:182:57 | password | testGRDB.swift:182:56:182:65 | [...] | provenance | | +| testGRDB.swift:183:48:183:48 | password | testGRDB.swift:183:47:183:56 | [...] | provenance | | +| testGRDB.swift:187:57:187:57 | password | testGRDB.swift:187:56:187:65 | [...] | provenance | | +| testGRDB.swift:188:48:188:48 | password | testGRDB.swift:188:47:188:56 | [...] | provenance | | +| testGRDB.swift:191:57:191:57 | password | testGRDB.swift:191:56:191:65 | [...] | provenance | | +| testGRDB.swift:192:48:192:48 | password | testGRDB.swift:192:47:192:56 | [...] | provenance | | +| testGRDB.swift:198:30:198:30 | password | testGRDB.swift:198:29:198:38 | [...] | provenance | | +| testGRDB.swift:201:24:201:24 | password | testGRDB.swift:201:23:201:32 | [...] | provenance | | +| testGRDB.swift:206:67:206:67 | password | testGRDB.swift:206:66:206:75 | [...] | provenance | | +| testGRDB.swift:208:81:208:81 | password | testGRDB.swift:208:80:208:89 | [...] | provenance | | +| testGRDB.swift:210:85:210:85 | password | testGRDB.swift:210:84:210:93 | [...] | provenance | | +| testGRDB.swift:212:99:212:99 | password | testGRDB.swift:212:98:212:107 | [...] | provenance | | | testRealm2.swift:13:6:13:6 | value | file://:0:0:0:0 | value | provenance | | | testRealm2.swift:13:6:13:6 | value [Collection element] | file://:0:0:0:0 | value [Collection element] | provenance | | -| testRealm2.swift:18:2:18:2 | [post] o [data] | testRealm2.swift:18:2:18:2 | [post] o | provenance | | | testRealm2.swift:18:11:18:11 | myPassword | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:18:11:18:11 | myPassword | testRealm2.swift:18:2:18:2 | [post] o [data] | provenance | | -| testRealm2.swift:24:2:24:2 | [post] o [data] | testRealm2.swift:24:2:24:2 | [post] o | provenance | | +| testRealm2.swift:18:11:18:11 | myPassword | testRealm2.swift:18:2:18:2 | [post] o | provenance | | | testRealm2.swift:24:11:24:11 | socialSecurityNumber | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:24:11:24:11 | socialSecurityNumber | testRealm2.swift:24:2:24:2 | [post] o [data] | provenance | | -| testRealm2.swift:25:2:25:2 | [post] o [data] | testRealm2.swift:25:2:25:2 | [post] o | provenance | | +| testRealm2.swift:24:11:24:11 | socialSecurityNumber | testRealm2.swift:24:2:24:2 | [post] o | provenance | | | testRealm2.swift:25:11:25:11 | ssn | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:25:11:25:11 | ssn | testRealm2.swift:25:2:25:2 | [post] o [data] | provenance | | -| testRealm2.swift:26:2:26:2 | [post] o [data, Collection element] | testRealm2.swift:26:2:26:2 | [post] o | provenance | | -| testRealm2.swift:26:2:26:2 | [post] o [data] | testRealm2.swift:26:2:26:2 | [post] o | provenance | | +| testRealm2.swift:25:11:25:11 | ssn | testRealm2.swift:25:2:25:2 | [post] o | provenance | | | testRealm2.swift:26:11:26:25 | call to String.init(_:) | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:26:11:26:25 | call to String.init(_:) | testRealm2.swift:26:2:26:2 | [post] o [data] | provenance | | +| testRealm2.swift:26:11:26:25 | call to String.init(_:) | testRealm2.swift:26:2:26:2 | [post] o | provenance | | | testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | testRealm2.swift:13:6:13:6 | value [Collection element] | provenance | | -| testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | testRealm2.swift:26:2:26:2 | [post] o [data, Collection element] | provenance | | +| testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | testRealm2.swift:26:2:26:2 | [post] o | provenance | | | testRealm2.swift:26:18:26:18 | ssn_int | testRealm2.swift:26:11:26:25 | call to String.init(_:) | provenance | | | testRealm2.swift:26:18:26:18 | ssn_int | testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | provenance | | -| testRealm2.swift:32:2:32:2 | [post] o [data] | testRealm2.swift:32:2:32:2 | [post] o | provenance | | | testRealm2.swift:32:11:32:11 | creditCardNumber | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:32:11:32:11 | creditCardNumber | testRealm2.swift:32:2:32:2 | [post] o [data] | provenance | | -| testRealm2.swift:33:2:33:2 | [post] o [data] | testRealm2.swift:33:2:33:2 | [post] o | provenance | | +| testRealm2.swift:32:11:32:11 | creditCardNumber | testRealm2.swift:32:2:32:2 | [post] o | provenance | | | testRealm2.swift:33:11:33:11 | CCN | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:33:11:33:11 | CCN | testRealm2.swift:33:2:33:2 | [post] o [data] | provenance | | -| testRealm2.swift:34:2:34:2 | [post] o [data, Collection element] | testRealm2.swift:34:2:34:2 | [post] o | provenance | | -| testRealm2.swift:34:2:34:2 | [post] o [data] | testRealm2.swift:34:2:34:2 | [post] o | provenance | | +| testRealm2.swift:33:11:33:11 | CCN | testRealm2.swift:33:2:33:2 | [post] o | provenance | | | testRealm2.swift:34:11:34:25 | call to String.init(_:) | testRealm2.swift:13:6:13:6 | value | provenance | | -| testRealm2.swift:34:11:34:25 | call to String.init(_:) | testRealm2.swift:34:2:34:2 | [post] o [data] | provenance | | +| testRealm2.swift:34:11:34:25 | call to String.init(_:) | testRealm2.swift:34:2:34:2 | [post] o | provenance | | | testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | testRealm2.swift:13:6:13:6 | value [Collection element] | provenance | | -| testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | testRealm2.swift:34:2:34:2 | [post] o [data, Collection element] | provenance | | +| testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | testRealm2.swift:34:2:34:2 | [post] o | provenance | | | testRealm2.swift:34:18:34:18 | int_ccn | testRealm2.swift:34:11:34:25 | call to String.init(_:) | provenance | | | testRealm2.swift:34:18:34:18 | int_ccn | testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | provenance | | | testRealm.swift:27:6:27:6 | value | file://:0:0:0:0 | value | provenance | | | testRealm.swift:34:6:34:6 | value | file://:0:0:0:0 | value | provenance | | -| testRealm.swift:41:2:41:2 | [post] a [data] | testRealm.swift:41:2:41:2 | [post] a | provenance | | | testRealm.swift:41:11:41:11 | myPassword | testRealm.swift:27:6:27:6 | value | provenance | | -| testRealm.swift:41:11:41:11 | myPassword | testRealm.swift:41:2:41:2 | [post] a [data] | provenance | | -| testRealm.swift:49:2:49:2 | [post] c [data] | testRealm.swift:49:2:49:2 | [post] c | provenance | | +| testRealm.swift:41:11:41:11 | myPassword | testRealm.swift:41:2:41:2 | [post] a | provenance | | | testRealm.swift:49:11:49:11 | myPassword | testRealm.swift:27:6:27:6 | value | provenance | | -| testRealm.swift:49:11:49:11 | myPassword | testRealm.swift:49:2:49:2 | [post] c [data] | provenance | | -| testRealm.swift:59:2:59:3 | [post] ...! [data] | testRealm.swift:59:2:59:3 | [post] ...! | provenance | | +| testRealm.swift:49:11:49:11 | myPassword | testRealm.swift:49:2:49:2 | [post] c | provenance | | | testRealm.swift:59:12:59:12 | myPassword | testRealm.swift:27:6:27:6 | value | provenance | | -| testRealm.swift:59:12:59:12 | myPassword | testRealm.swift:59:2:59:3 | [post] ...! [data] | provenance | | -| testRealm.swift:66:2:66:2 | [post] g [data] | testRealm.swift:66:2:66:2 | [post] g | provenance | | +| testRealm.swift:59:12:59:12 | myPassword | testRealm.swift:59:2:59:3 | [post] ...! | provenance | | | testRealm.swift:66:11:66:11 | myPassword | testRealm.swift:27:6:27:6 | value | provenance | | -| testRealm.swift:66:11:66:11 | myPassword | testRealm.swift:66:2:66:2 | [post] g [data] | provenance | | -| testRealm.swift:73:2:73:2 | [post] h [password] | testRealm.swift:73:2:73:2 | [post] h | provenance | | +| testRealm.swift:66:11:66:11 | myPassword | testRealm.swift:66:2:66:2 | [post] g | provenance | | | testRealm.swift:73:15:73:15 | myPassword | testRealm.swift:34:6:34:6 | value | provenance | | -| testRealm.swift:73:15:73:15 | myPassword | testRealm.swift:73:2:73:2 | [post] h [password] | provenance | | +| testRealm.swift:73:15:73:15 | myPassword | testRealm.swift:73:2:73:2 | [post] h | provenance | | nodes | SQLite.swift:119:70:119:70 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:120:50:120:50 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | @@ -377,45 +274,33 @@ nodes | SQLite.swift:154:23:154:23 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:154:23:154:23 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:158:32:158:54 | [...] | semmle.label | [...] | -| SQLite.swift:158:32:158:54 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:158:33:158:33 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:159:28:159:50 | [...] | semmle.label | [...] | -| SQLite.swift:159:28:159:50 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:159:29:159:29 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:160:31:160:53 | [...] | semmle.label | [...] | -| SQLite.swift:160:31:160:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:160:32:160:32 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:163:21:163:43 | [...] | semmle.label | [...] | -| SQLite.swift:163:21:163:43 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:163:22:163:22 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:164:20:164:42 | [...] | semmle.label | [...] | -| SQLite.swift:164:20:164:42 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:164:21:164:21 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:165:23:165:45 | [...] | semmle.label | [...] | -| SQLite.swift:165:23:165:45 | [...] [Collection element] | semmle.label | [...] [Collection element] | | SQLite.swift:165:24:165:24 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:169:32:169:70 | [...] | semmle.label | [...] | -| SQLite.swift:169:32:169:70 | [...] [Collection element, Tuple element at index 1] | semmle.label | [...] [Collection element, Tuple element at index 1] | | SQLite.swift:169:43:169:53 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | | SQLite.swift:169:53:169:53 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:170:28:170:66 | [...] | semmle.label | [...] | -| SQLite.swift:170:28:170:66 | [...] [Collection element, Tuple element at index 1] | semmle.label | [...] [Collection element, Tuple element at index 1] | | SQLite.swift:170:39:170:49 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | | SQLite.swift:170:49:170:49 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:171:31:171:69 | [...] | semmle.label | [...] | -| SQLite.swift:171:31:171:69 | [...] [Collection element, Tuple element at index 1] | semmle.label | [...] [Collection element, Tuple element at index 1] | | SQLite.swift:171:42:171:52 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | | SQLite.swift:171:52:171:52 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:174:21:174:59 | [...] | semmle.label | [...] | -| SQLite.swift:174:21:174:59 | [...] [Collection element, Tuple element at index 1] | semmle.label | [...] [Collection element, Tuple element at index 1] | | SQLite.swift:174:32:174:42 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | | SQLite.swift:174:42:174:42 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:175:20:175:58 | [...] | semmle.label | [...] | -| SQLite.swift:175:20:175:58 | [...] [Collection element, Tuple element at index 1] | semmle.label | [...] [Collection element, Tuple element at index 1] | | SQLite.swift:175:31:175:41 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | | SQLite.swift:175:41:175:41 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:176:23:176:61 | [...] | semmle.label | [...] | -| SQLite.swift:176:23:176:61 | [...] [Collection element, Tuple element at index 1] | semmle.label | [...] [Collection element, Tuple element at index 1] | | SQLite.swift:176:34:176:44 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | | SQLite.swift:176:44:176:44 | mobilePhoneNumber | semmle.label | mobilePhoneNumber | | SQLite.swift:186:40:186:54 | ... <-(_:_:) ... | semmle.label | ... <-(_:_:) ... | @@ -467,40 +352,28 @@ nodes | testCoreData2.swift:23:13:23:13 | self [Return] [notStoredBankAccountNumber] | semmle.label | self [Return] [notStoredBankAccountNumber] | | testCoreData2.swift:23:13:23:13 | value | semmle.label | value | | testCoreData2.swift:37:2:37:2 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:37:2:37:2 | [post] obj [myValue] | semmle.label | [post] obj [myValue] | | testCoreData2.swift:37:16:37:16 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:39:2:39:2 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:39:2:39:2 | [post] obj [myBankAccountNumber] | semmle.label | [post] obj [myBankAccountNumber] | | testCoreData2.swift:39:28:39:28 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:41:2:41:2 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:41:2:41:2 | [post] obj [myBankAccountNumber2] | semmle.label | [post] obj [myBankAccountNumber2] | | testCoreData2.swift:41:29:41:29 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:43:2:43:2 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:43:2:43:2 | [post] obj [notStoredBankAccountNumber] | semmle.label | [post] obj [notStoredBankAccountNumber] | | testCoreData2.swift:43:35:43:35 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:46:2:46:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:46:2:46:10 | [post] ...? [myValue] | semmle.label | [post] ...? [myValue] | | testCoreData2.swift:46:22:46:22 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:48:2:48:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:48:2:48:10 | [post] ...? [myBankAccountNumber] | semmle.label | [post] ...? [myBankAccountNumber] | | testCoreData2.swift:48:34:48:34 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:50:2:50:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:50:2:50:10 | [post] ...? [myBankAccountNumber2] | semmle.label | [post] ...? [myBankAccountNumber2] | | testCoreData2.swift:50:35:50:35 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:52:2:52:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:52:2:52:10 | [post] ...? [notStoredBankAccountNumber] | semmle.label | [post] ...? [notStoredBankAccountNumber] | | testCoreData2.swift:52:41:52:41 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:57:3:57:3 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:57:3:57:3 | [post] obj [myBankAccountNumber] | semmle.label | [post] obj [myBankAccountNumber] | | testCoreData2.swift:57:29:57:29 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:60:4:60:4 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:60:4:60:4 | [post] obj [myBankAccountNumber] | semmle.label | [post] obj [myBankAccountNumber] | | testCoreData2.swift:60:30:60:30 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:62:4:62:4 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:62:4:62:4 | [post] obj [myBankAccountNumber] | semmle.label | [post] obj [myBankAccountNumber] | | testCoreData2.swift:62:30:62:30 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:65:3:65:3 | [post] obj | semmle.label | [post] obj | -| testCoreData2.swift:65:3:65:3 | [post] obj [myBankAccountNumber] | semmle.label | [post] obj [myBankAccountNumber] | | testCoreData2.swift:65:29:65:29 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:70:9:70:9 | self | semmle.label | self | | testCoreData2.swift:70:9:70:9 | self [Return] [value] | semmle.label | self [Return] [value] | @@ -508,41 +381,32 @@ nodes | testCoreData2.swift:70:9:70:9 | value | semmle.label | value | | testCoreData2.swift:71:9:71:9 | self | semmle.label | self | | testCoreData2.swift:79:2:79:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:79:2:79:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:79:18:79:28 | .bankAccountNo | semmle.label | .bankAccountNo | | testCoreData2.swift:80:2:80:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:80:2:80:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:80:18:80:28 | ...! | semmle.label | ...! | | testCoreData2.swift:80:18:80:28 | .bankAccountNo2 | semmle.label | .bankAccountNo2 | | testCoreData2.swift:82:2:82:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:82:2:82:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:82:18:82:18 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:82:18:82:32 | .value | semmle.label | .value | | testCoreData2.swift:83:2:83:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:83:2:83:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:83:18:83:18 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:83:18:83:32 | ...! | semmle.label | ...! | | testCoreData2.swift:83:18:83:32 | .value2 | semmle.label | .value2 | | testCoreData2.swift:84:2:84:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:84:2:84:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:84:18:84:18 | ...! | semmle.label | ...! | | testCoreData2.swift:84:18:84:18 | bankAccountNo2 | semmle.label | bankAccountNo2 | | testCoreData2.swift:84:18:84:33 | .value | semmle.label | .value | | testCoreData2.swift:85:2:85:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:85:2:85:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:85:18:85:18 | ...! | semmle.label | ...! | | testCoreData2.swift:85:18:85:18 | bankAccountNo2 | semmle.label | bankAccountNo2 | | testCoreData2.swift:85:18:85:33 | ...! | semmle.label | ...! | | testCoreData2.swift:85:18:85:33 | .value2 | semmle.label | .value2 | | testCoreData2.swift:87:2:87:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:87:2:87:10 | [post] ...? [myValue] | semmle.label | [post] ...? [myValue] | | testCoreData2.swift:87:22:87:32 | .bankAccountNo | semmle.label | .bankAccountNo | | testCoreData2.swift:88:2:88:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:88:2:88:10 | [post] ...? [myValue] | semmle.label | [post] ...? [myValue] | | testCoreData2.swift:88:22:88:22 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:88:22:88:36 | .value | semmle.label | .value | | testCoreData2.swift:89:2:89:10 | [post] ...? | semmle.label | [post] ...? | -| testCoreData2.swift:89:2:89:10 | [post] ...? [myValue] | semmle.label | [post] ...? [myValue] | | testCoreData2.swift:89:22:89:22 | ...! | semmle.label | ...! | | testCoreData2.swift:89:22:89:22 | bankAccountNo2 | semmle.label | bankAccountNo2 | | testCoreData2.swift:89:22:89:37 | ...! | semmle.label | ...! | @@ -551,24 +415,20 @@ nodes | testCoreData2.swift:92:10:92:10 | a | semmle.label | a | | testCoreData2.swift:92:10:92:12 | .value | semmle.label | .value | | testCoreData2.swift:93:2:93:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:93:2:93:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:93:18:93:18 | b | semmle.label | b | | testCoreData2.swift:95:10:95:10 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:97:2:97:2 | [post] d [value] | semmle.label | [post] d [value] | | testCoreData2.swift:97:12:97:12 | c | semmle.label | c | | testCoreData2.swift:97:12:97:14 | .value | semmle.label | .value | | testCoreData2.swift:98:2:98:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:98:2:98:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:98:18:98:18 | d [value] | semmle.label | d [value] | | testCoreData2.swift:98:18:98:20 | .value | semmle.label | .value | | testCoreData2.swift:101:10:101:10 | bankAccountNo | semmle.label | bankAccountNo | | testCoreData2.swift:103:13:103:13 | e | semmle.label | e | | testCoreData2.swift:104:2:104:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:104:2:104:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:104:18:104:18 | e | semmle.label | e | | testCoreData2.swift:104:18:104:20 | .value | semmle.label | .value | | testCoreData2.swift:105:2:105:2 | [post] dbObj | semmle.label | [post] dbObj | -| testCoreData2.swift:105:2:105:2 | [post] dbObj [myValue] | semmle.label | [post] dbObj [myValue] | | testCoreData2.swift:105:18:105:18 | e | semmle.label | e | | testCoreData2.swift:105:18:105:20 | ...! | semmle.label | ...! | | testCoreData2.swift:105:18:105:20 | .value2 | semmle.label | .value2 | @@ -581,7 +441,6 @@ nodes | testCoreData.swift:58:15:58:15 | password | semmle.label | password | | testCoreData.swift:61:25:61:25 | password | semmle.label | password | | testCoreData.swift:64:2:64:2 | [post] obj | semmle.label | [post] obj | -| testCoreData.swift:64:2:64:2 | [post] obj [myValue] | semmle.label | [post] obj [myValue] | | testCoreData.swift:64:16:64:16 | password | semmle.label | password | | testCoreData.swift:77:24:77:24 | x | semmle.label | x | | testCoreData.swift:78:15:78:15 | x | semmle.label | x | @@ -597,186 +456,126 @@ nodes | testCoreData.swift:128:15:128:33 | call to generateSecretKey() | semmle.label | call to generateSecretKey() | | testCoreData.swift:129:15:129:30 | call to getCertificate() | semmle.label | call to getCertificate() | | testGRDB.swift:73:56:73:65 | [...] | semmle.label | [...] | -| testGRDB.swift:73:56:73:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:73:57:73:57 | password | semmle.label | password | | testGRDB.swift:76:42:76:51 | [...] | semmle.label | [...] | -| testGRDB.swift:76:42:76:51 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:76:43:76:43 | password | semmle.label | password | | testGRDB.swift:81:44:81:53 | [...] | semmle.label | [...] | -| testGRDB.swift:81:44:81:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:81:45:81:45 | password | semmle.label | password | | testGRDB.swift:83:44:83:53 | [...] | semmle.label | [...] | -| testGRDB.swift:83:44:83:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:83:45:83:45 | password | semmle.label | password | | testGRDB.swift:85:44:85:53 | [...] | semmle.label | [...] | -| testGRDB.swift:85:44:85:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:85:45:85:45 | password | semmle.label | password | | testGRDB.swift:87:44:87:53 | [...] | semmle.label | [...] | -| testGRDB.swift:87:44:87:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:87:45:87:45 | password | semmle.label | password | | testGRDB.swift:92:37:92:46 | [...] | semmle.label | [...] | -| testGRDB.swift:92:37:92:46 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:92:38:92:38 | password | semmle.label | password | | testGRDB.swift:95:36:95:45 | [...] | semmle.label | [...] | -| testGRDB.swift:95:36:95:45 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:95:37:95:37 | password | semmle.label | password | | testGRDB.swift:100:72:100:81 | [...] | semmle.label | [...] | -| testGRDB.swift:100:72:100:81 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:100:73:100:73 | password | semmle.label | password | | testGRDB.swift:101:72:101:81 | [...] | semmle.label | [...] | -| testGRDB.swift:101:72:101:81 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:101:73:101:73 | password | semmle.label | password | | testGRDB.swift:107:52:107:61 | [...] | semmle.label | [...] | -| testGRDB.swift:107:52:107:61 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:107:53:107:53 | password | semmle.label | password | | testGRDB.swift:109:52:109:61 | [...] | semmle.label | [...] | -| testGRDB.swift:109:52:109:61 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:109:53:109:53 | password | semmle.label | password | | testGRDB.swift:111:51:111:60 | [...] | semmle.label | [...] | -| testGRDB.swift:111:51:111:60 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:111:52:111:52 | password | semmle.label | password | | testGRDB.swift:116:47:116:56 | [...] | semmle.label | [...] | -| testGRDB.swift:116:47:116:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:116:48:116:48 | password | semmle.label | password | | testGRDB.swift:118:47:118:56 | [...] | semmle.label | [...] | -| testGRDB.swift:118:47:118:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:118:48:118:48 | password | semmle.label | password | | testGRDB.swift:121:44:121:53 | [...] | semmle.label | [...] | -| testGRDB.swift:121:44:121:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:121:45:121:45 | password | semmle.label | password | | testGRDB.swift:123:44:123:53 | [...] | semmle.label | [...] | -| testGRDB.swift:123:44:123:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:123:45:123:45 | password | semmle.label | password | | testGRDB.swift:126:44:126:53 | [...] | semmle.label | [...] | -| testGRDB.swift:126:44:126:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:126:45:126:45 | password | semmle.label | password | | testGRDB.swift:128:44:128:53 | [...] | semmle.label | [...] | -| testGRDB.swift:128:44:128:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:128:45:128:45 | password | semmle.label | password | | testGRDB.swift:131:44:131:53 | [...] | semmle.label | [...] | -| testGRDB.swift:131:44:131:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:131:45:131:45 | password | semmle.label | password | | testGRDB.swift:133:44:133:53 | [...] | semmle.label | [...] | -| testGRDB.swift:133:44:133:53 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:133:45:133:45 | password | semmle.label | password | | testGRDB.swift:138:68:138:77 | [...] | semmle.label | [...] | -| testGRDB.swift:138:68:138:77 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:138:69:138:69 | password | semmle.label | password | | testGRDB.swift:140:68:140:77 | [...] | semmle.label | [...] | -| testGRDB.swift:140:68:140:77 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:140:69:140:69 | password | semmle.label | password | | testGRDB.swift:143:65:143:74 | [...] | semmle.label | [...] | -| testGRDB.swift:143:65:143:74 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:143:66:143:66 | password | semmle.label | password | | testGRDB.swift:145:65:145:74 | [...] | semmle.label | [...] | -| testGRDB.swift:145:65:145:74 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:145:66:145:66 | password | semmle.label | password | | testGRDB.swift:148:65:148:74 | [...] | semmle.label | [...] | -| testGRDB.swift:148:65:148:74 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:148:66:148:66 | password | semmle.label | password | | testGRDB.swift:150:65:150:74 | [...] | semmle.label | [...] | -| testGRDB.swift:150:65:150:74 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:150:66:150:66 | password | semmle.label | password | | testGRDB.swift:153:65:153:74 | [...] | semmle.label | [...] | -| testGRDB.swift:153:65:153:74 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:153:66:153:66 | password | semmle.label | password | | testGRDB.swift:155:65:155:74 | [...] | semmle.label | [...] | -| testGRDB.swift:155:65:155:74 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:155:66:155:66 | password | semmle.label | password | | testGRDB.swift:160:59:160:68 | [...] | semmle.label | [...] | -| testGRDB.swift:160:59:160:68 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:160:60:160:60 | password | semmle.label | password | | testGRDB.swift:161:50:161:59 | [...] | semmle.label | [...] | -| testGRDB.swift:161:50:161:59 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:161:51:161:51 | password | semmle.label | password | | testGRDB.swift:164:59:164:68 | [...] | semmle.label | [...] | -| testGRDB.swift:164:59:164:68 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:164:60:164:60 | password | semmle.label | password | | testGRDB.swift:165:50:165:59 | [...] | semmle.label | [...] | -| testGRDB.swift:165:50:165:59 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:165:51:165:51 | password | semmle.label | password | | testGRDB.swift:169:56:169:65 | [...] | semmle.label | [...] | -| testGRDB.swift:169:56:169:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:169:57:169:57 | password | semmle.label | password | | testGRDB.swift:170:47:170:56 | [...] | semmle.label | [...] | -| testGRDB.swift:170:47:170:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:170:48:170:48 | password | semmle.label | password | | testGRDB.swift:173:56:173:65 | [...] | semmle.label | [...] | -| testGRDB.swift:173:56:173:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:173:57:173:57 | password | semmle.label | password | | testGRDB.swift:174:47:174:56 | [...] | semmle.label | [...] | -| testGRDB.swift:174:47:174:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:174:48:174:48 | password | semmle.label | password | | testGRDB.swift:178:56:178:65 | [...] | semmle.label | [...] | -| testGRDB.swift:178:56:178:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:178:57:178:57 | password | semmle.label | password | | testGRDB.swift:179:47:179:56 | [...] | semmle.label | [...] | -| testGRDB.swift:179:47:179:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:179:48:179:48 | password | semmle.label | password | | testGRDB.swift:182:56:182:65 | [...] | semmle.label | [...] | -| testGRDB.swift:182:56:182:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:182:57:182:57 | password | semmle.label | password | | testGRDB.swift:183:47:183:56 | [...] | semmle.label | [...] | -| testGRDB.swift:183:47:183:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:183:48:183:48 | password | semmle.label | password | | testGRDB.swift:187:56:187:65 | [...] | semmle.label | [...] | -| testGRDB.swift:187:56:187:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:187:57:187:57 | password | semmle.label | password | | testGRDB.swift:188:47:188:56 | [...] | semmle.label | [...] | -| testGRDB.swift:188:47:188:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:188:48:188:48 | password | semmle.label | password | | testGRDB.swift:191:56:191:65 | [...] | semmle.label | [...] | -| testGRDB.swift:191:56:191:65 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:191:57:191:57 | password | semmle.label | password | | testGRDB.swift:192:47:192:56 | [...] | semmle.label | [...] | -| testGRDB.swift:192:47:192:56 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:192:48:192:48 | password | semmle.label | password | | testGRDB.swift:198:29:198:38 | [...] | semmle.label | [...] | -| testGRDB.swift:198:29:198:38 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:198:30:198:30 | password | semmle.label | password | | testGRDB.swift:201:23:201:32 | [...] | semmle.label | [...] | -| testGRDB.swift:201:23:201:32 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:201:24:201:24 | password | semmle.label | password | | testGRDB.swift:206:66:206:75 | [...] | semmle.label | [...] | -| testGRDB.swift:206:66:206:75 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:206:67:206:67 | password | semmle.label | password | | testGRDB.swift:208:80:208:89 | [...] | semmle.label | [...] | -| testGRDB.swift:208:80:208:89 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:208:81:208:81 | password | semmle.label | password | | testGRDB.swift:210:84:210:93 | [...] | semmle.label | [...] | -| testGRDB.swift:210:84:210:93 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:210:85:210:85 | password | semmle.label | password | | testGRDB.swift:212:98:212:107 | [...] | semmle.label | [...] | -| testGRDB.swift:212:98:212:107 | [...] [Collection element] | semmle.label | [...] [Collection element] | | testGRDB.swift:212:99:212:99 | password | semmle.label | password | | testRealm2.swift:13:6:13:6 | self [Return] [data, Collection element] | semmle.label | self [Return] [data, Collection element] | | testRealm2.swift:13:6:13:6 | self [Return] [data] | semmle.label | self [Return] [data] | | testRealm2.swift:13:6:13:6 | value | semmle.label | value | | testRealm2.swift:13:6:13:6 | value [Collection element] | semmle.label | value [Collection element] | | testRealm2.swift:18:2:18:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:18:2:18:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:18:11:18:11 | myPassword | semmle.label | myPassword | | testRealm2.swift:24:2:24:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:24:2:24:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:24:11:24:11 | socialSecurityNumber | semmle.label | socialSecurityNumber | | testRealm2.swift:25:2:25:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:25:2:25:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:25:11:25:11 | ssn | semmle.label | ssn | | testRealm2.swift:26:2:26:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:26:2:26:2 | [post] o [data, Collection element] | semmle.label | [post] o [data, Collection element] | -| testRealm2.swift:26:2:26:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:26:11:26:25 | call to String.init(_:) | semmle.label | call to String.init(_:) | | testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | testRealm2.swift:26:18:26:18 | ssn_int | semmle.label | ssn_int | | testRealm2.swift:32:2:32:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:32:2:32:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:32:11:32:11 | creditCardNumber | semmle.label | creditCardNumber | | testRealm2.swift:33:2:33:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:33:2:33:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:33:11:33:11 | CCN | semmle.label | CCN | | testRealm2.swift:34:2:34:2 | [post] o | semmle.label | [post] o | -| testRealm2.swift:34:2:34:2 | [post] o [data, Collection element] | semmle.label | [post] o [data, Collection element] | -| testRealm2.swift:34:2:34:2 | [post] o [data] | semmle.label | [post] o [data] | | testRealm2.swift:34:11:34:25 | call to String.init(_:) | semmle.label | call to String.init(_:) | | testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | semmle.label | call to String.init(_:) [Collection element] | | testRealm2.swift:34:18:34:18 | int_ccn | semmle.label | int_ccn | @@ -785,23 +584,18 @@ nodes | testRealm.swift:34:6:34:6 | self [Return] [password] | semmle.label | self [Return] [password] | | testRealm.swift:34:6:34:6 | value | semmle.label | value | | testRealm.swift:41:2:41:2 | [post] a | semmle.label | [post] a | -| testRealm.swift:41:2:41:2 | [post] a [data] | semmle.label | [post] a [data] | | testRealm.swift:41:11:41:11 | myPassword | semmle.label | myPassword | | testRealm.swift:49:2:49:2 | [post] c | semmle.label | [post] c | -| testRealm.swift:49:2:49:2 | [post] c [data] | semmle.label | [post] c [data] | | testRealm.swift:49:11:49:11 | myPassword | semmle.label | myPassword | | testRealm.swift:59:2:59:3 | [post] ...! | semmle.label | [post] ...! | -| testRealm.swift:59:2:59:3 | [post] ...! [data] | semmle.label | [post] ...! [data] | | testRealm.swift:59:12:59:12 | myPassword | semmle.label | myPassword | | testRealm.swift:66:2:66:2 | [post] g | semmle.label | [post] g | -| testRealm.swift:66:2:66:2 | [post] g [data] | semmle.label | [post] g [data] | | testRealm.swift:66:11:66:11 | myPassword | semmle.label | myPassword | | testRealm.swift:73:2:73:2 | [post] h | semmle.label | [post] h | -| testRealm.swift:73:2:73:2 | [post] h [password] | semmle.label | [post] h [password] | | testRealm.swift:73:15:73:15 | myPassword | semmle.label | myPassword | subpaths -| testCoreData2.swift:43:35:43:35 | bankAccountNo | testCoreData2.swift:23:13:23:13 | value | testCoreData2.swift:23:13:23:13 | self [Return] [notStoredBankAccountNumber] | testCoreData2.swift:43:2:43:2 | [post] obj [notStoredBankAccountNumber] | -| testCoreData2.swift:52:41:52:41 | bankAccountNo | testCoreData2.swift:23:13:23:13 | value | testCoreData2.swift:23:13:23:13 | self [Return] [notStoredBankAccountNumber] | testCoreData2.swift:52:2:52:10 | [post] ...? [notStoredBankAccountNumber] | +| testCoreData2.swift:43:35:43:35 | bankAccountNo | testCoreData2.swift:23:13:23:13 | value | testCoreData2.swift:23:13:23:13 | self [Return] [notStoredBankAccountNumber] | testCoreData2.swift:43:2:43:2 | [post] obj | +| testCoreData2.swift:52:41:52:41 | bankAccountNo | testCoreData2.swift:23:13:23:13 | value | testCoreData2.swift:23:13:23:13 | self [Return] [notStoredBankAccountNumber] | testCoreData2.swift:52:2:52:10 | [post] ...? | | testCoreData2.swift:82:18:82:18 | bankAccountNo | testCoreData2.swift:70:9:70:9 | self | file://:0:0:0:0 | .value | testCoreData2.swift:82:18:82:32 | .value | | testCoreData2.swift:83:18:83:18 | bankAccountNo | testCoreData2.swift:71:9:71:9 | self | file://:0:0:0:0 | .value2 | testCoreData2.swift:83:18:83:32 | .value2 | | testCoreData2.swift:84:18:84:18 | ...! | testCoreData2.swift:70:9:70:9 | self | file://:0:0:0:0 | .value | testCoreData2.swift:84:18:84:33 | .value | @@ -814,20 +608,20 @@ subpaths | testCoreData2.swift:98:18:98:18 | d [value] | testCoreData2.swift:70:9:70:9 | self [value] | file://:0:0:0:0 | .value | testCoreData2.swift:98:18:98:20 | .value | | testCoreData2.swift:104:18:104:18 | e | testCoreData2.swift:70:9:70:9 | self | file://:0:0:0:0 | .value | testCoreData2.swift:104:18:104:20 | .value | | testCoreData2.swift:105:18:105:18 | e | testCoreData2.swift:71:9:71:9 | self | file://:0:0:0:0 | .value2 | testCoreData2.swift:105:18:105:20 | .value2 | -| testRealm2.swift:18:11:18:11 | myPassword | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:18:2:18:2 | [post] o [data] | -| testRealm2.swift:24:11:24:11 | socialSecurityNumber | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:24:2:24:2 | [post] o [data] | -| testRealm2.swift:25:11:25:11 | ssn | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:25:2:25:2 | [post] o [data] | -| testRealm2.swift:26:11:26:25 | call to String.init(_:) | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:26:2:26:2 | [post] o [data] | -| testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | testRealm2.swift:13:6:13:6 | value [Collection element] | testRealm2.swift:13:6:13:6 | self [Return] [data, Collection element] | testRealm2.swift:26:2:26:2 | [post] o [data, Collection element] | -| testRealm2.swift:32:11:32:11 | creditCardNumber | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:32:2:32:2 | [post] o [data] | -| testRealm2.swift:33:11:33:11 | CCN | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:33:2:33:2 | [post] o [data] | -| testRealm2.swift:34:11:34:25 | call to String.init(_:) | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:34:2:34:2 | [post] o [data] | -| testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | testRealm2.swift:13:6:13:6 | value [Collection element] | testRealm2.swift:13:6:13:6 | self [Return] [data, Collection element] | testRealm2.swift:34:2:34:2 | [post] o [data, Collection element] | -| testRealm.swift:41:11:41:11 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:41:2:41:2 | [post] a [data] | -| testRealm.swift:49:11:49:11 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:49:2:49:2 | [post] c [data] | -| testRealm.swift:59:12:59:12 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:59:2:59:3 | [post] ...! [data] | -| testRealm.swift:66:11:66:11 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:66:2:66:2 | [post] g [data] | -| testRealm.swift:73:15:73:15 | myPassword | testRealm.swift:34:6:34:6 | value | testRealm.swift:34:6:34:6 | self [Return] [password] | testRealm.swift:73:2:73:2 | [post] h [password] | +| testRealm2.swift:18:11:18:11 | myPassword | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:18:2:18:2 | [post] o | +| testRealm2.swift:24:11:24:11 | socialSecurityNumber | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:24:2:24:2 | [post] o | +| testRealm2.swift:25:11:25:11 | ssn | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:25:2:25:2 | [post] o | +| testRealm2.swift:26:11:26:25 | call to String.init(_:) | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:26:2:26:2 | [post] o | +| testRealm2.swift:26:11:26:25 | call to String.init(_:) [Collection element] | testRealm2.swift:13:6:13:6 | value [Collection element] | testRealm2.swift:13:6:13:6 | self [Return] [data, Collection element] | testRealm2.swift:26:2:26:2 | [post] o | +| testRealm2.swift:32:11:32:11 | creditCardNumber | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:32:2:32:2 | [post] o | +| testRealm2.swift:33:11:33:11 | CCN | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:33:2:33:2 | [post] o | +| testRealm2.swift:34:11:34:25 | call to String.init(_:) | testRealm2.swift:13:6:13:6 | value | testRealm2.swift:13:6:13:6 | self [Return] [data] | testRealm2.swift:34:2:34:2 | [post] o | +| testRealm2.swift:34:11:34:25 | call to String.init(_:) [Collection element] | testRealm2.swift:13:6:13:6 | value [Collection element] | testRealm2.swift:13:6:13:6 | self [Return] [data, Collection element] | testRealm2.swift:34:2:34:2 | [post] o | +| testRealm.swift:41:11:41:11 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:41:2:41:2 | [post] a | +| testRealm.swift:49:11:49:11 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:49:2:49:2 | [post] c | +| testRealm.swift:59:12:59:12 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:59:2:59:3 | [post] ...! | +| testRealm.swift:66:11:66:11 | myPassword | testRealm.swift:27:6:27:6 | value | testRealm.swift:27:6:27:6 | self [Return] [data] | testRealm.swift:66:2:66:2 | [post] g | +| testRealm.swift:73:15:73:15 | myPassword | testRealm.swift:34:6:34:6 | value | testRealm.swift:34:6:34:6 | self [Return] [password] | testRealm.swift:73:2:73:2 | [post] h | #select | SQLite.swift:123:17:123:17 | insertQuery | SQLite.swift:119:70:119:70 | mobilePhoneNumber | SQLite.swift:123:17:123:17 | insertQuery | This operation stores 'insertQuery' in a database. It may contain unencrypted sensitive data from $@. | SQLite.swift:119:70:119:70 | mobilePhoneNumber | mobilePhoneNumber | | SQLite.swift:124:17:124:17 | updateQuery | SQLite.swift:120:50:120:50 | mobilePhoneNumber | SQLite.swift:124:17:124:17 | updateQuery | This operation stores 'updateQuery' in a database. It may contain unencrypted sensitive data from $@. | SQLite.swift:120:50:120:50 | mobilePhoneNumber | mobilePhoneNumber | diff --git a/swift/ql/test/query-tests/Security/CWE-321/HardcodedEncryptionKey.expected b/swift/ql/test/query-tests/Security/CWE-321/HardcodedEncryptionKey.expected index 544431cfb4fa..bd2119ac332d 100644 --- a/swift/ql/test/query-tests/Security/CWE-321/HardcodedEncryptionKey.expected +++ b/swift/ql/test/query-tests/Security/CWE-321/HardcodedEncryptionKey.expected @@ -26,8 +26,8 @@ edges | cryptoswift.swift:94:18:94:36 | call to getConstantString() | cryptoswift.swift:155:26:155:26 | keyString | provenance | | | cryptoswift.swift:94:18:94:36 | call to getConstantString() | cryptoswift.swift:164:24:164:24 | keyString | provenance | | | cryptoswift.swift:94:18:94:36 | call to getConstantString() | cryptoswift.swift:166:24:166:24 | keyString | provenance | | -| file://:0:0:0:0 | [post] self [encryptionKey] | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | [post] self [encryptionKey] | misc.swift:30:7:30:7 | self [Return] [encryptionKey] | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self [encryptionKey] | provenance | | | grdb.swift:21:20:21:20 | abc123 | grdb.swift:27:23:27:23 | constString | provenance | | | grdb.swift:21:20:21:20 | abc123 | grdb.swift:31:26:31:26 | constString | provenance | | @@ -40,18 +40,14 @@ edges | misc.swift:57:19:57:38 | call to Data.init(_:) | misc.swift:66:25:66:25 | myConstKey | provenance | | | misc.swift:57:19:57:38 | call to Data.init(_:) | misc.swift:70:41:70:41 | myConstKey | provenance | | | misc.swift:57:24:57:24 | abcdef123456 | misc.swift:57:19:57:38 | call to Data.init(_:) | provenance | | -| misc.swift:66:2:66:2 | [post] config [encryptionKey] | misc.swift:66:2:66:2 | [post] config | provenance | | | misc.swift:66:25:66:25 | myConstKey | misc.swift:30:7:30:7 | value | provenance | | -| misc.swift:66:25:66:25 | myConstKey | misc.swift:66:2:66:2 | [post] config [encryptionKey] | provenance | | -| misc.swift:70:2:70:18 | [post] getter for .config [encryptionKey] | misc.swift:70:2:70:18 | [post] getter for .config | provenance | | +| misc.swift:66:25:66:25 | myConstKey | misc.swift:66:2:66:2 | [post] config | provenance | | | misc.swift:70:41:70:41 | myConstKey | misc.swift:30:7:30:7 | value | provenance | | -| misc.swift:70:41:70:41 | myConstKey | misc.swift:70:2:70:18 | [post] getter for .config [encryptionKey] | provenance | | +| misc.swift:70:41:70:41 | myConstKey | misc.swift:70:2:70:18 | [post] getter for .config | provenance | | | misc.swift:73:14:73:20 | k1 | misc.swift:76:26:76:29 | .utf8 | provenance | | | misc.swift:73:28:73:34 | k2 | misc.swift:77:26:77:29 | .utf8 | provenance | | -| misc.swift:76:20:76:33 | call to Array.init(_:) [Collection element] | misc.swift:76:20:76:33 | call to Array.init(_:) | provenance | | -| misc.swift:76:26:76:29 | .utf8 | misc.swift:76:20:76:33 | call to Array.init(_:) [Collection element] | provenance | | -| misc.swift:77:20:77:33 | call to Array.init(_:) [Collection element] | misc.swift:77:20:77:33 | call to Array.init(_:) | provenance | | -| misc.swift:77:26:77:29 | .utf8 | misc.swift:77:20:77:33 | call to Array.init(_:) [Collection element] | provenance | | +| misc.swift:76:26:76:29 | .utf8 | misc.swift:76:20:76:33 | call to Array.init(_:) | provenance | | +| misc.swift:77:26:77:29 | .utf8 | misc.swift:77:20:77:33 | call to Array.init(_:) | provenance | | | misc.swift:82:10:82:10 | abc123 | misc.swift:73:14:73:20 | k1 | provenance | | | misc.swift:83:10:83:10 | abc123 | misc.swift:73:14:73:20 | k1 | provenance | | | misc.swift:83:20:83:20 | abc123 | misc.swift:73:28:73:34 | k2 | provenance | | @@ -128,18 +124,14 @@ nodes | misc.swift:57:24:57:24 | abcdef123456 | semmle.label | abcdef123456 | | misc.swift:62:41:62:41 | myConstKey | semmle.label | myConstKey | | misc.swift:66:2:66:2 | [post] config | semmle.label | [post] config | -| misc.swift:66:2:66:2 | [post] config [encryptionKey] | semmle.label | [post] config [encryptionKey] | | misc.swift:66:25:66:25 | myConstKey | semmle.label | myConstKey | | misc.swift:70:2:70:18 | [post] getter for .config | semmle.label | [post] getter for .config | -| misc.swift:70:2:70:18 | [post] getter for .config [encryptionKey] | semmle.label | [post] getter for .config [encryptionKey] | | misc.swift:70:41:70:41 | myConstKey | semmle.label | myConstKey | | misc.swift:73:14:73:20 | k1 | semmle.label | k1 | | misc.swift:73:28:73:34 | k2 | semmle.label | k2 | | misc.swift:76:20:76:33 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | -| misc.swift:76:20:76:33 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | | misc.swift:76:26:76:29 | .utf8 | semmle.label | .utf8 | | misc.swift:77:20:77:33 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | -| misc.swift:77:20:77:33 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | | misc.swift:77:26:77:29 | .utf8 | semmle.label | .utf8 | | misc.swift:82:10:82:10 | abc123 | semmle.label | abc123 | | misc.swift:83:10:83:10 | abc123 | semmle.label | abc123 | @@ -168,8 +160,8 @@ nodes | sqlite3_c_api.swift:49:36:49:36 | buffer | semmle.label | buffer | | sqlite3_c_api.swift:50:38:50:38 | buffer | semmle.label | buffer | subpaths -| misc.swift:66:25:66:25 | myConstKey | misc.swift:30:7:30:7 | value | misc.swift:30:7:30:7 | self [Return] [encryptionKey] | misc.swift:66:2:66:2 | [post] config [encryptionKey] | -| misc.swift:70:41:70:41 | myConstKey | misc.swift:30:7:30:7 | value | misc.swift:30:7:30:7 | self [Return] [encryptionKey] | misc.swift:70:2:70:18 | [post] getter for .config [encryptionKey] | +| misc.swift:66:25:66:25 | myConstKey | misc.swift:30:7:30:7 | value | misc.swift:30:7:30:7 | self [Return] [encryptionKey] | misc.swift:66:2:66:2 | [post] config | +| misc.swift:70:41:70:41 | myConstKey | misc.swift:30:7:30:7 | value | misc.swift:30:7:30:7 | self [Return] [encryptionKey] | misc.swift:70:2:70:18 | [post] getter for .config | #select | SQLite.swift:43:13:43:13 | hardcoded_key | SQLite.swift:43:13:43:13 | hardcoded_key | SQLite.swift:43:13:43:13 | hardcoded_key | The key 'hardcoded_key' has been initialized with hard-coded values from $@. | SQLite.swift:43:13:43:13 | hardcoded_key | hardcoded_key | | SQLite.swift:45:23:45:23 | hardcoded_key | SQLite.swift:45:23:45:23 | hardcoded_key | SQLite.swift:45:23:45:23 | hardcoded_key | The key 'hardcoded_key' has been initialized with hard-coded values from $@. | SQLite.swift:45:23:45:23 | hardcoded_key | hardcoded_key | diff --git a/swift/ql/test/query-tests/Security/CWE-757/InsecureTLS.expected b/swift/ql/test/query-tests/Security/CWE-757/InsecureTLS.expected index f463e8d939b5..e48f6c9a9b6d 100644 --- a/swift/ql/test/query-tests/Security/CWE-757/InsecureTLS.expected +++ b/swift/ql/test/query-tests/Security/CWE-757/InsecureTLS.expected @@ -3,62 +3,51 @@ edges | InsecureTLS.swift:20:7:20:7 | value | file://:0:0:0:0 | value | provenance | | | InsecureTLS.swift:22:7:22:7 | value | file://:0:0:0:0 | value | provenance | | | InsecureTLS.swift:23:7:23:7 | value | file://:0:0:0:0 | value | provenance | | -| InsecureTLS.swift:40:3:40:3 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:40:3:40:3 | [post] config | provenance | | | InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | provenance | | -| InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:40:3:40:3 | [post] config [tlsMinimumSupportedProtocolVersion] | provenance | | -| InsecureTLS.swift:45:3:45:3 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:45:3:45:3 | [post] config | provenance | | +| InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:40:3:40:3 | [post] config | provenance | | | InsecureTLS.swift:45:47:45:70 | .TLSv11 | InsecureTLS.swift:19:7:19:7 | value | provenance | | -| InsecureTLS.swift:45:47:45:70 | .TLSv11 | InsecureTLS.swift:45:3:45:3 | [post] config [tlsMinimumSupportedProtocolVersion] | provenance | | -| InsecureTLS.swift:57:3:57:3 | [post] config [tlsMaximumSupportedProtocolVersion] | InsecureTLS.swift:57:3:57:3 | [post] config | provenance | | +| InsecureTLS.swift:45:47:45:70 | .TLSv11 | InsecureTLS.swift:45:3:45:3 | [post] config | provenance | | | InsecureTLS.swift:57:47:57:70 | .TLSv10 | InsecureTLS.swift:20:7:20:7 | value | provenance | | -| InsecureTLS.swift:57:47:57:70 | .TLSv10 | InsecureTLS.swift:57:3:57:3 | [post] config [tlsMaximumSupportedProtocolVersion] | provenance | | -| InsecureTLS.swift:64:3:64:3 | [post] config [tlsMinimumSupportedProtocol] | InsecureTLS.swift:64:3:64:3 | [post] config | provenance | | +| InsecureTLS.swift:57:47:57:70 | .TLSv10 | InsecureTLS.swift:57:3:57:3 | [post] config | provenance | | | InsecureTLS.swift:64:40:64:52 | .tlsProtocol10 | InsecureTLS.swift:22:7:22:7 | value | provenance | | -| InsecureTLS.swift:64:40:64:52 | .tlsProtocol10 | InsecureTLS.swift:64:3:64:3 | [post] config [tlsMinimumSupportedProtocol] | provenance | | -| InsecureTLS.swift:76:3:76:3 | [post] config [tlsMaximumSupportedProtocol] | InsecureTLS.swift:76:3:76:3 | [post] config | provenance | | +| InsecureTLS.swift:64:40:64:52 | .tlsProtocol10 | InsecureTLS.swift:64:3:64:3 | [post] config | provenance | | | InsecureTLS.swift:76:40:76:52 | .tlsProtocol10 | InsecureTLS.swift:23:7:23:7 | value | provenance | | -| InsecureTLS.swift:76:40:76:52 | .tlsProtocol10 | InsecureTLS.swift:76:3:76:3 | [post] config [tlsMaximumSupportedProtocol] | provenance | | +| InsecureTLS.swift:76:40:76:52 | .tlsProtocol10 | InsecureTLS.swift:76:3:76:3 | [post] config | provenance | | | InsecureTLS.swift:102:10:102:33 | .TLSv10 | InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | provenance | | -| InsecureTLS.swift:111:3:111:3 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:111:3:111:3 | [post] config | provenance | | | InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | InsecureTLS.swift:19:7:19:7 | value | provenance | | -| InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | InsecureTLS.swift:111:3:111:3 | [post] config [tlsMinimumSupportedProtocolVersion] | provenance | | +| InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | InsecureTLS.swift:111:3:111:3 | [post] config | provenance | | | InsecureTLS.swift:121:55:121:66 | version | InsecureTLS.swift:122:47:122:47 | version | provenance | | -| InsecureTLS.swift:122:3:122:3 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:122:3:122:3 | [post] config | provenance | | | InsecureTLS.swift:122:47:122:47 | version | InsecureTLS.swift:19:7:19:7 | value | provenance | | -| InsecureTLS.swift:122:47:122:47 | version | InsecureTLS.swift:122:3:122:3 | [post] config [tlsMinimumSupportedProtocolVersion] | provenance | | +| InsecureTLS.swift:122:47:122:47 | version | InsecureTLS.swift:122:3:122:3 | [post] config | provenance | | | InsecureTLS.swift:127:25:127:48 | .TLSv11 | InsecureTLS.swift:121:55:121:66 | version | provenance | | | InsecureTLS.swift:158:7:158:7 | self [TLSVersion] | file://:0:0:0:0 | self [TLSVersion] | provenance | | | InsecureTLS.swift:158:7:158:7 | value | file://:0:0:0:0 | value | provenance | | | InsecureTLS.swift:163:3:163:3 | [post] def [TLSVersion] | InsecureTLS.swift:165:47:165:47 | def [TLSVersion] | provenance | | | InsecureTLS.swift:163:20:163:43 | .TLSv10 | InsecureTLS.swift:158:7:158:7 | value | provenance | | | InsecureTLS.swift:163:20:163:43 | .TLSv10 | InsecureTLS.swift:163:3:163:3 | [post] def [TLSVersion] | provenance | | -| InsecureTLS.swift:165:3:165:3 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:165:3:165:3 | [post] config | provenance | | | InsecureTLS.swift:165:47:165:47 | def [TLSVersion] | InsecureTLS.swift:158:7:158:7 | self [TLSVersion] | provenance | | | InsecureTLS.swift:165:47:165:47 | def [TLSVersion] | InsecureTLS.swift:165:47:165:51 | .TLSVersion | provenance | | | InsecureTLS.swift:165:47:165:51 | .TLSVersion | InsecureTLS.swift:19:7:19:7 | value | provenance | | -| InsecureTLS.swift:165:47:165:51 | .TLSVersion | InsecureTLS.swift:165:3:165:3 | [post] config [tlsMinimumSupportedProtocolVersion] | provenance | | -| InsecureTLS.swift:181:3:181:9 | [post] getter for .config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:181:3:181:9 | [post] getter for .config | provenance | | +| InsecureTLS.swift:165:47:165:51 | .TLSVersion | InsecureTLS.swift:165:3:165:3 | [post] config | provenance | | | InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | provenance | | -| InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:181:3:181:9 | [post] getter for .config [tlsMinimumSupportedProtocolVersion] | provenance | | +| InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:181:3:181:9 | [post] getter for .config | provenance | | | InsecureTLS.swift:185:20:185:36 | withMinVersion | InsecureTLS.swift:187:42:187:42 | withMinVersion | provenance | | -| InsecureTLS.swift:187:5:187:5 | [post] self [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:187:5:187:5 | [post] self | provenance | | -| InsecureTLS.swift:187:42:187:42 | withMinVersion | InsecureTLS.swift:187:5:187:5 | [post] self [tlsMinimumSupportedProtocolVersion] | provenance | | +| InsecureTLS.swift:187:42:187:42 | withMinVersion | InsecureTLS.swift:187:5:187:5 | [post] self | provenance | | | InsecureTLS.swift:193:51:193:74 | .TLSv10 | InsecureTLS.swift:185:20:185:36 | withMinVersion | provenance | | | InsecureTLS.swift:196:56:196:63 | value | InsecureTLS.swift:196:1:198:1 | version[return] | provenance | | -| InsecureTLS.swift:202:24:202:24 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:202:24:202:24 | [post] config | provenance | | -| InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | InsecureTLS.swift:202:24:202:24 | [post] config [tlsMinimumSupportedProtocolVersion] | provenance | | +| InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | InsecureTLS.swift:202:24:202:24 | [post] config | provenance | | | InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:196:56:196:63 | value | provenance | | | InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | provenance | | | file://:0:0:0:0 | [post] self [TLSVersion] | InsecureTLS.swift:158:7:158:7 | self [Return] [TLSVersion] | provenance | | | file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocolVersion] | InsecureTLS.swift:20:7:20:7 | self [Return] [tlsMaximumSupportedProtocolVersion] | provenance | | -| file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocolVersion] | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocol] | InsecureTLS.swift:23:7:23:7 | self [Return] [tlsMaximumSupportedProtocol] | provenance | | -| file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocol] | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | [post] self [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | provenance | | -| file://:0:0:0:0 | [post] self [tlsMinimumSupportedProtocolVersion] | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | [post] self [tlsMinimumSupportedProtocol] | InsecureTLS.swift:22:7:22:7 | self [Return] [tlsMinimumSupportedProtocol] | provenance | | -| file://:0:0:0:0 | [post] self [tlsMinimumSupportedProtocol] | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | self [TLSVersion] | file://:0:0:0:0 | .TLSVersion | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | | file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self [TLSVersion] | provenance | | | file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocolVersion] | provenance | | | file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocol] | provenance | | @@ -74,27 +63,20 @@ nodes | InsecureTLS.swift:23:7:23:7 | self [Return] [tlsMaximumSupportedProtocol] | semmle.label | self [Return] [tlsMaximumSupportedProtocol] | | InsecureTLS.swift:23:7:23:7 | value | semmle.label | value | | InsecureTLS.swift:40:3:40:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:40:3:40:3 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:40:47:40:70 | .TLSv10 | semmle.label | .TLSv10 | | InsecureTLS.swift:45:3:45:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:45:3:45:3 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:45:47:45:70 | .TLSv11 | semmle.label | .TLSv11 | | InsecureTLS.swift:57:3:57:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:57:3:57:3 | [post] config [tlsMaximumSupportedProtocolVersion] | semmle.label | [post] config [tlsMaximumSupportedProtocolVersion] | | InsecureTLS.swift:57:47:57:70 | .TLSv10 | semmle.label | .TLSv10 | | InsecureTLS.swift:64:3:64:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:64:3:64:3 | [post] config [tlsMinimumSupportedProtocol] | semmle.label | [post] config [tlsMinimumSupportedProtocol] | | InsecureTLS.swift:64:40:64:52 | .tlsProtocol10 | semmle.label | .tlsProtocol10 | | InsecureTLS.swift:76:3:76:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:76:3:76:3 | [post] config [tlsMaximumSupportedProtocol] | semmle.label | [post] config [tlsMaximumSupportedProtocol] | | InsecureTLS.swift:76:40:76:52 | .tlsProtocol10 | semmle.label | .tlsProtocol10 | | InsecureTLS.swift:102:10:102:33 | .TLSv10 | semmle.label | .TLSv10 | | InsecureTLS.swift:111:3:111:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:111:3:111:3 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | semmle.label | call to getBadTLSVersion() | | InsecureTLS.swift:121:55:121:66 | version | semmle.label | version | | InsecureTLS.swift:122:3:122:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:122:3:122:3 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:122:47:122:47 | version | semmle.label | version | | InsecureTLS.swift:127:25:127:48 | .TLSv11 | semmle.label | .TLSv11 | | InsecureTLS.swift:158:7:158:7 | self [Return] [TLSVersion] | semmle.label | self [Return] [TLSVersion] | @@ -103,21 +85,17 @@ nodes | InsecureTLS.swift:163:3:163:3 | [post] def [TLSVersion] | semmle.label | [post] def [TLSVersion] | | InsecureTLS.swift:163:20:163:43 | .TLSv10 | semmle.label | .TLSv10 | | InsecureTLS.swift:165:3:165:3 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:165:3:165:3 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:165:47:165:47 | def [TLSVersion] | semmle.label | def [TLSVersion] | | InsecureTLS.swift:165:47:165:51 | .TLSVersion | semmle.label | .TLSVersion | | InsecureTLS.swift:181:3:181:9 | [post] getter for .config | semmle.label | [post] getter for .config | -| InsecureTLS.swift:181:3:181:9 | [post] getter for .config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] getter for .config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:181:53:181:76 | .TLSv10 | semmle.label | .TLSv10 | | InsecureTLS.swift:185:20:185:36 | withMinVersion | semmle.label | withMinVersion | | InsecureTLS.swift:187:5:187:5 | [post] self | semmle.label | [post] self | -| InsecureTLS.swift:187:5:187:5 | [post] self [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] self [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:187:42:187:42 | withMinVersion | semmle.label | withMinVersion | | InsecureTLS.swift:193:51:193:74 | .TLSv10 | semmle.label | .TLSv10 | | InsecureTLS.swift:196:1:198:1 | version[return] | semmle.label | version[return] | | InsecureTLS.swift:196:56:196:63 | value | semmle.label | value | | InsecureTLS.swift:202:24:202:24 | [post] config | semmle.label | [post] config | -| InsecureTLS.swift:202:24:202:24 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] | | InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | semmle.label | [post] getter for .tlsMinimumSupportedProtocolVersion | | InsecureTLS.swift:202:74:202:97 | .TLSv10 | semmle.label | .TLSv10 | | file://:0:0:0:0 | .TLSVersion | semmle.label | .TLSVersion | @@ -137,17 +115,17 @@ nodes | file://:0:0:0:0 | value | semmle.label | value | | file://:0:0:0:0 | value | semmle.label | value | subpaths -| InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:40:3:40:3 | [post] config [tlsMinimumSupportedProtocolVersion] | -| InsecureTLS.swift:45:47:45:70 | .TLSv11 | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:45:3:45:3 | [post] config [tlsMinimumSupportedProtocolVersion] | -| InsecureTLS.swift:57:47:57:70 | .TLSv10 | InsecureTLS.swift:20:7:20:7 | value | InsecureTLS.swift:20:7:20:7 | self [Return] [tlsMaximumSupportedProtocolVersion] | InsecureTLS.swift:57:3:57:3 | [post] config [tlsMaximumSupportedProtocolVersion] | -| InsecureTLS.swift:64:40:64:52 | .tlsProtocol10 | InsecureTLS.swift:22:7:22:7 | value | InsecureTLS.swift:22:7:22:7 | self [Return] [tlsMinimumSupportedProtocol] | InsecureTLS.swift:64:3:64:3 | [post] config [tlsMinimumSupportedProtocol] | -| InsecureTLS.swift:76:40:76:52 | .tlsProtocol10 | InsecureTLS.swift:23:7:23:7 | value | InsecureTLS.swift:23:7:23:7 | self [Return] [tlsMaximumSupportedProtocol] | InsecureTLS.swift:76:3:76:3 | [post] config [tlsMaximumSupportedProtocol] | -| InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:111:3:111:3 | [post] config [tlsMinimumSupportedProtocolVersion] | -| InsecureTLS.swift:122:47:122:47 | version | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:122:3:122:3 | [post] config [tlsMinimumSupportedProtocolVersion] | +| InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:40:3:40:3 | [post] config | +| InsecureTLS.swift:45:47:45:70 | .TLSv11 | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:45:3:45:3 | [post] config | +| InsecureTLS.swift:57:47:57:70 | .TLSv10 | InsecureTLS.swift:20:7:20:7 | value | InsecureTLS.swift:20:7:20:7 | self [Return] [tlsMaximumSupportedProtocolVersion] | InsecureTLS.swift:57:3:57:3 | [post] config | +| InsecureTLS.swift:64:40:64:52 | .tlsProtocol10 | InsecureTLS.swift:22:7:22:7 | value | InsecureTLS.swift:22:7:22:7 | self [Return] [tlsMinimumSupportedProtocol] | InsecureTLS.swift:64:3:64:3 | [post] config | +| InsecureTLS.swift:76:40:76:52 | .tlsProtocol10 | InsecureTLS.swift:23:7:23:7 | value | InsecureTLS.swift:23:7:23:7 | self [Return] [tlsMaximumSupportedProtocol] | InsecureTLS.swift:76:3:76:3 | [post] config | +| InsecureTLS.swift:111:47:111:64 | call to getBadTLSVersion() | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:111:3:111:3 | [post] config | +| InsecureTLS.swift:122:47:122:47 | version | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:122:3:122:3 | [post] config | | InsecureTLS.swift:163:20:163:43 | .TLSv10 | InsecureTLS.swift:158:7:158:7 | value | InsecureTLS.swift:158:7:158:7 | self [Return] [TLSVersion] | InsecureTLS.swift:163:3:163:3 | [post] def [TLSVersion] | | InsecureTLS.swift:165:47:165:47 | def [TLSVersion] | InsecureTLS.swift:158:7:158:7 | self [TLSVersion] | file://:0:0:0:0 | .TLSVersion | InsecureTLS.swift:165:47:165:51 | .TLSVersion | -| InsecureTLS.swift:165:47:165:51 | .TLSVersion | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:165:3:165:3 | [post] config [tlsMinimumSupportedProtocolVersion] | -| InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:181:3:181:9 | [post] getter for .config [tlsMinimumSupportedProtocolVersion] | +| InsecureTLS.swift:165:47:165:51 | .TLSVersion | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:165:3:165:3 | [post] config | +| InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | InsecureTLS.swift:19:7:19:7 | self [Return] [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:181:3:181:9 | [post] getter for .config | | InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:196:56:196:63 | value | InsecureTLS.swift:196:1:198:1 | version[return] | InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | #select | InsecureTLS.swift:40:3:40:3 | [post] config | InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:40:3:40:3 | [post] config | This TLS configuration is insecure. | From 16925355a80f9458b90b587d2d4435c0712bbd1b Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 26 Aug 2024 13:48:38 +0200 Subject: [PATCH 088/162] Data flow: Cache `TNodeEx` --- .../cpp/ir/dataflow/internal/ProductFlow.qll | 4 +- .../codeql/dataflow/internal/DataFlowImpl.qll | 105 +--------- .../dataflow/internal/DataFlowImplCommon.qll | 184 ++++++++++++++---- .../dataflow/internal/FlowSummaryImpl.qll | 2 +- 4 files changed, 161 insertions(+), 134 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll index c2325593df26..0c474b0e75d0 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll @@ -546,7 +546,7 @@ module ProductFlow { Flow1::PathGraph::edges(pred1, succ1, _, _) and exists(ReturnKindExt returnKind | succ1.getNode() = returnKind.getAnOutNode(call) and - paramReturnNode(_, pred1.asParameterReturnNode(), _, returnKind) + returnKind = getParamReturnPosition(_, pred1.asParameterReturnNode()).getKind() ) } @@ -574,7 +574,7 @@ module ProductFlow { Flow2::PathGraph::edges(pred2, succ2, _, _) and exists(ReturnKindExt returnKind | succ2.getNode() = returnKind.getAnOutNode(call) and - paramReturnNode(_, pred2.asParameterReturnNode(), _, returnKind) + returnKind = getParamReturnPosition(_, pred2.asParameterReturnNode()).getKind() ) } diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index 742d68db9afd..12a583141c92 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -164,94 +164,19 @@ module MakeImpl Lang> { module Impl { private class FlowState = Config::FlowState; - private newtype TNodeEx = - TNodeNormal(Node n) or - TNodeImplicitRead(Node n) { Config::allowImplicitRead(n, _) } or - TParamReturnNode(ParameterNode p, SndLevelScopeOption scope) { - paramReturnNode(_, p, scope, _) - } - - private class NodeEx extends TNodeEx { - string toString() { - result = this.asNode().toString() + private class NodeEx extends NodeExImpl { + NodeEx() { + Config::allowImplicitRead(any(Node n | this.isImplicitReadNode(n)), _) or - exists(Node n | this.isImplicitReadNode(n) | result = n.toString() + " [Ext]") - or - result = this.asParamReturnNode().toString() + " [Return]" - } - - Node asNode() { this = TNodeNormal(result) } - - /** Gets the corresponding Node if this is a normal node or its post-implicit read node. */ - Node asNodeOrImplicitRead() { this = TNodeNormal(result) or this = TNodeImplicitRead(result) } - - predicate isImplicitReadNode(Node n) { this = TNodeImplicitRead(n) } - - ParameterNode asParamReturnNode() { this = TParamReturnNode(result, _) } - - Node projectToNode() { - this = TNodeNormal(result) or - this = TNodeImplicitRead(result) or - this = TParamReturnNode(result, _) - } - - pragma[nomagic] - private DataFlowCallable getEnclosingCallable0() { - nodeEnclosingCallable(this.projectToNode(), result) - } - - pragma[inline] - DataFlowCallable getEnclosingCallable() { - pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) - } - - pragma[nomagic] - private DataFlowType getDataFlowType0() { - nodeDataFlowType(this.asNode(), result) - or - nodeDataFlowType(this.asParamReturnNode(), result) - } - - pragma[inline] - DataFlowType getDataFlowType() { - pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + not this.isImplicitReadNode(_) } - - Location getLocation() { result = this.projectToNode().getLocation() } - } - - private class ArgNodeEx extends NodeEx { - ArgNodeEx() { this.asNode() instanceof ArgNode } - - DataFlowCall getCall() { this.asNode().(ArgNode).argumentOf(result, _) } - } - - private class ParamNodeEx extends NodeEx { - ParamNodeEx() { this.asNode() instanceof ParamNode } - - predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { - this.asNode().(ParamNode).isParameterOf(c, pos) - } - - ParameterPosition getPosition() { this.isParameterOf(_, result) } } - /** - * A node from which flow can return to the caller. This is either a regular - * `ReturnNode` or a synthesized node for flow out via a parameter. - */ - private class RetNodeEx extends NodeEx { - private ReturnPosition pos; + private class ArgNodeEx extends NodeEx, ArgNodeExImpl { } - RetNodeEx() { - pos = getValueReturnPosition(this.asNode()) or - pos = getParamReturnPosition(_, this.asParamReturnNode()) - } + private class ParamNodeEx extends NodeEx, ParamNodeExImpl { } - ReturnPosition getReturnPosition() { result = pos } - - ReturnKindExt getKind() { result = pos.getKind() } - } + private class RetNodeEx extends NodeEx, RetNodeExImpl { } private module SourceSinkFiltering { private import codeql.util.AlertFiltering @@ -428,20 +353,8 @@ module MakeImpl Lang> { * Holds if data can flow in one local step from `node1` to `node2`. */ private predicate localFlowStepEx(NodeEx node1, NodeEx node2, string model) { - exists(Node n1, Node n2 | - node1.asNode() = n1 and - node2.asNode() = n2 and - simpleLocalFlowStepExt(pragma[only_bind_into](n1), pragma[only_bind_into](n2), model) and - stepFilter(node1, node2) - ) - or - exists(Node n1, Node n2, SndLevelScopeOption scope | - node1.asNode() = n1 and - node2 = TParamReturnNode(n2, scope) and - paramReturnNode(pragma[only_bind_into](n1), pragma[only_bind_into](n2), - pragma[only_bind_into](scope), _) and - model = "" - ) + localFlowStepExImpl(node1, node2, model) and + stepFilter(node1, node2) } /** diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll index 8a82c7b570c5..fffe28d2994b 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll @@ -850,6 +850,85 @@ module MakeImplCommon Lang> { class SndLevelScopeOption = SndLevelScopeOption::Option; + final class NodeExImpl extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n) | result = n.toString() + " [Ext]") + or + result = this.asParamReturnNode().toString() + " [Return]" + } + + Node asNode() { this = TNodeNormal(result) } + + /** Gets the corresponding Node if this is a normal node or its post-implicit read node. */ + Node asNodeOrImplicitRead() { this = TNodeNormal(result) or this = TNodeImplicitRead(result) } + + predicate isImplicitReadNode(Node n) { this = TNodeImplicitRead(n) } + + ParameterNode asParamReturnNode() { this = TParamReturnNode(result, _) } + + Node projectToNode() { + this = TNodeNormal(result) or + this = TNodeImplicitRead(result) or + this = TParamReturnNode(result, _) + } + + pragma[nomagic] + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { + nodeDataFlowType(this.asNode(), result) + or + nodeDataFlowType(this.asParamReturnNode(), result) + } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } + + Location getLocation() { result = this.projectToNode().getLocation() } + } + + final class ArgNodeExImpl extends NodeExImpl { + ArgNodeExImpl() { this.asNode() instanceof ArgNode } + + DataFlowCall getCall() { this.asNode().(ArgNode).argumentOf(result, _) } + } + + final class ParamNodeExImpl extends NodeExImpl { + ParamNodeExImpl() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { + this.asNode().(ParamNode).isParameterOf(c, pos) + } + + ParameterPosition getPosition() { this.isParameterOf(_, result) } + } + + /** + * A node from which flow can return to the caller. This is either a regular + * `ReturnNode` or a synthesized node for flow out via a parameter. + */ + final class RetNodeExImpl extends NodeExImpl { + private ReturnPosition pos; + + RetNodeExImpl() { pos = getReturnPositionEx(this) } + + ReturnPosition getReturnPosition() { result = pos } + + ReturnKindExt getKind() { result = pos.getKind() } + } + cached private module Cached { /** @@ -927,11 +1006,8 @@ module MakeImplCommon Lang> { ) } - cached - predicate valueReturnNode(ReturnNode n, ReturnKindExt k) { k = TValueReturn(n.getKind()) } - - cached - predicate paramReturnNode( + pragma[nomagic] + private predicate paramReturnNode( PostUpdateNode n, ParamNode p, SndLevelScopeOption scope, ReturnKindExt k ) { exists(ParameterPosition pos | @@ -1541,6 +1617,20 @@ module MakeImplCommon Lang> { class UnreachableSetOption = UnreachableSetOption::Option; + pragma[nomagic] + private predicate hasValueReturnKindIn(ReturnNode ret, ReturnKindExt kind, DataFlowCallable c) { + c = getNodeEnclosingCallable(ret) and + kind = TValueReturn(ret.getKind()) + } + + pragma[nomagic] + private predicate hasParamReturnKindIn( + PostUpdateNode n, ParamNode p, ReturnKindExt kind, DataFlowCallable c + ) { + c = getNodeEnclosingCallable(n) and + paramReturnNode(n, p, _, kind) + } + cached newtype TReturnPosition = TReturnPosition0(DataFlowCallable c, ReturnKindExt kind) { @@ -1549,6 +1639,22 @@ module MakeImplCommon Lang> { hasParamReturnKindIn(_, _, kind, c) } + cached + ReturnPosition getValueReturnPosition(ReturnNode ret) { + exists(ReturnKindExt kind, DataFlowCallable c | + hasValueReturnKindIn(ret, kind, c) and + result = TReturnPosition0(c, kind) + ) + } + + cached + ReturnPosition getParamReturnPosition(PostUpdateNode n, ParamNode p) { + exists(ReturnKindExt kind, DataFlowCallable c | + hasParamReturnKindIn(n, p, kind, c) and + result = TReturnPosition0(c, kind) + ) + } + cached newtype TLocalFlowCallContext = TAnyLocalCall() or @@ -1594,6 +1700,44 @@ module MakeImplCommon Lang> { newtype TApproxAccessPathFrontOption = TApproxAccessPathFrontNone() or TApproxAccessPathFrontSome(ApproxAccessPathFront apf) + + cached + newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n) or // will be restricted to nodes with actual implicit reads in `DataFlowImpl.qll` + TParamReturnNode(ParameterNode p, SndLevelScopeOption scope) { + paramReturnNode(_, p, scope, _) + } + + /** + * Holds if data can flow in one local step from `node1` to `node2`. + */ + cached + predicate localFlowStepExImpl(NodeExImpl node1, NodeExImpl node2, string model) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(pragma[only_bind_into](n1), pragma[only_bind_into](n2), model) + ) + or + exists(Node n1, Node n2, SndLevelScopeOption scope | + node1.asNode() = n1 and + node2 = TParamReturnNode(n2, scope) and + paramReturnNode(pragma[only_bind_into](n1), pragma[only_bind_into](n2), + pragma[only_bind_into](scope), _) and + model = "" + ) + } + + cached + ReturnPosition getReturnPositionEx(NodeExImpl ret) { + result = getValueReturnPosition(ret.asNode()) + or + exists(ParamNode p | + ret = TParamReturnNode(p, _) and + result = getParamReturnPosition(_, p) + ) + } } bindingset[call, tgt] @@ -2177,36 +2321,6 @@ module MakeImplCommon Lang> { nodeDataFlowType(pragma[only_bind_out](n), pragma[only_bind_into](result)) } - pragma[nomagic] - private predicate hasValueReturnKindIn(ReturnNode ret, ReturnKindExt kind, DataFlowCallable c) { - c = getNodeEnclosingCallable(ret) and - valueReturnNode(ret, kind) - } - - pragma[nomagic] - private predicate hasParamReturnKindIn( - PostUpdateNode n, ParamNode p, ReturnKindExt kind, DataFlowCallable c - ) { - c = getNodeEnclosingCallable(n) and - paramReturnNode(n, p, _, kind) - } - - pragma[nomagic] - ReturnPosition getValueReturnPosition(ReturnNode ret) { - exists(ReturnKindExt kind, DataFlowCallable c | - hasValueReturnKindIn(ret, kind, c) and - result = TReturnPosition0(c, kind) - ) - } - - pragma[nomagic] - ReturnPosition getParamReturnPosition(PostUpdateNode n, ParamNode p) { - exists(ReturnKindExt kind, DataFlowCallable c | - hasParamReturnKindIn(n, p, kind, c) and - result = TReturnPosition0(c, kind) - ) - } - /** An optional Boolean value. */ class BooleanOption extends TBooleanOption { string toString() { diff --git a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll index 86b79d4433a2..b0b8901e982e 100644 --- a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll @@ -1775,7 +1775,7 @@ module Make< exists(ReturnNode ret, ValueReturnKind kind | c = "ReturnValue" and ret = node.asNode() and - valueReturnNode(ret, kind) and + kind.getKind() = ret.getKind() and kind.getKind() = getStandardReturnValueKind() and mid.asCallable() = getNodeEnclosingCallable(ret) ) From 6a11120e505b07c5055a85e2d967e7c12e295c62 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 16 Sep 2024 15:01:50 +0200 Subject: [PATCH 089/162] Address review comments --- .../CommandInjectionRuntimeExecLocal.expected | 2 +- .../dataflow/summaries/Summaries.expected | 4 +- .../codeql/dataflow/internal/DataFlowImpl.qll | 59 ++++++++----------- .../dataflow/internal/DataFlowImplCommon.qll | 18 +++--- 4 files changed, 37 insertions(+), 46 deletions(-) diff --git a/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected b/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected index 57820bb4d527..4b46d4d5cd49 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.expected @@ -14,7 +14,7 @@ edges | RuntimeExecTest.java:25:66:25:71 | script : String | RuntimeExecTest.java:25:42:25:72 | {...} : String[] [[]] : String | provenance | | | RuntimeExecTest.java:31:17:31:29 | commandArray2 [post update] : String[] [[]] : String | RuntimeExecTest.java:32:43:32:55 | commandArray2 | provenance | Sink:MaD:1 | | RuntimeExecTest.java:31:36:31:41 | script : String | RuntimeExecTest.java:31:17:31:29 | commandArray2 [post update] : String[] [[]] : String | provenance | | -| RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | RuntimeExecTest.java:36:21:39:44 | toArray(...) | provenance | MaD:5 | +| RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | RuntimeExecTest.java:36:21:39:44 | toArray(...) | provenance | MaD:5 Sink:MaD:1 | | RuntimeExecTest.java:38:25:38:59 | stream(...) : Stream [] : String | RuntimeExecTest.java:36:21:39:21 | concat(...) : Stream [] : String | provenance | MaD:4 | | RuntimeExecTest.java:38:39:38:58 | new String[] : String[] [[]] : String | RuntimeExecTest.java:38:25:38:59 | stream(...) : Stream [] : String | provenance | MaD:3 | | RuntimeExecTest.java:38:39:38:58 | {...} : String[] [[]] : String | RuntimeExecTest.java:38:39:38:58 | new String[] : String[] [[]] : String | provenance | | diff --git a/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected b/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected index cbfa5730e5b7..ce89d3f549f6 100644 --- a/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected +++ b/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected @@ -292,8 +292,8 @@ edges | summaries.rb:128:1:128:1 | [post] x | summaries.rb:129:6:129:6 | x | provenance | | | summaries.rb:128:14:128:20 | tainted | summaries.rb:128:1:128:1 | [post] x | provenance | MaD:21 | | summaries.rb:131:16:131:22 | tainted | summaries.rb:131:1:131:23 | synthetic splat argument | provenance | Sink:MaD:4 | -| summaries.rb:157:14:160:3 | do ... end [captured tainted] | summaries.rb:158:15:158:21 | tainted | provenance | heuristic-callback | -| summaries.rb:157:14:160:3 | do ... end [captured tainted] | summaries.rb:158:15:158:21 | tainted | provenance | heuristic-callback | +| summaries.rb:157:14:160:3 | do ... end [captured tainted] | summaries.rb:158:15:158:21 | tainted | provenance | heuristic-callback Sink:MaD:6 | +| summaries.rb:157:14:160:3 | do ... end [captured tainted] | summaries.rb:158:15:158:21 | tainted | provenance | heuristic-callback Sink:MaD:6 | nodes | summaries.rb:1:11:1:36 | call to identity | semmle.label | call to identity | | summaries.rb:1:11:1:36 | call to identity | semmle.label | call to identity | diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index 12a583141c92..e9d6eafde8a9 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -164,20 +164,6 @@ module MakeImpl Lang> { module Impl { private class FlowState = Config::FlowState; - private class NodeEx extends NodeExImpl { - NodeEx() { - Config::allowImplicitRead(any(Node n | this.isImplicitReadNode(n)), _) - or - not this.isImplicitReadNode(_) - } - } - - private class ArgNodeEx extends NodeEx, ArgNodeExImpl { } - - private class ParamNodeEx extends NodeEx, ParamNodeExImpl { } - - private class RetNodeEx extends NodeEx, RetNodeExImpl { } - private module SourceSinkFiltering { private import codeql.util.AlertFiltering @@ -1043,10 +1029,15 @@ module MakeImpl Lang> { bindingset[label1, label2] pragma[inline_late] private string mergeLabels(string label1, string label2) { - // Big-step, hidden nodes, and summaries all may need to merge labels. - // These cases are expected to involve at most one non-empty label, so - // we'll just discard the 2nd+ label for now. - if label1 = "" then result = label2 else result = label1 + if label2.matches("Sink:%") + then if label1 = "" then result = label2 else result = label1 + " " + label2 + else + // Big-step, hidden nodes, and summaries all may need to merge labels. + // These cases are expected to involve at most one non-empty label, so + // we'll just discard the 2nd+ label for now. + if label1 = "" + then result = label2 + else result = label1 } pragma[nomagic] @@ -2819,15 +2810,15 @@ module MakeImpl Lang> { pragma[nomagic] PathNodeImpl getAnImplicitReadSuccessorAtSink(string label) { exists(PathNodeMid readTarget | - result = this.getASuccessorImpl(label) and + result = this.getASuccessorImpl(_) and localStep(this, readTarget, _) and readTarget.getNodeEx().isImplicitReadNode(_) | // last implicit read, leaving the access path empty - result = readTarget.projectToSink(_) + result = readTarget.projectToSink(label) or // implicit read, leaving the access path non-empty - exists(result.getAnImplicitReadSuccessorAtSink(_)) and + exists(result.getAnImplicitReadSuccessorAtSink(label)) and result = readTarget ) } @@ -2859,7 +2850,7 @@ module MakeImpl Lang> { // `x [Field]` -> `x` // // which the restriction below ensures. - not result = this.getAnImplicitReadSuccessorAtSink(label) + not result = this.getAnImplicitReadSuccessorAtSink(_) or exists(string l1, string l2 | result = this.getASuccessorFromNonHidden(l1).getASuccessorIfHidden(l2) and @@ -2980,18 +2971,15 @@ module MakeImpl Lang> { ) or // a final step to a sink - exists(string l2, string sinkmodel, string l2_ | - result = this.getSuccMid(l2).projectToSink(sinkmodel) and - if l2 = "" then l2_ = l2 else l2_ = l2 + " " + exists(string l2, string sinkLabel | + result = this.getSuccMid(l2).projectToSink(sinkLabel) | not this.isSourceWithLabel(_) and - if sinkmodel != "" then label = l2_ + "Sink:" + sinkmodel else label = l2 + label = mergeLabels(l2, sinkLabel) or exists(string l1 | this.isSourceWithLabel(l1) and - if sinkmodel != "" - then label = l1 + l2_ + "Sink:" + sinkmodel - else label = l1 + l2 + label = l1 + mergeLabels(l2, sinkLabel) ) ) } @@ -3057,11 +3045,14 @@ module MakeImpl Lang> { else any() } - PathNodeSink projectToSink(string model) { - this.isAtSink() and - sinkModel(node, model) and - result.getNodeEx() = this.toNormalSinkNodeEx() and - result.getState() = state + PathNodeSink projectToSink(string label) { + exists(string model | + this.isAtSink() and + sinkModel(node, model) and + result.getNodeEx() = this.toNormalSinkNodeEx() and + result.getState() = state and + if model != "" then label = "Sink:" + model else label = "" + ) } } diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll index fffe28d2994b..81f9946126db 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll @@ -850,7 +850,7 @@ module MakeImplCommon Lang> { class SndLevelScopeOption = SndLevelScopeOption::Option; - final class NodeExImpl extends TNodeEx { + final class NodeEx extends TNodeEx { string toString() { result = this.asNode().toString() or @@ -899,14 +899,14 @@ module MakeImplCommon Lang> { Location getLocation() { result = this.projectToNode().getLocation() } } - final class ArgNodeExImpl extends NodeExImpl { - ArgNodeExImpl() { this.asNode() instanceof ArgNode } + final class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } DataFlowCall getCall() { this.asNode().(ArgNode).argumentOf(result, _) } } - final class ParamNodeExImpl extends NodeExImpl { - ParamNodeExImpl() { this.asNode() instanceof ParamNode } + final class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { this.asNode().(ParamNode).isParameterOf(c, pos) @@ -919,10 +919,10 @@ module MakeImplCommon Lang> { * A node from which flow can return to the caller. This is either a regular * `ReturnNode` or a synthesized node for flow out via a parameter. */ - final class RetNodeExImpl extends NodeExImpl { + final class RetNodeEx extends NodeEx { private ReturnPosition pos; - RetNodeExImpl() { pos = getReturnPositionEx(this) } + RetNodeEx() { pos = getReturnPositionEx(this) } ReturnPosition getReturnPosition() { result = pos } @@ -1713,7 +1713,7 @@ module MakeImplCommon Lang> { * Holds if data can flow in one local step from `node1` to `node2`. */ cached - predicate localFlowStepExImpl(NodeExImpl node1, NodeExImpl node2, string model) { + predicate localFlowStepExImpl(NodeEx node1, NodeEx node2, string model) { exists(Node n1, Node n2 | node1.asNode() = n1 and node2.asNode() = n2 and @@ -1730,7 +1730,7 @@ module MakeImplCommon Lang> { } cached - ReturnPosition getReturnPositionEx(NodeExImpl ret) { + ReturnPosition getReturnPositionEx(NodeEx ret) { result = getValueReturnPosition(ret.asNode()) or exists(ParamNode p | From 300fdc344deb6b698535e4a49332fce3f693e2dd Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 12:13:39 +0200 Subject: [PATCH 090/162] Go: Update expected test output --- .../CWE-090/LDAPInjection.expected | 12 +++------- .../CWE-1004/CookieWithoutHttpOnly.expected | 22 +++++++++++++++++++ .../frameworks/XNetHtml/ReflectedXss.expected | 2 ++ .../CWE-078/CommandInjection.expected | 12 +++------- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/go/ql/test/experimental/CWE-090/LDAPInjection.expected b/go/ql/test/experimental/CWE-090/LDAPInjection.expected index f7f3bdedd4b0..aeaeda6741c7 100644 --- a/go/ql/test/experimental/CWE-090/LDAPInjection.expected +++ b/go/ql/test/experimental/CWE-090/LDAPInjection.expected @@ -25,12 +25,9 @@ edges | LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:76:24:76:32 | untrusted | provenance | Src:MaD:1 | | LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:80:22:80:30 | untrusted | provenance | Src:MaD:1 | | LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:81:25:81:33 | untrusted | provenance | Src:MaD:1 | -| LDAPInjection.go:62:3:62:33 | slice literal [array] | LDAPInjection.go:62:3:62:33 | slice literal | provenance | | -| LDAPInjection.go:62:24:62:32 | untrusted | LDAPInjection.go:62:3:62:33 | slice literal [array] | provenance | | -| LDAPInjection.go:69:3:69:33 | slice literal [array] | LDAPInjection.go:69:3:69:33 | slice literal | provenance | | -| LDAPInjection.go:69:24:69:32 | untrusted | LDAPInjection.go:69:3:69:33 | slice literal [array] | provenance | | -| LDAPInjection.go:76:3:76:33 | slice literal [array] | LDAPInjection.go:76:3:76:33 | slice literal | provenance | | -| LDAPInjection.go:76:24:76:32 | untrusted | LDAPInjection.go:76:3:76:33 | slice literal [array] | provenance | | +| LDAPInjection.go:62:24:62:32 | untrusted | LDAPInjection.go:62:3:62:33 | slice literal | provenance | | +| LDAPInjection.go:69:24:69:32 | untrusted | LDAPInjection.go:69:3:69:33 | slice literal | provenance | | +| LDAPInjection.go:76:24:76:32 | untrusted | LDAPInjection.go:76:3:76:33 | slice literal | provenance | | models | 1 | Source: net/http; Request; true; UserAgent; ; ; ReturnValue; remote; manual | nodes @@ -38,17 +35,14 @@ nodes | LDAPInjection.go:59:3:59:11 | untrusted | semmle.label | untrusted | | LDAPInjection.go:61:3:61:51 | ...+... | semmle.label | ...+... | | LDAPInjection.go:62:3:62:33 | slice literal | semmle.label | slice literal | -| LDAPInjection.go:62:3:62:33 | slice literal [array] | semmle.label | slice literal [array] | | LDAPInjection.go:62:24:62:32 | untrusted | semmle.label | untrusted | | LDAPInjection.go:66:3:66:11 | untrusted | semmle.label | untrusted | | LDAPInjection.go:68:3:68:51 | ...+... | semmle.label | ...+... | | LDAPInjection.go:69:3:69:33 | slice literal | semmle.label | slice literal | -| LDAPInjection.go:69:3:69:33 | slice literal [array] | semmle.label | slice literal [array] | | LDAPInjection.go:69:24:69:32 | untrusted | semmle.label | untrusted | | LDAPInjection.go:73:3:73:11 | untrusted | semmle.label | untrusted | | LDAPInjection.go:75:3:75:51 | ...+... | semmle.label | ...+... | | LDAPInjection.go:76:3:76:33 | slice literal | semmle.label | slice literal | -| LDAPInjection.go:76:3:76:33 | slice literal [array] | semmle.label | slice literal [array] | | LDAPInjection.go:76:24:76:32 | untrusted | semmle.label | untrusted | | LDAPInjection.go:80:22:80:30 | untrusted | semmle.label | untrusted | | LDAPInjection.go:81:25:81:33 | untrusted | semmle.label | untrusted | diff --git a/go/ql/test/experimental/CWE-1004/CookieWithoutHttpOnly.expected b/go/ql/test/experimental/CWE-1004/CookieWithoutHttpOnly.expected index 467f08e74e6f..5c7bef1155ef 100644 --- a/go/ql/test/experimental/CWE-1004/CookieWithoutHttpOnly.expected +++ b/go/ql/test/experimental/CWE-1004/CookieWithoutHttpOnly.expected @@ -7,6 +7,7 @@ edges | CookieWithoutHttpOnly.go:15:20:15:21 | &... [pointer] | CookieWithoutHttpOnly.go:15:20:15:21 | &... | provenance | | | CookieWithoutHttpOnly.go:15:20:15:21 | &... [pointer] | CookieWithoutHttpOnly.go:15:20:15:21 | &... | provenance | | | CookieWithoutHttpOnly.go:15:20:15:21 | &... [pointer] | CookieWithoutHttpOnly.go:15:21:15:21 | c | provenance | | +| CookieWithoutHttpOnly.go:15:21:15:21 | c | CookieWithoutHttpOnly.go:15:20:15:21 | &... | provenance | | | CookieWithoutHttpOnly.go:15:21:15:21 | c | CookieWithoutHttpOnly.go:15:20:15:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:19:7:23:2 | struct literal | CookieWithoutHttpOnly.go:24:20:24:21 | &... | provenance | | | CookieWithoutHttpOnly.go:19:7:23:2 | struct literal | CookieWithoutHttpOnly.go:24:20:24:21 | &... | provenance | | @@ -24,6 +25,8 @@ edges | CookieWithoutHttpOnly.go:24:20:24:21 | &... [pointer] | CookieWithoutHttpOnly.go:24:20:24:21 | &... | provenance | | | CookieWithoutHttpOnly.go:24:20:24:21 | &... [pointer] | CookieWithoutHttpOnly.go:24:21:24:21 | c | provenance | | | CookieWithoutHttpOnly.go:24:20:24:21 | &... [pointer] | CookieWithoutHttpOnly.go:24:21:24:21 | c | provenance | | +| CookieWithoutHttpOnly.go:24:21:24:21 | c | CookieWithoutHttpOnly.go:24:20:24:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:24:21:24:21 | c | CookieWithoutHttpOnly.go:24:20:24:21 | &... | provenance | | | CookieWithoutHttpOnly.go:24:21:24:21 | c | CookieWithoutHttpOnly.go:24:20:24:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:24:21:24:21 | c | CookieWithoutHttpOnly.go:24:20:24:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:28:7:32:2 | struct literal | CookieWithoutHttpOnly.go:33:20:33:21 | &... | provenance | | @@ -42,6 +45,8 @@ edges | CookieWithoutHttpOnly.go:33:20:33:21 | &... [pointer] | CookieWithoutHttpOnly.go:33:20:33:21 | &... | provenance | | | CookieWithoutHttpOnly.go:33:20:33:21 | &... [pointer] | CookieWithoutHttpOnly.go:33:21:33:21 | c | provenance | | | CookieWithoutHttpOnly.go:33:20:33:21 | &... [pointer] | CookieWithoutHttpOnly.go:33:21:33:21 | c | provenance | | +| CookieWithoutHttpOnly.go:33:21:33:21 | c | CookieWithoutHttpOnly.go:33:20:33:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:33:21:33:21 | c | CookieWithoutHttpOnly.go:33:20:33:21 | &... | provenance | | | CookieWithoutHttpOnly.go:33:21:33:21 | c | CookieWithoutHttpOnly.go:33:20:33:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:33:21:33:21 | c | CookieWithoutHttpOnly.go:33:20:33:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:37:7:40:2 | struct literal | CookieWithoutHttpOnly.go:42:20:42:21 | &... | provenance | | @@ -60,6 +65,8 @@ edges | CookieWithoutHttpOnly.go:42:20:42:21 | &... [pointer] | CookieWithoutHttpOnly.go:42:20:42:21 | &... | provenance | | | CookieWithoutHttpOnly.go:42:20:42:21 | &... [pointer] | CookieWithoutHttpOnly.go:42:21:42:21 | c | provenance | | | CookieWithoutHttpOnly.go:42:20:42:21 | &... [pointer] | CookieWithoutHttpOnly.go:42:21:42:21 | c | provenance | | +| CookieWithoutHttpOnly.go:42:21:42:21 | c | CookieWithoutHttpOnly.go:42:20:42:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:42:21:42:21 | c | CookieWithoutHttpOnly.go:42:20:42:21 | &... | provenance | | | CookieWithoutHttpOnly.go:42:21:42:21 | c | CookieWithoutHttpOnly.go:42:20:42:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:42:21:42:21 | c | CookieWithoutHttpOnly.go:42:20:42:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:46:7:49:2 | struct literal | CookieWithoutHttpOnly.go:51:20:51:21 | &... | provenance | | @@ -78,6 +85,8 @@ edges | CookieWithoutHttpOnly.go:51:20:51:21 | &... [pointer] | CookieWithoutHttpOnly.go:51:20:51:21 | &... | provenance | | | CookieWithoutHttpOnly.go:51:20:51:21 | &... [pointer] | CookieWithoutHttpOnly.go:51:21:51:21 | c | provenance | | | CookieWithoutHttpOnly.go:51:20:51:21 | &... [pointer] | CookieWithoutHttpOnly.go:51:21:51:21 | c | provenance | | +| CookieWithoutHttpOnly.go:51:21:51:21 | c | CookieWithoutHttpOnly.go:51:20:51:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:51:21:51:21 | c | CookieWithoutHttpOnly.go:51:20:51:21 | &... | provenance | | | CookieWithoutHttpOnly.go:51:21:51:21 | c | CookieWithoutHttpOnly.go:51:20:51:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:51:21:51:21 | c | CookieWithoutHttpOnly.go:51:20:51:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:55:2:55:4 | definition of val | CookieWithoutHttpOnly.go:59:13:59:15 | val | provenance | | @@ -98,6 +107,8 @@ edges | CookieWithoutHttpOnly.go:61:20:61:21 | &... [pointer] | CookieWithoutHttpOnly.go:61:20:61:21 | &... | provenance | | | CookieWithoutHttpOnly.go:61:20:61:21 | &... [pointer] | CookieWithoutHttpOnly.go:61:21:61:21 | c | provenance | | | CookieWithoutHttpOnly.go:61:20:61:21 | &... [pointer] | CookieWithoutHttpOnly.go:61:21:61:21 | c | provenance | | +| CookieWithoutHttpOnly.go:61:21:61:21 | c | CookieWithoutHttpOnly.go:61:20:61:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:61:21:61:21 | c | CookieWithoutHttpOnly.go:61:20:61:21 | &... | provenance | | | CookieWithoutHttpOnly.go:61:21:61:21 | c | CookieWithoutHttpOnly.go:61:20:61:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:61:21:61:21 | c | CookieWithoutHttpOnly.go:61:20:61:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:65:2:65:4 | definition of val | CookieWithoutHttpOnly.go:69:13:69:15 | val | provenance | | @@ -118,6 +129,8 @@ edges | CookieWithoutHttpOnly.go:71:20:71:21 | &... [pointer] | CookieWithoutHttpOnly.go:71:20:71:21 | &... | provenance | | | CookieWithoutHttpOnly.go:71:20:71:21 | &... [pointer] | CookieWithoutHttpOnly.go:71:21:71:21 | c | provenance | | | CookieWithoutHttpOnly.go:71:20:71:21 | &... [pointer] | CookieWithoutHttpOnly.go:71:21:71:21 | c | provenance | | +| CookieWithoutHttpOnly.go:71:21:71:21 | c | CookieWithoutHttpOnly.go:71:20:71:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:71:21:71:21 | c | CookieWithoutHttpOnly.go:71:20:71:21 | &... | provenance | | | CookieWithoutHttpOnly.go:71:21:71:21 | c | CookieWithoutHttpOnly.go:71:20:71:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:71:21:71:21 | c | CookieWithoutHttpOnly.go:71:20:71:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:75:2:75:4 | definition of val | CookieWithoutHttpOnly.go:80:15:80:17 | val | provenance | | @@ -138,6 +151,8 @@ edges | CookieWithoutHttpOnly.go:81:20:81:21 | &... [pointer] | CookieWithoutHttpOnly.go:81:20:81:21 | &... | provenance | | | CookieWithoutHttpOnly.go:81:20:81:21 | &... [pointer] | CookieWithoutHttpOnly.go:81:21:81:21 | c | provenance | | | CookieWithoutHttpOnly.go:81:20:81:21 | &... [pointer] | CookieWithoutHttpOnly.go:81:21:81:21 | c | provenance | | +| CookieWithoutHttpOnly.go:81:21:81:21 | c | CookieWithoutHttpOnly.go:81:20:81:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:81:21:81:21 | c | CookieWithoutHttpOnly.go:81:20:81:21 | &... | provenance | | | CookieWithoutHttpOnly.go:81:21:81:21 | c | CookieWithoutHttpOnly.go:81:20:81:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:81:21:81:21 | c | CookieWithoutHttpOnly.go:81:20:81:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:85:2:85:4 | definition of val | CookieWithoutHttpOnly.go:90:15:90:17 | val | provenance | | @@ -158,6 +173,8 @@ edges | CookieWithoutHttpOnly.go:91:20:91:21 | &... [pointer] | CookieWithoutHttpOnly.go:91:20:91:21 | &... | provenance | | | CookieWithoutHttpOnly.go:91:20:91:21 | &... [pointer] | CookieWithoutHttpOnly.go:91:21:91:21 | c | provenance | | | CookieWithoutHttpOnly.go:91:20:91:21 | &... [pointer] | CookieWithoutHttpOnly.go:91:21:91:21 | c | provenance | | +| CookieWithoutHttpOnly.go:91:21:91:21 | c | CookieWithoutHttpOnly.go:91:20:91:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:91:21:91:21 | c | CookieWithoutHttpOnly.go:91:20:91:21 | &... | provenance | | | CookieWithoutHttpOnly.go:91:21:91:21 | c | CookieWithoutHttpOnly.go:91:20:91:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:91:21:91:21 | c | CookieWithoutHttpOnly.go:91:20:91:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:95:7:98:2 | struct literal | CookieWithoutHttpOnly.go:100:20:100:21 | &... | provenance | | @@ -168,6 +185,7 @@ edges | CookieWithoutHttpOnly.go:100:20:100:21 | &... [pointer] | CookieWithoutHttpOnly.go:100:20:100:21 | &... | provenance | | | CookieWithoutHttpOnly.go:100:20:100:21 | &... [pointer] | CookieWithoutHttpOnly.go:100:20:100:21 | &... | provenance | | | CookieWithoutHttpOnly.go:100:20:100:21 | &... [pointer] | CookieWithoutHttpOnly.go:100:21:100:21 | c | provenance | | +| CookieWithoutHttpOnly.go:100:21:100:21 | c | CookieWithoutHttpOnly.go:100:20:100:21 | &... | provenance | | | CookieWithoutHttpOnly.go:100:21:100:21 | c | CookieWithoutHttpOnly.go:100:20:100:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:104:10:104:18 | "session" | CookieWithoutHttpOnly.go:106:10:106:13 | name | provenance | | | CookieWithoutHttpOnly.go:105:7:108:2 | struct literal | CookieWithoutHttpOnly.go:110:20:110:21 | &... | provenance | | @@ -186,6 +204,8 @@ edges | CookieWithoutHttpOnly.go:110:20:110:21 | &... [pointer] | CookieWithoutHttpOnly.go:110:20:110:21 | &... | provenance | | | CookieWithoutHttpOnly.go:110:20:110:21 | &... [pointer] | CookieWithoutHttpOnly.go:110:21:110:21 | c | provenance | | | CookieWithoutHttpOnly.go:110:20:110:21 | &... [pointer] | CookieWithoutHttpOnly.go:110:21:110:21 | c | provenance | | +| CookieWithoutHttpOnly.go:110:21:110:21 | c | CookieWithoutHttpOnly.go:110:20:110:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:110:21:110:21 | c | CookieWithoutHttpOnly.go:110:20:110:21 | &... | provenance | | | CookieWithoutHttpOnly.go:110:21:110:21 | c | CookieWithoutHttpOnly.go:110:20:110:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:110:21:110:21 | c | CookieWithoutHttpOnly.go:110:20:110:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:114:13:114:24 | "login_name" | CookieWithoutHttpOnly.go:116:10:116:16 | session | provenance | | @@ -205,6 +225,8 @@ edges | CookieWithoutHttpOnly.go:120:20:120:21 | &... [pointer] | CookieWithoutHttpOnly.go:120:20:120:21 | &... | provenance | | | CookieWithoutHttpOnly.go:120:20:120:21 | &... [pointer] | CookieWithoutHttpOnly.go:120:21:120:21 | c | provenance | | | CookieWithoutHttpOnly.go:120:20:120:21 | &... [pointer] | CookieWithoutHttpOnly.go:120:21:120:21 | c | provenance | | +| CookieWithoutHttpOnly.go:120:21:120:21 | c | CookieWithoutHttpOnly.go:120:20:120:21 | &... | provenance | | +| CookieWithoutHttpOnly.go:120:21:120:21 | c | CookieWithoutHttpOnly.go:120:20:120:21 | &... | provenance | | | CookieWithoutHttpOnly.go:120:21:120:21 | c | CookieWithoutHttpOnly.go:120:20:120:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:120:21:120:21 | c | CookieWithoutHttpOnly.go:120:20:120:21 | &... [pointer] | provenance | | | CookieWithoutHttpOnly.go:123:13:123:49 | call to NewCookieStore | CookieWithoutHttpOnly.go:126:16:126:20 | store | provenance | | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected index 7cd78374940d..c4f6a2e13376 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected @@ -54,6 +54,7 @@ edges | test.go:45:22:45:31 | &... [pointer] | test.go:45:22:45:31 | &... | provenance | | | test.go:45:22:45:31 | &... [pointer] | test.go:45:22:45:31 | &... | provenance | | | test.go:45:22:45:31 | &... [pointer] | test.go:45:23:45:31 | cleanNode | provenance | | +| test.go:45:23:45:31 | cleanNode | test.go:45:22:45:31 | &... | provenance | | | test.go:45:23:45:31 | cleanNode | test.go:45:22:45:31 | &... [pointer] | provenance | | | test.go:47:6:47:15 | definition of cleanNode2 | test.go:50:22:50:32 | &... | provenance | | | test.go:47:6:47:15 | definition of cleanNode2 | test.go:50:22:50:32 | &... | provenance | | @@ -65,6 +66,7 @@ edges | test.go:50:22:50:32 | &... [pointer] | test.go:50:22:50:32 | &... | provenance | | | test.go:50:22:50:32 | &... [pointer] | test.go:50:22:50:32 | &... | provenance | | | test.go:50:22:50:32 | &... [pointer] | test.go:50:23:50:32 | cleanNode2 | provenance | | +| test.go:50:23:50:32 | cleanNode2 | test.go:50:22:50:32 | &... | provenance | | | test.go:50:23:50:32 | cleanNode2 | test.go:50:22:50:32 | &... [pointer] | provenance | | models | 1 | Summary: golang.org/x/net/html; ; false; NewTokenizer; ; ; Argument[0]; ReturnValue; taint; manual | diff --git a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected index 998f8c09bd02..3743e7fc4541 100644 --- a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected +++ b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected @@ -59,8 +59,7 @@ edges | SanitizingDoubleDash.go:13:15:13:32 | array literal [array] | SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | provenance | | | SanitizingDoubleDash.go:13:25:13:31 | tainted | SanitizingDoubleDash.go:13:15:13:32 | array literal [array] | provenance | | | SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | SanitizingDoubleDash.go:14:23:14:33 | slice element node | provenance | | -| SanitizingDoubleDash.go:14:23:14:33 | slice element node | SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | provenance | | -| SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | SanitizingDoubleDash.go:14:23:14:33 | slice expression | provenance | | +| SanitizingDoubleDash.go:14:23:14:33 | slice element node | SanitizingDoubleDash.go:14:23:14:33 | slice expression | provenance | | | SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | SanitizingDoubleDash.go:39:14:39:44 | call to append | provenance | MaD:3 | | SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | SanitizingDoubleDash.go:39:14:39:44 | call to append [array] | provenance | MaD:3 | | SanitizingDoubleDash.go:39:14:39:44 | call to append | SanitizingDoubleDash.go:40:23:40:30 | arrayLit | provenance | | @@ -102,13 +101,11 @@ edges | SanitizingDoubleDash.go:95:15:95:32 | array literal [array] | SanitizingDoubleDash.go:96:24:96:31 | arrayLit [array] | provenance | | | SanitizingDoubleDash.go:95:25:95:31 | tainted | SanitizingDoubleDash.go:95:15:95:32 | array literal [array] | provenance | | | SanitizingDoubleDash.go:96:24:96:31 | arrayLit [array] | SanitizingDoubleDash.go:96:24:96:34 | slice element node | provenance | | -| SanitizingDoubleDash.go:96:24:96:34 | slice element node | SanitizingDoubleDash.go:96:24:96:34 | slice expression [array] | provenance | | -| SanitizingDoubleDash.go:96:24:96:34 | slice expression [array] | SanitizingDoubleDash.go:96:24:96:34 | slice expression | provenance | | +| SanitizingDoubleDash.go:96:24:96:34 | slice element node | SanitizingDoubleDash.go:96:24:96:34 | slice expression | provenance | | | SanitizingDoubleDash.go:100:15:100:38 | array literal [array] | SanitizingDoubleDash.go:101:24:101:31 | arrayLit [array] | provenance | | | SanitizingDoubleDash.go:100:31:100:37 | tainted | SanitizingDoubleDash.go:100:15:100:38 | array literal [array] | provenance | | | SanitizingDoubleDash.go:101:24:101:31 | arrayLit [array] | SanitizingDoubleDash.go:101:24:101:34 | slice element node | provenance | | -| SanitizingDoubleDash.go:101:24:101:34 | slice element node | SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] | provenance | | -| SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] | SanitizingDoubleDash.go:101:24:101:34 | slice expression | provenance | | +| SanitizingDoubleDash.go:101:24:101:34 | slice element node | SanitizingDoubleDash.go:101:24:101:34 | slice expression | provenance | | | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | SanitizingDoubleDash.go:106:24:106:31 | arrayLit | provenance | | | SanitizingDoubleDash.go:105:30:105:36 | tainted | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | provenance | | | SanitizingDoubleDash.go:111:14:111:44 | []type{args} [array] | SanitizingDoubleDash.go:111:14:111:44 | call to append | provenance | MaD:3 | @@ -190,7 +187,6 @@ nodes | SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:14:23:14:33 | slice element node | semmle.label | slice element node | | SanitizingDoubleDash.go:14:23:14:33 | slice expression | semmle.label | slice expression | -| SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | semmle.label | slice expression [array] | | SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | semmle.label | []type{args} [array] | | SanitizingDoubleDash.go:39:14:39:44 | call to append | semmle.label | call to append | | SanitizingDoubleDash.go:39:14:39:44 | call to append [array] | semmle.label | call to append [array] | @@ -220,13 +216,11 @@ nodes | SanitizingDoubleDash.go:96:24:96:31 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:96:24:96:34 | slice element node | semmle.label | slice element node | | SanitizingDoubleDash.go:96:24:96:34 | slice expression | semmle.label | slice expression | -| SanitizingDoubleDash.go:96:24:96:34 | slice expression [array] | semmle.label | slice expression [array] | | SanitizingDoubleDash.go:100:15:100:38 | array literal [array] | semmle.label | array literal [array] | | SanitizingDoubleDash.go:100:31:100:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:101:24:101:31 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:101:24:101:34 | slice element node | semmle.label | slice element node | | SanitizingDoubleDash.go:101:24:101:34 | slice expression | semmle.label | slice expression | -| SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] | semmle.label | slice expression [array] | | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | semmle.label | slice literal [array] | | SanitizingDoubleDash.go:105:30:105:36 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:106:24:106:31 | arrayLit | semmle.label | arrayLit | From 300864a38be319fe29e2a4eaf4a16eecd758e1d8 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 18 Sep 2024 11:18:37 +0100 Subject: [PATCH 091/162] Java: dbscheme: Remove sourceid column of fields/5 It was always the same as the id column. --- java/ql/lib/config/semmlecode.dbscheme | 3 +- java/ql/lib/config/semmlecode.dbscheme.stats | 197 ------------------- 2 files changed, 1 insertion(+), 199 deletions(-) diff --git a/java/ql/lib/config/semmlecode.dbscheme b/java/ql/lib/config/semmlecode.dbscheme index 376ce7dad793..876cabc76c5c 100644 --- a/java/ql/lib/config/semmlecode.dbscheme +++ b/java/ql/lib/config/semmlecode.dbscheme @@ -392,8 +392,7 @@ fields( unique int id: @field, string nodeName: string ref, int typeid: @type ref, - int parentid: @reftype ref, - int sourceid: @field ref + int parentid: @reftype ref ); fieldsKotlinType( diff --git a/java/ql/lib/config/semmlecode.dbscheme.stats b/java/ql/lib/config/semmlecode.dbscheme.stats index 0a89bd2d1ec0..18f6ac5b4a85 100644 --- a/java/ql/lib/config/semmlecode.dbscheme.stats +++ b/java/ql/lib/config/semmlecode.dbscheme.stats @@ -9197,10 +9197,6 @@ parentid 249278 - - sourceid - 2886451 - @@ -9251,22 +9247,6 @@ - - id - sourceid - - - 12 - - - 1 - 2 - 2886451 - - - - - nodeName id @@ -9330,27 +9310,6 @@ - - nodeName - sourceid - - - 12 - - - 1 - 2 - 2356342 - - - 2 - 302 - 152116 - - - - - typeid id @@ -9449,42 +9408,6 @@ - - typeid - sourceid - - - 12 - - - 1 - 2 - 124952 - - - 2 - 3 - 21104 - - - 3 - 4 - 10447 - - - 4 - 8 - 14835 - - - 8 - 9650 - 11283 - - - - - parentid id @@ -9633,126 +9556,6 @@ - - parentid - sourceid - - - 12 - - - 1 - 2 - 115132 - - - 2 - 3 - 25074 - - - 3 - 4 - 20477 - - - 4 - 5 - 15253 - - - 5 - 6 - 12328 - - - 6 - 8 - 18387 - - - 8 - 14 - 19641 - - - 14 - 93 - 18805 - - - 95 - 1772 - 4179 - - - - - - - sourceid - id - - - 12 - - - 1 - 2 - 2886451 - - - - - - - sourceid - nodeName - - - 12 - - - 1 - 2 - 2886451 - - - - - - - sourceid - typeid - - - 12 - - - 1 - 2 - 2886451 - - - - - - - sourceid - parentid - - - 12 - - - 1 - 2 - 2886451 - - - - - From 0be52f9660dec20783948112dbe91f665ab3d960 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 18 Sep 2024 11:23:54 +0100 Subject: [PATCH 092/162] Kotlin: Follow removal of sourceid column of the fields relation --- .../src/main/kotlin/KotlinFileExtractor.kt | 9 ++++----- .../src/main/kotlin/KotlinUsesExtractor.kt | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 0ca8cb4af09a..4b61447824de 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -1020,7 +1020,7 @@ open class KotlinFileExtractor( // here. val instance = useObjectClassInstance(c) val type = useSimpleTypeClass(c, emptyList(), false) - tw.writeFields(instance.id, instance.name, type.javaResult.id, id, instance.id) + tw.writeFields(instance.id, instance.name, type.javaResult.id, id) tw.writeFieldsKotlinType(instance.id, type.kotlinResult.id) tw.writeHasLocation(instance.id, locId) addModifiers(instance.id, "public", "static", "final") @@ -1237,8 +1237,7 @@ open class KotlinFileExtractor( instance.id, instance.name, type.javaResult.id, - parentId, - instance.id + parentId ) tw.writeFieldsKotlinType(instance.id, type.kotlinResult.id) tw.writeHasLocation(instance.id, innerLocId) @@ -2600,7 +2599,7 @@ open class KotlinFileExtractor( isStatic: Boolean ): Label { val t = useType(type) - tw.writeFields(id, name, t.javaResult.id, parentId, id) + tw.writeFields(id, name, t.javaResult.id, parentId) tw.writeFieldsKotlinType(id, t.kotlinResult.id) tw.writeHasLocation(id, locId) @@ -2757,7 +2756,7 @@ open class KotlinFileExtractor( DeclarationStackAdjuster(ee).use { val id = useEnumEntry(ee) val type = getEnumEntryType(ee) ?: return - tw.writeFields(id, ee.name.asString(), type.javaResult.id, parentId, id) + tw.writeFields(id, ee.name.asString(), type.javaResult.id, parentId) tw.writeFieldsKotlinType(id, type.kotlinResult.id) val locId = tw.getLocation(ee) tw.writeHasLocation(id, locId) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index 3be94d65690f..a1c247340640 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -779,7 +779,7 @@ open class KotlinUsesExtractor( // array.length val length = tw.getLabelFor("@\"field;{$it};length\"") val intTypeIds = useType(pluginContext.irBuiltIns.intType) - tw.writeFields(length, "length", intTypeIds.javaResult.id, it, length) + tw.writeFields(length, "length", intTypeIds.javaResult.id, it) tw.writeFieldsKotlinType(length, intTypeIds.kotlinResult.id) addModifiers(length, "public", "final") From bda779a58d6aae7de31e9bca7298f7d4524b0672 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 18 Sep 2024 11:27:20 +0100 Subject: [PATCH 093/162] Java: Deprecate Field.getSourceDeclaration() and Field.isSourceDeclaration() Also follows the removal of the sourceid column of fields. --- java/ql/lib/definitions.qll | 2 +- java/ql/lib/semmle/code/Location.qll | 2 +- java/ql/lib/semmle/code/java/Dependency.qll | 2 +- .../lib/semmle/code/java/DependencyCounts.qll | 2 +- java/ql/lib/semmle/code/java/Element.qll | 2 +- java/ql/lib/semmle/code/java/Member.qll | 18 ++++++------------ java/ql/lib/semmle/code/java/Type.qll | 8 +++----- .../Declarations/NonFinalImmutableField.ql | 2 +- .../Dead Code/NonAssignedFields.ql | 11 +++-------- .../Dead Code/UnusedField.ql | 2 +- .../Naming Conventions/Shadowing.qll | 14 +++++--------- 11 files changed, 24 insertions(+), 41 deletions(-) diff --git a/java/ql/lib/definitions.qll b/java/ql/lib/definitions.qll index e4b93f6f7e14..aa5de3eb4019 100644 --- a/java/ql/lib/definitions.qll +++ b/java/ql/lib/definitions.qll @@ -159,7 +159,7 @@ private Element definition(Element e, string kind) { e.(TypeAccess).getType().(RefType).getSourceDeclaration() = result and kind = "T" or exists(Variable v | v = e.(VarAccess).getVariable() | - result = v.(Field).getSourceDeclaration() or + result = v.(Field) or result = v.(Parameter).getSourceDeclaration() or result = v.(LocalVariableDecl) ) and diff --git a/java/ql/lib/semmle/code/Location.qll b/java/ql/lib/semmle/code/Location.qll index 1a6ddc737289..abc1d19d0f89 100644 --- a/java/ql/lib/semmle/code/Location.qll +++ b/java/ql/lib/semmle/code/Location.qll @@ -18,7 +18,7 @@ predicate hasName(Element e, string name) { or methods(e, name, _, _, _, _) or - fields(e, name, _, _, _) + fields(e, name, _, _) or packages(e, name) or diff --git a/java/ql/lib/semmle/code/java/Dependency.qll b/java/ql/lib/semmle/code/java/Dependency.qll index 29dc81a19600..8514bcb466a1 100644 --- a/java/ql/lib/semmle/code/java/Dependency.qll +++ b/java/ql/lib/semmle/code/java/Dependency.qll @@ -52,7 +52,7 @@ predicate depends(RefType t, RefType dep) { or // the declaring type of a field accessed in `t`, exists(Field f | f.getAnAccess().getEnclosingCallable().getDeclaringType() = t | - usesType(f.getSourceDeclaration().getDeclaringType(), dep) + usesType(f.getDeclaringType(), dep) ) or // the type of a local variable declared in `t`, diff --git a/java/ql/lib/semmle/code/java/DependencyCounts.qll b/java/ql/lib/semmle/code/java/DependencyCounts.qll index 464f88471884..4cb958373a93 100644 --- a/java/ql/lib/semmle/code/java/DependencyCounts.qll +++ b/java/ql/lib/semmle/code/java/DependencyCounts.qll @@ -64,7 +64,7 @@ predicate numDepends(RefType t, RefType dep, int value) { elem = fa and fa.getEnclosingCallable().getDeclaringType() = t | - usesType(fa.getField().getSourceDeclaration().getDeclaringType(), dep) + usesType(fa.getField().getDeclaringType(), dep) ) or // the type of a local variable declared in `t`, diff --git a/java/ql/lib/semmle/code/java/Element.qll b/java/ql/lib/semmle/code/java/Element.qll index 493bf7cec0ff..2032d72ee5f9 100644 --- a/java/ql/lib/semmle/code/java/Element.qll +++ b/java/ql/lib/semmle/code/java/Element.qll @@ -115,7 +115,7 @@ private predicate hasChildElement(Element parent, Element e) { or params(e, _, _, parent, _) or - fields(e, _, _, parent, _) + fields(e, _, _, parent) or typeVars(e, _, _, parent) } diff --git a/java/ql/lib/semmle/code/java/Member.qll b/java/ql/lib/semmle/code/java/Member.qll index 7c625ae48c61..f6f4ca56f92d 100644 --- a/java/ql/lib/semmle/code/java/Member.qll +++ b/java/ql/lib/semmle/code/java/Member.qll @@ -756,13 +756,13 @@ class FieldDeclaration extends ExprParent, @fielddecl, Annotatable { /** A class or instance field. */ class Field extends Member, ExprParent, @field, Variable { /** Gets the declared type of this field. */ - override Type getType() { fields(this, _, result, _, _) } + override Type getType() { fields(this, _, result, _) } /** Gets the Kotlin type of this field. */ override KotlinType getKotlinType() { fieldsKotlinType(this, result) } /** Gets the type in which this field is declared. */ - override RefType getDeclaringType() { fields(this, _, _, result, _) } + override RefType getDeclaringType() { fields(this, _, _, result) } /** * Gets the field declaration in which this field is declared. @@ -794,18 +794,12 @@ class Field extends Member, ExprParent, @field, Variable { } /** - * Gets the source declaration of this field. - * - * For fields that are members of a parameterized - * instance of a generic type, the source declaration is the - * corresponding field in the generic type. - * - * For all other fields, the source declaration is the field itself. + * DEPRECATED: The result is always `this`. */ - Field getSourceDeclaration() { fields(this, _, _, _, result) } + deprecated Field getSourceDeclaration() { result = this } - /** Holds if this field is the same as its source declaration. */ - predicate isSourceDeclaration() { this.getSourceDeclaration() = this } + /** DEPRECATED: This always holds. */ + deprecated predicate isSourceDeclaration() { any() } override predicate isPublic() { Member.super.isPublic() diff --git a/java/ql/lib/semmle/code/java/Type.qll b/java/ql/lib/semmle/code/java/Type.qll index f2709d3dda1a..5036bbea6224 100644 --- a/java/ql/lib/semmle/code/java/Type.qll +++ b/java/ql/lib/semmle/code/java/Type.qll @@ -324,7 +324,7 @@ predicate declaresMember(Type t, @member m) { or constrs(m, _, _, _, t, _) or - fields(m, _, _, t, _) + fields(m, _, _, t) or enclInReftype(m, t) and // Since the type `@member` in the dbscheme includes all `@reftype`s, @@ -1195,12 +1195,10 @@ class EnumType extends Class { EnumType() { isEnumType(this) } /** Gets the enum constant with the specified name. */ - EnumConstant getEnumConstant(string name) { - fields(result, _, _, this, _) and result.hasName(name) - } + EnumConstant getEnumConstant(string name) { fields(result, _, _, this) and result.hasName(name) } /** Gets an enum constant declared in this enum type. */ - EnumConstant getAnEnumConstant() { fields(result, _, _, this, _) } + EnumConstant getAnEnumConstant() { fields(result, _, _, this) } override predicate isFinal() { // JLS 8.9: An enum declaration is implicitly `final` unless it contains diff --git a/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql b/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql index d025466ae5ac..493168d80a7e 100644 --- a/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql +++ b/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql @@ -40,7 +40,7 @@ class ImmutableField extends Field { this.getType() instanceof ImmutableType and // The field is only assigned to in a constructor or static initializer of the type it is declared in. forall(FieldAccess fw, AnyAssignment ae | - fw.getField().getSourceDeclaration() = this and + fw.getField() = this and fw = ae.getDest() | ae.getEnclosingCallable().getDeclaringType() = this.getDeclaringType() and diff --git a/java/ql/src/Violations of Best Practice/Dead Code/NonAssignedFields.ql b/java/ql/src/Violations of Best Practice/Dead Code/NonAssignedFields.ql index 2c618f94aad3..28f06c4edfc0 100644 --- a/java/ql/src/Violations of Best Practice/Dead Code/NonAssignedFields.ql +++ b/java/ql/src/Violations of Best Practice/Dead Code/NonAssignedFields.ql @@ -63,15 +63,10 @@ predicate isVMObserver(RefType rt) { from Field f, FieldRead fr where f.fromSource() and - fr.getField().getSourceDeclaration() = f and + fr.getField() = f and not f.getDeclaringType() instanceof EnumType and - forall(Assignment ae, Field g | ae.getDest() = g.getAnAccess() and g.getSourceDeclaration() = f | - ae.getSource() instanceof NullLiteral - ) and - not exists(UnaryAssignExpr ua, Field g | - ua.getExpr() = g.getAnAccess() and - g.getSourceDeclaration() = f - ) and + forall(Assignment ae | ae.getDest() = f.getAnAccess() | ae.getSource() instanceof NullLiteral) and + not exists(UnaryAssignExpr ua | ua.getExpr() = f.getAnAccess()) and not f.isFinal() and // Exclude fields that may be accessed reflectively. not reflectivelyWritten(f) and diff --git a/java/ql/src/Violations of Best Practice/Dead Code/UnusedField.ql b/java/ql/src/Violations of Best Practice/Dead Code/UnusedField.ql index b5cb9f1c3c14..fab4e76bbda8 100644 --- a/java/ql/src/Violations of Best Practice/Dead Code/UnusedField.ql +++ b/java/ql/src/Violations of Best Practice/Dead Code/UnusedField.ql @@ -19,7 +19,7 @@ where not (f.isPublic() or f.isProtected()) and f.fromSource() and not f.getDeclaringType() instanceof EnumType and - not exists(VarAccess va | va.getVariable().(Field).getSourceDeclaration() = f) and + not exists(VarAccess va | va.getVariable() = f) and // Exclude results in generated classes. not f.getDeclaringType() instanceof GeneratedClass and // Exclude fields that may be reflectively read (this includes standard serialization). diff --git a/java/ql/src/Violations of Best Practice/Naming Conventions/Shadowing.qll b/java/ql/src/Violations of Best Practice/Naming Conventions/Shadowing.qll index f37d7fdcab00..561c57b7cd9b 100644 --- a/java/ql/src/Violations of Best Practice/Naming Conventions/Shadowing.qll +++ b/java/ql/src/Violations of Best Practice/Naming Conventions/Shadowing.qll @@ -33,7 +33,7 @@ private Field getField(Class c, string name, Type t) { predicate thisAccess(LocalVariableDecl d, Field f) { shadows(d, _, f, _) and - exists(VarAccess va | va.getVariable().(Field).getSourceDeclaration() = f | + exists(VarAccess va | va.getVariable() = f | va.getQualifier() instanceof ThisAccess and va.getEnclosingCallable() = d.getCallable() ) @@ -41,7 +41,7 @@ predicate thisAccess(LocalVariableDecl d, Field f) { predicate confusingAccess(LocalVariableDecl d, Field f) { shadows(d, _, f, _) and - exists(VarAccess va | va.getVariable().(Field).getSourceDeclaration() = f | + exists(VarAccess va | va.getVariable() = f | not exists(va.getQualifier()) and va.getEnclosingCallable() = d.getCallable() ) @@ -52,10 +52,7 @@ predicate assignmentToShadowingLocal(LocalVariableDecl d, Field f) { exists(Expr assignedValue, Expr use | d.getAnAssignedValue() = assignedValue and getARelevantChild(assignedValue) = use | - exists(FieldAccess access, Field ff | access = assignedValue | - ff = access.getField() and - ff.getSourceDeclaration() = f - ) + exists(FieldAccess access | access = assignedValue | f = access.getField()) or exists(MethodCall get, Method getter | get = assignedValue and getter = get.getMethod() | getterFor(getter, f) @@ -73,10 +70,9 @@ predicate assignmentFromShadowingLocal(LocalVariableDecl d, Field f) { setterFor(setter, f) ) or - exists(Field instance, Expr assignedValue | + exists(Expr assignedValue | access = getARelevantChild(assignedValue) and - assignedValue = instance.getAnAssignedValue() and - instance.getSourceDeclaration() = f + assignedValue = f.getAnAssignedValue() ) ) } From 76662a6002783cd07a3417dd5130abdb199fa96d Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 18 Sep 2024 11:29:51 +0100 Subject: [PATCH 094/162] Java: Add changenote for deprecation of Field.getSourceDeclaration() and Field.isSourceDeclaration() --- java/ql/lib/change-notes/2024-09-18-fields.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 java/ql/lib/change-notes/2024-09-18-fields.md diff --git a/java/ql/lib/change-notes/2024-09-18-fields.md b/java/ql/lib/change-notes/2024-09-18-fields.md new file mode 100644 index 000000000000..d2367bf2b04e --- /dev/null +++ b/java/ql/lib/change-notes/2024-09-18-fields.md @@ -0,0 +1,5 @@ +--- +category: deprecated +--- +* The `Field.getSourceDeclaration()` predicate has been deprecated. The result was always the original field, so calls to it can simply be removed. +* The `Field.isSourceDeclaration()` predicate has been deprecated. It always holds. From 9b8152a44b1f917b17bdd8cf4356a9555e8b571b Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 18 Sep 2024 11:45:45 +0100 Subject: [PATCH 095/162] Java: Add up/downgrade scripts --- .../fields.ql | 15 + .../old.dbscheme | 1232 ++++++++++++++++ .../semmlecode.dbscheme | 1233 +++++++++++++++++ .../upgrade.properties | 3 + .../fields.ql | 15 + .../old.dbscheme | 1233 +++++++++++++++++ .../semmlecode.dbscheme | 1232 ++++++++++++++++ .../upgrade.properties | 3 + 8 files changed, 4966 insertions(+) create mode 100644 java/downgrades/876cabc76c5c83912271db331481f8cba2749643/fields.ql create mode 100644 java/downgrades/876cabc76c5c83912271db331481f8cba2749643/old.dbscheme create mode 100644 java/downgrades/876cabc76c5c83912271db331481f8cba2749643/semmlecode.dbscheme create mode 100644 java/downgrades/876cabc76c5c83912271db331481f8cba2749643/upgrade.properties create mode 100644 java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/fields.ql create mode 100644 java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/old.dbscheme create mode 100644 java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/semmlecode.dbscheme create mode 100644 java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/upgrade.properties diff --git a/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/fields.ql b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/fields.ql new file mode 100644 index 000000000000..614cb9b4afe5 --- /dev/null +++ b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/fields.ql @@ -0,0 +1,15 @@ +class Field extends @field { + string toString() { none() } +} + +class Type extends @type { + string toString() { none() } +} + +class RefType extends @reftype { + string toString() { none() } +} + +from Field f, string name, Type t, RefType parent +where fields(f, name, t, parent) +select f, name, t, parent, f diff --git a/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/old.dbscheme b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/old.dbscheme new file mode 100644 index 000000000000..876cabc76c5c --- /dev/null +++ b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/old.dbscheme @@ -0,0 +1,1232 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +isCanonicalConstr( + int constructorid: @constructor ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +| 89 = @recordpatternexpr +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +isNullDefaultCase( + int id: @case ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF + // 3: ENUM_ENTRIES +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/semmlecode.dbscheme b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/semmlecode.dbscheme new file mode 100644 index 000000000000..376ce7dad793 --- /dev/null +++ b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/semmlecode.dbscheme @@ -0,0 +1,1233 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @field ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +isCanonicalConstr( + int constructorid: @constructor ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +| 89 = @recordpatternexpr +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +isNullDefaultCase( + int id: @case ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF + // 3: ENUM_ENTRIES +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/upgrade.properties b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/upgrade.properties new file mode 100644 index 000000000000..64fe711dd701 --- /dev/null +++ b/java/downgrades/876cabc76c5c83912271db331481f8cba2749643/upgrade.properties @@ -0,0 +1,3 @@ +description: Remove fields.sourceid +compatibility: full +fields.rel: run fields.qlo diff --git a/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/fields.ql b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/fields.ql new file mode 100644 index 000000000000..a8b9b57c3f63 --- /dev/null +++ b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/fields.ql @@ -0,0 +1,15 @@ +class Field extends @field { + string toString() { none() } +} + +class Type extends @type { + string toString() { none() } +} + +class RefType extends @reftype { + string toString() { none() } +} + +from Field f, string name, Type t, RefType parent +where fields(f, name, t, parent, _) +select f, name, t, parent diff --git a/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/old.dbscheme b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/old.dbscheme new file mode 100644 index 000000000000..376ce7dad793 --- /dev/null +++ b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/old.dbscheme @@ -0,0 +1,1233 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @field ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +isCanonicalConstr( + int constructorid: @constructor ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +| 89 = @recordpatternexpr +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +isNullDefaultCase( + int id: @case ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF + // 3: ENUM_ENTRIES +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/semmlecode.dbscheme b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/semmlecode.dbscheme new file mode 100644 index 000000000000..876cabc76c5c --- /dev/null +++ b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/semmlecode.dbscheme @@ -0,0 +1,1232 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +isCanonicalConstr( + int constructorid: @constructor ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +| 89 = @recordpatternexpr +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +isNullDefaultCase( + int id: @case ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF + // 3: ENUM_ENTRIES +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/upgrade.properties b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/upgrade.properties new file mode 100644 index 000000000000..64fe711dd701 --- /dev/null +++ b/java/ql/lib/upgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/upgrade.properties @@ -0,0 +1,3 @@ +description: Remove fields.sourceid +compatibility: full +fields.rel: run fields.qlo From 22c2522aacfe4d6e9234ada03f98fe7e5ddd2dd8 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 24 Sep 2024 15:16:16 +0200 Subject: [PATCH 096/162] Shared: Make a ContentSensitive module with predicates and classes related to content flow. --- .../CaptureContentSummaryModels.ql | 2 +- .../dataflow/CaptureContentSummaryModels.ql | 2 +- .../CaptureContentSummaryModels.ql | 2 +- .../dataflow/CaptureContentSummaryModels.ql | 2 +- .../mad/modelgenerator/ModelGeneratorImpl.qll | 540 +++++++++--------- 5 files changed, 278 insertions(+), 270 deletions(-) diff --git a/csharp/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql b/csharp/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql index 5a653867572e..306ec34d31d0 100644 --- a/csharp/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql +++ b/csharp/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql @@ -9,5 +9,5 @@ import internal.CaptureModels from DataFlowSummaryTargetApi api, string flow -where flow = captureContentFlow(api) +where flow = ContentSensitive::captureFlow(api) select flow order by flow diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql index f5d8593a32ac..b2777d4bc346 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql @@ -3,7 +3,7 @@ import utils.modelgenerator.internal.CaptureModels import TestUtilities.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { - string getCapturedModel(Callable c) { result = captureContentFlow(c) } + string getCapturedModel(Callable c) { result = ContentSensitive::captureFlow(c) } string getKind() { result = "contentbased-summary" } } diff --git a/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql b/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql index e0e793348f59..ad3008e54a59 100644 --- a/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql @@ -9,5 +9,5 @@ import internal.CaptureModels from DataFlowSummaryTargetApi api, string flow -where flow = captureContentFlow(api) +where flow = ContentSensitive::captureFlow(api) select flow order by flow diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql index 3d2a2e07ac6e..4cb7f4604039 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql @@ -3,7 +3,7 @@ import utils.modelgenerator.internal.CaptureModels import TestUtilities.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { - string getCapturedModel(Callable c) { result = captureContentFlow(c) } + string getCapturedModel(Callable c) { result = ContentSensitive::captureFlow(c) } string getKind() { result = "contentbased-summary" } } diff --git a/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll b/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll index 1ce4edb2fda3..6e8c160ffb7f 100644 --- a/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll +++ b/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll @@ -260,7 +260,6 @@ module MakeModelGenerator< } private import ModelGeneratorInput - private import MakeImplContentDataFlow as ContentDataFlow private import Tt::TaintFlowMake as TaintTracking private module ModelPrintingLang implements ModelPrintingLangSig { @@ -310,10 +309,6 @@ module MakeModelGenerator< result = PrintReturnNodeExt::getOutput(node) } - string getContentOutput(ReturnNodeExt node) { - result = PrintReturnNodeExt::getOutput(node) - } - final private class SummaryTargetApiFinal = SummaryTargetApi; class DataFlowSummaryTargetApi extends SummaryTargetApiFinal { @@ -373,16 +368,6 @@ module MakeModelGenerator< result = qualifierString() and p instanceof InstanceParameterNode } - /** - * Gets the MaD string representation of the parameter `p` - * when used in content flow. - */ - string parameterNodeAsContentInput(DataFlow::ParameterNode p) { - result = parameterContentAccess(p.(NodeExtended).asParameter()) - or - result = qualifierString() and p instanceof InstanceParameterNode - } - /** * Gets the MaD input string representation of `source`. */ @@ -520,302 +505,325 @@ module MakeModelGenerator< ) } - private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source instanceof DataFlow::ParameterNode and - source.(NodeExtended).getEnclosingCallable() instanceof DataFlowSummaryTargetApi - } - - predicate isSink(DataFlow::Node sink) { - sink.(ReturnNodeExt).getEnclosingCallable() instanceof DataFlowSummaryTargetApi - } - - predicate isAdditionalFlowStep = isAdditionalContentFlowStep/2; + /** + * Provides classes and predicates related to capturing summary models + * based on content data flow. + */ + module ContentSensitive { + private import MakeImplContentDataFlow as ContentDataFlow - predicate isBarrier(DataFlow::Node n) { - exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) - } + private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + source instanceof DataFlow::ParameterNode and + source.(NodeExtended).getEnclosingCallable() instanceof DataFlowSummaryTargetApi + } - int accessPathLimit() { result = 2 } + predicate isSink(DataFlow::Node sink) { + sink.(ReturnNodeExt).getEnclosingCallable() instanceof DataFlowSummaryTargetApi + } - predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } + predicate isAdditionalFlowStep = isAdditionalContentFlowStep/2; - DataFlow::FlowFeature getAFeature() { - result instanceof DataFlow::FeatureEqualSourceSinkCallContext - } - } - - private module PropagateContentFlow = ContentDataFlow::Global; + predicate isBarrier(DataFlow::Node n) { + exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) + } - private string getContent(PropagateContentFlow::AccessPath ap, int i) { - exists(DataFlow::ContentSet head, PropagateContentFlow::AccessPath tail | - head = ap.getHead() and - tail = ap.getTail() - | - i = 0 and - result = "." + printContent(head) - or - i > 0 and result = getContent(tail, i - 1) - ) - } + int accessPathLimit() { result = 2 } - /** - * Gets the MaD string representation of a store step access path. - */ - private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) { - result = concat(int i | | getContent(ap, i), "" order by i) - } + predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } - /** - * Gets the MaD string representation of a read step access path. - */ - private string printReadAccessPath(PropagateContentFlow::AccessPath ap) { - result = concat(int i | | getContent(ap, i), "" order by i desc) - } + DataFlow::FlowFeature getAFeature() { + result instanceof DataFlow::FeatureEqualSourceSinkCallContext + } + } - /** - * Holds if the access path `ap` contains a field or synthetic field access. - */ - private predicate mentionsField(PropagateContentFlow::AccessPath ap) { - exists(DataFlow::ContentSet head, PropagateContentFlow::AccessPath tail | - head = ap.getHead() and - tail = ap.getTail() - | - mentionsField(tail) or isField(head) - ) - } + private module PropagateContentFlow = ContentDataFlow::Global; - private predicate apiFlow( - DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, - ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores, boolean preservesValue - ) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - returnNodeExt.getEnclosingCallable() = api and - p.(NodeExtended).getEnclosingCallable() = api - } + private string getContentOutput(ReturnNodeExt node) { + result = PrintReturnNodeExt::getOutput(node) + } - /** - * A class of APIs relevant for modeling using content flow. - * The following heuristic is applied: - * Content flow is only relevant for an API, if - * #content flow <= 2 * #parameters + 3 - * If an API produces more content flow, it is likely that - * 1. Types are not sufficiently constrained leading to a combinatorial - * explosion in dispatch and thus in the generated summaries. - * 2. It is a reasonable approximation to use the non-content based flow - * detection instead, as reads and stores would use a significant - * part of an objects internal state. - */ - private class ContentDataFlowSummaryTargetApi extends DataFlowSummaryTargetApi { - ContentDataFlowSummaryTargetApi() { - count(string input, string output | - exists( - DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, - ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores - | - apiFlow(this, p, reads, returnNodeExt, stores, _) and - input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and - output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) - ) - ) <= 2 * this.getNumberOfParameters() + 3 + /** + * Gets the MaD string representation of the parameter `p` + * when used in content flow. + */ + private string parameterNodeAsContentInput(DataFlow::ParameterNode p) { + result = parameterContentAccess(p.(NodeExtended).asParameter()) + or + result = qualifierString() and p instanceof InstanceParameterNode } - } - pragma[nomagic] - private predicate apiContentFlow( - ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, - PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath stores, boolean preservesValue - ) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - returnNodeExt.getEnclosingCallable() = api and - p.(NodeExtended).getEnclosingCallable() = api - } + private string getContent(PropagateContentFlow::AccessPath ap, int i) { + exists(DataFlow::ContentSet head, PropagateContentFlow::AccessPath tail | + head = ap.getHead() and + tail = ap.getTail() + | + i = 0 and + result = "." + printContent(head) + or + i > 0 and result = getContent(tail, i - 1) + ) + } - /** - * Holds if any of the content sets in `path` translates into a synthetic field. - */ - private predicate hasSyntheticContent(PropagateContentFlow::AccessPath path) { - exists(PropagateContentFlow::AccessPath tail, DataFlow::ContentSet head | - head = path.getHead() and - tail = path.getTail() - | - exists(getSyntheticName(head)) or - hasSyntheticContent(tail) - ) - } + /** + * Gets the MaD string representation of a store step access path. + */ + private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) { + result = concat(int i | | getContent(ap, i), "" order by i) + } - /** - * A module containing predicates for validating access paths containing content sets - * that translates into synthetic fields, when used for generated summary models. - */ - private module AccessPathSyntheticValidation { /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`). + * Gets the MaD string representation of a read step access path. */ - private predicate step( - Type t1, PropagateContentFlow::AccessPath read, Type t2, - PropagateContentFlow::AccessPath store - ) { - exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | - p.(NodeExtended).getType() = t1 and - returnNodeExt.getType() = t2 and - apiContentFlow(_, p, read, returnNodeExt, store, _) - ) + private string printReadAccessPath(PropagateContentFlow::AccessPath ap) { + result = concat(int i | | getContent(ap, i), "" order by i desc) } /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`), where `read` does not have synthetic content and `store` does. - * - * Step A -> Synth. + * Holds if the access path `ap` contains a field or synthetic field access. */ - private predicate synthPathEntry( - Type t1, PropagateContentFlow::AccessPath read, Type t2, - PropagateContentFlow::AccessPath store + private predicate mentionsField(PropagateContentFlow::AccessPath ap) { + exists(DataFlow::ContentSet head, PropagateContentFlow::AccessPath tail | + head = ap.getHead() and + tail = ap.getTail() + | + mentionsField(tail) or isField(head) + ) + } + + private predicate apiFlow( + DataFlowSummaryTargetApi api, DataFlow::ParameterNode p, + PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath stores, boolean preservesValue ) { - not hasSyntheticContent(read) and - hasSyntheticContent(store) and - step(t1, read, t2, store) + PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and + returnNodeExt.getEnclosingCallable() = api and + p.(NodeExtended).getEnclosingCallable() = api } /** - * Holds if there exists an API that has content flow from `read` (on type `t1`) - * to `store` (on type `t2`), where `read` has synthetic content - * and `store` does not. - * - * Step Synth -> A. + * A class of APIs relevant for modeling using content flow. + * The following heuristic is applied: + * Content flow is only relevant for an API, if + * #content flow <= 2 * #parameters + 3 + * If an API produces more content flow, it is likely that + * 1. Types are not sufficiently constrained leading to a combinatorial + * explosion in dispatch and thus in the generated summaries. + * 2. It is a reasonable approximation to use the non-content based flow + * detection instead, as reads and stores would use a significant + * part of an objects internal state. */ - private predicate synthPathExit( - Type t1, PropagateContentFlow::AccessPath read, Type t2, - PropagateContentFlow::AccessPath store + private class ContentDataFlowSummaryTargetApi extends DataFlowSummaryTargetApi { + ContentDataFlowSummaryTargetApi() { + count(string input, string output | + exists( + DataFlow::ParameterNode p, PropagateContentFlow::AccessPath reads, + ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores + | + apiFlow(this, p, reads, returnNodeExt, stores, _) and + input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and + output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) + ) + ) <= 2 * this.getNumberOfParameters() + 3 + } + } + + pragma[nomagic] + private predicate apiContentFlow( + ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, + PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath stores, boolean preservesValue ) { - hasSyntheticContent(read) and - not hasSyntheticContent(store) and - step(t1, read, t2, store) + PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and + returnNodeExt.getEnclosingCallable() = api and + p.(NodeExtended).getEnclosingCallable() = api } /** - * Holds if there exists a path of steps from `read` to an exit. - * - * read ->* Synth -> A + * Holds if any of the content sets in `path` translates into a synthetic field. */ - private predicate reachesSynthExit(Type t, PropagateContentFlow::AccessPath read) { - synthPathExit(t, read, _, _) - or - hasSyntheticContent(read) and - exists(PropagateContentFlow::AccessPath mid, Type midType | - hasSyntheticContent(mid) and - step(t, read, midType, mid) and - reachesSynthExit(midType, mid.reverse()) + private predicate hasSyntheticContent(PropagateContentFlow::AccessPath path) { + exists(PropagateContentFlow::AccessPath tail, DataFlow::ContentSet head | + head = path.getHead() and + tail = path.getTail() + | + exists(getSyntheticName(head)) or + hasSyntheticContent(tail) ) } /** - * Holds if there exists a path of steps from an entry to `store`. - * - * A -> Synth ->* store + * A module containing predicates for validating access paths containing content sets + * that translates into synthetic fields, when used for generated summary models. */ - private predicate synthEntryReaches(Type t, PropagateContentFlow::AccessPath store) { - synthPathEntry(_, _, t, store) - or - hasSyntheticContent(store) and - exists(PropagateContentFlow::AccessPath mid, Type midType | - hasSyntheticContent(mid) and - step(midType, mid, t, store) and - synthEntryReaches(midType, mid.reverse()) - ) + private module AccessPathSyntheticValidation { + /** + * Holds if there exists an API that has content flow from `read` (on type `t1`) + * to `store` (on type `t2`). + */ + private predicate step( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | + p.(NodeExtended).getType() = t1 and + returnNodeExt.getType() = t2 and + apiContentFlow(_, p, read, returnNodeExt, store, _) + ) + } + + /** + * Holds if there exists an API that has content flow from `read` (on type `t1`) + * to `store` (on type `t2`), where `read` does not have synthetic content and `store` does. + * + * Step A -> Synth. + */ + private predicate synthPathEntry( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + not hasSyntheticContent(read) and + hasSyntheticContent(store) and + step(t1, read, t2, store) + } + + /** + * Holds if there exists an API that has content flow from `read` (on type `t1`) + * to `store` (on type `t2`), where `read` has synthetic content + * and `store` does not. + * + * Step Synth -> A. + */ + private predicate synthPathExit( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + hasSyntheticContent(read) and + not hasSyntheticContent(store) and + step(t1, read, t2, store) + } + + /** + * Holds if there exists a path of steps from `read` to an exit. + * + * read ->* Synth -> A + */ + private predicate reachesSynthExit(Type t, PropagateContentFlow::AccessPath read) { + synthPathExit(t, read, _, _) + or + hasSyntheticContent(read) and + exists(PropagateContentFlow::AccessPath mid, Type midType | + hasSyntheticContent(mid) and + step(t, read, midType, mid) and + reachesSynthExit(midType, mid.reverse()) + ) + } + + /** + * Holds if there exists a path of steps from an entry to `store`. + * + * A -> Synth ->* store + */ + private predicate synthEntryReaches(Type t, PropagateContentFlow::AccessPath store) { + synthPathEntry(_, _, t, store) + or + hasSyntheticContent(store) and + exists(PropagateContentFlow::AccessPath mid, Type midType | + hasSyntheticContent(mid) and + step(midType, mid, t, store) and + synthEntryReaches(midType, mid.reverse()) + ) + } + + /** + * Holds if at least one of the access paths `read` (on type `t1`) and `store` (on type `t2`) + * contain content that will be translated into a synthetic field, when being used in + * a MaD summary model, and if there is a range of APIs, such that + * when chaining their flow access paths, there exists access paths `A` and `B` where + * A ->* read -> store ->* B and where `A` and `B` do not contain content that will + * be translated into a synthetic field. + * + * This is needed because we don't want to include summaries that reads from or + * stores into an "internal" synthetic field. + * + * Example: + * Assume we have a type `t` (in this case `t1` = `t2`) with methods `getX` and + * `setX`, which gets and sets a private field `X` on `t`. + * This would lead to the following content flows + * getX : Argument[this].SyntheticField[t.X] -> ReturnValue. + * setX : Argument[0] -> Argument[this].SyntheticField[t.X] + * As the reads and stores are on synthetic fields we should only make summaries + * if both of these methods exist. + */ + pragma[nomagic] + predicate acceptReadStore( + Type t1, PropagateContentFlow::AccessPath read, Type t2, + PropagateContentFlow::AccessPath store + ) { + synthPathEntry(t1, read, t2, store) and reachesSynthExit(t2, store.reverse()) + or + exists(PropagateContentFlow::AccessPath store0 | store0.reverse() = read | + synthEntryReaches(t1, store0) and synthPathExit(t1, read, t2, store) + or + synthEntryReaches(t1, store0) and + step(t1, read, t2, store) and + reachesSynthExit(t2, store.reverse()) + ) + } } /** - * Holds if at least one of the access paths `read` (on type `t1`) and `store` (on type `t2`) - * contain content that will be translated into a synthetic field, when being used in - * a MaD summary model, and if there is a range of APIs, such that - * when chaining their flow access paths, there exists access paths `A` and `B` where - * A ->* read -> store ->* B and where `A` and `B` do not contain content that will - * be translated into a synthetic field. - * - * This is needed because we don't want to include summaries that reads from or - * stores into an "internal" synthetic field. - * - * Example: - * Assume we have a type `t` (in this case `t1` = `t2`) with methods `getX` and - * `setX`, which gets and sets a private field `X` on `t`. - * This would lead to the following content flows - * getX : Argument[this].SyntheticField[t.X] -> ReturnValue. - * setX : Argument[0] -> Argument[this].SyntheticField[t.X] - * As the reads and stores are on synthetic fields we should only make summaries - * if both of these methods exist. + * Holds, if the API `api` has relevant flow from `read` on `p` to `store` on `returnNodeExt`. + * Flow is considered relevant, + * 1. If `read` or `store` do not contain a content set that translates into a synthetic field. + * 2. If `read` or `store` contain a content set that translates into a synthetic field, and if + * the synthetic content is "live" on the relevant declaring type. */ - pragma[nomagic] - predicate acceptReadStore( - Type t1, PropagateContentFlow::AccessPath read, Type t2, - PropagateContentFlow::AccessPath store + private predicate apiRelevantContentFlow( + ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, + PropagateContentFlow::AccessPath read, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath store, boolean preservesValue ) { - synthPathEntry(t1, read, t2, store) and reachesSynthExit(t2, store.reverse()) - or - exists(PropagateContentFlow::AccessPath store0 | store0.reverse() = read | - synthEntryReaches(t1, store0) and synthPathExit(t1, read, t2, store) + apiContentFlow(api, p, read, returnNodeExt, store, preservesValue) and + ( + not hasSyntheticContent(read) and not hasSyntheticContent(store) or - synthEntryReaches(t1, store0) and - step(t1, read, t2, store) and - reachesSynthExit(t2, store.reverse()) + AccessPathSyntheticValidation::acceptReadStore(p.(NodeExtended).getType(), read, + returnNodeExt.getType(), store) ) } - } - /** - * Holds, if the API `api` has relevant flow from `read` on `p` to `store` on `returnNodeExt`. - * Flow is considered relevant, - * 1. If `read` or `store` do not contain a content set that translates into a synthetic field. - * 2. If `read` or `store` contain a content set that translates into a synthetic field, and if - * the synthetic content is "live" on the relevant declaring type. - */ - private predicate apiRelevantContentFlow( - ContentDataFlowSummaryTargetApi api, DataFlow::ParameterNode p, - PropagateContentFlow::AccessPath read, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath store, boolean preservesValue - ) { - apiContentFlow(api, p, read, returnNodeExt, store, preservesValue) and - ( - not hasSyntheticContent(read) and not hasSyntheticContent(store) - or - AccessPathSyntheticValidation::acceptReadStore(p.(NodeExtended).getType(), read, - returnNodeExt.getType(), store) - ) - } - - pragma[nomagic] - private predicate captureContentFlow0( - ContentDataFlowSummaryTargetApi api, string input, string output, boolean preservesValue, - boolean lift - ) { - exists( - DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt, - PropagateContentFlow::AccessPath reads, PropagateContentFlow::AccessPath stores - | - apiRelevantContentFlow(api, p, reads, returnNodeExt, stores, preservesValue) and - input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and - output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) and - input != output and - (if mentionsField(reads) or mentionsField(stores) then lift = false else lift = true) - ) - } + pragma[nomagic] + private predicate captureFlow0( + ContentDataFlowSummaryTargetApi api, string input, string output, boolean preservesValue, + boolean lift + ) { + exists( + DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt, + PropagateContentFlow::AccessPath reads, PropagateContentFlow::AccessPath stores + | + apiRelevantContentFlow(api, p, reads, returnNodeExt, stores, preservesValue) and + input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and + output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) and + input != output and + (if mentionsField(reads) or mentionsField(stores) then lift = false else lift = true) + ) + } - /** - * Gets the content based summary model(s) of the API `api` (if there is flow from a parameter to - * the return value or a parameter). - * - * Models are lifted to the best type in case the read and store access paths do not - * contain a field or synthetic field access. - */ - string captureContentFlow(ContentDataFlowSummaryTargetApi api) { - exists(string input, string output, boolean lift, boolean preservesValue | - captureContentFlow0(api, input, output, _, lift) and - preservesValue = max(boolean p | captureContentFlow0(api, input, output, p, lift)) and - result = ModelPrinting::asModel(api, input, output, preservesValue, lift) - ) + /** + * Gets the content based summary model(s) of the API `api` (if there is flow from a parameter to + * the return value or a parameter). + * + * Models are lifted to the best type in case the read and store access paths do not + * contain a field or synthetic field access. + */ + string captureFlow(ContentDataFlowSummaryTargetApi api) { + exists(string input, string output, boolean lift, boolean preservesValue | + captureFlow0(api, input, output, _, lift) and + preservesValue = max(boolean p | captureFlow0(api, input, output, p, lift)) and + result = ModelPrinting::asModel(api, input, output, preservesValue, lift) + ) + } } /** From fd45d2dcbb681546c2516154f8bdaa87f336b77b Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 24 Sep 2024 15:27:29 +0200 Subject: [PATCH 097/162] Shared: Move the model generator implementation to an internal folder. --- csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll | 2 +- .../src/utils/modelgenerator/internal/CaptureModelsPrinting.qll | 2 +- java/ql/src/utils/modelgenerator/internal/CaptureModels.qll | 2 +- .../src/utils/modelgenerator/internal/CaptureModelsPrinting.qll | 2 +- .../mad/modelgenerator/{ => internal}/ModelGeneratorImpl.qll | 0 .../codeql/mad/modelgenerator/{ => internal}/ModelPrinting.qll | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename shared/mad/codeql/mad/modelgenerator/{ => internal}/ModelGeneratorImpl.qll (100%) rename shared/mad/codeql/mad/modelgenerator/{ => internal}/ModelPrinting.qll (100%) diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll index d431b1293785..7c0aed91b6b8 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -13,7 +13,7 @@ private import semmle.code.csharp.dataflow.internal.TaintTrackingImplSpecific private import semmle.code.csharp.frameworks.system.linq.Expressions private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.Location -private import codeql.mad.modelgenerator.ModelGeneratorImpl +private import codeql.mad.modelgenerator.internal.ModelGeneratorImpl module ModelGeneratorInput implements ModelGeneratorInputSig { class Type = CS::Type; diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll index 4c09f4ccba5b..90452b1fc91e 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll @@ -1,5 +1,5 @@ private import csharp as CS -private import codeql.mad.modelgenerator.ModelPrinting +private import codeql.mad.modelgenerator.internal.ModelPrinting private import semmle.code.csharp.dataflow.internal.ExternalFlow as ExternalFlow private module ModelPrintingLang implements ModelPrintingLangSig { diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll index 9cc3bd17d25b..6724527a1b17 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -16,7 +16,7 @@ private import semmle.code.java.dataflow.internal.ModelExclusions private import semmle.code.java.dataflow.internal.TaintTrackingImplSpecific private import semmle.code.java.dataflow.SSA as Ssa private import semmle.code.java.dataflow.TaintTracking -private import codeql.mad.modelgenerator.ModelGeneratorImpl +private import codeql.mad.modelgenerator.internal.ModelGeneratorImpl /** * Holds if the type `t` is a primitive type used for bulk data. diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll index 57dc74ccca55..dbf08b15e902 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll @@ -1,5 +1,5 @@ private import java as J -private import codeql.mad.modelgenerator.ModelPrinting +private import codeql.mad.modelgenerator.internal.ModelPrinting private import CaptureModels::ModelGeneratorInput as ModelGeneratorInput private module ModelPrintingLang implements ModelPrintingLangSig { diff --git a/shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll b/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll similarity index 100% rename from shared/mad/codeql/mad/modelgenerator/ModelGeneratorImpl.qll rename to shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll diff --git a/shared/mad/codeql/mad/modelgenerator/ModelPrinting.qll b/shared/mad/codeql/mad/modelgenerator/internal/ModelPrinting.qll similarity index 100% rename from shared/mad/codeql/mad/modelgenerator/ModelPrinting.qll rename to shared/mad/codeql/mad/modelgenerator/internal/ModelPrinting.qll From e6085759ae2ab8b496fb8922c2c151d7f3ec4051 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 24 Sep 2024 15:46:44 +0200 Subject: [PATCH 098/162] Shared: Put the content of CaptureSummaryFlowQuery into the shared library code. --- .../modelgenerator/CaptureNeutralModels.ql | 2 - .../modelgenerator/CaptureSummaryModels.ql | 2 - .../internal/CaptureSummaryFlowQuery.qll | 93 ------------------- .../dataflow/CaptureNeutralModels.ql | 2 +- .../dataflow/CaptureSummaryModels.ql | 2 +- .../modelgenerator/CaptureNeutralModels.ql | 1 - .../modelgenerator/CaptureSummaryModels.ql | 1 - .../internal/CaptureSummaryFlowQuery.qll | 84 ----------------- .../dataflow/CaptureNeutralModels.ql | 2 +- .../dataflow/CaptureSummaryModels.ql | 2 +- .../internal/ModelGeneratorImpl.qll | 26 +++++- 11 files changed, 28 insertions(+), 189 deletions(-) delete mode 100644 csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll delete mode 100644 java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll diff --git a/csharp/ql/src/utils/modelgenerator/CaptureNeutralModels.ql b/csharp/ql/src/utils/modelgenerator/CaptureNeutralModels.ql index a601c2511e6d..7a53125e21c1 100644 --- a/csharp/ql/src/utils/modelgenerator/CaptureNeutralModels.ql +++ b/csharp/ql/src/utils/modelgenerator/CaptureNeutralModels.ql @@ -6,9 +6,7 @@ * @tags modelgenerator */ -import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl import internal.CaptureModels -import internal.CaptureSummaryFlowQuery from DataFlowSummaryTargetApi api, string noflow where noflow = captureNoFlow(api) diff --git a/csharp/ql/src/utils/modelgenerator/CaptureSummaryModels.ql b/csharp/ql/src/utils/modelgenerator/CaptureSummaryModels.ql index da4d03fa9bb2..991e593474e2 100644 --- a/csharp/ql/src/utils/modelgenerator/CaptureSummaryModels.ql +++ b/csharp/ql/src/utils/modelgenerator/CaptureSummaryModels.ql @@ -6,9 +6,7 @@ * @tags modelgenerator */ -import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl import internal.CaptureModels -import internal.CaptureSummaryFlowQuery from DataFlowSummaryTargetApi api, string flow where flow = captureFlow(api) diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll deleted file mode 100644 index 092c80664964..000000000000 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll +++ /dev/null @@ -1,93 +0,0 @@ -private import CaptureModels - -/** - * Capture fluent APIs that return `this`. - * Example of a fluent API: - * ```csharp - * public class BasicFlow { - * public BasicFlow ReturnThis(object input) - * { - * // some side effect - * return this; - * } - * ``` - * Captured Model: - * ```Summaries;BasicFlow;false;ReturnThis;(System.Object);Argument[this];ReturnValue;value;df-generated``` - * Capture APIs that transfer taint from an input parameter to an output return - * value or parameter. - * Allows a sequence of read steps followed by a sequence of store steps. - * - * Examples: - * - * ```csharp - * public class BasicFlow { - * private string tainted; - * - * public String ReturnField() - * { - * return tainted; - * } - * - * public void AssignFieldToArray(object[] target) - * { - * target[0] = tainted; - * } - * } - * ``` - * Captured Models: - * ``` - * Summaries;BasicFlow;false;ReturnField;();Argument[this];ReturnValue;taint;df-generated | - * Summaries;BasicFlow;false;AssignFieldToArray;(System.Object[]);Argument[this];Argument[0].Element;taint;df-generated - * ``` - * - * ```csharp - * public class BasicFlow { - * private string tainted; - * - * public void SetField(string s) - * { - * tainted = s; - * } - * } - * ``` - * Captured Model: - * ```Summaries;BasicFlow;false;SetField;(System.String);Argument[0];Argument[this];taint;df-generated``` - * - * ```csharp - * public class BasicFlow { - * public void ReturnSubstring(string s) - * { - * return s.Substring(0, 1); - * } - * } - * ``` - * Captured Model: - * ```Summaries;BasicFlow;false;ReturnSubstring;(System.String);Argument[0];ReturnValue;taint;df-generated``` - * - * ```csharp - * public class BasicFlow { - * public void AssignToArray(int data, int[] target) - * { - * target[0] = data; - * } - * } - * ``` - * Captured Model: - * ```Summaries;BasicFlow;false;AssignToArray;(System.Int32,System.Int32[]);Argument[0];Argument[1].Element;taint;df-generated``` - */ -string captureFlow(DataFlowSummaryTargetApi api) { - result = captureQualifierFlow(api) or - result = captureThroughFlow(api) -} - -/** - * Gets the neutral summary model for `api`, if any. - * A neutral summary model is generated, if we are not generating - * a summary model that applies to `api` and if it relevant to generate - * a model for `api`. - */ -string captureNoFlow(DataFlowSummaryTargetApi api) { - not exists(DataFlowSummaryTargetApi api0 | exists(captureFlow(api0)) and api0.lift() = api.lift()) and - api.isRelevant() and - result = ModelPrinting::asNeutralSummaryModel(api) -} diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql index c9fd2c2655db..922588049d26 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql @@ -1,5 +1,5 @@ import csharp -import utils.modelgenerator.internal.CaptureSummaryFlowQuery +import utils.modelgenerator.internal.CaptureModels import TestUtilities.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql index 5e4a67bcf0cb..29cb8f7fb874 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql @@ -1,5 +1,5 @@ import csharp -import utils.modelgenerator.internal.CaptureSummaryFlowQuery +import utils.modelgenerator.internal.CaptureModels import TestUtilities.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { diff --git a/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql b/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql index 2ff65ad7fae0..c91f182f6038 100644 --- a/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql @@ -7,7 +7,6 @@ */ import internal.CaptureModels -import internal.CaptureSummaryFlowQuery from DataFlowSummaryTargetApi api, string noflow where noflow = captureNoFlow(api) diff --git a/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql b/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql index 3f18bf49428a..7fc7c0f7a571 100644 --- a/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql @@ -7,7 +7,6 @@ */ import internal.CaptureModels -import internal.CaptureSummaryFlowQuery from DataFlowSummaryTargetApi api, string flow where flow = captureFlow(api) diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll b/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll deleted file mode 100644 index 4c98cb05ae2d..000000000000 --- a/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll +++ /dev/null @@ -1,84 +0,0 @@ -private import CaptureModels - -/** - * Capture fluent APIs that return `this`. - * Example of a fluent API: - * ```java - * public class Foo { - * public Foo someAPI() { - * // some side-effect - * return this; - * } - * } - * ``` - * - * Capture APIs that transfer taint from an input parameter to an output return - * value or parameter. - * Allows a sequence of read steps followed by a sequence of store steps. - * - * Examples: - * - * ```java - * public class Foo { - * private String tainted; - * - * public String returnsTainted() { - * return tainted; - * } - * - * public void putsTaintIntoParameter(List foo) { - * foo.add(tainted); - * } - * } - * ``` - * Captured Models: - * ``` - * p;Foo;true;returnsTainted;;Argument[this];ReturnValue;taint;df-generated - * p;Foo;true;putsTaintIntoParameter;(List);Argument[this];Argument[0];taint;df-generated - * ``` - * - * ```java - * public class Foo { - * private String tainted; - * public void doSomething(String input) { - * tainted = input; - * } - * ``` - * Captured Model: - * ```p;Foo;true;doSomething;(String);Argument[0];Argument[this];taint;df-generated``` - * - * ```java - * public class Foo { - * public String returnData(String tainted) { - * return tainted.substring(0,10) - * } - * } - * ``` - * Captured Model: - * ```p;Foo;true;returnData;;Argument[0];ReturnValue;taint;df-generated``` - * - * ```java - * public class Foo { - * public void addToList(String tainted, List foo) { - * foo.add(tainted); - * } - * } - * ``` - * Captured Model: - * ```p;Foo;true;addToList;;Argument[0];Argument[1];taint;df-generated``` - */ -string captureFlow(DataFlowSummaryTargetApi api) { - result = captureQualifierFlow(api) or - result = captureThroughFlow(api) -} - -/** - * Gets the neutral summary model for `api`, if any. - * A neutral summary model is generated, if we are not generating - * a summary model that applies to `api`. - */ -string captureNoFlow(DataFlowSummaryTargetApi api) { - not exists(DataFlowSummaryTargetApi api0 | exists(captureFlow(api0)) and api0.lift() = api.lift()) and - api.isRelevant() and - result = ModelPrinting::asNeutralSummaryModel(api) -} diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql index e68730cc0edd..cdc2dfcaa459 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql @@ -1,5 +1,5 @@ import java -import utils.modelgenerator.internal.CaptureSummaryFlowQuery +import utils.modelgenerator.internal.CaptureModels import TestUtilities.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql index 415ebab13439..c9e5050fc1fc 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql @@ -1,5 +1,5 @@ import java -import utils.modelgenerator.internal.CaptureSummaryFlowQuery +import utils.modelgenerator.internal.CaptureModels import TestUtilities.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { diff --git a/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll b/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll index 6e8c160ffb7f..f668d80ef1fc 100644 --- a/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll +++ b/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll @@ -376,7 +376,7 @@ module MakeModelGenerator< /** * Gets the summary model of `api`, if it follows the `fluent` programming pattern (returns `this`). */ - string captureQualifierFlow(DataFlowSummaryTargetApi api) { + private string captureQualifierFlow(DataFlowSummaryTargetApi api) { exists(ReturnNodeExt ret | api = returnNodeEnclosingCallable(ret) and isOwnInstanceAccessNode(ret) @@ -498,13 +498,35 @@ module MakeModelGenerator< /** * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter. */ - string captureThroughFlow(DataFlowSummaryTargetApi api) { + private string captureThroughFlow(DataFlowSummaryTargetApi api) { exists(DataFlow::ParameterNode p, ReturnNodeExt returnNodeExt | PropagateFlow::flow(p, returnNodeExt) and result = captureThroughFlow0(api, p, returnNodeExt) ) } + /** + * Gets the summary model(s) of `api`, if there is flow from parameters to the + * return value or parameter or if `api` is a fluent API. + */ + string captureFlow(DataFlowSummaryTargetApi api) { + result = captureQualifierFlow(api) or + result = captureThroughFlow(api) + } + + /** + * Gets the neutral summary model for `api`, if any. + * A neutral summary model is generated, if we are not generating + * a summary model that applies to `api`. + */ + string captureNoFlow(DataFlowSummaryTargetApi api) { + not exists(DataFlowSummaryTargetApi api0 | + exists(captureFlow(api0)) and api0.lift() = api.lift() + ) and + api.isRelevant() and + result = ModelPrinting::asNeutralSummaryModel(api) + } + /** * Provides classes and predicates related to capturing summary models * based on content data flow. From 279800ea626d678fb7185f26499f1493d152b71b Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 07:24:48 +0100 Subject: [PATCH 099/162] Use shorter naming scheme for types --- ...ed => mad_SEmbedI1_subtypes_true.expected} | 0 .../mad_SEmbedI1_subtypes_true.ext.yml | 16 ++++++ ..._true.ql => mad_SEmbedI1_subtypes_true.ql} | 0 .../mad_SEmbedI2_subtypes_true.expected | 22 ++++++++ .../mad_SEmbedI2_subtypes_true.ext.yml | 16 ++++++ ..._true.ql => mad_SEmbedI2_subtypes_true.ql} | 2 - .../mad_SEmbedS1_subtypes_true.expected | 4 ++ .../mad_SEmbedS1_subtypes_true.ext.yml | 16 ++++++ .../mad_SEmbedS1_subtypes_true.ql | 18 +++++++ .../mad_SEmbedS2_subtypes_true.expected | 4 ++ .../mad_SEmbedS2_subtypes_true.ext.yml | 16 ++++++ .../mad_SEmbedS2_subtypes_true.ql | 18 +++++++ ...> mad_SImplEmbedI1_subtypes_true.expected} | 0 .../mad_SImplEmbedI1_subtypes_true.ext.yml | 16 ++++++ .../mad_SImplEmbedI1_subtypes_true.ql | 18 +++++++ .../mad_SImplEmbedI2_subtypes_true.expected | 22 ++++++++ .../mad_SImplEmbedI2_subtypes_true.ext.yml | 16 ++++++ .../mad_SImplEmbedI2_subtypes_true.ql | 18 +++++++ .../mad_SImplEmbedS1_subtypes_true.expected | 7 +++ .../mad_SImplEmbedS1_subtypes_true.ext.yml | 16 ++++++ .../mad_SImplEmbedS1_subtypes_true.ql | 18 +++++++ .../mad_SImplEmbedS2_subtypes_true.expected | 7 +++ .../mad_SImplEmbedS2_subtypes_true.ext.yml | 16 ++++++ .../mad_SImplEmbedS2_subtypes_true.ql | 18 +++++++ ...ddingAndOverridingI1_subtypes_true.ext.yml | 16 ------ ...ad_StructEmbeddingI1_subtypes_true.ext.yml | 16 ------ .../dataflow/ExternalFlowInheritance/test.go | 16 +++--- .../github.com/nonexistent/test/stub.go | 54 ++++++++++--------- 28 files changed, 338 insertions(+), 68 deletions(-) rename go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/{mad_StructEmbeddingAndOverridingI1_subtypes_true.expected => mad_SEmbedI1_subtypes_true.expected} (100%) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ext.yml rename go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/{mad_StructEmbeddingI1_subtypes_true.ql => mad_SEmbedI1_subtypes_true.ql} (100%) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ext.yml rename go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/{mad_StructEmbeddingAndOverridingI1_subtypes_true.ql => mad_SEmbedI2_subtypes_true.ql} (96%) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql rename go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/{mad_StructEmbeddingI1_subtypes_true.expected => mad_SImplEmbedI1_subtypes_true.expected} (100%) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.expected rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ext.yml new file mode 100644 index 000000000000..93f8f74dfb5b --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SEmbedI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SEmbedI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SEmbedI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected new file mode 100644 index 000000000000..9989b831c34c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected @@ -0,0 +1,22 @@ +invalidModelRow +paths +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:14:7:14:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:16:9:16:9 | y | +| test.go:28:9:28:9 | y | +| test.go:40:9:40:9 | y | +| test.go:52:9:52:9 | y | +| test.go:64:9:64:9 | y | +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ext.yml new file mode 100644 index 000000000000..ba94082e7e31 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SEmbedI2", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SEmbedI2", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SEmbedI2", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql similarity index 96% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql index c86d36f20f93..e1f1ca3bd629 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql @@ -16,5 +16,3 @@ query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(s query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } -// predicate foo() { -// } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected new file mode 100644 index 000000000000..b2263b2664eb --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected @@ -0,0 +1,4 @@ +invalidModelRow +paths +sources +sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ext.yml new file mode 100644 index 000000000000..89218840c0bf --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SEmbedS1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SEmbedS1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SEmbedS1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected new file mode 100644 index 000000000000..b2263b2664eb --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected @@ -0,0 +1,4 @@ +invalidModelRow +paths +sources +sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ext.yml new file mode 100644 index 000000000000..e773cf215b40 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SEmbedS2", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SEmbedS2", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SEmbedS2", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.expected rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ext.yml new file mode 100644 index 000000000000..4b572ad124cc --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SImplEmbedI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SImplEmbedI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SImplEmbedI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected new file mode 100644 index 000000000000..9989b831c34c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected @@ -0,0 +1,22 @@ +invalidModelRow +paths +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:14:7:14:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:16:9:16:9 | y | +| test.go:28:9:28:9 | y | +| test.go:40:9:40:9 | y | +| test.go:52:9:52:9 | y | +| test.go:64:9:64:9 | y | +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ext.yml new file mode 100644 index 000000000000..9d695502c29a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SImplEmbedI2", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SImplEmbedI2", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SImplEmbedI2", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected new file mode 100644 index 000000000000..b757a5154332 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected @@ -0,0 +1,7 @@ +invalidModelRow +paths +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +sources +| test.go:68:7:68:16 | call to Source | +sinks +| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ext.yml new file mode 100644 index 000000000000..0936a7d253b2 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SImplEmbedS1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SImplEmbedS1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SImplEmbedS1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected new file mode 100644 index 000000000000..f487470f4ae6 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected @@ -0,0 +1,7 @@ +invalidModelRow +paths +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +sources +| test.go:74:7:74:16 | call to Source | +sinks +| test.go:76:9:76:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ext.yml new file mode 100644 index 000000000000..04bc012e7f41 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "SImplEmbedS2", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "SImplEmbedS2", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "SImplEmbedS2", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml deleted file mode 100644 index 5b033d5574e3..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingAndOverridingI1_subtypes_true.ext.yml +++ /dev/null @@ -1,16 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sourceModel - data: - - ["github.com/nonexistent/test", "StructEmbeddingAndOverridingI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] - - addsTo: - pack: codeql/go-all - extensible: summaryModel - data: - - ["github.com/nonexistent/test", "StructEmbeddingAndOverridingI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["github.com/nonexistent/test", "StructEmbeddingAndOverridingI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml deleted file mode 100644 index c24fadddd89b..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_StructEmbeddingI1_subtypes_true.ext.yml +++ /dev/null @@ -1,16 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sourceModel - data: - - ["github.com/nonexistent/test", "StructEmbeddingI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] - - addsTo: - pack: codeql/go-all - extensible: summaryModel - data: - - ["github.com/nonexistent/test", "StructEmbeddingI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["github.com/nonexistent/test", "StructEmbeddingI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go index 87e6eab8532c..8329420910c6 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -28,49 +28,49 @@ func TestS2(t test.S2) { t.Sink(y) } -func TestStructEmbeddingI1(t test.StructEmbeddingI1) { +func TestSEmbedI1(t test.SEmbedI1) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingI2(t test.StructEmbeddingI2) { +func TestSEmbedI2(t test.SEmbedI2) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingAndOverridingI1(t test.StructEmbeddingAndOverridingI1) { +func TestSImplEmbedI1(t test.SImplEmbedI1) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingAndOverridingI2(t test.StructEmbeddingAndOverridingI2) { +func TestSImplEmbedI2(t test.SImplEmbedI2) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingS1(t test.StructEmbeddingS1) { +func TestSEmbedS1(t test.SEmbedS1) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingS2(t test.StructEmbeddingS2) { +func TestSEmbedS2(t test.SEmbedS2) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingAndOverridingS1(t test.StructEmbeddingAndOverridingS1) { +func TestSImplEmbedS1(t test.SImplEmbedS1) { x := t.Source() y := t.Step(x) t.Sink(y) } -func TestStructEmbeddingAndOverridingS2(t test.StructEmbeddingAndOverridingS2) { +func TestSImplEmbedS2(t test.SImplEmbedS2) { x := t.Source() y := t.Step(x) t.Sink(y) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go index 9e5ec515b0bd..db0a217dc77d 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go @@ -12,7 +12,7 @@ type I2 interface { Source() interface{} Step(interface{}) interface{} Sink(interface{}) - ExtraMethod() + ExtraMethodI2() } // A struct type implementing I1 @@ -41,72 +41,74 @@ func (t *S2) Step(val interface{}) interface{} { return val } -func (t *S2) ExtraMethod() {} +func (t *S2) ExtraMethodI2() {} // A struct type embedding I1 -type StructEmbeddingI1 struct{ I1 } +type SEmbedI1 struct{ I1 } // A struct type embedding I2 -type StructEmbeddingI2 struct{ I2 } +type SEmbedI2 struct{ I2 } -// A struct type embedding I1 and "overriding" its methods -type StructEmbeddingAndOverridingI1 struct{ I1 } +// A struct type embedding I1 and separately implementing its methods, so the +// methods of the embedded field are not promoted. +type SImplEmbedI1 struct{ I1 } -func (t *StructEmbeddingAndOverridingI1) Source() interface{} { +func (t *SImplEmbedI1) Source() interface{} { return nil } -func (t *StructEmbeddingAndOverridingI1) Sink(interface{}) {} +func (t *SImplEmbedI1) Sink(interface{}) {} -func (t *StructEmbeddingAndOverridingI1) Step(val interface{}) interface{} { +func (t *SImplEmbedI1) Step(val interface{}) interface{} { return val } -// A struct type embedding I2 and "overriding" its methods -type StructEmbeddingAndOverridingI2 struct{ I2 } +// A struct type embedding I2 and separately implementing its methods, so the +// methods of the embedded field are not promoted. +type SImplEmbedI2 struct{ I2 } -func (t *StructEmbeddingAndOverridingI2) Source() interface{} { +func (t *SImplEmbedI2) Source() interface{} { return nil } -func (t *StructEmbeddingAndOverridingI2) Sink(interface{}) {} +func (t *SImplEmbedI2) Sink(interface{}) {} -func (t *StructEmbeddingAndOverridingI2) Step(val interface{}) interface{} { +func (t *SImplEmbedI2) Step(val interface{}) interface{} { return val } -func (t *StructEmbeddingAndOverridingI2) ExtraMethod() {} +func (t *SImplEmbedI2) ExtraMethodI2() {} // A struct type embedding S1 -type StructEmbeddingS1 struct{ S1 } +type SEmbedS1 struct{ S1 } // A struct type embedding S2 -type StructEmbeddingS2 struct{ S2 } +type SEmbedS2 struct{ S2 } // A struct type embedding S1 and "overriding" its methods -type StructEmbeddingAndOverridingS1 struct{ S1 } +type SImplEmbedS1 struct{ S1 } -func (t *StructEmbeddingAndOverridingS1) Source() interface{} { +func (t *SImplEmbedS1) Source() interface{} { return nil } -func (t *StructEmbeddingAndOverridingS1) Sink(interface{}) {} +func (t *SImplEmbedS1) Sink(interface{}) {} -func (t *StructEmbeddingAndOverridingS1) Step(val interface{}) interface{} { +func (t *SImplEmbedS1) Step(val interface{}) interface{} { return val } // A struct type embedding S2 and "overriding" its methods -type StructEmbeddingAndOverridingS2 struct{ S2 } +type SImplEmbedS2 struct{ S2 } -func (t *StructEmbeddingAndOverridingS2) Source() interface{} { +func (t *SImplEmbedS2) Source() interface{} { return nil } -func (t *StructEmbeddingAndOverridingS2) Sink(interface{}) {} +func (t *SImplEmbedS2) Sink(interface{}) {} -func (t *StructEmbeddingAndOverridingS2) Step(val interface{}) interface{} { +func (t *SImplEmbedS2) Step(val interface{}) interface{} { return val } -func (t *StructEmbeddingAndOverridingS2) ExtraMethod() {} +func (t *SImplEmbedS2) ExtraMethodI2() {} From 5490f3a957a809b1384ea13e27cdd8b285c8f304 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 07:31:14 +0100 Subject: [PATCH 100/162] Add tests for interface embedding interface --- .../mad_IEmbedI1_subtypes_true.expected | 46 +++++++++++++++++++ .../mad_IEmbedI1_subtypes_true.ext.yml | 16 +++++++ .../mad_IEmbedI1_subtypes_true.ql | 18 ++++++++ .../mad_IEmbedI2_subtypes_true.expected | 25 ++++++++++ .../mad_IEmbedI2_subtypes_true.ext.yml | 16 +++++++ .../mad_IEmbedI2_subtypes_true.ql | 18 ++++++++ .../mad_SEmbedI1_subtypes_true.expected | 6 +++ .../mad_SEmbedI2_subtypes_true.expected | 3 ++ .../mad_SImplEmbedI1_subtypes_true.expected | 6 +++ .../mad_SImplEmbedI2_subtypes_true.expected | 3 ++ .../mad_SImplEmbedS1_subtypes_true.expected | 6 +-- .../mad_SImplEmbedS2_subtypes_true.expected | 6 +-- .../mad_i1_subtypes_false.expected | 3 ++ .../mad_i1_subtypes_true.expected | 6 +++ .../mad_i2_subtypes_false.expected | 3 ++ .../mad_i2_subtypes_true.expected | 3 ++ .../mad_s1_subtypes_false.expected | 6 +-- .../mad_s1_subtypes_true.expected | 6 +-- .../ExternalFlowInheritance/ql_i1.expected | 3 ++ .../ExternalFlowInheritance/ql_s1.expected | 9 ++-- .../dataflow/ExternalFlowInheritance/test.go | 12 +++++ .../github.com/nonexistent/test/stub.go | 12 +++++ 22 files changed, 217 insertions(+), 15 deletions(-) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ext.yml create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected new file mode 100644 index 000000000000..51ebdd2ad0e1 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected @@ -0,0 +1,46 @@ +invalidModelRow +paths +| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +sources +| test.go:8:7:8:16 | call to Source | +| test.go:14:7:14:16 | call to Source | +| test.go:20:7:20:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:32:7:32:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:44:7:44:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:56:7:56:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:68:7:68:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +| test.go:80:7:80:16 | call to Source | +| test.go:86:7:86:16 | call to Source | +sinks +| test.go:10:9:10:9 | y | +| test.go:16:9:16:9 | y | +| test.go:22:9:22:9 | y | +| test.go:28:9:28:9 | y | +| test.go:34:9:34:9 | y | +| test.go:40:9:40:9 | y | +| test.go:46:9:46:9 | y | +| test.go:52:9:52:9 | y | +| test.go:58:9:58:9 | y | +| test.go:64:9:64:9 | y | +| test.go:70:9:70:9 | y | +| test.go:76:9:76:9 | y | +| test.go:82:9:82:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ext.yml new file mode 100644 index 000000000000..7d2e45d89f31 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "IEmbedI1", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "IEmbedI1", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "IEmbedI1", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected new file mode 100644 index 000000000000..dbe68c279b38 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected @@ -0,0 +1,25 @@ +invalidModelRow +paths +| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | +| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | +| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | +| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +sources +| test.go:14:7:14:16 | call to Source | +| test.go:26:7:26:16 | call to Source | +| test.go:38:7:38:16 | call to Source | +| test.go:50:7:50:16 | call to Source | +| test.go:62:7:62:16 | call to Source | +| test.go:74:7:74:16 | call to Source | +| test.go:86:7:86:16 | call to Source | +sinks +| test.go:16:9:16:9 | y | +| test.go:28:9:28:9 | y | +| test.go:40:9:40:9 | y | +| test.go:52:9:52:9 | y | +| test.go:64:9:64:9 | y | +| test.go:76:9:76:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ext.yml new file mode 100644 index 000000000000..b723867e3e79 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ext.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "IEmbedI2", True, "Source", "", "", "ReturnValue", "remote", "manual"] + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "IEmbedI2", True, "Step", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "IEmbedI2", True, "Sink", "", "", "Argument[0]", "path-injection", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql new file mode 100644 index 000000000000..e1f1ca3bd629 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql @@ -0,0 +1,18 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sources(source) } + + predicate isSink(DataFlow::Node sink) { sinks(sink) } +} + +module Flow = DataFlow::Global; + +query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } + +query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } + +query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected index 369f3c666035..51ebdd2ad0e1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected @@ -12,6 +12,8 @@ paths | test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | | test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | | test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | @@ -25,6 +27,8 @@ sources | test.go:62:7:62:16 | call to Source | | test.go:68:7:68:16 | call to Source | | test.go:74:7:74:16 | call to Source | +| test.go:80:7:80:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks | test.go:10:9:10:9 | y | | test.go:16:9:16:9 | y | @@ -38,3 +42,5 @@ sinks | test.go:64:9:64:9 | y | | test.go:70:9:70:9 | y | | test.go:76:9:76:9 | y | +| test.go:82:9:82:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected index 9989b831c34c..dbe68c279b38 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected @@ -6,6 +6,7 @@ paths | test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | | test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | | test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | @@ -13,6 +14,7 @@ sources | test.go:50:7:50:16 | call to Source | | test.go:62:7:62:16 | call to Source | | test.go:74:7:74:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks | test.go:16:9:16:9 | y | | test.go:28:9:28:9 | y | @@ -20,3 +22,4 @@ sinks | test.go:52:9:52:9 | y | | test.go:64:9:64:9 | y | | test.go:76:9:76:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected index 369f3c666035..51ebdd2ad0e1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected @@ -12,6 +12,8 @@ paths | test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | | test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | | test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | @@ -25,6 +27,8 @@ sources | test.go:62:7:62:16 | call to Source | | test.go:68:7:68:16 | call to Source | | test.go:74:7:74:16 | call to Source | +| test.go:80:7:80:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks | test.go:10:9:10:9 | y | | test.go:16:9:16:9 | y | @@ -38,3 +42,5 @@ sinks | test.go:64:9:64:9 | y | | test.go:70:9:70:9 | y | | test.go:76:9:76:9 | y | +| test.go:82:9:82:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected index 9989b831c34c..dbe68c279b38 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected @@ -6,6 +6,7 @@ paths | test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | | test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | | test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | @@ -13,6 +14,7 @@ sources | test.go:50:7:50:16 | call to Source | | test.go:62:7:62:16 | call to Source | | test.go:74:7:74:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks | test.go:16:9:16:9 | y | | test.go:28:9:28:9 | y | @@ -20,3 +22,4 @@ sinks | test.go:52:9:52:9 | y | | test.go:64:9:64:9 | y | | test.go:76:9:76:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected index b757a5154332..710110560e63 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected @@ -1,7 +1,7 @@ invalidModelRow paths -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | sources -| test.go:68:7:68:16 | call to Source | +| test.go:80:7:80:16 | call to Source | sinks -| test.go:70:9:70:9 | y | +| test.go:82:9:82:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected index f487470f4ae6..b7f99718d581 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected @@ -1,7 +1,7 @@ invalidModelRow paths -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources -| test.go:74:7:74:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks -| test.go:76:9:76:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected index 1a6dc55986ca..d58288abca70 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected @@ -2,9 +2,12 @@ invalidModelRow paths | test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | | test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | sources | test.go:8:7:8:16 | call to Source | | test.go:32:7:32:16 | call to Source | +| test.go:44:7:44:16 | call to Source | sinks | test.go:10:9:10:9 | y | | test.go:34:9:34:9 | y | +| test.go:46:9:46:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected index 369f3c666035..51ebdd2ad0e1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected @@ -12,6 +12,8 @@ paths | test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | | test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | | test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | @@ -25,6 +27,8 @@ sources | test.go:62:7:62:16 | call to Source | | test.go:68:7:68:16 | call to Source | | test.go:74:7:74:16 | call to Source | +| test.go:80:7:80:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks | test.go:10:9:10:9 | y | | test.go:16:9:16:9 | y | @@ -38,3 +42,5 @@ sinks | test.go:64:9:64:9 | y | | test.go:70:9:70:9 | y | | test.go:76:9:76:9 | y | +| test.go:82:9:82:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected index 35fc35829a76..3fd0e4920657 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected @@ -2,9 +2,12 @@ invalidModelRow paths | test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | | test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | +| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | sources | test.go:14:7:14:16 | call to Source | | test.go:38:7:38:16 | call to Source | +| test.go:50:7:50:16 | call to Source | sinks | test.go:16:9:16:9 | y | | test.go:40:9:40:9 | y | +| test.go:52:9:52:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected index 9989b831c34c..dbe68c279b38 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected @@ -6,6 +6,7 @@ paths | test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | | test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | | test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | +| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | @@ -13,6 +14,7 @@ sources | test.go:50:7:50:16 | call to Source | | test.go:62:7:62:16 | call to Source | | test.go:74:7:74:16 | call to Source | +| test.go:86:7:86:16 | call to Source | sinks | test.go:16:9:16:9 | y | | test.go:28:9:28:9 | y | @@ -20,3 +22,4 @@ sinks | test.go:52:9:52:9 | y | | test.go:64:9:64:9 | y | | test.go:76:9:76:9 | y | +| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected index 2b6a7e942283..034a14d6a93d 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected @@ -1,10 +1,10 @@ invalidModelRow paths | test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | sources | test.go:20:7:20:16 | call to Source | -| test.go:56:7:56:16 | call to Source | +| test.go:68:7:68:16 | call to Source | sinks | test.go:22:9:22:9 | y | -| test.go:58:9:58:9 | y | +| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected index 2b6a7e942283..034a14d6a93d 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected @@ -1,10 +1,10 @@ invalidModelRow paths | test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | sources | test.go:20:7:20:16 | call to Source | -| test.go:56:7:56:16 | call to Source | +| test.go:68:7:68:16 | call to Source | sinks | test.go:22:9:22:9 | y | -| test.go:58:9:58:9 | y | +| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected index 1a6dc55986ca..d58288abca70 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected @@ -2,9 +2,12 @@ invalidModelRow paths | test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | | test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | sources | test.go:8:7:8:16 | call to Source | | test.go:32:7:32:16 | call to Source | +| test.go:44:7:44:16 | call to Source | sinks | test.go:10:9:10:9 | y | | test.go:34:9:34:9 | y | +| test.go:46:9:46:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected index 5f186108a583..39cd1eaca944 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected @@ -3,14 +3,17 @@ paths | test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | | test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | | test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | +| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | +| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | sources | test.go:8:7:8:16 | call to Source | | test.go:20:7:20:16 | call to Source | | test.go:32:7:32:16 | call to Source | -| test.go:56:7:56:16 | call to Source | +| test.go:44:7:44:16 | call to Source | +| test.go:68:7:68:16 | call to Source | sinks | test.go:10:9:10:9 | y | | test.go:22:9:22:9 | y | | test.go:34:9:34:9 | y | -| test.go:58:9:58:9 | y | +| test.go:46:9:46:9 | y | +| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go index 8329420910c6..88bf41fba4a6 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -40,6 +40,18 @@ func TestSEmbedI2(t test.SEmbedI2) { t.Sink(y) } +func TestIEmbedI1(t test.IEmbedI1) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + +func TestIEmbedI2(t test.IEmbedI2) { + x := t.Source() + y := t.Step(x) + t.Sink(y) +} + func TestSImplEmbedI1(t test.SImplEmbedI1) { x := t.Source() y := t.Step(x) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go index db0a217dc77d..e5a417bcbd35 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go @@ -49,6 +49,18 @@ type SEmbedI1 struct{ I1 } // A struct type embedding I2 type SEmbedI2 struct{ I2 } +// An interface type embedding I1 +type IEmbedI1 interface { + I1 + ExtraMethodIEmbedI1() +} + +// An interface type embedding I2 +type IEmbedI2 interface { + I2 + ExtraMethodIEmbedI2() +} + // A struct type embedding I1 and separately implementing its methods, so the // methods of the embedded field are not promoted. type SImplEmbedI1 struct{ I1 } From afa4b6dd4aeff8a95fb2480c05692d582a568926 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 13:50:53 +0100 Subject: [PATCH 101/162] Make `paths` test an inline expectations test --- .../mad_IEmbedI1_subtypes_true.expected | 17 ++--------- .../mad_IEmbedI1_subtypes_true.ql | 18 ++++++++++-- .../mad_IEmbedI2_subtypes_true.expected | 10 ++----- .../mad_IEmbedI2_subtypes_true.ql | 18 ++++++++++-- .../mad_SEmbedI1_subtypes_true.expected | 17 ++--------- .../mad_SEmbedI1_subtypes_true.ql | 18 ++++++++++-- .../mad_SEmbedI2_subtypes_true.expected | 10 ++----- .../mad_SEmbedI2_subtypes_true.ql | 18 ++++++++++-- .../mad_SEmbedS1_subtypes_true.expected | 3 +- .../mad_SEmbedS1_subtypes_true.ql | 18 ++++++++++-- .../mad_SEmbedS2_subtypes_true.expected | 3 +- .../mad_SEmbedS2_subtypes_true.ql | 18 ++++++++++-- .../mad_SImplEmbedI1_subtypes_true.expected | 17 ++--------- .../mad_SImplEmbedI1_subtypes_true.ql | 18 ++++++++++-- .../mad_SImplEmbedI2_subtypes_true.expected | 10 ++----- .../mad_SImplEmbedI2_subtypes_true.ql | 18 ++++++++++-- .../mad_SImplEmbedS1_subtypes_true.expected | 4 +-- .../mad_SImplEmbedS1_subtypes_true.ql | 18 ++++++++++-- .../mad_SImplEmbedS2_subtypes_true.expected | 4 +-- .../mad_SImplEmbedS2_subtypes_true.ql | 18 ++++++++++-- .../mad_i1_subtypes_false.expected | 6 ++-- .../mad_i1_subtypes_false.ql | 18 ++++++++++-- .../mad_i1_subtypes_true.expected | 17 ++--------- .../mad_i1_subtypes_true.ql | 18 ++++++++++-- .../mad_i2_subtypes_false.expected | 6 ++-- .../mad_i2_subtypes_false.ql | 18 ++++++++++-- .../mad_i2_subtypes_true.expected | 10 ++----- .../mad_i2_subtypes_true.ql | 18 ++++++++++-- .../mad_s1_subtypes_false.expected | 5 ++-- .../mad_s1_subtypes_false.ql | 18 ++++++++++-- .../mad_s1_subtypes_true.expected | 5 ++-- .../mad_s1_subtypes_true.ql | 18 ++++++++++-- .../dataflow/ExternalFlowInheritance/test.go | 28 +++++++++---------- 33 files changed, 302 insertions(+), 158 deletions(-) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected index 51ebdd2ad0e1..cbf95dd43678 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected @@ -1,19 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql index e1f1ca3bd629..8e2b2d851f8d 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "IEmbedI1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "IEmbedI1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected index dbe68c279b38..fd2bac1acf5e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected @@ -1,12 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql index e1f1ca3bd629..7941f126967c 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "IEmbedI2[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "IEmbedI2[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected index 51ebdd2ad0e1..cbf95dd43678 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected @@ -1,19 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql index e1f1ca3bd629..6221720a45ec 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SEmbedI1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SEmbedI1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected index dbe68c279b38..fd2bac1acf5e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected @@ -1,12 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql index e1f1ca3bd629..e1a2ff93d953 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SEmbedI2[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SEmbedI2[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected index b2263b2664eb..3b436cd843b4 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected @@ -1,4 +1,5 @@ +testFailures invalidModelRow -paths +failures sources sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql index e1f1ca3bd629..fba25acec597 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SEmbedS1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SEmbedS1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected index b2263b2664eb..3b436cd843b4 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected @@ -1,4 +1,5 @@ +testFailures invalidModelRow -paths +failures sources sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql index e1f1ca3bd629..817a7b60ae30 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SEmbedS2[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SEmbedS2[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected index 51ebdd2ad0e1..cbf95dd43678 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected @@ -1,19 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql index e1f1ca3bd629..d04767396daf 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SImplEmbedI1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SImplEmbedI1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected index dbe68c279b38..fd2bac1acf5e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected @@ -1,12 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql index e1f1ca3bd629..6fe3df197346 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SImplEmbedI2[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SImplEmbedI2[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected index 710110560e63..432cb871c801 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected @@ -1,6 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | +failures sources | test.go:80:7:80:16 | call to Source | sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql index e1f1ca3bd629..559e33dfe747 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SImplEmbedS1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SImplEmbedS1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected index b7f99718d581..bdb17db38b6f 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected @@ -1,6 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:86:7:86:16 | call to Source | sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql index e1f1ca3bd629..492bc2f9fd6a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "SImplEmbedS2[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SImplEmbedS2[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected index d58288abca70..4175a026f36f 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected @@ -1,8 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | +failures sources | test.go:8:7:8:16 | call to Source | | test.go:32:7:32:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql index e1f1ca3bd629..f9f2bf6ebfc4 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "I1[f]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "I1[f]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected index 51ebdd2ad0e1..cbf95dd43678 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected @@ -1,19 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:56:7:56:16 | call to Source | test.go:58:9:58:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:80:7:80:16 | call to Source | test.go:82:9:82:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:8:7:8:16 | call to Source | | test.go:14:7:14:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql index e1f1ca3bd629..2dbf85ef9d0a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "I1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "I1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected index 3fd0e4920657..fcf4ee6e4c7c 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected @@ -1,8 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | +failures sources | test.go:14:7:14:16 | call to Source | | test.go:38:7:38:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql index e1f1ca3bd629..6324fc52cf8b 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "I2[f]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "I2[f]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected index dbe68c279b38..fd2bac1acf5e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected @@ -1,12 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:14:7:14:16 | call to Source | test.go:16:9:16:9 | y | -| test.go:26:7:26:16 | call to Source | test.go:28:9:28:9 | y | -| test.go:38:7:38:16 | call to Source | test.go:40:9:40:9 | y | -| test.go:50:7:50:16 | call to Source | test.go:52:9:52:9 | y | -| test.go:62:7:62:16 | call to Source | test.go:64:9:64:9 | y | -| test.go:74:7:74:16 | call to Source | test.go:76:9:76:9 | y | -| test.go:86:7:86:16 | call to Source | test.go:88:9:88:9 | y | +failures sources | test.go:14:7:14:16 | call to Source | | test.go:26:7:26:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql index e1f1ca3bd629..5c936b10dbc0 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "I2[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "I2[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected index 034a14d6a93d..bec552c85511 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected @@ -1,7 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +failures sources | test.go:20:7:20:16 | call to Source | | test.go:68:7:68:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql index e1f1ca3bd629..b11b64c4a13b 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "S1[f]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "S1[f]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected index 034a14d6a93d..bec552c85511 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected @@ -1,7 +1,6 @@ +testFailures invalidModelRow -paths -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | +failures sources | test.go:20:7:20:16 | call to Source | | test.go:68:7:68:16 | call to Source | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql index e1f1ca3bd629..7809f59c3d70 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql @@ -2,6 +2,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sources(source) } @@ -9,9 +11,21 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sinks(sink) } } -module Flow = DataFlow::Global; +module Flow = TaintTracking::Global; -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } +module FlowTest implements TestSig { + string getARelevantTag() { result = "S1[t]" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "S1[t]" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go index 88bf41fba4a6..88ffaff711a2 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -7,83 +7,83 @@ import ( func TestI1(t test.I1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestI2(t test.I2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] } func TestS1(t test.S1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestS2(t test.S2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] } func TestSEmbedI1(t test.SEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestSEmbedI2(t test.SEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] } func TestIEmbedI1(t test.IEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestIEmbedI2(t test.IEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] } func TestSImplEmbedI1(t test.SImplEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestSImplEmbedI2(t test.SImplEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] } func TestSEmbedS1(t test.SEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestSEmbedS2(t test.SEmbedS2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] } func TestSImplEmbedS1(t test.SImplEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] SImplEmbedS1[t] } func TestSImplEmbedS2(t test.SImplEmbedS2) { x := t.Source() y := t.Step(x) - t.Sink(y) + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] SImplEmbedS2[t] } From 0255edf524a33c01dfc3f26cfec98ee8359e670a Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 13:55:39 +0100 Subject: [PATCH 102/162] Remove tests for sources and sinks This is redundant given that we test for paths, and for a path we need the source, step and sink methods to be modeled. --- .../mad_IEmbedI1_subtypes_true.expected | 30 ------------------- .../mad_IEmbedI1_subtypes_true.ql | 8 ++--- .../mad_IEmbedI2_subtypes_true.expected | 16 ---------- .../mad_IEmbedI2_subtypes_true.ql | 8 ++--- .../mad_SEmbedI1_subtypes_true.expected | 30 ------------------- .../mad_SEmbedI1_subtypes_true.ql | 8 ++--- .../mad_SEmbedI2_subtypes_true.expected | 16 ---------- .../mad_SEmbedI2_subtypes_true.ql | 8 ++--- .../mad_SEmbedS1_subtypes_true.expected | 2 -- .../mad_SEmbedS1_subtypes_true.ql | 8 ++--- .../mad_SEmbedS2_subtypes_true.expected | 2 -- .../mad_SEmbedS2_subtypes_true.ql | 8 ++--- .../mad_SImplEmbedI1_subtypes_true.expected | 30 ------------------- .../mad_SImplEmbedI1_subtypes_true.ql | 8 ++--- .../mad_SImplEmbedI2_subtypes_true.expected | 16 ---------- .../mad_SImplEmbedI2_subtypes_true.ql | 8 ++--- .../mad_SImplEmbedS1_subtypes_true.expected | 4 --- .../mad_SImplEmbedS1_subtypes_true.ql | 8 ++--- .../mad_SImplEmbedS2_subtypes_true.expected | 4 --- .../mad_SImplEmbedS2_subtypes_true.ql | 8 ++--- .../mad_i1_subtypes_false.expected | 8 ----- .../mad_i1_subtypes_false.ql | 8 ++--- .../mad_i1_subtypes_true.expected | 30 ------------------- .../mad_i1_subtypes_true.ql | 8 ++--- .../mad_i2_subtypes_false.expected | 8 ----- .../mad_i2_subtypes_false.ql | 8 ++--- .../mad_i2_subtypes_true.expected | 16 ---------- .../mad_i2_subtypes_true.ql | 8 ++--- .../mad_s1_subtypes_false.expected | 6 ---- .../mad_s1_subtypes_false.ql | 8 ++--- .../mad_s1_subtypes_true.expected | 6 ---- .../mad_s1_subtypes_true.ql | 8 ++--- .../ExternalFlowInheritance/ql_i1.expected | 8 ----- .../dataflow/ExternalFlowInheritance/ql_i1.ql | 8 ++--- .../ExternalFlowInheritance/ql_s1.expected | 12 -------- .../dataflow/ExternalFlowInheritance/ql_s1.ql | 8 ++--- 36 files changed, 36 insertions(+), 352 deletions(-) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected index cbf95dd43678..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.expected @@ -1,33 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:8:7:8:16 | call to Source | -| test.go:14:7:14:16 | call to Source | -| test.go:20:7:20:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:56:7:56:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:80:7:80:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:16:9:16:9 | y | -| test.go:22:9:22:9 | y | -| test.go:28:9:28:9 | y | -| test.go:34:9:34:9 | y | -| test.go:40:9:40:9 | y | -| test.go:46:9:46:9 | y | -| test.go:52:9:52:9 | y | -| test.go:58:9:58:9 | y | -| test.go:64:9:64:9 | y | -| test.go:70:9:70:9 | y | -| test.go:76:9:76:9 | y | -| test.go:82:9:82:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql index 8e2b2d851f8d..7af5b7795b9f 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected index fd2bac1acf5e..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.expected @@ -1,19 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:14:7:14:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:16:9:16:9 | y | -| test.go:28:9:28:9 | y | -| test.go:40:9:40:9 | y | -| test.go:52:9:52:9 | y | -| test.go:64:9:64:9 | y | -| test.go:76:9:76:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql index 7941f126967c..388370ba6b8c 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected index cbf95dd43678..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.expected @@ -1,33 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:8:7:8:16 | call to Source | -| test.go:14:7:14:16 | call to Source | -| test.go:20:7:20:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:56:7:56:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:80:7:80:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:16:9:16:9 | y | -| test.go:22:9:22:9 | y | -| test.go:28:9:28:9 | y | -| test.go:34:9:34:9 | y | -| test.go:40:9:40:9 | y | -| test.go:46:9:46:9 | y | -| test.go:52:9:52:9 | y | -| test.go:58:9:58:9 | y | -| test.go:64:9:64:9 | y | -| test.go:70:9:70:9 | y | -| test.go:76:9:76:9 | y | -| test.go:82:9:82:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql index 6221720a45ec..d56f8ae0f0f9 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected index fd2bac1acf5e..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.expected @@ -1,19 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:14:7:14:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:16:9:16:9 | y | -| test.go:28:9:28:9 | y | -| test.go:40:9:40:9 | y | -| test.go:52:9:52:9 | y | -| test.go:64:9:64:9 | y | -| test.go:76:9:76:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql index e1a2ff93d953..dd46393546fc 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected index 3b436cd843b4..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.expected @@ -1,5 +1,3 @@ testFailures invalidModelRow failures -sources -sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql index fba25acec597..0789ada5c51f 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected index 3b436cd843b4..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.expected @@ -1,5 +1,3 @@ testFailures invalidModelRow failures -sources -sinks diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql index 817a7b60ae30..76d0b6fcd1a1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected index cbf95dd43678..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.expected @@ -1,33 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:8:7:8:16 | call to Source | -| test.go:14:7:14:16 | call to Source | -| test.go:20:7:20:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:56:7:56:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:80:7:80:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:16:9:16:9 | y | -| test.go:22:9:22:9 | y | -| test.go:28:9:28:9 | y | -| test.go:34:9:34:9 | y | -| test.go:40:9:40:9 | y | -| test.go:46:9:46:9 | y | -| test.go:52:9:52:9 | y | -| test.go:58:9:58:9 | y | -| test.go:64:9:64:9 | y | -| test.go:70:9:70:9 | y | -| test.go:76:9:76:9 | y | -| test.go:82:9:82:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql index d04767396daf..4fb7909d7610 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected index fd2bac1acf5e..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.expected @@ -1,19 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:14:7:14:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:16:9:16:9 | y | -| test.go:28:9:28:9 | y | -| test.go:40:9:40:9 | y | -| test.go:52:9:52:9 | y | -| test.go:64:9:64:9 | y | -| test.go:76:9:76:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql index 6fe3df197346..f5dba02a1528 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected index 432cb871c801..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.expected @@ -1,7 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:80:7:80:16 | call to Source | -sinks -| test.go:82:9:82:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql index 559e33dfe747..e08c787aa10a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected index bdb17db38b6f..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.expected @@ -1,7 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql index 492bc2f9fd6a..4c2d832620cb 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected index 4175a026f36f..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.expected @@ -1,11 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:8:7:8:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:34:9:34:9 | y | -| test.go:46:9:46:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql index f9f2bf6ebfc4..82d63025f226 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_false.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected index cbf95dd43678..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.expected @@ -1,33 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:8:7:8:16 | call to Source | -| test.go:14:7:14:16 | call to Source | -| test.go:20:7:20:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:56:7:56:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:80:7:80:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:16:9:16:9 | y | -| test.go:22:9:22:9 | y | -| test.go:28:9:28:9 | y | -| test.go:34:9:34:9 | y | -| test.go:40:9:40:9 | y | -| test.go:46:9:46:9 | y | -| test.go:52:9:52:9 | y | -| test.go:58:9:58:9 | y | -| test.go:64:9:64:9 | y | -| test.go:70:9:70:9 | y | -| test.go:76:9:76:9 | y | -| test.go:82:9:82:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql index 2dbf85ef9d0a..85a18e65096e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected index fcf4ee6e4c7c..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.expected @@ -1,11 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:14:7:14:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -sinks -| test.go:16:9:16:9 | y | -| test.go:40:9:40:9 | y | -| test.go:52:9:52:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql index 6324fc52cf8b..f8dafe8b4f71 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_false.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected index fd2bac1acf5e..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.expected @@ -1,19 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:14:7:14:16 | call to Source | -| test.go:26:7:26:16 | call to Source | -| test.go:38:7:38:16 | call to Source | -| test.go:50:7:50:16 | call to Source | -| test.go:62:7:62:16 | call to Source | -| test.go:74:7:74:16 | call to Source | -| test.go:86:7:86:16 | call to Source | -sinks -| test.go:16:9:16:9 | y | -| test.go:28:9:28:9 | y | -| test.go:40:9:40:9 | y | -| test.go:52:9:52:9 | y | -| test.go:64:9:64:9 | y | -| test.go:76:9:76:9 | y | -| test.go:88:9:88:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql index 5c936b10dbc0..140591813924 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_i2_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected index bec552c85511..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.expected @@ -1,9 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:20:7:20:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -sinks -| test.go:22:9:22:9 | y | -| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql index b11b64c4a13b..72cea1afe969 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_false.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected index bec552c85511..db33d6d2504a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.expected @@ -1,9 +1,3 @@ testFailures invalidModelRow failures -sources -| test.go:20:7:20:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -sinks -| test.go:22:9:22:9 | y | -| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql index 7809f59c3d70..4afbff7ac9e1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_s1_subtypes_true.ql @@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = TaintTracking::Global; @@ -26,7 +26,3 @@ module FlowTest implements TestSig { ) } } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected index d58288abca70..7547cc92e0b6 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected @@ -3,11 +3,3 @@ paths | test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | | test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | | test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | -sources -| test.go:8:7:8:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:34:9:34:9 | y | -| test.go:46:9:46:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql index bf113c3330c6..7e0108da7649 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql @@ -32,15 +32,11 @@ class MySink extends FileSystemAccess::Range, DataFlow::CallNode { } module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = DataFlow::Global; query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected index 39cd1eaca944..4b10ac1b7b02 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected @@ -5,15 +5,3 @@ paths | test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | | test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | | test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | -sources -| test.go:8:7:8:16 | call to Source | -| test.go:20:7:20:16 | call to Source | -| test.go:32:7:32:16 | call to Source | -| test.go:44:7:44:16 | call to Source | -| test.go:68:7:68:16 | call to Source | -sinks -| test.go:10:9:10:9 | y | -| test.go:22:9:22:9 | y | -| test.go:34:9:34:9 | y | -| test.go:46:9:46:9 | y | -| test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql index 6d9371308efe..27c8d4aec867 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql @@ -32,15 +32,11 @@ class MySink extends FileSystemAccess::Range, DataFlow::CallNode { } module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { sources(source) } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - predicate isSink(DataFlow::Node sink) { sinks(sink) } + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } } module Flow = DataFlow::Global; query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } - -query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource } - -query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } From 6e428d508300cbdedff9d3c6f5aa0e5043356610 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 15:03:48 +0100 Subject: [PATCH 103/162] Fix bug where some methods were inappropriately promoted --- go/ql/lib/semmle/go/Types.qll | 2 +- .../dataflow/ExternalFlowInheritance/test.go | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 645f0e3fe67e..b01e0a7f4dd5 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -1000,7 +1000,7 @@ class NamedType extends @namedtype, CompositeType { s.hasOwnField(_, _, embedded, true) and // ensure `m` can be promoted not s.hasOwnField(_, m, _, _) and - not exists(Method m2 | m2.getReceiverType() = this and m2.getName() = m) + not exists(Method m2 | m2.getReceiverBaseType() = this and m2.getName() = m) | // If S contains an embedded field T, the method set of S includes promoted methods with receiver T result = embedded.getMethod(m) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go index 88ffaff711a2..6291f991cf11 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -7,83 +7,83 @@ import ( func TestI1(t test.I1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] } func TestI2(t test.I2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestS1(t test.S1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] } func TestS2(t test.S2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestSEmbedI1(t test.SEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] } func TestSEmbedI2(t test.SEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestIEmbedI1(t test.IEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] } func TestIEmbedI2(t test.IEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestSImplEmbedI1(t test.SImplEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] } func TestSImplEmbedI2(t test.SImplEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI2[t] } func TestSEmbedS1(t test.SEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] } func TestSEmbedS2(t test.SEmbedS2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestSImplEmbedS1(t test.SImplEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] SImplEmbedS1[t] + t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedS1[t] } func TestSImplEmbedS2(t test.SImplEmbedS2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI1[t] SImplEmbedI2[t] SImplEmbedS2[t] + t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedS2[t] } From b0caabac8672d876db92a96c322d1b221b51e56b Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 16:18:59 +0100 Subject: [PATCH 104/162] Also update QL tests --- .../ExternalFlowInheritance/ql_I1.expected | 3 ++ .../{ql_i1.ql => ql_I1.ql} | 34 +++++++++++++------ .../ExternalFlowInheritance/ql_S1.expected | 3 ++ .../{ql_s1.ql => ql_S1.ql} | 34 +++++++++++++------ .../ExternalFlowInheritance/ql_i1.expected | 5 --- .../ExternalFlowInheritance/ql_s1.expected | 7 ---- .../dataflow/ExternalFlowInheritance/test.go | 10 +++--- 7 files changed, 59 insertions(+), 37 deletions(-) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.expected rename go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/{ql_i1.ql => ql_I1.ql} (65%) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.expected rename go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/{ql_s1.ql => ql_S1.ql} (65%) delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.expected new file mode 100644 index 000000000000..db33d6d2504a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.expected @@ -0,0 +1,3 @@ +testFailures +invalidModelRow +failures diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql similarity index 65% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql index 7e0108da7649..9e563a5bb70e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql @@ -2,6 +2,30 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } +} + +module Flow = TaintTracking::Global; + +module FlowTest implements TestSig { + string getARelevantTag() { result = "ql_I1" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "ql_I1" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} class MySource extends RemoteFlowSource::Range instanceof DataFlow::Node { MySource() { @@ -30,13 +54,3 @@ class MySink extends FileSystemAccess::Range, DataFlow::CallNode { override DataFlow::Node getAPathArgument() { result = this.getArgument(0) } } - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } -} - -module Flow = DataFlow::Global; - -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.expected new file mode 100644 index 000000000000..db33d6d2504a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.expected @@ -0,0 +1,3 @@ +testFailures +invalidModelRow +failures diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql similarity index 65% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql index 27c8d4aec867..bf9f36358b9d 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql @@ -2,6 +2,30 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineExpectationsTest +import MakeTest + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } +} + +module Flow = TaintTracking::Global; + +module FlowTest implements TestSig { + string getARelevantTag() { result = "ql_S1" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "ql_S1" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "" + ) + } +} class MySource extends RemoteFlowSource::Range instanceof DataFlow::Node { MySource() { @@ -30,13 +54,3 @@ class MySink extends FileSystemAccess::Range, DataFlow::CallNode { override DataFlow::Node getAPathArgument() { result = this.getArgument(0) } } - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() } -} - -module Flow = DataFlow::Global; - -query predicate paths(DataFlow::Node source, DataFlow::Node sink) { Flow::flow(source, sink) } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected deleted file mode 100644 index 7547cc92e0b6..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_i1.expected +++ /dev/null @@ -1,5 +0,0 @@ -invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected deleted file mode 100644 index 4b10ac1b7b02..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_s1.expected +++ /dev/null @@ -1,7 +0,0 @@ -invalidModelRow -paths -| test.go:8:7:8:16 | call to Source | test.go:10:9:10:9 | y | -| test.go:20:7:20:16 | call to Source | test.go:22:9:22:9 | y | -| test.go:32:7:32:16 | call to Source | test.go:34:9:34:9 | y | -| test.go:44:7:44:16 | call to Source | test.go:46:9:46:9 | y | -| test.go:68:7:68:16 | call to Source | test.go:70:9:70:9 | y | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go index 6291f991cf11..141e51483c5b 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -7,7 +7,7 @@ import ( func TestI1(t test.I1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] ql_I1 ql_S1 } func TestI2(t test.I2) { @@ -19,7 +19,7 @@ func TestI2(t test.I2) { func TestS1(t test.S1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] + t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] ql_S1 } func TestS2(t test.S2) { @@ -31,7 +31,7 @@ func TestS2(t test.S2) { func TestSEmbedI1(t test.SEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] ql_I1 ql_S1 } func TestSEmbedI2(t test.SEmbedI2) { @@ -43,7 +43,7 @@ func TestSEmbedI2(t test.SEmbedI2) { func TestIEmbedI1(t test.IEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] + t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] ql_I1 ql_S1 } func TestIEmbedI2(t test.IEmbedI2) { @@ -67,7 +67,7 @@ func TestSImplEmbedI2(t test.SImplEmbedI2) { func TestSEmbedS1(t test.SEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] + t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] ql_S1 } func TestSEmbedS2(t test.SEmbedS2) { From b04abc09f02b060a673f0941cb0f43db44b7d1f2 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Mon, 23 Sep 2024 16:41:34 +0200 Subject: [PATCH 105/162] Rust: extract syntax errors --- rust/extractor/src/main.rs | 5 ++- rust/extractor/src/translate/base.rs | 18 +++++++++-- rust/extractor/src/trap.rs | 46 +++++++++++++++++++++++++--- 3 files changed, 58 insertions(+), 11 deletions(-) diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs index 0300e3c1f3b0..2fd672765570 100644 --- a/rust/extractor/src/main.rs +++ b/rust/extractor/src/main.rs @@ -27,15 +27,14 @@ fn extract( let parse = ra_ap_syntax::ast::SourceFile::parse(&input, Edition::CURRENT); for err in parse.errors() { - let (start, _) = translator.location(err.range()); - log::warn!("{}:{}:{}: {}", display_path, start.line, start.col, err); + translator.emit_parse_error(display_path.as_ref(), err); } if let Some(ast) = SourceFile::cast(parse.syntax_node()) { translator.emit_source_file(ast); - translator.trap.commit()? } else { log::warn!("Skipped {}", display_path); } + translator.trap.commit()?; Ok(()) } fn main() -> anyhow::Result<()> { diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs index b0d42b1dbee3..6d261daf80fe 100644 --- a/rust/extractor/src/translate/base.rs +++ b/rust/extractor/src/translate/base.rs @@ -1,10 +1,9 @@ -use crate::trap::TrapFile; +use crate::trap::{DiagnosticSeverity, TrapFile}; use crate::trap::{Label, TrapClass}; use codeql_extractor::trap::{self}; use ra_ap_ide_db::line_index::{LineCol, LineIndex}; use ra_ap_syntax::ast::RangeItem; -use ra_ap_syntax::TextSize; -use ra_ap_syntax::{ast, TextRange}; +use ra_ap_syntax::{ast, SyntaxError, TextRange, TextSize}; pub trait TextValue { fn try_get_text(&self) -> Option; } @@ -83,4 +82,17 @@ impl Translator { let (start, end) = self.location(node.syntax().text_range()); self.trap.emit_location(self.label, label, start, end) } + pub fn emit_parse_error(&mut self, path: &str, err: SyntaxError) { + let (start, end) = self.location(err.range()); + log::warn!("{}:{}:{}: {}", path, start.line, start.col, err); + let message = err.to_string(); + let location = self.trap.emit_location_label(self.label, start, end); + self.trap.emit_diagnostic( + DiagnosticSeverity::Warning, + "parse_error".to_owned(), + message.clone(), + message, + location, + ); + } } diff --git a/rust/extractor/src/trap.rs b/rust/extractor/src/trap.rs index 6ad1742557dc..0d549ea4dc7a 100644 --- a/rust/extractor/src/trap.rs +++ b/rust/extractor/src/trap.rs @@ -128,19 +128,25 @@ pub struct TrapFile { compression: Compression, } +#[derive(Copy, Clone)] +pub enum DiagnosticSeverity { + Debug = 10, + Info = 20, + Warning = 30, + Error = 40, +} impl TrapFile { - pub fn emit_location( + pub fn emit_location_label( &mut self, file_label: UntypedLabel, - entity_label: Label, start: LineCol, end: LineCol, - ) { + ) -> UntypedLabel { let start_line = 1 + start.line as usize; let start_column = 1 + start.col as usize; let end_line = 1 + end.line as usize; let end_column = 1 + end.col as usize; - let location_label = extractor::location_label( + extractor::location_label( &mut self.writer, trap::Location { file_label, @@ -149,13 +155,43 @@ impl TrapFile { end_line, end_column, }, - ); + ) + } + pub fn emit_location( + &mut self, + file_label: UntypedLabel, + entity_label: Label, + start: LineCol, + end: LineCol, + ) { + let location_label = self.emit_location_label(file_label, start, end); self.writer.add_tuple( "locatable_locations", vec![entity_label.into(), location_label.into()], ); } + pub fn emit_diagnostic( + &mut self, + severity: DiagnosticSeverity, + error_tag: String, + error_message: String, + full_error_message: String, + location: UntypedLabel, + ) { + let label = self.writer.fresh_id(); + self.writer.add_tuple( + "diagnostics", + vec![ + trap::Arg::Label(label), + trap::Arg::Int(severity as usize), + trap::Arg::String(error_tag), + trap::Arg::String(error_message), + trap::Arg::String(full_error_message), + trap::Arg::Label(location), + ], + ); + } pub fn emit_file(&mut self, absolute_path: &Path) -> trap::Label { extractor::populate_file(&mut self.writer, absolute_path) } From bdb4d89f9f32d08bdb349933e4cf4a85dafd39a4 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Mon, 23 Sep 2024 17:15:26 +0200 Subject: [PATCH 106/162] Rust: add Diagnostics.qll --- config/identical-files.json | 4 ++ rust/ql/lib/codeql/rust/Diagnostics.qll | 52 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 rust/ql/lib/codeql/rust/Diagnostics.qll diff --git a/config/identical-files.json b/config/identical-files.json index d14052c12d83..89a1e6fc363a 100644 --- a/config/identical-files.json +++ b/config/identical-files.json @@ -355,5 +355,9 @@ "Python model summaries test extension": [ "python/ql/test/library-tests/dataflow/model-summaries/InlineTaintTest.ext.yml", "python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ext.yml" + ], + "Diagnostics.qll": [ + "ruby/ql/lib/codeql/ruby/Diagnostics.qll", + "rust/ql/lib/codeql/rust/Diagnostics.qll" ] } diff --git a/rust/ql/lib/codeql/rust/Diagnostics.qll b/rust/ql/lib/codeql/rust/Diagnostics.qll new file mode 100644 index 000000000000..faf7b8420a0e --- /dev/null +++ b/rust/ql/lib/codeql/rust/Diagnostics.qll @@ -0,0 +1,52 @@ +private import codeql.Locations + +/** A diagnostic emitted during extraction, such as a parse error */ +class Diagnostic extends @diagnostic { + int severity; + string tag; + string message; + string fullMessage; + Location location; + + Diagnostic() { diagnostics(this, severity, tag, message, fullMessage, location) } + + /** + * Gets the numerical severity level associated with this diagnostic. + */ + int getSeverity() { result = severity } + + /** Gets a string representation of the severity of this diagnostic. */ + string getSeverityText() { + severity = 10 and result = "Debug" + or + severity = 20 and result = "Info" + or + severity = 30 and result = "Warning" + or + severity = 40 and result = "Error" + } + + /** Gets the error code associated with this diagnostic, e.g. parse_error. */ + string getTag() { result = tag } + + /** + * Gets the error message text associated with this diagnostic. + */ + string getMessage() { result = message } + + /** + * Gets the full error message text associated with this diagnostic. + */ + string getFullMessage() { result = fullMessage } + + /** Gets the source location of this diagnostic. */ + Location getLocation() { result = location } + + /** Gets a textual representation of this diagnostic. */ + string toString() { result = this.getMessage() } +} + +/** A diagnostic relating to a particular error in extracting a file. */ +class ExtractionError extends Diagnostic { + ExtractionError() { this.getTag() = "parse_error" } +} From c596205416011bd28bedb750088553654f45d435 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Mon, 23 Sep 2024 17:16:57 +0200 Subject: [PATCH 107/162] Rust: add some more diagnostics queries --- .../queries/diagnostics/ExtractionErrors.ql | 18 ++++++++++++++++++ .../NumberOfFilesExtractedWithErrors.ql | 15 +++++++++++++++ .../NumberOfSuccessfullyExtractedFiles.ql | 15 +++++++++++++++ .../diagnostics/ExtractionErrors.expected | 6 ++++++ .../diagnostics/ExtractionErrors.qlref | 1 + 5 files changed, 55 insertions(+) create mode 100644 rust/ql/src/queries/diagnostics/ExtractionErrors.ql create mode 100644 rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql create mode 100644 rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql create mode 100644 rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected create mode 100644 rust/ql/test/query-tests/diagnostics/ExtractionErrors.qlref diff --git a/rust/ql/src/queries/diagnostics/ExtractionErrors.ql b/rust/ql/src/queries/diagnostics/ExtractionErrors.ql new file mode 100644 index 000000000000..a04c4e618c41 --- /dev/null +++ b/rust/ql/src/queries/diagnostics/ExtractionErrors.ql @@ -0,0 +1,18 @@ +/** + * @name Extraction errors + * @description List all extraction errors for files in the source code directory. + * @kind diagnostic + * @id rust/diagnostics/extraction-errors + */ + +import codeql.rust.Diagnostics +import codeql.files.FileSystem + +/** Gets the SARIF severity to associate an error. */ +int getSeverity() { result = 2 } + +from ExtractionError error, File f +where + f = error.getLocation().getFile() and + exists(f.getRelativePath()) +select error, "Extraction failed in " + f + " with error " + error.getMessage(), getSeverity() diff --git a/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql b/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql new file mode 100644 index 000000000000..14427158c369 --- /dev/null +++ b/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql @@ -0,0 +1,15 @@ +/** + * @id rust/summary/number-of-files-extracted-with-errors + * @name Total number of Rust files that were extracted with errors + * @description The total number of Rust code files that we extracted, but where + * at least one extraction error occurred in the process. + * @kind metric + * @tags summary + */ + +import codeql.files.FileSystem +import codeql.rust.Diagnostics + +select count(File f | + exists(ExtractionError e | e.getLocation().getFile() = f) and exists(f.getRelativePath()) + ) diff --git a/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql b/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql new file mode 100644 index 000000000000..b8a64f60512d --- /dev/null +++ b/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql @@ -0,0 +1,15 @@ +/** + * @id rust/summary/number-of-successfully-extracted-files + * @name Total number of Rust files that were extracted without error + * @description The total number of Rust code files that we extracted without + * encountering any extraction errors + * @kind metric + * @tags summary + */ + +import codeql.rust.Diagnostics +import codeql.files.FileSystem + +select count(File f | + not exists(ExtractionError e | e.getLocation().getFile() = f) and exists(f.getRelativePath()) + ) diff --git a/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected b/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected new file mode 100644 index 000000000000..b6aaf7b6d373 --- /dev/null +++ b/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected @@ -0,0 +1,6 @@ +| does_not_compile.rs:2:6:2:5 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 | +| does_not_compile.rs:2:9:2:8 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 | +| does_not_compile.rs:2:13:2:12 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 | +| does_not_compile.rs:2:21:2:20 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 | +| does_not_compile.rs:2:26:2:25 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 | +| does_not_compile.rs:2:32:2:31 | expected field name or number | Extraction failed in does_not_compile.rs with error expected field name or number | 2 | diff --git a/rust/ql/test/query-tests/diagnostics/ExtractionErrors.qlref b/rust/ql/test/query-tests/diagnostics/ExtractionErrors.qlref new file mode 100644 index 000000000000..ffbdb0a7b1b5 --- /dev/null +++ b/rust/ql/test/query-tests/diagnostics/ExtractionErrors.qlref @@ -0,0 +1 @@ +queries/diagnostics/ExtractionErrors.ql \ No newline at end of file From 9b8cbdad49910f329b857743c5c83574a4ff899e Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Mon, 23 Sep 2024 17:43:23 +0200 Subject: [PATCH 108/162] Add QLDoc to Diagnostics.qll --- ruby/ql/lib/codeql/ruby/Diagnostics.qll | 2 ++ rust/ql/lib/codeql/rust/Diagnostics.qll | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ruby/ql/lib/codeql/ruby/Diagnostics.qll b/ruby/ql/lib/codeql/ruby/Diagnostics.qll index faf7b8420a0e..5902bb594141 100644 --- a/ruby/ql/lib/codeql/ruby/Diagnostics.qll +++ b/ruby/ql/lib/codeql/ruby/Diagnostics.qll @@ -1,3 +1,5 @@ +/** Provides classes relating to extraction diagnostics. */ + private import codeql.Locations /** A diagnostic emitted during extraction, such as a parse error */ diff --git a/rust/ql/lib/codeql/rust/Diagnostics.qll b/rust/ql/lib/codeql/rust/Diagnostics.qll index faf7b8420a0e..5902bb594141 100644 --- a/rust/ql/lib/codeql/rust/Diagnostics.qll +++ b/rust/ql/lib/codeql/rust/Diagnostics.qll @@ -1,3 +1,5 @@ +/** Provides classes relating to extraction diagnostics. */ + private import codeql.Locations /** A diagnostic emitted during extraction, such as a parse error */ From ca2b8ef6c0db5c0b25e086a01b8c23786fdf8e7e Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 24 Sep 2024 10:02:25 +0200 Subject: [PATCH 109/162] Apply suggestions from code review Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../src/queries/summary/NumberOfFilesExtractedWithErrors.ql | 4 ++-- .../src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql b/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql index 14427158c369..1af3f0f88ec0 100644 --- a/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql +++ b/rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql @@ -1,8 +1,8 @@ /** * @id rust/summary/number-of-files-extracted-with-errors * @name Total number of Rust files that were extracted with errors - * @description The total number of Rust code files that we extracted, but where - * at least one extraction error occurred in the process. + * @description The total number of Rust files in the source code directory that + * were extracted, but where at least one extraction error occurred in the process. * @kind metric * @tags summary */ diff --git a/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql b/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql index b8a64f60512d..eb86577b4b80 100644 --- a/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql +++ b/rust/ql/src/queries/summary/NumberOfSuccessfullyExtractedFiles.ql @@ -1,8 +1,8 @@ /** * @id rust/summary/number-of-successfully-extracted-files * @name Total number of Rust files that were extracted without error - * @description The total number of Rust code files that we extracted without - * encountering any extraction errors + * @description The total number of Rust files in the source code directory that + * were extracted without encountering any extraction errors. * @kind metric * @tags summary */ From 37f264df74f41c624b970b1827724f508c03dc19 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 24 Sep 2024 11:11:48 +0200 Subject: [PATCH 110/162] Rust: correct line and column numbers in printed error messages --- rust/extractor/src/translate/base.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs index 6d261daf80fe..9bca31421642 100644 --- a/rust/extractor/src/translate/base.rs +++ b/rust/extractor/src/translate/base.rs @@ -84,7 +84,7 @@ impl Translator { } pub fn emit_parse_error(&mut self, path: &str, err: SyntaxError) { let (start, end) = self.location(err.range()); - log::warn!("{}:{}:{}: {}", path, start.line, start.col, err); + log::warn!("{}:{}:{}: {}", path, start.line + 1, start.col + 1, err); let message = err.to_string(); let location = self.trap.emit_location_label(self.label, start, end); self.trap.emit_diagnostic( From 1953e4f9719353131eebdc0bd6687f91bea6dd1d Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 24 Sep 2024 11:12:40 +0200 Subject: [PATCH 111/162] Rust: handle UTF-8 decoding errors --- rust/extractor/src/main.rs | 43 +++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs index 2fd672765570..81032636ceb0 100644 --- a/rust/extractor/src/main.rs +++ b/rust/extractor/src/main.rs @@ -1,13 +1,48 @@ use anyhow::Context; use ra_ap_ide_db::line_index::LineIndex; use ra_ap_parser::Edition; +use std::borrow::Cow; mod archive; mod config; pub mod generated; mod translate; pub mod trap; use ra_ap_syntax::ast::SourceFile; -use ra_ap_syntax::AstNode; +use ra_ap_syntax::{AstNode, SyntaxError, TextRange, TextSize}; + +fn from_utf8_lossy(v: &[u8]) -> (Cow<'_, str>, Option) { + let mut iter = v.utf8_chunks(); + let (first_valid, first_invalid) = if let Some(chunk) = iter.next() { + let valid = chunk.valid(); + let invalid = chunk.invalid(); + if invalid.is_empty() { + debug_assert_eq!(valid.len(), v.len()); + return (Cow::Borrowed(valid), None); + } + (valid, invalid) + } else { + return (Cow::Borrowed(""), None); + }; + + const REPLACEMENT: &str = "\u{FFFD}"; + let error_start = first_valid.len() as u32; + let error_end = error_start + first_invalid.len() as u32; + let error_range = TextRange::new(TextSize::new(error_start), TextSize::new(error_end)); + let error = SyntaxError::new("invalid utf-8 sequence".to_owned(), error_range); + let mut res = String::with_capacity(v.len()); + res.push_str(first_valid); + + res.push_str(REPLACEMENT); + + for chunk in iter { + res.push_str(chunk.valid()); + if !chunk.invalid().is_empty() { + res.push_str(REPLACEMENT); + } + } + + (Cow::Owned(res), Some(error)) +} fn extract( archiver: &archive::Archiver, @@ -18,13 +53,15 @@ fn extract( let file = std::fs::canonicalize(&file).unwrap_or(file); archiver.archive(&file); let input = std::fs::read(&file)?; - let input = String::from_utf8(input)?; + let (input, err) = from_utf8_lossy(&input); let line_index = LineIndex::new(&input); let display_path = file.to_string_lossy(); let mut trap = traps.create("source", &file); let label = trap.emit_file(&file); let mut translator = translate::Translator::new(trap, label, line_index); - + if let Some(err) = err { + translator.emit_parse_error(display_path.as_ref(), err); + } let parse = ra_ap_syntax::ast::SourceFile::parse(&input, Edition::CURRENT); for err in parse.errors() { translator.emit_parse_error(display_path.as_ref(), err); From 73209638e3fdd054f048e4eafe3e7f0a1a85035d Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 16:41:10 +0100 Subject: [PATCH 112/162] Improve comments in test library --- .../vendor/github.com/nonexistent/test/stub.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go index e5a417bcbd35..206e1d99e383 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/vendor/github.com/nonexistent/test/stub.go @@ -97,7 +97,8 @@ type SEmbedS1 struct{ S1 } // A struct type embedding S2 type SEmbedS2 struct{ S2 } -// A struct type embedding S1 and "overriding" its methods +// A struct type embedding S1 and separately implementing I1's methods, so the +// methods of the embedded field are not promoted. type SImplEmbedS1 struct{ S1 } func (t *SImplEmbedS1) Source() interface{} { @@ -110,7 +111,8 @@ func (t *SImplEmbedS1) Step(val interface{}) interface{} { return val } -// A struct type embedding S2 and "overriding" its methods +// A struct type embedding S2 and separately implementing I2's methods, so the +// methods of the embedded field are not promoted. type SImplEmbedS2 struct{ S2 } func (t *SImplEmbedS2) Source() interface{} { From 4d3a140dd7a1dcd4ee4c2b7c766420b86ca9d4e0 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 26 Aug 2024 23:43:15 +0100 Subject: [PATCH 113/162] Expose whether functions are variadic in their pp() output --- go/ql/lib/semmle/go/Types.qll | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 645f0e3fe67e..683768bfdec1 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -921,9 +921,12 @@ class SignatureType extends @signaturetype, CompositeType { language[monotonicAggregates] override string pp() { - result = - "func(" + concat(int i, Type tp | tp = this.getParameterType(i) | tp.pp(), ", " order by i) + - ") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i) + exists(string suffix | (if this.isVariadic() then suffix = "[variadic]" else suffix = "") | + result = + "func(" + concat(int i, Type tp | tp = this.getParameterType(i) | tp.pp(), ", " order by i) + + ") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i) + + " " + suffix + ) } override string toString() { result = "signature type" } From 40035a0b6278f809c7d4aa05a0cbd97b8afc6195 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 2 Sep 2024 21:59:53 +0100 Subject: [PATCH 114/162] Improve pretty-printer --- go/ql/lib/semmle/go/Types.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 683768bfdec1..117d089851ee 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -921,11 +921,11 @@ class SignatureType extends @signaturetype, CompositeType { language[monotonicAggregates] override string pp() { - exists(string suffix | (if this.isVariadic() then suffix = "[variadic]" else suffix = "") | + exists(string suffix | (if this.isVariadic() then suffix = " [variadic]" else suffix = "") | result = "func(" + concat(int i, Type tp | tp = this.getParameterType(i) | tp.pp(), ", " order by i) + ") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i) + - " " + suffix + suffix ) } From 11755482e44cfe81598079081e90486837bfca41 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 2 Sep 2024 22:41:50 +0100 Subject: [PATCH 115/162] Update test expectation (now signature types pretty-print indicating if they are variadic) --- .../semmle/go/PrintAst/PrintAst.expected | 40 +++++++++---------- .../PrintAst/PrintAstExcludeComments.expected | 40 +++++++++---------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected index e2424aa4575d..3fe19e433f82 100644 --- a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected +++ b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected @@ -53,10 +53,10 @@ input.go: # 20| 0: [CallExpr] call to Println # 20| Type = (int, error) # 20| 0: [FunctionName, SelectorExpr] selection of Println -# 20| Type = func([]interface { }) int, error +# 20| Type = func([]interface { }) int, error [variadic] # 20| 0: [Ident, PackageName] fmt # 20| 1: [FunctionName, Ident] Println -# 20| Type = func([]interface { }) int, error +# 20| Type = func([]interface { }) int, error [variadic] # 20| 1: [StringLit] "Hi" # 20| Type = string # 20| Value = [StringLit] Hi @@ -203,10 +203,10 @@ input.go: # 52| 0: [CallExpr] call to Println # 52| Type = (int, error) # 52| 0: [FunctionName, SelectorExpr] selection of Println -# 52| Type = func([]interface { }) int, error +# 52| Type = func([]interface { }) int, error [variadic] # 52| 0: [Ident, PackageName] fmt # 52| 1: [FunctionName, Ident] Println -# 52| Type = func([]interface { }) int, error +# 52| Type = func([]interface { }) int, error [variadic] # 52| 1: [StringLit] "Heard from ch1" # 52| Type = string # 52| Value = [StringLit] Heard from ch1 @@ -229,20 +229,20 @@ input.go: # 54| 0: [CallExpr] call to Println # 54| Type = (int, error) # 54| 0: [FunctionName, SelectorExpr] selection of Println -# 54| Type = func([]interface { }) int, error +# 54| Type = func([]interface { }) int, error [variadic] # 54| 0: [Ident, PackageName] fmt # 54| 1: [FunctionName, Ident] Println -# 54| Type = func([]interface { }) int, error +# 54| Type = func([]interface { }) int, error [variadic] # 54| 1: [Ident, VariableName] a # 54| Type = [1]float32 # 55| 2: [ExprStmt] expression statement # 55| 0: [CallExpr] call to Println # 55| Type = (int, error) # 55| 0: [FunctionName, SelectorExpr] selection of Println -# 55| Type = func([]interface { }) int, error +# 55| Type = func([]interface { }) int, error [variadic] # 55| 0: [Ident, PackageName] fmt # 55| 1: [FunctionName, Ident] Println -# 55| Type = func([]interface { }) int, error +# 55| Type = func([]interface { }) int, error [variadic] # 55| 1: [Ident, VariableName] w # 55| Type = bool # 56| 2: [CommClause] comm clause @@ -250,10 +250,10 @@ input.go: # 57| 0: [CallExpr] call to Println # 57| Type = (int, error) # 57| 0: [FunctionName, SelectorExpr] selection of Println -# 57| Type = func([]interface { }) int, error +# 57| Type = func([]interface { }) int, error [variadic] # 57| 0: [Ident, PackageName] fmt # 57| 1: [FunctionName, Ident] Println -# 57| Type = func([]interface { }) int, error +# 57| Type = func([]interface { }) int, error [variadic] # 58| 3: [CommClause] comm clause # 58| 0: [SendStmt] send statement # 58| 0: [Ident, VariableName] ch1 @@ -297,10 +297,10 @@ input.go: # 67| 0: [CallExpr] call to Println # 67| Type = (int, error) # 67| 0: [FunctionName, SelectorExpr] selection of Println -# 67| Type = func([]interface { }) int, error +# 67| Type = func([]interface { }) int, error [variadic] # 67| 0: [Ident, PackageName] fmt # 67| 1: [FunctionName, Ident] Println -# 67| Type = func([]interface { }) int, error +# 67| Type = func([]interface { }) int, error [variadic] # 67| 1: [Ident, VariableName] x # 67| Type = int # 68| 2: [BlockStmt] block statement @@ -316,10 +316,10 @@ input.go: # 69| 0: [CallExpr] call to Println # 69| Type = (int, error) # 69| 0: [FunctionName, SelectorExpr] selection of Println -# 69| Type = func([]interface { }) int, error +# 69| Type = func([]interface { }) int, error [variadic] # 69| 0: [Ident, PackageName] fmt # 69| 1: [FunctionName, Ident] Println -# 69| Type = func([]interface { }) int, error +# 69| Type = func([]interface { }) int, error [variadic] # 69| 1: [MinusExpr] -... # 69| Type = int # 69| 0: [Ident, VariableName] x @@ -474,10 +474,10 @@ input.go: # 115| 0: [CallExpr] call to Println # 115| Type = (int, error) # 115| 0: [FunctionName, SelectorExpr] selection of Println -# 115| Type = func([]interface { }) int, error +# 115| Type = func([]interface { }) int, error [variadic] # 115| 0: [Ident, PackageName] fmt # 115| 1: [FunctionName, Ident] Println -# 115| Type = func([]interface { }) int, error +# 115| Type = func([]interface { }) int, error [variadic] # 115| 1: [Ident, VariableName] y # 115| Type = interface { } # 116| 1: [CaseClause] case clause @@ -566,10 +566,10 @@ input.go: # 138| 0: [CallExpr] call to Print # 138| Type = (int, error) # 138| 0: [FunctionName, SelectorExpr] selection of Print -# 138| Type = func([]interface { }) int, error +# 138| Type = func([]interface { }) int, error [variadic] # 138| 0: [Ident, PackageName] fmt # 138| 1: [FunctionName, Ident] Print -# 138| Type = func([]interface { }) int, error +# 138| Type = func([]interface { }) int, error [variadic] # 138| 1: [Ident, VariableName] x # 138| Type = int # 141| 1: [RangeStmt] range statement @@ -584,10 +584,10 @@ input.go: # 142| 0: [CallExpr] call to Print # 142| Type = (int, error) # 142| 0: [FunctionName, SelectorExpr] selection of Print -# 142| Type = func([]interface { }) int, error +# 142| Type = func([]interface { }) int, error [variadic] # 142| 0: [Ident, PackageName] fmt # 142| 1: [FunctionName, Ident] Print -# 142| Type = func([]interface { }) int, error +# 142| Type = func([]interface { }) int, error [variadic] # 142| 1: [Ident, VariableName] i # 142| Type = int # 142| 2: [Ident, VariableName] v diff --git a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected index 57fbeb881a52..3906a5352068 100644 --- a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected +++ b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected @@ -33,10 +33,10 @@ input.go: # 20| 0: [CallExpr] call to Println # 20| Type = (int, error) # 20| 0: [FunctionName, SelectorExpr] selection of Println -# 20| Type = func([]interface { }) int, error +# 20| Type = func([]interface { }) int, error [variadic] # 20| 0: [Ident, PackageName] fmt # 20| 1: [FunctionName, Ident] Println -# 20| Type = func([]interface { }) int, error +# 20| Type = func([]interface { }) int, error [variadic] # 20| 1: [StringLit] "Hi" # 20| Type = string # 20| Value = [StringLit] Hi @@ -183,10 +183,10 @@ input.go: # 52| 0: [CallExpr] call to Println # 52| Type = (int, error) # 52| 0: [FunctionName, SelectorExpr] selection of Println -# 52| Type = func([]interface { }) int, error +# 52| Type = func([]interface { }) int, error [variadic] # 52| 0: [Ident, PackageName] fmt # 52| 1: [FunctionName, Ident] Println -# 52| Type = func([]interface { }) int, error +# 52| Type = func([]interface { }) int, error [variadic] # 52| 1: [StringLit] "Heard from ch1" # 52| Type = string # 52| Value = [StringLit] Heard from ch1 @@ -209,20 +209,20 @@ input.go: # 54| 0: [CallExpr] call to Println # 54| Type = (int, error) # 54| 0: [FunctionName, SelectorExpr] selection of Println -# 54| Type = func([]interface { }) int, error +# 54| Type = func([]interface { }) int, error [variadic] # 54| 0: [Ident, PackageName] fmt # 54| 1: [FunctionName, Ident] Println -# 54| Type = func([]interface { }) int, error +# 54| Type = func([]interface { }) int, error [variadic] # 54| 1: [Ident, VariableName] a # 54| Type = [1]float32 # 55| 2: [ExprStmt] expression statement # 55| 0: [CallExpr] call to Println # 55| Type = (int, error) # 55| 0: [FunctionName, SelectorExpr] selection of Println -# 55| Type = func([]interface { }) int, error +# 55| Type = func([]interface { }) int, error [variadic] # 55| 0: [Ident, PackageName] fmt # 55| 1: [FunctionName, Ident] Println -# 55| Type = func([]interface { }) int, error +# 55| Type = func([]interface { }) int, error [variadic] # 55| 1: [Ident, VariableName] w # 55| Type = bool # 56| 2: [CommClause] comm clause @@ -230,10 +230,10 @@ input.go: # 57| 0: [CallExpr] call to Println # 57| Type = (int, error) # 57| 0: [FunctionName, SelectorExpr] selection of Println -# 57| Type = func([]interface { }) int, error +# 57| Type = func([]interface { }) int, error [variadic] # 57| 0: [Ident, PackageName] fmt # 57| 1: [FunctionName, Ident] Println -# 57| Type = func([]interface { }) int, error +# 57| Type = func([]interface { }) int, error [variadic] # 58| 3: [CommClause] comm clause # 58| 0: [SendStmt] send statement # 58| 0: [Ident, VariableName] ch1 @@ -277,10 +277,10 @@ input.go: # 67| 0: [CallExpr] call to Println # 67| Type = (int, error) # 67| 0: [FunctionName, SelectorExpr] selection of Println -# 67| Type = func([]interface { }) int, error +# 67| Type = func([]interface { }) int, error [variadic] # 67| 0: [Ident, PackageName] fmt # 67| 1: [FunctionName, Ident] Println -# 67| Type = func([]interface { }) int, error +# 67| Type = func([]interface { }) int, error [variadic] # 67| 1: [Ident, VariableName] x # 67| Type = int # 68| 2: [BlockStmt] block statement @@ -296,10 +296,10 @@ input.go: # 69| 0: [CallExpr] call to Println # 69| Type = (int, error) # 69| 0: [FunctionName, SelectorExpr] selection of Println -# 69| Type = func([]interface { }) int, error +# 69| Type = func([]interface { }) int, error [variadic] # 69| 0: [Ident, PackageName] fmt # 69| 1: [FunctionName, Ident] Println -# 69| Type = func([]interface { }) int, error +# 69| Type = func([]interface { }) int, error [variadic] # 69| 1: [MinusExpr] -... # 69| Type = int # 69| 0: [Ident, VariableName] x @@ -454,10 +454,10 @@ input.go: # 115| 0: [CallExpr] call to Println # 115| Type = (int, error) # 115| 0: [FunctionName, SelectorExpr] selection of Println -# 115| Type = func([]interface { }) int, error +# 115| Type = func([]interface { }) int, error [variadic] # 115| 0: [Ident, PackageName] fmt # 115| 1: [FunctionName, Ident] Println -# 115| Type = func([]interface { }) int, error +# 115| Type = func([]interface { }) int, error [variadic] # 115| 1: [Ident, VariableName] y # 115| Type = interface { } # 116| 1: [CaseClause] case clause @@ -546,10 +546,10 @@ input.go: # 138| 0: [CallExpr] call to Print # 138| Type = (int, error) # 138| 0: [FunctionName, SelectorExpr] selection of Print -# 138| Type = func([]interface { }) int, error +# 138| Type = func([]interface { }) int, error [variadic] # 138| 0: [Ident, PackageName] fmt # 138| 1: [FunctionName, Ident] Print -# 138| Type = func([]interface { }) int, error +# 138| Type = func([]interface { }) int, error [variadic] # 138| 1: [Ident, VariableName] x # 138| Type = int # 141| 1: [RangeStmt] range statement @@ -564,10 +564,10 @@ input.go: # 142| 0: [CallExpr] call to Print # 142| Type = (int, error) # 142| 0: [FunctionName, SelectorExpr] selection of Print -# 142| Type = func([]interface { }) int, error +# 142| Type = func([]interface { }) int, error [variadic] # 142| 0: [Ident, PackageName] fmt # 142| 1: [FunctionName, Ident] Print -# 142| Type = func([]interface { }) int, error +# 142| Type = func([]interface { }) int, error [variadic] # 142| 1: [Ident, VariableName] i # 142| Type = int # 142| 2: [Ident, VariableName] v From d673d24ca6c540e8cda79a245a296f089ce9b03b Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 24 Sep 2024 17:22:26 +0100 Subject: [PATCH 116/162] Revise notation to more closely resemble real Go --- go/ql/lib/semmle/go/Types.qll | 20 +++++++--- .../semmle/go/PrintAst/PrintAst.expected | 40 +++++++++---------- .../PrintAst/PrintAstExcludeComments.expected | 40 +++++++++---------- 3 files changed, 54 insertions(+), 46 deletions(-) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 117d089851ee..211c966b9194 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -921,12 +921,20 @@ class SignatureType extends @signaturetype, CompositeType { language[monotonicAggregates] override string pp() { - exists(string suffix | (if this.isVariadic() then suffix = " [variadic]" else suffix = "") | - result = - "func(" + concat(int i, Type tp | tp = this.getParameterType(i) | tp.pp(), ", " order by i) + - ") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i) + - suffix - ) + result = + "func(" + + concat(int i, Type tp, string prefix | + if i = this.getNumParameter() - 1 and this.isVariadic() + then + tp = this.getParameterType(i).(SliceType).getElementType() and + prefix = "..." + else ( + tp = this.getParameterType(i) and + prefix = "" + ) + | + prefix + tp.pp(), ", " order by i + ) + ") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i) } override string toString() { result = "signature type" } diff --git a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected index 3fe19e433f82..eb792c7028ed 100644 --- a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected +++ b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAst.expected @@ -53,10 +53,10 @@ input.go: # 20| 0: [CallExpr] call to Println # 20| Type = (int, error) # 20| 0: [FunctionName, SelectorExpr] selection of Println -# 20| Type = func([]interface { }) int, error [variadic] +# 20| Type = func(...interface { }) int, error # 20| 0: [Ident, PackageName] fmt # 20| 1: [FunctionName, Ident] Println -# 20| Type = func([]interface { }) int, error [variadic] +# 20| Type = func(...interface { }) int, error # 20| 1: [StringLit] "Hi" # 20| Type = string # 20| Value = [StringLit] Hi @@ -203,10 +203,10 @@ input.go: # 52| 0: [CallExpr] call to Println # 52| Type = (int, error) # 52| 0: [FunctionName, SelectorExpr] selection of Println -# 52| Type = func([]interface { }) int, error [variadic] +# 52| Type = func(...interface { }) int, error # 52| 0: [Ident, PackageName] fmt # 52| 1: [FunctionName, Ident] Println -# 52| Type = func([]interface { }) int, error [variadic] +# 52| Type = func(...interface { }) int, error # 52| 1: [StringLit] "Heard from ch1" # 52| Type = string # 52| Value = [StringLit] Heard from ch1 @@ -229,20 +229,20 @@ input.go: # 54| 0: [CallExpr] call to Println # 54| Type = (int, error) # 54| 0: [FunctionName, SelectorExpr] selection of Println -# 54| Type = func([]interface { }) int, error [variadic] +# 54| Type = func(...interface { }) int, error # 54| 0: [Ident, PackageName] fmt # 54| 1: [FunctionName, Ident] Println -# 54| Type = func([]interface { }) int, error [variadic] +# 54| Type = func(...interface { }) int, error # 54| 1: [Ident, VariableName] a # 54| Type = [1]float32 # 55| 2: [ExprStmt] expression statement # 55| 0: [CallExpr] call to Println # 55| Type = (int, error) # 55| 0: [FunctionName, SelectorExpr] selection of Println -# 55| Type = func([]interface { }) int, error [variadic] +# 55| Type = func(...interface { }) int, error # 55| 0: [Ident, PackageName] fmt # 55| 1: [FunctionName, Ident] Println -# 55| Type = func([]interface { }) int, error [variadic] +# 55| Type = func(...interface { }) int, error # 55| 1: [Ident, VariableName] w # 55| Type = bool # 56| 2: [CommClause] comm clause @@ -250,10 +250,10 @@ input.go: # 57| 0: [CallExpr] call to Println # 57| Type = (int, error) # 57| 0: [FunctionName, SelectorExpr] selection of Println -# 57| Type = func([]interface { }) int, error [variadic] +# 57| Type = func(...interface { }) int, error # 57| 0: [Ident, PackageName] fmt # 57| 1: [FunctionName, Ident] Println -# 57| Type = func([]interface { }) int, error [variadic] +# 57| Type = func(...interface { }) int, error # 58| 3: [CommClause] comm clause # 58| 0: [SendStmt] send statement # 58| 0: [Ident, VariableName] ch1 @@ -297,10 +297,10 @@ input.go: # 67| 0: [CallExpr] call to Println # 67| Type = (int, error) # 67| 0: [FunctionName, SelectorExpr] selection of Println -# 67| Type = func([]interface { }) int, error [variadic] +# 67| Type = func(...interface { }) int, error # 67| 0: [Ident, PackageName] fmt # 67| 1: [FunctionName, Ident] Println -# 67| Type = func([]interface { }) int, error [variadic] +# 67| Type = func(...interface { }) int, error # 67| 1: [Ident, VariableName] x # 67| Type = int # 68| 2: [BlockStmt] block statement @@ -316,10 +316,10 @@ input.go: # 69| 0: [CallExpr] call to Println # 69| Type = (int, error) # 69| 0: [FunctionName, SelectorExpr] selection of Println -# 69| Type = func([]interface { }) int, error [variadic] +# 69| Type = func(...interface { }) int, error # 69| 0: [Ident, PackageName] fmt # 69| 1: [FunctionName, Ident] Println -# 69| Type = func([]interface { }) int, error [variadic] +# 69| Type = func(...interface { }) int, error # 69| 1: [MinusExpr] -... # 69| Type = int # 69| 0: [Ident, VariableName] x @@ -474,10 +474,10 @@ input.go: # 115| 0: [CallExpr] call to Println # 115| Type = (int, error) # 115| 0: [FunctionName, SelectorExpr] selection of Println -# 115| Type = func([]interface { }) int, error [variadic] +# 115| Type = func(...interface { }) int, error # 115| 0: [Ident, PackageName] fmt # 115| 1: [FunctionName, Ident] Println -# 115| Type = func([]interface { }) int, error [variadic] +# 115| Type = func(...interface { }) int, error # 115| 1: [Ident, VariableName] y # 115| Type = interface { } # 116| 1: [CaseClause] case clause @@ -566,10 +566,10 @@ input.go: # 138| 0: [CallExpr] call to Print # 138| Type = (int, error) # 138| 0: [FunctionName, SelectorExpr] selection of Print -# 138| Type = func([]interface { }) int, error [variadic] +# 138| Type = func(...interface { }) int, error # 138| 0: [Ident, PackageName] fmt # 138| 1: [FunctionName, Ident] Print -# 138| Type = func([]interface { }) int, error [variadic] +# 138| Type = func(...interface { }) int, error # 138| 1: [Ident, VariableName] x # 138| Type = int # 141| 1: [RangeStmt] range statement @@ -584,10 +584,10 @@ input.go: # 142| 0: [CallExpr] call to Print # 142| Type = (int, error) # 142| 0: [FunctionName, SelectorExpr] selection of Print -# 142| Type = func([]interface { }) int, error [variadic] +# 142| Type = func(...interface { }) int, error # 142| 0: [Ident, PackageName] fmt # 142| 1: [FunctionName, Ident] Print -# 142| Type = func([]interface { }) int, error [variadic] +# 142| Type = func(...interface { }) int, error # 142| 1: [Ident, VariableName] i # 142| Type = int # 142| 2: [Ident, VariableName] v diff --git a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected index 3906a5352068..e0777268f048 100644 --- a/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected +++ b/go/ql/test/library-tests/semmle/go/PrintAst/PrintAstExcludeComments.expected @@ -33,10 +33,10 @@ input.go: # 20| 0: [CallExpr] call to Println # 20| Type = (int, error) # 20| 0: [FunctionName, SelectorExpr] selection of Println -# 20| Type = func([]interface { }) int, error [variadic] +# 20| Type = func(...interface { }) int, error # 20| 0: [Ident, PackageName] fmt # 20| 1: [FunctionName, Ident] Println -# 20| Type = func([]interface { }) int, error [variadic] +# 20| Type = func(...interface { }) int, error # 20| 1: [StringLit] "Hi" # 20| Type = string # 20| Value = [StringLit] Hi @@ -183,10 +183,10 @@ input.go: # 52| 0: [CallExpr] call to Println # 52| Type = (int, error) # 52| 0: [FunctionName, SelectorExpr] selection of Println -# 52| Type = func([]interface { }) int, error [variadic] +# 52| Type = func(...interface { }) int, error # 52| 0: [Ident, PackageName] fmt # 52| 1: [FunctionName, Ident] Println -# 52| Type = func([]interface { }) int, error [variadic] +# 52| Type = func(...interface { }) int, error # 52| 1: [StringLit] "Heard from ch1" # 52| Type = string # 52| Value = [StringLit] Heard from ch1 @@ -209,20 +209,20 @@ input.go: # 54| 0: [CallExpr] call to Println # 54| Type = (int, error) # 54| 0: [FunctionName, SelectorExpr] selection of Println -# 54| Type = func([]interface { }) int, error [variadic] +# 54| Type = func(...interface { }) int, error # 54| 0: [Ident, PackageName] fmt # 54| 1: [FunctionName, Ident] Println -# 54| Type = func([]interface { }) int, error [variadic] +# 54| Type = func(...interface { }) int, error # 54| 1: [Ident, VariableName] a # 54| Type = [1]float32 # 55| 2: [ExprStmt] expression statement # 55| 0: [CallExpr] call to Println # 55| Type = (int, error) # 55| 0: [FunctionName, SelectorExpr] selection of Println -# 55| Type = func([]interface { }) int, error [variadic] +# 55| Type = func(...interface { }) int, error # 55| 0: [Ident, PackageName] fmt # 55| 1: [FunctionName, Ident] Println -# 55| Type = func([]interface { }) int, error [variadic] +# 55| Type = func(...interface { }) int, error # 55| 1: [Ident, VariableName] w # 55| Type = bool # 56| 2: [CommClause] comm clause @@ -230,10 +230,10 @@ input.go: # 57| 0: [CallExpr] call to Println # 57| Type = (int, error) # 57| 0: [FunctionName, SelectorExpr] selection of Println -# 57| Type = func([]interface { }) int, error [variadic] +# 57| Type = func(...interface { }) int, error # 57| 0: [Ident, PackageName] fmt # 57| 1: [FunctionName, Ident] Println -# 57| Type = func([]interface { }) int, error [variadic] +# 57| Type = func(...interface { }) int, error # 58| 3: [CommClause] comm clause # 58| 0: [SendStmt] send statement # 58| 0: [Ident, VariableName] ch1 @@ -277,10 +277,10 @@ input.go: # 67| 0: [CallExpr] call to Println # 67| Type = (int, error) # 67| 0: [FunctionName, SelectorExpr] selection of Println -# 67| Type = func([]interface { }) int, error [variadic] +# 67| Type = func(...interface { }) int, error # 67| 0: [Ident, PackageName] fmt # 67| 1: [FunctionName, Ident] Println -# 67| Type = func([]interface { }) int, error [variadic] +# 67| Type = func(...interface { }) int, error # 67| 1: [Ident, VariableName] x # 67| Type = int # 68| 2: [BlockStmt] block statement @@ -296,10 +296,10 @@ input.go: # 69| 0: [CallExpr] call to Println # 69| Type = (int, error) # 69| 0: [FunctionName, SelectorExpr] selection of Println -# 69| Type = func([]interface { }) int, error [variadic] +# 69| Type = func(...interface { }) int, error # 69| 0: [Ident, PackageName] fmt # 69| 1: [FunctionName, Ident] Println -# 69| Type = func([]interface { }) int, error [variadic] +# 69| Type = func(...interface { }) int, error # 69| 1: [MinusExpr] -... # 69| Type = int # 69| 0: [Ident, VariableName] x @@ -454,10 +454,10 @@ input.go: # 115| 0: [CallExpr] call to Println # 115| Type = (int, error) # 115| 0: [FunctionName, SelectorExpr] selection of Println -# 115| Type = func([]interface { }) int, error [variadic] +# 115| Type = func(...interface { }) int, error # 115| 0: [Ident, PackageName] fmt # 115| 1: [FunctionName, Ident] Println -# 115| Type = func([]interface { }) int, error [variadic] +# 115| Type = func(...interface { }) int, error # 115| 1: [Ident, VariableName] y # 115| Type = interface { } # 116| 1: [CaseClause] case clause @@ -546,10 +546,10 @@ input.go: # 138| 0: [CallExpr] call to Print # 138| Type = (int, error) # 138| 0: [FunctionName, SelectorExpr] selection of Print -# 138| Type = func([]interface { }) int, error [variadic] +# 138| Type = func(...interface { }) int, error # 138| 0: [Ident, PackageName] fmt # 138| 1: [FunctionName, Ident] Print -# 138| Type = func([]interface { }) int, error [variadic] +# 138| Type = func(...interface { }) int, error # 138| 1: [Ident, VariableName] x # 138| Type = int # 141| 1: [RangeStmt] range statement @@ -564,10 +564,10 @@ input.go: # 142| 0: [CallExpr] call to Print # 142| Type = (int, error) # 142| 0: [FunctionName, SelectorExpr] selection of Print -# 142| Type = func([]interface { }) int, error [variadic] +# 142| Type = func(...interface { }) int, error # 142| 0: [Ident, PackageName] fmt # 142| 1: [FunctionName, Ident] Print -# 142| Type = func([]interface { }) int, error [variadic] +# 142| Type = func(...interface { }) int, error # 142| 1: [Ident, VariableName] i # 142| Type = int # 142| 2: [Ident, VariableName] v From 57148110715e672c5823e84390fbb8577d2ed5bc Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 24 Sep 2024 16:20:50 +0200 Subject: [PATCH 117/162] Rust: fix panic when the last character in a range is multi-byte --- rust/extractor/src/translate/base.rs | 23 +++++++---- .../ql/test/extractor-tests/utf8/ast.expected | 39 +++++++++++++++++++ rust/ql/test/extractor-tests/utf8/ast.ql | 3 ++ .../extractor-tests/utf8/utf8-identifiers.rs | 12 ++++++ 4 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 rust/ql/test/extractor-tests/utf8/ast.expected create mode 100644 rust/ql/test/extractor-tests/utf8/ast.ql create mode 100644 rust/ql/test/extractor-tests/utf8/utf8-identifiers.rs diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs index 9bca31421642..063a59d8937e 100644 --- a/rust/extractor/src/translate/base.rs +++ b/rust/extractor/src/translate/base.rs @@ -3,7 +3,7 @@ use crate::trap::{Label, TrapClass}; use codeql_extractor::trap::{self}; use ra_ap_ide_db::line_index::{LineCol, LineIndex}; use ra_ap_syntax::ast::RangeItem; -use ra_ap_syntax::{ast, SyntaxError, TextRange, TextSize}; +use ra_ap_syntax::{ast, SyntaxError, TextRange}; pub trait TextValue { fn try_get_text(&self) -> Option; } @@ -70,12 +70,21 @@ impl Translator { } pub fn location(&self, range: TextRange) -> (LineCol, LineCol) { let start = self.line_index.line_col(range.start()); - let end = self.line_index.line_col( - range - .end() - .checked_sub(TextSize::new(1)) - .unwrap_or(range.end()), - ); + let range_end = range.end(); + // QL end positions are inclusive, while TextRange offsets are exclusive and point at the position + // right after the last character of the range. We need to shift the end offset one character to the left to + // get the right inclusive QL position. Unfortunately, simply subtracting `1` from the end-offset may cause + // the offset to point in the middle of a mult-byte character, resulting in a `panic`. Therefore we use `try_line_col` + // with decreasing offsets to find the start of the last character included in the range. + for i in 1..4 { + if let Some(end) = range_end + .checked_sub(i.into()) + .and_then(|x| self.line_index.try_line_col(x)) + { + return (start, end); + } + } + let end = self.line_index.line_col(range_end); (start, end) } pub fn emit_location(&mut self, label: Label, node: impl ast::AstNode) { diff --git a/rust/ql/test/extractor-tests/utf8/ast.expected b/rust/ql/test/extractor-tests/utf8/ast.expected new file mode 100644 index 000000000000..bf1fd078af80 --- /dev/null +++ b/rust/ql/test/extractor-tests/utf8/ast.expected @@ -0,0 +1,39 @@ +| lib.rs:1:1:3:22 | SourceFile | +| lib.rs:2:1:2:8 | Module | +| lib.rs:2:5:2:7 | Name | +| lib.rs:3:1:3:8 | Module | +| lib.rs:3:5:3:8 | Name | +| lib.rs:3:10:3:20 | NameRef | +| lib.rs:3:10:3:20 | Path | +| lib.rs:3:10:3:20 | PathSegment | +| lib.rs:3:10:3:21 | MacroCall | +| utf8-identifiers.rs:1:1:4:6 | foo | +| utf8-identifiers.rs:1:1:12:2 | SourceFile | +| utf8-identifiers.rs:1:4:1:6 | Name | +| utf8-identifiers.rs:1:7:4:1 | GenericParamList | +| utf8-identifiers.rs:2:5:2:6 | Lifetime | +| utf8-identifiers.rs:2:5:2:6 | LifetimeParam | +| utf8-identifiers.rs:3:5:3:5 | Name | +| utf8-identifiers.rs:3:5:3:5 | TypeParam | +| utf8-identifiers.rs:4:2:4:3 | ParamList | +| utf8-identifiers.rs:4:5:4:6 | BlockExpr | +| utf8-identifiers.rs:4:5:4:6 | StmtList | +| utf8-identifiers.rs:6:1:8:1 | Struct | +| utf8-identifiers.rs:6:8:6:8 | Name | +| utf8-identifiers.rs:6:10:8:1 | RecordFieldList | +| utf8-identifiers.rs:7:5:7:5 | Name | +| utf8-identifiers.rs:7:5:7:13 | RecordField | +| utf8-identifiers.rs:7:9:7:13 | NameRef | +| utf8-identifiers.rs:7:9:7:13 | Path | +| utf8-identifiers.rs:7:9:7:13 | PathSegment | +| utf8-identifiers.rs:7:9:7:13 | PathType | +| utf8-identifiers.rs:10:1:10:3 | Visibility | +| utf8-identifiers.rs:10:1:12:1 | main | +| utf8-identifiers.rs:10:8:10:11 | Name | +| utf8-identifiers.rs:10:12:10:13 | ParamList | +| utf8-identifiers.rs:10:15:12:1 | BlockExpr | +| utf8-identifiers.rs:10:15:12:1 | StmtList | +| utf8-identifiers.rs:11:5:11:24 | LetStmt | +| utf8-identifiers.rs:11:9:11:9 | IdentPat | +| utf8-identifiers.rs:11:9:11:9 | Name | +| utf8-identifiers.rs:11:14:11:23 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/utf8/ast.ql b/rust/ql/test/extractor-tests/utf8/ast.ql new file mode 100644 index 000000000000..420f7e94eb9a --- /dev/null +++ b/rust/ql/test/extractor-tests/utf8/ast.ql @@ -0,0 +1,3 @@ +import codeql.rust.elements + +select any(AstNode n) diff --git a/rust/ql/test/extractor-tests/utf8/utf8-identifiers.rs b/rust/ql/test/extractor-tests/utf8/utf8-identifiers.rs new file mode 100644 index 000000000000..579dc82ab5f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/utf8/utf8-identifiers.rs @@ -0,0 +1,12 @@ +fn foo< + 'β, + γ +>() {} + +struct X { + δ: usize +} + +pub fn main() { + let α = 0.00001f64; +} From bcb718ac77251c60433935b3b3ec919c565d7178 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 21:39:49 +0100 Subject: [PATCH 118/162] Add change note --- .../change-notes/2024-09-24-incorrectly-promoted-methods.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 go/ql/lib/change-notes/2024-09-24-incorrectly-promoted-methods.md diff --git a/go/ql/lib/change-notes/2024-09-24-incorrectly-promoted-methods.md b/go/ql/lib/change-notes/2024-09-24-incorrectly-promoted-methods.md new file mode 100644 index 000000000000..32802982b75e --- /dev/null +++ b/go/ql/lib/change-notes/2024-09-24-incorrectly-promoted-methods.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* A method in the method set of an embedded field of a struct should not be promoted to the method set of the struct if the struct has a method with the same name. This was not being enforced, which meant that there were two methods with the same qualified name, and models were sometimes being applied when they shouldn't have been. This has now been fixed. From ea4f9cad3c57cbf90a8c58e9dd6a642bd9aa3e70 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 24 Sep 2024 22:04:50 +0100 Subject: [PATCH 119/162] Mark some test results as SPURIOUS --- .../dataflow/ExternalFlowInheritance/test.go | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go index 141e51483c5b..1c41bc05c76a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/test.go @@ -7,83 +7,83 @@ import ( func TestI1(t test.I1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] ql_I1 ql_S1 + t.Sink(y) // $ I1[f] I1[t] ql_I1 SPURIOUS: IEmbedI1[t] SEmbedI1[t] ql_S1 } func TestI2(t test.I2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] + t.Sink(y) // $ I1[t] I2[f] I2[t] SPURIOUS: IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestS1(t test.S1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] ql_S1 + t.Sink(y) // $ I1[t] S1[f] S1[t] ql_S1 SPURIOUS: IEmbedI1[t] SEmbedI1[t] } func TestS2(t test.S2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] SPURIOUS: IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestSEmbedI1(t test.SEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] ql_I1 ql_S1 + t.Sink(y) // $ I1[t] SEmbedI1[t] ql_I1 SPURIOUS: I1[f] IEmbedI1[t] ql_S1 } func TestSEmbedI2(t test.SEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] SEmbedI2[t] SPURIOUS: I2[f] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] } func TestIEmbedI1(t test.IEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[f] I1[t] IEmbedI1[t] SEmbedI1[t] ql_I1 ql_S1 + t.Sink(y) // $ I1[t] IEmbedI1[t] ql_I1 SPURIOUS: I1[f] SEmbedI1[t] ql_S1 } func TestIEmbedI2(t test.IEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[f] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] IEmbedI2[t] SPURIOUS: I2[f] IEmbedI1[t] SEmbedI1[t] SEmbedI2[t] } func TestSImplEmbedI1(t test.SImplEmbedI1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedI1[t] + t.Sink(y) // $ I1[t] SImplEmbedI1[t] SPURIOUS: IEmbedI1[t] SEmbedI1[t] } func TestSImplEmbedI2(t test.SImplEmbedI2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] SImplEmbedI2[t] SPURIOUS: IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestSEmbedS1(t test.SEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] S1[f] S1[t] SEmbedI1[t] ql_S1 + t.Sink(y) // $ I1[t] S1[t] ql_S1 SPURIOUS: IEmbedI1[t] S1[f] SEmbedI1[t] } func TestSEmbedS2(t test.SEmbedS2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] + t.Sink(y) // $ I1[t] I2[t] SPURIOUS: IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } func TestSImplEmbedS1(t test.SImplEmbedS1) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] IEmbedI1[t] SEmbedI1[t] SImplEmbedS1[t] + t.Sink(y) // $ I1[t] SImplEmbedS1[t] SPURIOUS: IEmbedI1[t] SEmbedI1[t] } func TestSImplEmbedS2(t test.SImplEmbedS2) { x := t.Source() y := t.Step(x) - t.Sink(y) // $ I1[t] I2[t] IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] SImplEmbedS2[t] + t.Sink(y) // $ I1[t] I2[t] SImplEmbedS2[t] SPURIOUS: IEmbedI1[t] IEmbedI2[t] SEmbedI1[t] SEmbedI2[t] } From a9e07a88aff1c717772bef98b8e45c3716d33230 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:02:04 -0400 Subject: [PATCH 120/162] Downgrade IncorrectIntegerConversionQuery precision to high `very-high` implies near 0 false positives and we have run into a number and an entire class Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- go/ql/src/Security/CWE-681/IncorrectIntegerConversionQuery.ql | 2 +- ...2024-09-24-incorrect-integer-conversion-query-precision.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 go/ql/src/change-notes/2024-09-24-incorrect-integer-conversion-query-precision.md diff --git a/go/ql/src/Security/CWE-681/IncorrectIntegerConversionQuery.ql b/go/ql/src/Security/CWE-681/IncorrectIntegerConversionQuery.ql index 4497ffe7c4a9..a310f024a2d0 100644 --- a/go/ql/src/Security/CWE-681/IncorrectIntegerConversionQuery.ql +++ b/go/ql/src/Security/CWE-681/IncorrectIntegerConversionQuery.ql @@ -10,7 +10,7 @@ * @tags security * external/cwe/cwe-190 * external/cwe/cwe-681 - * @precision very-high + * @precision high */ import go diff --git a/go/ql/src/change-notes/2024-09-24-incorrect-integer-conversion-query-precision.md b/go/ql/src/change-notes/2024-09-24-incorrect-integer-conversion-query-precision.md new file mode 100644 index 000000000000..b8acf46c9c5b --- /dev/null +++ b/go/ql/src/change-notes/2024-09-24-incorrect-integer-conversion-query-precision.md @@ -0,0 +1,4 @@ +--- +category: queryMetadata +--- +* The precision of the `go/incorrect-integer-conversion-query` query was decreased from `very-high` to `high`, since there is at least one known class of false positives involving dynamic bounds checking. From 6e493f2baa1842abb93185e1dbd1314fed68586c Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 25 Sep 2024 09:09:29 +0200 Subject: [PATCH 121/162] Address review comments --- .../rust/controlflow/internal/ControlFlowGraphImpl.qll | 3 --- .../lib/codeql/rust/controlflow/internal/SuccessorType.qll | 2 +- .../ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll | 7 +------ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index a13f5b27e76d..58d24dbeede9 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -374,9 +374,6 @@ class MatchExprTree extends PostOrderTree instanceof MatchExpr { or // Edge from the end of each arm to the match expression. last(super.getArm(_).getExpr(), pred, c) and succ = this and completionIsNormal(c) - or - // Edge from the end of last arm to the match expression. - last(super.getLastArm().getExpr(), pred, c) and succ = this and completionIsNormal(c) } } diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll b/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll index 036552c716c2..6bdd54c263dd 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/SuccessorType.qll @@ -34,7 +34,7 @@ abstract class ConditionalSuccessorImpl extends SuccessorTypeImpl { boolean value; bindingset[value] - ConditionalSuccessorImpl() { any() } + ConditionalSuccessorImpl() { exists(value) } /** Gets the Boolean value of this successor. */ boolean getValue() { result = value } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll index 4028aad275ee..ebb0b8510678 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll @@ -41,11 +41,6 @@ module Impl { /** * Gets the number of arms of this match expression. */ - int getNumberOfArms() { result = count(int i | exists(this.getArm(i))) } - - /** - * Gets the last arm of this match expression. - */ - MatchArm getLastArm() { result = this.getArm(this.getNumberOfArms() - 1) } + int getNumberOfArms() { result = this.getMatchArmList().getNumberOfArms() } } } From 29061a08adfa487722139239160c0b340f32220e Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 25 Sep 2024 09:43:05 +0200 Subject: [PATCH 122/162] C++: Do not wrap quoted text to the next line Wrapping breaks the highlighting in VSCode, making the QLDoc difficult to read. --- cpp/ql/lib/semmle/code/cpp/Type.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll index 16d589e99955..b67b6502afe2 100644 --- a/cpp/ql/lib/semmle/code/cpp/Type.qll +++ b/cpp/ql/lib/semmle/code/cpp/Type.qll @@ -39,8 +39,8 @@ class Type extends Locatable, @type { /** * Gets a specifier of this type, recursively looking through `typedef` and - * `decltype`. For example, in the context of `typedef const int *restrict - * t`, the type `volatile t` has specifiers `volatile` and `restrict` but not + * `decltype`. For example, in the context of `typedef const int *restrict t`, + * the type `volatile t` has specifiers `volatile` and `restrict` but not * `const` since the `const` is attached to the type being pointed to rather * than the pointer itself. */ From 3a1b618a74cd0f92bb14c08c1343729cfdd277cf Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 24 Sep 2024 15:26:35 +0200 Subject: [PATCH 123/162] Cpp: Replace sink inlining with a forward scan from source. --- .../InvalidPointerToDereference.qll | 29 +++++++++++++++++-- .../codeql/dataflow/internal/DataFlowImpl.qll | 19 +++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll b/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll index 90d7f04f7ca7..03369aacade3 100644 --- a/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll +++ b/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll @@ -160,6 +160,26 @@ private module InvalidPointerToDerefBarrier { } } +/** + * BEWARE: This configuration uses an unrestricted sink, so accessing its full + * flow computation or any stages beyond the first 2 will likely diverge. + * Stage 1 will still be fast and we use it to restrict the subsequent sink + * computation. + */ +private module InvalidPointerReachesConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { invalidPointerToDerefSource(_, _, source) } + + predicate isSink(DataFlow::Node sink) { any() } + + predicate isBarrier(DataFlow::Node node) { InvalidPointerToDerefConfig::isBarrier(node) } + + int fieldFlowBranchLimit() { result = invalidPointerToDereferenceFieldFlowBranchLimit() } +} + +private module InvalidPointerReachesFlow = DataFlow::Global; + +private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon + /** * A configuration to track flow from a pointer-arithmetic operation found * by `AllocToInvalidPointerConfig` to a dereference of the pointer. @@ -173,8 +193,13 @@ private module InvalidPointerToDerefConfig implements DataFlow::StateConfigSig { invalidPointerToDerefSource(_, pai, source) } - pragma[inline] - predicate isSink(DataFlow::Node sink) { isInvalidPointerDerefSink(sink, _, _, _, _) } + predicate isSink(DataFlow::Node sink) { + exists(DataFlowImplCommon::NodeEx n | + InvalidPointerReachesFlow::Stages::Stage1::sinkNode(n, _) and + n.asNode() = sink and + isInvalidPointerDerefSink(sink, _, _, _, _) + ) + } predicate isSink(DataFlow::Node sink, FlowState pai) { none() } diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index e9d6eafde8a9..1bebea93c486 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -2773,8 +2773,6 @@ module MakeImpl Lang> { } /** - * INTERNAL: Only for debugging. - * * Provides a graph representation of the data flow in this stage suitable for use in a `path-problem` query. */ additional module Graph { @@ -4634,6 +4632,8 @@ module MakeImpl Lang> { */ predicate stageStats = Debug::stageStats/10; + private module Stage1alias = Stage1; + private module Stage2alias = Stage2; private module Stage3alias = Stage3; @@ -4643,11 +4643,13 @@ module MakeImpl Lang> { private module Stage5alias = Stage5; /** - * INTERNAL: Only for debugging. + * INTERNAL: Subject to change without notice. * * Contains references to individual pruning stages. */ - module Debug { + module Stages { + module Stage1 = Stage1alias; + module Stage2 = Stage2alias; module Stage3 = Stage3alias; @@ -4655,6 +4657,15 @@ module MakeImpl Lang> { module Stage4 = Stage4alias; module Stage5 = Stage5alias; + } + + /** + * INTERNAL: Only for debugging. + * + * Contains references to individual pruning stages and stage statistics. + */ + module Debug { + import Stages predicate stageStats1( int n, string stage, int nodes, int fields, int conscand, int states, int tuples, From 3bd5c6e445351766e858cefe0d5f7c05aef8c310 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 13:31:33 +0200 Subject: [PATCH 124/162] Rust: Implement `{BinaryExpr,PrefixExpr}.toString()` --- .../rust/elements/internal/BinaryExprImpl.qll | 5 +- .../rust/elements/internal/PrefixExprImpl.qll | 5 +- .../generated/BinaryExpr/BinaryExpr.expected | 10 +-- .../BinaryExpr/BinaryExpr_getLhs.expected | 10 +-- .../BinaryExpr_getOperatorName.expected | 10 +-- .../BinaryExpr/BinaryExpr_getRhs.expected | 10 +-- .../ClosureExpr/ClosureExpr_getBody.expected | 4 +- .../IfExpr/IfExpr_getCondition.expected | 4 +- .../MatchArm/MatchArm_getExpr.expected | 2 +- .../generated/PrefixExpr/PrefixExpr.expected | 6 +- .../PrefixExpr/PrefixExpr_getExpr.expected | 6 +- .../PrefixExpr_getOperatorName.expected | 6 +- .../library-tests/controlflow/Cfg.expected | 86 +++++++++---------- 13 files changed, 83 insertions(+), 81 deletions(-) diff --git a/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll index 10490787fc1c..09dd26b14de4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `BinaryExpr`. * @@ -22,5 +21,7 @@ module Impl { * x += y; * ``` */ - class BinaryExpr extends Generated::BinaryExpr { } + class BinaryExpr extends Generated::BinaryExpr { + override string toString() { result = "... " + this.getOperatorName() + " ..." } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll index f5878bac274e..92ecdac0a66e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `PrefixExpr`. * @@ -20,5 +19,7 @@ module Impl { * let z = *ptr * ``` */ - class PrefixExpr extends Generated::PrefixExpr { } + class PrefixExpr extends Generated::PrefixExpr { + override string toString() { result = this.getOperatorName() + " ..." } + } } diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected index 0c0061be3efc..2f7a47933b1c 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected @@ -1,5 +1,5 @@ -| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:5:5:5:9 | ... + ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected index 2eb8f6ef572d..1f51339f5a8f 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected @@ -1,5 +1,5 @@ -| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | gen_binary_expr.rs:5:5:5:5 | PathExpr | -| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | gen_binary_expr.rs:6:5:6:5 | PathExpr | -| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | gen_binary_expr.rs:7:5:7:5 | PathExpr | -| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | gen_binary_expr.rs:8:5:8:5 | PathExpr | -| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | gen_binary_expr.rs:9:5:9:5 | PathExpr | +| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | PathExpr | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | PathExpr | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | PathExpr | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | PathExpr | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected index 9f9e191f660a..e55ca0c63a05 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected @@ -1,5 +1,5 @@ -| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | + | -| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | && | -| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | <= | -| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | = | -| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | += | +| gen_binary_expr.rs:5:5:5:9 | ... + ... | + | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | && | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | <= | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | = | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected index 868bf4490b9d..4f0277f2b2f3 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected @@ -1,5 +1,5 @@ -| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | gen_binary_expr.rs:5:9:5:9 | PathExpr | -| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | gen_binary_expr.rs:6:10:6:10 | PathExpr | -| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | gen_binary_expr.rs:7:10:7:10 | PathExpr | -| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | gen_binary_expr.rs:8:9:8:9 | PathExpr | -| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | gen_binary_expr.rs:9:10:9:10 | PathExpr | +| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | PathExpr | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | PathExpr | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | PathExpr | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | PathExpr | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected index 3b16f320ced0..71bc3cccda3c 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected @@ -1,5 +1,5 @@ -| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | gen_closure_expr.rs:5:9:5:13 | BinaryExpr | +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | gen_closure_expr.rs:5:9:5:13 | ... + ... | | gen_closure_expr.rs:6:5:6:34 | ClosureExpr | gen_closure_expr.rs:6:26:6:34 | BlockExpr | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | gen_closure_expr.rs:7:23:7:27 | BinaryExpr | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | gen_closure_expr.rs:7:23:7:27 | ... + ... | | gen_closure_expr.rs:8:6:9:15 | ClosureExpr | gen_closure_expr.rs:9:9:9:15 | YieldExpr | | gen_closure_expr.rs:10:6:11:23 | ClosureExpr | gen_closure_expr.rs:11:17:11:23 | YieldExpr | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected index 4a777a6f762f..7bdb262dd324 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected @@ -1,2 +1,2 @@ -| gen_if_expr.rs:5:5:7:5 | IfExpr | gen_if_expr.rs:5:8:5:14 | BinaryExpr | -| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:8:16:8:20 | BinaryExpr | +| gen_if_expr.rs:5:5:7:5 | IfExpr | gen_if_expr.rs:5:8:5:14 | ... == ... | +| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:8:16:8:20 | ... > ... | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected index 82984cc9385e..f1779f7b3944 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected @@ -1,4 +1,4 @@ | gen_match_arm.rs:6:9:6:29 | MatchArm | gen_match_arm.rs:6:28:6:28 | PathExpr | | gen_match_arm.rs:7:9:7:26 | MatchArm | gen_match_arm.rs:7:25:7:25 | LiteralExpr | -| gen_match_arm.rs:10:9:10:35 | MatchArm | gen_match_arm.rs:10:30:10:34 | BinaryExpr | +| gen_match_arm.rs:10:9:10:35 | MatchArm | gen_match_arm.rs:10:30:10:34 | ... / ... | | gen_match_arm.rs:11:9:11:15 | MatchArm | gen_match_arm.rs:11:14:11:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected index 74b997454980..01ebd0f099ca 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected @@ -1,3 +1,3 @@ -| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | -| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | -| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:5:13:5:15 | - ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:7:13:7:16 | * ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected index 8ba21b74a778..d0ee1d8ce2b2 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected @@ -1,3 +1,3 @@ -| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | gen_prefix_expr.rs:5:14:5:15 | LiteralExpr | -| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | gen_prefix_expr.rs:6:14:6:17 | LiteralExpr | -| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | gen_prefix_expr.rs:7:14:7:16 | PathExpr | +| gen_prefix_expr.rs:5:13:5:15 | - ... | gen_prefix_expr.rs:5:14:5:15 | LiteralExpr | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | gen_prefix_expr.rs:6:14:6:17 | LiteralExpr | +| gen_prefix_expr.rs:7:13:7:16 | * ... | gen_prefix_expr.rs:7:14:7:16 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected index a9b0fe4f73c8..0cee9c31bc3f 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected @@ -1,3 +1,3 @@ -| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | - | -| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | ! | -| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | * | +| gen_prefix_expr.rs:5:13:5:15 | - ... | - | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | ! | +| gen_prefix_expr.rs:7:13:7:16 | * ... | * | diff --git a/rust/ql/test/library-tests/controlflow/Cfg.expected b/rust/ql/test/library-tests/controlflow/Cfg.expected index 93e6defe9923..5722456daa86 100644 --- a/rust/ql/test/library-tests/controlflow/Cfg.expected +++ b/rust/ql/test/library-tests/controlflow/Cfg.expected @@ -20,43 +20,43 @@ | test.rs:10:9:22:9 | LoopExpr | test.rs:23:9:23:20 | ExprStmt | | | test.rs:10:14:22:9 | BlockExpr | test.rs:11:13:11:24 | ExprStmt | | | test.rs:11:13:11:13 | PathExpr | test.rs:11:17:11:20 | PathExpr | | -| test.rs:11:13:11:23 | BinaryExpr | test.rs:12:13:14:13 | ExprStmt | | +| test.rs:11:13:11:23 | ... = ... | test.rs:12:13:14:13 | ExprStmt | | | test.rs:11:13:11:24 | ExprStmt | test.rs:11:13:11:13 | PathExpr | | | test.rs:11:17:11:20 | PathExpr | test.rs:11:22:11:22 | PathExpr | | -| test.rs:11:17:11:23 | CallExpr | test.rs:11:13:11:23 | BinaryExpr | | +| test.rs:11:17:11:23 | CallExpr | test.rs:11:13:11:23 | ... = ... | | | test.rs:11:22:11:22 | PathExpr | test.rs:11:17:11:23 | CallExpr | | | test.rs:12:13:14:13 | ExprStmt | test.rs:12:16:12:16 | PathExpr | | | test.rs:12:13:14:13 | IfExpr | test.rs:15:13:17:13 | ExprStmt | | | test.rs:12:16:12:16 | PathExpr | test.rs:12:20:12:24 | LiteralExpr | | -| test.rs:12:16:12:24 | BinaryExpr | test.rs:12:13:14:13 | IfExpr | false | -| test.rs:12:16:12:24 | BinaryExpr | test.rs:13:17:13:29 | ExprStmt | true | -| test.rs:12:20:12:24 | LiteralExpr | test.rs:12:16:12:24 | BinaryExpr | | +| test.rs:12:16:12:24 | ... > ... | test.rs:12:13:14:13 | IfExpr | false | +| test.rs:12:16:12:24 | ... > ... | test.rs:13:17:13:29 | ExprStmt | true | +| test.rs:12:20:12:24 | LiteralExpr | test.rs:12:16:12:24 | ... > ... | | | test.rs:13:17:13:28 | ReturnExpr | test.rs:8:5:24:5 | exit test_break_and_continue (normal) | return | | test.rs:13:17:13:29 | ExprStmt | test.rs:13:24:13:28 | LiteralExpr | | | test.rs:13:24:13:28 | LiteralExpr | test.rs:13:17:13:28 | ReturnExpr | | | test.rs:15:13:17:13 | ExprStmt | test.rs:15:16:15:16 | PathExpr | | | test.rs:15:13:17:13 | IfExpr | test.rs:18:13:20:13 | ExprStmt | | | test.rs:15:16:15:16 | PathExpr | test.rs:15:21:15:21 | LiteralExpr | | -| test.rs:15:16:15:21 | BinaryExpr | test.rs:15:13:17:13 | IfExpr | false | -| test.rs:15:16:15:21 | BinaryExpr | test.rs:16:17:16:22 | ExprStmt | true | -| test.rs:15:21:15:21 | LiteralExpr | test.rs:15:16:15:21 | BinaryExpr | | +| test.rs:15:16:15:21 | ... == ... | test.rs:15:13:17:13 | IfExpr | false | +| test.rs:15:16:15:21 | ... == ... | test.rs:16:17:16:22 | ExprStmt | true | +| test.rs:15:21:15:21 | LiteralExpr | test.rs:15:16:15:21 | ... == ... | | | test.rs:16:17:16:21 | BreakExpr | test.rs:10:9:22:9 | LoopExpr | break | | test.rs:16:17:16:22 | ExprStmt | test.rs:16:17:16:21 | BreakExpr | | | test.rs:18:13:20:13 | ExprStmt | test.rs:18:16:18:16 | PathExpr | | | test.rs:18:13:20:13 | IfExpr | test.rs:21:13:21:13 | PathExpr | | | test.rs:18:16:18:16 | PathExpr | test.rs:18:20:18:20 | LiteralExpr | | -| test.rs:18:16:18:20 | BinaryExpr | test.rs:18:25:18:25 | LiteralExpr | | -| test.rs:18:16:18:25 | BinaryExpr | test.rs:18:13:20:13 | IfExpr | false | -| test.rs:18:16:18:25 | BinaryExpr | test.rs:19:17:19:25 | ExprStmt | true | -| test.rs:18:20:18:20 | LiteralExpr | test.rs:18:16:18:20 | BinaryExpr | | -| test.rs:18:25:18:25 | LiteralExpr | test.rs:18:16:18:25 | BinaryExpr | | +| test.rs:18:16:18:20 | ... % ... | test.rs:18:25:18:25 | LiteralExpr | | +| test.rs:18:16:18:25 | ... != ... | test.rs:18:13:20:13 | IfExpr | false | +| test.rs:18:16:18:25 | ... != ... | test.rs:19:17:19:25 | ExprStmt | true | +| test.rs:18:20:18:20 | LiteralExpr | test.rs:18:16:18:20 | ... % ... | | +| test.rs:18:25:18:25 | LiteralExpr | test.rs:18:16:18:25 | ... != ... | | | test.rs:19:17:19:24 | ContinueExpr | test.rs:11:13:11:24 | ExprStmt | continue | | test.rs:19:17:19:25 | ExprStmt | test.rs:19:17:19:24 | ContinueExpr | | | test.rs:21:13:21:13 | PathExpr | test.rs:21:17:21:17 | PathExpr | | -| test.rs:21:13:21:21 | BinaryExpr | test.rs:10:14:22:9 | BlockExpr | | +| test.rs:21:13:21:21 | ... = ... | test.rs:10:14:22:9 | BlockExpr | | | test.rs:21:17:21:17 | PathExpr | test.rs:21:21:21:21 | LiteralExpr | | -| test.rs:21:17:21:21 | BinaryExpr | test.rs:21:13:21:21 | BinaryExpr | | -| test.rs:21:21:21:21 | LiteralExpr | test.rs:21:17:21:21 | BinaryExpr | | +| test.rs:21:17:21:21 | ... / ... | test.rs:21:13:21:21 | ... = ... | | +| test.rs:21:21:21:21 | LiteralExpr | test.rs:21:17:21:21 | ... / ... | | | test.rs:23:9:23:19 | ReturnExpr | test.rs:8:5:24:5 | exit test_break_and_continue (normal) | return | | test.rs:23:9:23:20 | ExprStmt | test.rs:23:16:23:19 | LiteralExpr | | | test.rs:23:16:23:19 | LiteralExpr | test.rs:23:9:23:19 | ReturnExpr | | @@ -106,8 +106,8 @@ | test.rs:56:19:56:27 | enter ClosureExpr | test.rs:56:23:56:23 | PathExpr | | | test.rs:56:19:56:27 | exit ClosureExpr (normal) | test.rs:56:19:56:27 | exit ClosureExpr | | | test.rs:56:23:56:23 | PathExpr | test.rs:56:27:56:27 | LiteralExpr | | -| test.rs:56:23:56:27 | BinaryExpr | test.rs:56:19:56:27 | exit ClosureExpr (normal) | | -| test.rs:56:27:56:27 | LiteralExpr | test.rs:56:23:56:27 | BinaryExpr | | +| test.rs:56:23:56:27 | ... + ... | test.rs:56:19:56:27 | exit ClosureExpr (normal) | | +| test.rs:56:27:56:27 | LiteralExpr | test.rs:56:23:56:27 | ... + ... | | | test.rs:57:5:57:11 | PathExpr | test.rs:57:13:57:19 | PathExpr | | | test.rs:57:5:57:23 | CallExpr | test.rs:55:40:58:1 | BlockExpr | | | test.rs:57:13:57:19 | PathExpr | test.rs:57:21:57:21 | PathExpr | | @@ -118,15 +118,15 @@ | test.rs:62:36:68:5 | BlockExpr | test.rs:62:5:68:5 | exit test_if_else (normal) | | | test.rs:63:9:67:9 | IfExpr | test.rs:62:36:68:5 | BlockExpr | | | test.rs:63:12:63:12 | PathExpr | test.rs:63:17:63:17 | LiteralExpr | | -| test.rs:63:12:63:17 | BinaryExpr | test.rs:64:13:64:13 | LiteralExpr | true | -| test.rs:63:12:63:17 | BinaryExpr | test.rs:66:13:66:13 | PathExpr | false | -| test.rs:63:17:63:17 | LiteralExpr | test.rs:63:12:63:17 | BinaryExpr | | +| test.rs:63:12:63:17 | ... <= ... | test.rs:64:13:64:13 | LiteralExpr | true | +| test.rs:63:12:63:17 | ... <= ... | test.rs:66:13:66:13 | PathExpr | false | +| test.rs:63:17:63:17 | LiteralExpr | test.rs:63:12:63:17 | ... <= ... | | | test.rs:63:19:65:9 | BlockExpr | test.rs:63:9:67:9 | IfExpr | | | test.rs:64:13:64:13 | LiteralExpr | test.rs:63:19:65:9 | BlockExpr | | | test.rs:65:16:67:9 | BlockExpr | test.rs:63:9:67:9 | IfExpr | | | test.rs:66:13:66:13 | PathExpr | test.rs:66:17:66:17 | LiteralExpr | | -| test.rs:66:13:66:17 | BinaryExpr | test.rs:65:16:67:9 | BlockExpr | | -| test.rs:66:17:66:17 | LiteralExpr | test.rs:66:13:66:17 | BinaryExpr | | +| test.rs:66:13:66:17 | ... - ... | test.rs:65:16:67:9 | BlockExpr | | +| test.rs:66:17:66:17 | LiteralExpr | test.rs:66:13:66:17 | ... - ... | | | test.rs:70:5:76:5 | enter test_if_let_else | test.rs:71:12:71:26 | LetExpr | | | test.rs:70:5:76:5 | exit test_if_let_else (normal) | test.rs:70:5:76:5 | exit test_if_let_else | | | test.rs:70:48:76:5 | BlockExpr | test.rs:70:5:76:5 | exit test_if_let_else (normal) | | @@ -157,18 +157,18 @@ | test.rs:86:12:86:48 | ParenExpr | test.rs:89:13:89:13 | LiteralExpr | false | | test.rs:86:13:86:47 | IfExpr | test.rs:86:12:86:48 | ParenExpr | | | test.rs:86:16:86:16 | PathExpr | test.rs:86:20:86:20 | LiteralExpr | | -| test.rs:86:16:86:20 | BinaryExpr | test.rs:86:24:86:24 | PathExpr | true | -| test.rs:86:16:86:20 | BinaryExpr | test.rs:86:41:86:41 | PathExpr | false | -| test.rs:86:20:86:20 | LiteralExpr | test.rs:86:16:86:20 | BinaryExpr | | +| test.rs:86:16:86:20 | ... < ... | test.rs:86:24:86:24 | PathExpr | true | +| test.rs:86:16:86:20 | ... < ... | test.rs:86:41:86:41 | PathExpr | false | +| test.rs:86:20:86:20 | LiteralExpr | test.rs:86:16:86:20 | ... < ... | | | test.rs:86:22:86:32 | BlockExpr | test.rs:86:13:86:47 | IfExpr | | | test.rs:86:24:86:24 | PathExpr | test.rs:86:29:86:30 | LiteralExpr | | -| test.rs:86:24:86:30 | BinaryExpr | test.rs:86:22:86:32 | BlockExpr | | -| test.rs:86:28:86:30 | PrefixExpr | test.rs:86:24:86:30 | BinaryExpr | | -| test.rs:86:29:86:30 | LiteralExpr | test.rs:86:28:86:30 | PrefixExpr | | +| test.rs:86:24:86:30 | ... < ... | test.rs:86:22:86:32 | BlockExpr | | +| test.rs:86:28:86:30 | - ... | test.rs:86:24:86:30 | ... < ... | | +| test.rs:86:29:86:30 | LiteralExpr | test.rs:86:28:86:30 | - ... | | | test.rs:86:39:86:47 | BlockExpr | test.rs:86:13:86:47 | IfExpr | | | test.rs:86:41:86:41 | PathExpr | test.rs:86:45:86:46 | LiteralExpr | | -| test.rs:86:41:86:46 | BinaryExpr | test.rs:86:39:86:47 | BlockExpr | | -| test.rs:86:45:86:46 | LiteralExpr | test.rs:86:41:86:46 | BinaryExpr | | +| test.rs:86:41:86:46 | ... > ... | test.rs:86:39:86:47 | BlockExpr | | +| test.rs:86:45:86:46 | LiteralExpr | test.rs:86:41:86:46 | ... > ... | | | test.rs:86:50:88:9 | BlockExpr | test.rs:86:9:90:9 | IfExpr | | | test.rs:87:13:87:13 | LiteralExpr | test.rs:86:50:88:9 | BlockExpr | | | test.rs:88:16:90:9 | BlockExpr | test.rs:86:9:90:9 | IfExpr | | @@ -193,12 +193,12 @@ | test.rs:105:5:108:5 | enter test_and_operator | test.rs:106:9:106:28 | LetStmt | | | test.rs:105:5:108:5 | exit test_and_operator (normal) | test.rs:105:5:108:5 | exit test_and_operator | | | test.rs:105:61:108:5 | BlockExpr | test.rs:105:5:108:5 | exit test_and_operator (normal) | | -| test.rs:106:9:106:28 | LetStmt | test.rs:106:17:106:27 | BinaryExpr | | +| test.rs:106:9:106:28 | LetStmt | test.rs:106:17:106:27 | ... && ... | | | test.rs:106:13:106:13 | IdentPat | test.rs:107:9:107:9 | PathExpr | match, no-match | | test.rs:106:17:106:17 | PathExpr | test.rs:106:13:106:13 | IdentPat | false | | test.rs:106:17:106:17 | PathExpr | test.rs:106:22:106:22 | PathExpr | true | -| test.rs:106:17:106:22 | BinaryExpr | test.rs:106:17:106:17 | PathExpr | | -| test.rs:106:17:106:27 | BinaryExpr | test.rs:106:17:106:22 | BinaryExpr | | +| test.rs:106:17:106:22 | ... && ... | test.rs:106:17:106:17 | PathExpr | | +| test.rs:106:17:106:27 | ... && ... | test.rs:106:17:106:22 | ... && ... | | | test.rs:106:22:106:22 | PathExpr | test.rs:106:13:106:13 | IdentPat | false | | test.rs:106:22:106:22 | PathExpr | test.rs:106:27:106:27 | PathExpr | true | | test.rs:106:27:106:27 | PathExpr | test.rs:106:13:106:13 | IdentPat | | @@ -206,12 +206,12 @@ | test.rs:110:5:113:5 | enter test_or_operator | test.rs:111:9:111:28 | LetStmt | | | test.rs:110:5:113:5 | exit test_or_operator (normal) | test.rs:110:5:113:5 | exit test_or_operator | | | test.rs:110:60:113:5 | BlockExpr | test.rs:110:5:113:5 | exit test_or_operator (normal) | | -| test.rs:111:9:111:28 | LetStmt | test.rs:111:17:111:27 | BinaryExpr | | +| test.rs:111:9:111:28 | LetStmt | test.rs:111:17:111:27 | ... \|\| ... | | | test.rs:111:13:111:13 | IdentPat | test.rs:112:9:112:9 | PathExpr | match, no-match | | test.rs:111:17:111:17 | PathExpr | test.rs:111:13:111:13 | IdentPat | true | | test.rs:111:17:111:17 | PathExpr | test.rs:111:22:111:22 | PathExpr | false | -| test.rs:111:17:111:22 | BinaryExpr | test.rs:111:17:111:17 | PathExpr | | -| test.rs:111:17:111:27 | BinaryExpr | test.rs:111:17:111:22 | BinaryExpr | | +| test.rs:111:17:111:22 | ... \|\| ... | test.rs:111:17:111:17 | PathExpr | | +| test.rs:111:17:111:27 | ... \|\| ... | test.rs:111:17:111:22 | ... \|\| ... | | | test.rs:111:22:111:22 | PathExpr | test.rs:111:13:111:13 | IdentPat | true | | test.rs:111:22:111:22 | PathExpr | test.rs:111:27:111:27 | PathExpr | false | | test.rs:111:27:111:27 | PathExpr | test.rs:111:13:111:13 | IdentPat | | @@ -219,17 +219,17 @@ | test.rs:115:5:118:5 | enter test_or_operator_2 | test.rs:116:9:116:36 | LetStmt | | | test.rs:115:5:118:5 | exit test_or_operator_2 (normal) | test.rs:115:5:118:5 | exit test_or_operator_2 | | | test.rs:115:61:118:5 | BlockExpr | test.rs:115:5:118:5 | exit test_or_operator_2 (normal) | | -| test.rs:116:9:116:36 | LetStmt | test.rs:116:17:116:35 | BinaryExpr | | +| test.rs:116:9:116:36 | LetStmt | test.rs:116:17:116:35 | ... \|\| ... | | | test.rs:116:13:116:13 | IdentPat | test.rs:117:9:117:9 | PathExpr | match, no-match | | test.rs:116:17:116:17 | PathExpr | test.rs:116:13:116:13 | IdentPat | true | | test.rs:116:17:116:17 | PathExpr | test.rs:116:23:116:23 | PathExpr | false | -| test.rs:116:17:116:30 | BinaryExpr | test.rs:116:17:116:17 | PathExpr | | -| test.rs:116:17:116:35 | BinaryExpr | test.rs:116:17:116:30 | BinaryExpr | | +| test.rs:116:17:116:30 | ... \|\| ... | test.rs:116:17:116:17 | PathExpr | | +| test.rs:116:17:116:35 | ... \|\| ... | test.rs:116:17:116:30 | ... \|\| ... | | | test.rs:116:22:116:30 | ParenExpr | test.rs:116:13:116:13 | IdentPat | true | | test.rs:116:22:116:30 | ParenExpr | test.rs:116:35:116:35 | PathExpr | false | | test.rs:116:23:116:23 | PathExpr | test.rs:116:28:116:29 | LiteralExpr | | -| test.rs:116:23:116:29 | BinaryExpr | test.rs:116:22:116:30 | ParenExpr | | -| test.rs:116:28:116:29 | LiteralExpr | test.rs:116:23:116:29 | BinaryExpr | | +| test.rs:116:23:116:29 | ... == ... | test.rs:116:22:116:30 | ParenExpr | | +| test.rs:116:28:116:29 | LiteralExpr | test.rs:116:23:116:29 | ... == ... | | | test.rs:116:35:116:35 | PathExpr | test.rs:116:13:116:13 | IdentPat | | | test.rs:117:9:117:9 | PathExpr | test.rs:115:61:118:5 | BlockExpr | | | test.rs:122:1:128:1 | enter test_match | test.rs:123:11:123:21 | PathExpr | | @@ -240,7 +240,7 @@ | test.rs:124:9:124:23 | TupleStructPat | test.rs:124:28:124:28 | PathExpr | match | | test.rs:124:9:124:23 | TupleStructPat | test.rs:125:9:125:23 | TupleStructPat | no-match | | test.rs:124:28:124:28 | PathExpr | test.rs:124:32:124:33 | LiteralExpr | | -| test.rs:124:32:124:33 | LiteralExpr | test.rs:124:28:124:33 | BinaryExpr | | +| test.rs:124:32:124:33 | LiteralExpr | test.rs:124:28:124:33 | ... < ... | | | test.rs:125:9:125:23 | TupleStructPat | test.rs:125:28:125:28 | PathExpr | match | | test.rs:125:9:125:23 | TupleStructPat | test.rs:126:9:126:20 | PathPat | no-match | | test.rs:125:28:125:28 | PathExpr | test.rs:123:5:127:5 | MatchExpr | | From 8c956e8276810eb21fe56a1261ae346b75fba4c6 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 13:32:42 +0200 Subject: [PATCH 125/162] Rust: Add `LogicalOperation.qll` --- .../internal/ControlFlowGraphImpl.qll | 38 ++++++++----------- .../codeql/rust/elements/LogicalOperation.qll | 33 ++++++++++++++++ rust/ql/lib/rust.qll | 1 + 3 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 rust/ql/lib/codeql/rust/elements/LogicalOperation.qll diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index 58d24dbeede9..6e5ef7a7a4ed 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -73,7 +73,7 @@ class BecomeExprTree extends StandardPostOrderTree instanceof BecomeExpr { } class BinaryOpExprTree extends StandardPostOrderTree instanceof BinaryExpr { - BinaryOpExprTree() { super.getOperatorName() != "&&" and super.getOperatorName() != "||" } + BinaryOpExprTree() { not this instanceof LogicalOrExpr and not this instanceof LogicalAndExpr } override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getLhs() @@ -82,61 +82,53 @@ class BinaryOpExprTree extends StandardPostOrderTree instanceof BinaryExpr { } } -class LogicalOrBinaryOpExprTree extends PreOrderTree instanceof BinaryExpr { - LogicalOrBinaryOpExprTree() { super.getOperatorName() = "||" } - - final override predicate propagatesAbnormal(AstNode child) { - child = [super.getRhs(), super.getLhs()] - } +class LogicalOrBinaryOpExprTree extends PreOrderTree, LogicalOrExpr { + final override predicate propagatesAbnormal(AstNode child) { child = this.getAnOperand() } override predicate succ(AstNode pred, AstNode succ, Completion c) { // Edge to the first node in the lhs pred = this and - first(super.getLhs(), succ) and + first(this.getLhs(), succ) and completionIsSimple(c) or // Edge from the last node in the lhs to the first node in the rhs - last(super.getLhs(), pred, c) and - first(super.getRhs(), succ) and + last(this.getLhs(), pred, c) and + first(this.getRhs(), succ) and c.(BooleanCompletion).failed() } override predicate last(AstNode node, Completion c) { // Lhs. as the last node - last(super.getLhs(), node, c) and + last(this.getLhs(), node, c) and c.(BooleanCompletion).succeeded() or // Rhs. as the last node - last(super.getRhs(), node, c) + last(this.getRhs(), node, c) } } -class LogicalAndBinaryOpExprTree extends PreOrderTree instanceof BinaryExpr { - LogicalAndBinaryOpExprTree() { super.getOperatorName() = "&&" } - - final override predicate propagatesAbnormal(AstNode child) { - child = [super.getRhs(), super.getLhs()] - } +class LogicalAndBinaryOpExprTree extends PreOrderTree, LogicalAndExpr { + final override predicate propagatesAbnormal(AstNode child) { child = this.getAnOperand() } override predicate succ(AstNode pred, AstNode succ, Completion c) { // Edge to the first node in the lhs pred = this and - first(super.getLhs(), succ) and + first(this.getLhs(), succ) and completionIsSimple(c) or // Edge from the last node in the lhs to the first node in the rhs - last(super.getLhs(), pred, c) and - first(super.getRhs(), succ) and + last(this.getLhs(), pred, c) and + first(this.getRhs(), succ) and c.(BooleanCompletion).succeeded() } override predicate last(AstNode node, Completion c) { // Lhs. as the last node - last(super.getLhs(), node, c) and + last(this.getLhs(), node, c) and c.(BooleanCompletion).failed() or // Rhs. as the last node - last(super.getRhs(), node, c) + last(this.getRhs(), node, c) } } diff --git a/rust/ql/lib/codeql/rust/elements/LogicalOperation.qll b/rust/ql/lib/codeql/rust/elements/LogicalOperation.qll new file mode 100644 index 000000000000..fdbfb5d4613a --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/LogicalOperation.qll @@ -0,0 +1,33 @@ +private import codeql.rust.elements.Expr +private import codeql.rust.elements.BinaryExpr +private import codeql.rust.elements.PrefixExpr + +abstract private class LogicalOperationImpl extends Expr { + abstract Expr getAnOperand(); +} + +final class LogicalOperation = LogicalOperationImpl; + +abstract private class BinaryLogicalOperationImpl extends BinaryExpr, LogicalOperationImpl { + override Expr getAnOperand() { result = [this.getLhs(), this.getRhs()] } +} + +final class BinaryLogicalOperation = BinaryLogicalOperationImpl; + +final class LogicalAndExpr extends BinaryLogicalOperationImpl, BinaryExpr { + LogicalAndExpr() { this.getOperatorName() = "&&" } +} + +final class LogicalOrExpr extends BinaryLogicalOperationImpl { + LogicalOrExpr() { this.getOperatorName() = "||" } +} + +abstract private class UnaryLogicalOperationImpl extends PrefixExpr, LogicalOperationImpl { } + +final class UnaryLogicalOperation = UnaryLogicalOperationImpl; + +final class LogicalNotExpr extends UnaryLogicalOperationImpl { + LogicalNotExpr() { this.getOperatorName() = "!" } + + override Expr getAnOperand() { result = this.getExpr() } +} diff --git a/rust/ql/lib/rust.qll b/rust/ql/lib/rust.qll index bdb9f3df374c..72d2bd5498d2 100644 --- a/rust/ql/lib/rust.qll +++ b/rust/ql/lib/rust.qll @@ -3,3 +3,4 @@ import codeql.rust.elements import codeql.Locations import codeql.files.FileSystem +import codeql.rust.elements.LogicalOperation From f428fdc57c7e0e47d1cf8ddeacc24473a7a76336 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 13:39:30 +0200 Subject: [PATCH 126/162] Rust: Run codegen --- rust/ql/.generated.list | 2 -- rust/ql/.gitattributes | 2 -- rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll | 1 + rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll | 1 + 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 10ba5b76aae1..c6ea61cfc834 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -176,7 +176,6 @@ lib/codeql/rust/elements/internal/AwaitExprImpl.qll 97eb9abc0f30ead9385f31c87b46 lib/codeql/rust/elements/internal/BecomeExprConstructor.qll ba073aaa256cb8827a0307c3128d50f62b11aac0b1f324e48c95f30351a9b942 3a787ded505c3158fa4f4923f66e8ecdcb7b5f86f27f64c5412dc32dca031f18 lib/codeql/rust/elements/internal/BecomeExprImpl.qll 8522410257ca9ff09e5314c3a39fba02f6ba18e1d4349b91f8823586317f3e47 073a877a6d72c5b762aac64cdd843fd2872aaefb9e264fb90eac8c25753a6e07 lib/codeql/rust/elements/internal/BinaryExprConstructor.qll 7f9b17757f78b9fb7c46e21d2040a77fa50083bef4911c8464991c3d1ad91d87 a59390cd8e896c0bfbdc9ba0674e06d980ffcefa710fbc9886be52ed427e9717 -lib/codeql/rust/elements/internal/BinaryExprImpl.qll 6e22b183edc36083c45a03a600da6ea995563268ecdcdd4980b612fb8c3e7d33 7d8f32500f1edf8e9b8a725a640605e2ecfd88f21ad09d10f81b0ac18f27360d lib/codeql/rust/elements/internal/BlockExprConstructor.qll 438337c807645e98a01440f3f4610d68b0567ba15c8f51dc43bf5a30c9af3696 48ce7a546910c884619762349b8ada9836284f8008298fdb0070a38f7ddf25a0 lib/codeql/rust/elements/internal/BlockExprImpl.qll 36ac09e4a6eeeec22919b62b1d004bdb5bb2527e67932c308aec383a770768d6 3b4b2a2014f6fe075c63a2d633b297566b548ef2e4343cadf067a9edbcadc876 lib/codeql/rust/elements/internal/BoxPatConstructor.qll 153f110ba25fd6c889092bfd16f73bb610fa60d6e0c8965d5f44d2446fcd48a2 9324cf0d8aa29945551bf8ab64801d598f57aab8cd4e19bcd4e9ef8a4a4e06eb @@ -329,7 +328,6 @@ lib/codeql/rust/elements/internal/PathSegmentImpl.qll f8679dc63f0d71d412c3e1ce76 lib/codeql/rust/elements/internal/PathTypeConstructor.qll 8949742c7ab7fcfa3a3f6469e87355a6888931ab9ac7a6a07d2bd51e3fdf8283 fb1a402e94e9a1f33b7757338d7e95b107933339615a4fe86de33e41206dd94a lib/codeql/rust/elements/internal/PathTypeImpl.qll 0e3b85df054d1194505796e457ee31a8dac2a2a77284c077cbf1a3bfc179294e c198d4fdf8d1d55f1cf57685a9ad2adf88cc2d6d4f84bafa1e9f039192761399 lib/codeql/rust/elements/internal/PrefixExprConstructor.qll 90c50b0df2d4b4cbf5e2b7d67a9d243a1af9bfff660b7a70d8b9c7859c28bca7 1a1b5ea1f06ed8d41a658c872e8e1915c241a7c799c691df81b9a7b55d8f2f1e -lib/codeql/rust/elements/internal/PrefixExprImpl.qll f3c6a88cead13fb88f5be170123e9d5fc0819e6626602c42d38e756ef5a46213 e5cd78e6a77484e164334befd533d52e4de00c0c3b30dd2fa03f412f669cf369 lib/codeql/rust/elements/internal/PtrTypeConstructor.qll ee3c4326ea3f198d2537a914dd6eb51d0cf247310f037e13e87632fbd6cfb50a 3814218b5271f3c6c45b52082cca2a3250a2573abced43fe53e1b4145374afe3 lib/codeql/rust/elements/internal/PtrTypeImpl.qll ff4283ffab39b4a3c0e55e7d655dfdb846171cde0907bf1f893c86b35d2c1135 e54d3a6fb0b5a1484f00fd5a4631455902bab80642c3bb076e538ddcc29a85a4 lib/codeql/rust/elements/internal/RangeExprConstructor.qll a0aa90a1c38c5deea56475399016afae2a00a858b961fbbab8ddeb3bc6a08103 0ddf1bcf28aafc56d7334e6138fb268f9b36a429e4cbdd982cd8384e0644076b diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index ca6d0ee9bdc4..6f1e154b8be8 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -178,7 +178,6 @@ /lib/codeql/rust/elements/internal/BecomeExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/BecomeExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/BinaryExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/BinaryExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/BlockExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/BlockExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/BoxPatConstructor.qll linguist-generated @@ -331,7 +330,6 @@ /lib/codeql/rust/elements/internal/PathTypeConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/PathTypeImpl.qll linguist-generated /lib/codeql/rust/elements/internal/PrefixExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/PrefixExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/PtrTypeConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/PtrTypeImpl.qll linguist-generated /lib/codeql/rust/elements/internal/RangeExprConstructor.qll linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll index 09dd26b14de4..101295e5dc84 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BinaryExprImpl.qll @@ -11,6 +11,7 @@ private import codeql.rust.elements.internal.generated.BinaryExpr * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A binary operation expression. For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll index 92ecdac0a66e..51df8a764454 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PrefixExprImpl.qll @@ -11,6 +11,7 @@ private import codeql.rust.elements.internal.generated.PrefixExpr * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A unary operation expression. For example: * ```rust From d299380a5a2140b5236f28b1e1a3459344c0b467 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 13:40:08 +0200 Subject: [PATCH 127/162] Rust: Enable CFG consistency checks --- .../ql/consistency-queries/CfgConsistency.ql | 5 ----- ruby/ql/consistency-queries/CfgConsistency.ql | 5 ----- rust/ql/consistency-queries/CfgConsistency.ql | 19 +++++++++++++++++++ rust/ql/consistency-queries/Placeholder.ql | 3 --- shared/controlflow/codeql/controlflow/Cfg.qll | 5 +++++ 5 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 rust/ql/consistency-queries/CfgConsistency.ql delete mode 100644 rust/ql/consistency-queries/Placeholder.ql diff --git a/csharp/ql/consistency-queries/CfgConsistency.ql b/csharp/ql/consistency-queries/CfgConsistency.ql index 9802ddff264b..3caf64f9aece 100644 --- a/csharp/ql/consistency-queries/CfgConsistency.ql +++ b/csharp/ql/consistency-queries/CfgConsistency.ql @@ -61,8 +61,3 @@ query predicate preBasicBlockConsistency(ControlFlowElement cfe1, ControlFlowEle bbIntraSuccInconsistency(cfe1, cfe2) and s = "intra succ inconsistency" } - -query predicate multipleToString(Node n, string s) { - s = strictconcat(n.toString(), ",") and - strictcount(n.toString()) > 1 -} diff --git a/ruby/ql/consistency-queries/CfgConsistency.ql b/ruby/ql/consistency-queries/CfgConsistency.ql index d7d5b84a4025..a57cb03ebb2b 100644 --- a/ruby/ql/consistency-queries/CfgConsistency.ql +++ b/ruby/ql/consistency-queries/CfgConsistency.ql @@ -19,8 +19,3 @@ query predicate nonPostOrderExpr(Expr e, string cls) { c instanceof NormalCompletion ) } - -query predicate multipleToString(CfgNode n, string s) { - s = strictconcat(n.toString(), ",") and - strictcount(n.toString()) > 1 -} diff --git a/rust/ql/consistency-queries/CfgConsistency.ql b/rust/ql/consistency-queries/CfgConsistency.ql new file mode 100644 index 000000000000..6bcf8d88201c --- /dev/null +++ b/rust/ql/consistency-queries/CfgConsistency.ql @@ -0,0 +1,19 @@ +import rust +import codeql.rust.controlflow.internal.ControlFlowGraphImpl::Consistency +import codeql.rust.controlflow.internal.ControlFlowGraphImpl as CfgImpl +import codeql.rust.controlflow.internal.Completion + +/** + * All `Expr` nodes are `PostOrderTree`s + */ +query predicate nonPostOrderExpr(Expr e, string cls) { + cls = e.getPrimaryQlClasses() and + not e instanceof LetExpr and + not e instanceof LogicalAndExpr and // todo + not e instanceof LogicalOrExpr and + exists(AstNode last, Completion c | + CfgImpl::last(e, last, c) and + last != e and + c instanceof NormalCompletion + ) +} diff --git a/rust/ql/consistency-queries/Placeholder.ql b/rust/ql/consistency-queries/Placeholder.ql deleted file mode 100644 index 8e8965e4052a..000000000000 --- a/rust/ql/consistency-queries/Placeholder.ql +++ /dev/null @@ -1,3 +0,0 @@ -from boolean b -where b = true and b = false -select b diff --git a/shared/controlflow/codeql/controlflow/Cfg.qll b/shared/controlflow/codeql/controlflow/Cfg.qll index a6ce96be71d3..aa7a072e4cbb 100644 --- a/shared/controlflow/codeql/controlflow/Cfg.qll +++ b/shared/controlflow/codeql/controlflow/Cfg.qll @@ -1386,5 +1386,10 @@ module Make Input> { ord = sk.getListOrder() and strictcount(sk.getListOrder()) > 1 } + + query predicate multipleToString(Node n, string s) { + s = strictconcat(n.toString(), ",") and + strictcount(n.toString()) > 1 + } } } From cbc23894931fe241e74b587c5599f653758f6d58 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 24 Sep 2024 14:13:44 +0200 Subject: [PATCH 128/162] Rust: Accept CFG inconsistencies --- .../generated/MatchArm/CONSISTENCY/CfgConsistency.expected | 2 ++ .../generated/MatchExpr/CONSISTENCY/CfgConsistency.expected | 2 ++ .../controlflow/CONSISTENCY/CfgConsistency.expected | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/CONSISTENCY/CfgConsistency.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/CONSISTENCY/CfgConsistency.expected create mode 100644 rust/ql/test/library-tests/controlflow/CONSISTENCY/CfgConsistency.expected diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/CONSISTENCY/CfgConsistency.expected b/rust/ql/test/extractor-tests/generated/MatchArm/CONSISTENCY/CfgConsistency.expected new file mode 100644 index 000000000000..e558c7c1c28d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/CONSISTENCY/CfgConsistency.expected @@ -0,0 +1,2 @@ +deadEnd +| gen_match_arm.rs:10:20:10:25 | ... != ... | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/CONSISTENCY/CfgConsistency.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/CONSISTENCY/CfgConsistency.expected new file mode 100644 index 000000000000..8d6730211c8e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/CONSISTENCY/CfgConsistency.expected @@ -0,0 +1,2 @@ +deadEnd +| gen_match_expr.rs:10:20:10:25 | ... != ... | diff --git a/rust/ql/test/library-tests/controlflow/CONSISTENCY/CfgConsistency.expected b/rust/ql/test/library-tests/controlflow/CONSISTENCY/CfgConsistency.expected new file mode 100644 index 000000000000..a457b59c6a5a --- /dev/null +++ b/rust/ql/test/library-tests/controlflow/CONSISTENCY/CfgConsistency.expected @@ -0,0 +1,3 @@ +deadEnd +| test.rs:124:28:124:33 | ... < ... | +| test.rs:139:30:141:9 | BlockExpr | From 329c3c7c563f1c3615456b93e9777294c0b09f99 Mon Sep 17 00:00:00 2001 From: Felicity Chapman Date: Wed, 25 Sep 2024 10:59:22 +0100 Subject: [PATCH 129/162] Make links in drop-down absolute --- docs/codeql/_templates/layout.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/codeql/_templates/layout.html b/docs/codeql/_templates/layout.html index 779c99cfe9f5..5b234423b673 100644 --- a/docs/codeql/_templates/layout.html +++ b/docs/codeql/_templates/layout.html @@ -60,22 +60,22 @@ From 0ee138373212d834874f20a6b5acf70cfa058237 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 25 Sep 2024 14:04:31 +0200 Subject: [PATCH 130/162] C++: Remove `inline` pragma from sink --- .../lib/semmle/code/cpp/security/flowafterfree/FlowAfterFree.qll | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/security/flowafterfree/FlowAfterFree.qll b/cpp/ql/lib/semmle/code/cpp/security/flowafterfree/FlowAfterFree.qll index 1103ff93a1c2..e6a037a94314 100644 --- a/cpp/ql/lib/semmle/code/cpp/security/flowafterfree/FlowAfterFree.qll +++ b/cpp/ql/lib/semmle/code/cpp/security/flowafterfree/FlowAfterFree.qll @@ -72,7 +72,6 @@ module FlowFromFree { predicate isSource(DataFlow::Node node, FlowState state) { isFree(node, _, state, _) } - pragma[inline] predicate isSink(DataFlow::Node sink, FlowState state) { exists(Expr e, DataFlow::Node source, DeallocationExpr dealloc | P::isSink(sink, e) and From 28c48fb471044aa76ca6edccd5ee7784ab0e96d5 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 25 Sep 2024 13:32:50 +0200 Subject: [PATCH 131/162] C#: Add Xss attribute collection test example and update expected output. --- .../CWE-079/XSSAsp/AspInline.expected | 4 +- .../Security Features/CWE-079/XSSAsp/XSS.cs | 5 + .../CWE-079/XSSAsp/XSS.expected | 161 +++++++++--------- 3 files changed, 92 insertions(+), 78 deletions(-) diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/AspInline.expected b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/AspInline.expected index 66468b41a683..08f9aded5531 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/AspInline.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/AspInline.expected @@ -1,5 +1,5 @@ -| script.aspx:4:1:4:23 | <%= ... %> | XSS.cs:115:16:115:29 | someJavascript | -| script.aspx:8:1:8:12 | <%= ... %> | XSS.cs:122:24:122:28 | Field | +| script.aspx:4:1:4:23 | <%= ... %> | XSS.cs:120:16:120:29 | someJavascript | +| script.aspx:8:1:8:12 | <%= ... %> | XSS.cs:127:24:127:28 | Field | | script.aspx:12:1:12:14 | <%= ... %> | | Request | | script.aspx:16:1:16:34 | <%= ... %> | | QueryString | | script.aspx:20:1:20:41 | <%= ... %> | | QueryString | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.cs b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.cs index 1fc8a99e61b6..eba40b891d58 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.cs @@ -17,6 +17,7 @@ class XSS Table table; Label label; string connectionString; + public Button button; public void WebUIXSS() { @@ -100,6 +101,10 @@ public void HtmlEncoded(HttpContextBase context) // GOOD: HTML encoding string name = context.Request.QueryString["name"]; new StringContent(HttpUtility.HtmlEncode(name)); + + // GOOD: Implicit HTML encoding + string html = context.Request.QueryString["html"]; + button.Attributes.Add("data-href", html); } public void UrlEncoded(HttpContextBase context) diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected index cf0479cf253f..b3d93321c1f9 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected @@ -1,50 +1,55 @@ #select -| XSS.cs:26:32:26:51 | call to method ToString | XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | XSS.cs:26:32:26:51 | call to method ToString | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | User-provided value | -| XSS.cs:27:29:27:48 | call to method ToString | XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | XSS.cs:27:29:27:48 | call to method ToString | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | User-provided value | -| XSS.cs:28:26:28:45 | call to method ToString | XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | XSS.cs:28:26:28:45 | call to method ToString | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | User-provided value | -| XSS.cs:38:36:38:39 | access to local variable name | XSS.cs:37:27:37:53 | access to property QueryString : NameValueCollection | XSS.cs:38:36:38:39 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:37:27:37:53 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:59:22:59:25 | access to local variable name | XSS.cs:57:27:57:65 | access to property QueryString : NameValueCollection | XSS.cs:59:22:59:25 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:57:27:57:65 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:76:36:76:39 | access to local variable name | XSS.cs:75:27:75:53 | access to property QueryString : NameValueCollection | XSS.cs:76:36:76:39 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:75:27:75:53 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:79:36:79:40 | access to local variable name2 | XSS.cs:78:28:78:42 | access to property Request : HttpRequestBase | XSS.cs:79:36:79:40 | access to local variable name2 | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:78:28:78:42 | access to property Request : HttpRequestBase | User-provided value | -| XSS.cs:86:28:86:31 | access to local variable name | XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | XSS.cs:86:28:86:31 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:87:31:87:34 | access to local variable name | XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | XSS.cs:87:31:87:34 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:95:31:95:34 | access to local variable name | XSS.cs:94:27:94:53 | access to property QueryString : NameValueCollection | XSS.cs:95:31:95:34 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:94:27:94:53 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:135:20:135:33 | access to property RawUrl | XSS.cs:135:20:135:33 | access to property RawUrl | XSS.cs:135:20:135:33 | access to property RawUrl | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:135:20:135:33 | access to property RawUrl | User-provided value | +| XSS.cs:27:32:27:51 | call to method ToString | XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | XSS.cs:27:32:27:51 | call to method ToString | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | User-provided value | +| XSS.cs:28:29:28:48 | call to method ToString | XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | XSS.cs:28:29:28:48 | call to method ToString | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | User-provided value | +| XSS.cs:29:26:29:45 | call to method ToString | XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | XSS.cs:29:26:29:45 | call to method ToString | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | User-provided value | +| XSS.cs:39:36:39:39 | access to local variable name | XSS.cs:38:27:38:53 | access to property QueryString : NameValueCollection | XSS.cs:39:36:39:39 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:38:27:38:53 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:60:22:60:25 | access to local variable name | XSS.cs:58:27:58:65 | access to property QueryString : NameValueCollection | XSS.cs:60:22:60:25 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:58:27:58:65 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:77:36:77:39 | access to local variable name | XSS.cs:76:27:76:53 | access to property QueryString : NameValueCollection | XSS.cs:77:36:77:39 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:76:27:76:53 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:80:36:80:40 | access to local variable name2 | XSS.cs:79:28:79:42 | access to property Request : HttpRequestBase | XSS.cs:80:36:80:40 | access to local variable name2 | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:79:28:79:42 | access to property Request : HttpRequestBase | User-provided value | +| XSS.cs:87:28:87:31 | access to local variable name | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | XSS.cs:87:28:87:31 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:88:31:88:34 | access to local variable name | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | XSS.cs:88:31:88:34 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:96:31:96:34 | access to local variable name | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | XSS.cs:96:31:96:34 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:107:48:107:51 | access to local variable html | XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | XSS.cs:107:48:107:51 | access to local variable html | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | User-provided value | +| XSS.cs:140:20:140:33 | access to property RawUrl | XSS.cs:140:20:140:33 | access to property RawUrl | XSS.cs:140:20:140:33 | access to property RawUrl | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:140:20:140:33 | access to property RawUrl | User-provided value | | script.aspx:12:1:12:14 | <%= ... %> | script.aspx:12:1:12:14 | <%= ... %> | script.aspx:12:1:12:14 | <%= ... %> | $@ flows to here and is a remote source accessed inline in an ASPX page. | script.aspx:12:1:12:14 | <%= ... %> | User-provided value | | script.aspx:16:1:16:34 | <%= ... %> | script.aspx:16:1:16:34 | <%= ... %> | script.aspx:16:1:16:34 | <%= ... %> | $@ flows to here and is a remote source accessed inline in an ASPX page. | script.aspx:16:1:16:34 | <%= ... %> | User-provided value | | script.aspx:20:1:20:41 | <%= ... %> | script.aspx:20:1:20:41 | <%= ... %> | script.aspx:20:1:20:41 | <%= ... %> | $@ flows to here and is a remote source accessed inline in an ASPX page. | script.aspx:20:1:20:41 | <%= ... %> | User-provided value | edges -| XSS.cs:25:13:25:21 | [post] access to local variable userInput : StringBuilder | XSS.cs:26:32:26:40 | access to local variable userInput : StringBuilder | provenance | | -| XSS.cs:25:13:25:21 | [post] access to local variable userInput : StringBuilder | XSS.cs:27:29:27:37 | access to local variable userInput : StringBuilder | provenance | | -| XSS.cs:25:13:25:21 | [post] access to local variable userInput : StringBuilder | XSS.cs:28:26:28:34 | access to local variable userInput : StringBuilder | provenance | | -| XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | XSS.cs:25:48:25:67 | access to property Text : String | provenance | MaD:4 | -| XSS.cs:25:48:25:67 | access to property Text : String | XSS.cs:25:13:25:21 | [post] access to local variable userInput : StringBuilder | provenance | MaD:2 | -| XSS.cs:26:32:26:40 | access to local variable userInput : StringBuilder | XSS.cs:26:32:26:51 | call to method ToString | provenance | MaD:3 | -| XSS.cs:27:29:27:37 | access to local variable userInput : StringBuilder | XSS.cs:27:29:27:48 | call to method ToString | provenance | MaD:3 | -| XSS.cs:28:26:28:34 | access to local variable userInput : StringBuilder | XSS.cs:28:26:28:45 | call to method ToString | provenance | MaD:3 | -| XSS.cs:37:20:37:23 | access to local variable name : String | XSS.cs:38:36:38:39 | access to local variable name | provenance | Sink:MaD:5 | -| XSS.cs:37:27:37:53 | access to property QueryString : NameValueCollection | XSS.cs:37:20:37:23 | access to local variable name : String | provenance | | -| XSS.cs:37:27:37:53 | access to property QueryString : NameValueCollection | XSS.cs:37:27:37:61 | access to indexer : String | provenance | MaD:6 | -| XSS.cs:37:27:37:61 | access to indexer : String | XSS.cs:37:20:37:23 | access to local variable name : String | provenance | | -| XSS.cs:57:20:57:23 | access to local variable name : String | XSS.cs:59:22:59:25 | access to local variable name | provenance | | -| XSS.cs:57:27:57:65 | access to property QueryString : NameValueCollection | XSS.cs:57:20:57:23 | access to local variable name : String | provenance | | -| XSS.cs:57:27:57:65 | access to property QueryString : NameValueCollection | XSS.cs:57:27:57:73 | access to indexer : String | provenance | MaD:6 | -| XSS.cs:57:27:57:73 | access to indexer : String | XSS.cs:57:20:57:23 | access to local variable name : String | provenance | | -| XSS.cs:75:20:75:23 | access to local variable name : String | XSS.cs:76:36:76:39 | access to local variable name | provenance | | -| XSS.cs:75:27:75:53 | access to property QueryString : NameValueCollection | XSS.cs:75:20:75:23 | access to local variable name : String | provenance | | -| XSS.cs:75:27:75:53 | access to property QueryString : NameValueCollection | XSS.cs:75:27:75:61 | access to indexer : String | provenance | MaD:6 | -| XSS.cs:75:27:75:61 | access to indexer : String | XSS.cs:75:20:75:23 | access to local variable name : String | provenance | | -| XSS.cs:78:20:78:24 | access to local variable name2 : String | XSS.cs:79:36:79:40 | access to local variable name2 | provenance | | -| XSS.cs:78:28:78:42 | access to property Request : HttpRequestBase | XSS.cs:78:20:78:24 | access to local variable name2 : String | provenance | | -| XSS.cs:85:20:85:23 | access to local variable name : String | XSS.cs:86:28:86:31 | access to local variable name | provenance | | -| XSS.cs:85:20:85:23 | access to local variable name : String | XSS.cs:87:31:87:34 | access to local variable name | provenance | | -| XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | XSS.cs:85:20:85:23 | access to local variable name : String | provenance | | -| XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | XSS.cs:85:27:85:61 | access to indexer : String | provenance | MaD:6 | -| XSS.cs:85:27:85:61 | access to indexer : String | XSS.cs:85:20:85:23 | access to local variable name : String | provenance | | -| XSS.cs:94:20:94:23 | access to local variable name : String | XSS.cs:95:31:95:34 | access to local variable name | provenance | Sink:MaD:1 | -| XSS.cs:94:27:94:53 | access to property QueryString : NameValueCollection | XSS.cs:94:20:94:23 | access to local variable name : String | provenance | | -| XSS.cs:94:27:94:53 | access to property QueryString : NameValueCollection | XSS.cs:94:27:94:61 | access to indexer : String | provenance | MaD:6 | -| XSS.cs:94:27:94:61 | access to indexer : String | XSS.cs:94:20:94:23 | access to local variable name : String | provenance | | +| XSS.cs:26:13:26:21 | [post] access to local variable userInput : StringBuilder | XSS.cs:27:32:27:40 | access to local variable userInput : StringBuilder | provenance | | +| XSS.cs:26:13:26:21 | [post] access to local variable userInput : StringBuilder | XSS.cs:28:29:28:37 | access to local variable userInput : StringBuilder | provenance | | +| XSS.cs:26:13:26:21 | [post] access to local variable userInput : StringBuilder | XSS.cs:29:26:29:34 | access to local variable userInput : StringBuilder | provenance | | +| XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | XSS.cs:26:48:26:67 | access to property Text : String | provenance | MaD:4 | +| XSS.cs:26:48:26:67 | access to property Text : String | XSS.cs:26:13:26:21 | [post] access to local variable userInput : StringBuilder | provenance | MaD:2 | +| XSS.cs:27:32:27:40 | access to local variable userInput : StringBuilder | XSS.cs:27:32:27:51 | call to method ToString | provenance | MaD:3 | +| XSS.cs:28:29:28:37 | access to local variable userInput : StringBuilder | XSS.cs:28:29:28:48 | call to method ToString | provenance | MaD:3 | +| XSS.cs:29:26:29:34 | access to local variable userInput : StringBuilder | XSS.cs:29:26:29:45 | call to method ToString | provenance | MaD:3 | +| XSS.cs:38:20:38:23 | access to local variable name : String | XSS.cs:39:36:39:39 | access to local variable name | provenance | Sink:MaD:5 | +| XSS.cs:38:27:38:53 | access to property QueryString : NameValueCollection | XSS.cs:38:20:38:23 | access to local variable name : String | provenance | | +| XSS.cs:38:27:38:53 | access to property QueryString : NameValueCollection | XSS.cs:38:27:38:61 | access to indexer : String | provenance | MaD:6 | +| XSS.cs:38:27:38:61 | access to indexer : String | XSS.cs:38:20:38:23 | access to local variable name : String | provenance | | +| XSS.cs:58:20:58:23 | access to local variable name : String | XSS.cs:60:22:60:25 | access to local variable name | provenance | | +| XSS.cs:58:27:58:65 | access to property QueryString : NameValueCollection | XSS.cs:58:20:58:23 | access to local variable name : String | provenance | | +| XSS.cs:58:27:58:65 | access to property QueryString : NameValueCollection | XSS.cs:58:27:58:73 | access to indexer : String | provenance | MaD:6 | +| XSS.cs:58:27:58:73 | access to indexer : String | XSS.cs:58:20:58:23 | access to local variable name : String | provenance | | +| XSS.cs:76:20:76:23 | access to local variable name : String | XSS.cs:77:36:77:39 | access to local variable name | provenance | | +| XSS.cs:76:27:76:53 | access to property QueryString : NameValueCollection | XSS.cs:76:20:76:23 | access to local variable name : String | provenance | | +| XSS.cs:76:27:76:53 | access to property QueryString : NameValueCollection | XSS.cs:76:27:76:61 | access to indexer : String | provenance | MaD:6 | +| XSS.cs:76:27:76:61 | access to indexer : String | XSS.cs:76:20:76:23 | access to local variable name : String | provenance | | +| XSS.cs:79:20:79:24 | access to local variable name2 : String | XSS.cs:80:36:80:40 | access to local variable name2 | provenance | | +| XSS.cs:79:28:79:42 | access to property Request : HttpRequestBase | XSS.cs:79:20:79:24 | access to local variable name2 : String | provenance | | +| XSS.cs:86:20:86:23 | access to local variable name : String | XSS.cs:87:28:87:31 | access to local variable name | provenance | | +| XSS.cs:86:20:86:23 | access to local variable name : String | XSS.cs:88:31:88:34 | access to local variable name | provenance | | +| XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | XSS.cs:86:20:86:23 | access to local variable name : String | provenance | | +| XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | XSS.cs:86:27:86:61 | access to indexer : String | provenance | MaD:6 | +| XSS.cs:86:27:86:61 | access to indexer : String | XSS.cs:86:20:86:23 | access to local variable name : String | provenance | | +| XSS.cs:95:20:95:23 | access to local variable name : String | XSS.cs:96:31:96:34 | access to local variable name | provenance | Sink:MaD:1 | +| XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | XSS.cs:95:20:95:23 | access to local variable name : String | provenance | | +| XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | XSS.cs:95:27:95:61 | access to indexer : String | provenance | MaD:6 | +| XSS.cs:95:27:95:61 | access to indexer : String | XSS.cs:95:20:95:23 | access to local variable name : String | provenance | | +| XSS.cs:106:20:106:23 | access to local variable html : String | XSS.cs:107:48:107:51 | access to local variable html | provenance | | +| XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | XSS.cs:106:20:106:23 | access to local variable html : String | provenance | | +| XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | XSS.cs:106:27:106:61 | access to indexer : String | provenance | MaD:6 | +| XSS.cs:106:27:106:61 | access to indexer : String | XSS.cs:106:20:106:23 | access to local variable html : String | provenance | | | script.aspx:12:1:12:14 | <%= ... %> | script.aspx:12:1:12:14 | <%= ... %> | provenance | | | script.aspx:16:1:16:34 | <%= ... %> | script.aspx:16:1:16:34 | <%= ... %> | provenance | | | script.aspx:20:1:20:41 | <%= ... %> | script.aspx:20:1:20:41 | <%= ... %> | provenance | | @@ -56,40 +61,44 @@ models | 5 | Sink: System.Web; HttpResponse; false; Write; ; ; Argument[0]; html-injection; manual | | 6 | Summary: System.Collections.Specialized; NameValueCollection; false; get_Item; (System.String); ; Argument[this]; ReturnValue; taint; df-generated | nodes -| XSS.cs:25:13:25:21 | [post] access to local variable userInput : StringBuilder | semmle.label | [post] access to local variable userInput : StringBuilder | -| XSS.cs:25:48:25:62 | access to field categoryTextBox : TextBox | semmle.label | access to field categoryTextBox : TextBox | -| XSS.cs:25:48:25:67 | access to property Text : String | semmle.label | access to property Text : String | -| XSS.cs:26:32:26:40 | access to local variable userInput : StringBuilder | semmle.label | access to local variable userInput : StringBuilder | -| XSS.cs:26:32:26:51 | call to method ToString | semmle.label | call to method ToString | -| XSS.cs:27:29:27:37 | access to local variable userInput : StringBuilder | semmle.label | access to local variable userInput : StringBuilder | -| XSS.cs:27:29:27:48 | call to method ToString | semmle.label | call to method ToString | -| XSS.cs:28:26:28:34 | access to local variable userInput : StringBuilder | semmle.label | access to local variable userInput : StringBuilder | -| XSS.cs:28:26:28:45 | call to method ToString | semmle.label | call to method ToString | -| XSS.cs:37:20:37:23 | access to local variable name : String | semmle.label | access to local variable name : String | -| XSS.cs:37:27:37:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XSS.cs:37:27:37:61 | access to indexer : String | semmle.label | access to indexer : String | -| XSS.cs:38:36:38:39 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:57:20:57:23 | access to local variable name : String | semmle.label | access to local variable name : String | -| XSS.cs:57:27:57:65 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XSS.cs:57:27:57:73 | access to indexer : String | semmle.label | access to indexer : String | -| XSS.cs:59:22:59:25 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:75:20:75:23 | access to local variable name : String | semmle.label | access to local variable name : String | -| XSS.cs:75:27:75:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XSS.cs:75:27:75:61 | access to indexer : String | semmle.label | access to indexer : String | -| XSS.cs:76:36:76:39 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:78:20:78:24 | access to local variable name2 : String | semmle.label | access to local variable name2 : String | -| XSS.cs:78:28:78:42 | access to property Request : HttpRequestBase | semmle.label | access to property Request : HttpRequestBase | -| XSS.cs:79:36:79:40 | access to local variable name2 | semmle.label | access to local variable name2 | -| XSS.cs:85:20:85:23 | access to local variable name : String | semmle.label | access to local variable name : String | -| XSS.cs:85:27:85:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XSS.cs:85:27:85:61 | access to indexer : String | semmle.label | access to indexer : String | -| XSS.cs:86:28:86:31 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:87:31:87:34 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:94:20:94:23 | access to local variable name : String | semmle.label | access to local variable name : String | -| XSS.cs:94:27:94:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XSS.cs:94:27:94:61 | access to indexer : String | semmle.label | access to indexer : String | -| XSS.cs:95:31:95:34 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:135:20:135:33 | access to property RawUrl | semmle.label | access to property RawUrl | +| XSS.cs:26:13:26:21 | [post] access to local variable userInput : StringBuilder | semmle.label | [post] access to local variable userInput : StringBuilder | +| XSS.cs:26:48:26:62 | access to field categoryTextBox : TextBox | semmle.label | access to field categoryTextBox : TextBox | +| XSS.cs:26:48:26:67 | access to property Text : String | semmle.label | access to property Text : String | +| XSS.cs:27:32:27:40 | access to local variable userInput : StringBuilder | semmle.label | access to local variable userInput : StringBuilder | +| XSS.cs:27:32:27:51 | call to method ToString | semmle.label | call to method ToString | +| XSS.cs:28:29:28:37 | access to local variable userInput : StringBuilder | semmle.label | access to local variable userInput : StringBuilder | +| XSS.cs:28:29:28:48 | call to method ToString | semmle.label | call to method ToString | +| XSS.cs:29:26:29:34 | access to local variable userInput : StringBuilder | semmle.label | access to local variable userInput : StringBuilder | +| XSS.cs:29:26:29:45 | call to method ToString | semmle.label | call to method ToString | +| XSS.cs:38:20:38:23 | access to local variable name : String | semmle.label | access to local variable name : String | +| XSS.cs:38:27:38:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XSS.cs:38:27:38:61 | access to indexer : String | semmle.label | access to indexer : String | +| XSS.cs:39:36:39:39 | access to local variable name | semmle.label | access to local variable name | +| XSS.cs:58:20:58:23 | access to local variable name : String | semmle.label | access to local variable name : String | +| XSS.cs:58:27:58:65 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XSS.cs:58:27:58:73 | access to indexer : String | semmle.label | access to indexer : String | +| XSS.cs:60:22:60:25 | access to local variable name | semmle.label | access to local variable name | +| XSS.cs:76:20:76:23 | access to local variable name : String | semmle.label | access to local variable name : String | +| XSS.cs:76:27:76:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XSS.cs:76:27:76:61 | access to indexer : String | semmle.label | access to indexer : String | +| XSS.cs:77:36:77:39 | access to local variable name | semmle.label | access to local variable name | +| XSS.cs:79:20:79:24 | access to local variable name2 : String | semmle.label | access to local variable name2 : String | +| XSS.cs:79:28:79:42 | access to property Request : HttpRequestBase | semmle.label | access to property Request : HttpRequestBase | +| XSS.cs:80:36:80:40 | access to local variable name2 | semmle.label | access to local variable name2 | +| XSS.cs:86:20:86:23 | access to local variable name : String | semmle.label | access to local variable name : String | +| XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XSS.cs:86:27:86:61 | access to indexer : String | semmle.label | access to indexer : String | +| XSS.cs:87:28:87:31 | access to local variable name | semmle.label | access to local variable name | +| XSS.cs:88:31:88:34 | access to local variable name | semmle.label | access to local variable name | +| XSS.cs:95:20:95:23 | access to local variable name : String | semmle.label | access to local variable name : String | +| XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XSS.cs:95:27:95:61 | access to indexer : String | semmle.label | access to indexer : String | +| XSS.cs:96:31:96:34 | access to local variable name | semmle.label | access to local variable name | +| XSS.cs:106:20:106:23 | access to local variable html : String | semmle.label | access to local variable html : String | +| XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XSS.cs:106:27:106:61 | access to indexer : String | semmle.label | access to indexer : String | +| XSS.cs:107:48:107:51 | access to local variable html | semmle.label | access to local variable html | +| XSS.cs:140:20:140:33 | access to property RawUrl | semmle.label | access to property RawUrl | | script.aspx:12:1:12:14 | <%= ... %> | semmle.label | <%= ... %> | | script.aspx:16:1:16:34 | <%= ... %> | semmle.label | <%= ... %> | | script.aspx:20:1:20:41 | <%= ... %> | semmle.label | <%= ... %> | From d00e27916d8757a328b539c3ce56164aefbd06c8 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 25 Sep 2024 13:46:22 +0200 Subject: [PATCH 132/162] C#: No longer consider attribute collections as HTML sinks. --- .../semmle/code/csharp/security/dataflow/flowsinks/Html.qll | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll index 6889d6c5b896..8075ab9708ff 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll @@ -56,13 +56,11 @@ class HtmlTextWriterSink extends HtmlSink { } /** - * An expression that is used as an argument to an HTML sink method on - * `AttributeCollection`. + * DEPRECATED: Attribute collections are no longer considered HTML sinks. */ -class AttributeCollectionSink extends HtmlSink { +deprecated class AttributeCollectionSink extends DataFlow::ExprNode { AttributeCollectionSink() { exists(SystemWebUIAttributeCollectionClass ac, Parameter p | - p = ac.getAddMethod().getParameter(1) or p = ac.getItemProperty().getSetter().getParameter(0) | this.getExpr() = p.getAnAssignedArgument() From e89a47f2f52336d8459b222bdffd36f2e7d37119 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 25 Sep 2024 13:46:40 +0200 Subject: [PATCH 133/162] C#: Update XSS expected test output. --- .../Security Features/CWE-079/XSSAsp/XSS.expected | 9 --------- 1 file changed, 9 deletions(-) diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected index b3d93321c1f9..c158c599b548 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.expected @@ -9,7 +9,6 @@ | XSS.cs:87:28:87:31 | access to local variable name | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | XSS.cs:87:28:87:31 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | User-provided value | | XSS.cs:88:31:88:34 | access to local variable name | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | XSS.cs:88:31:88:34 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:86:27:86:53 | access to property QueryString : NameValueCollection | User-provided value | | XSS.cs:96:31:96:34 | access to local variable name | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | XSS.cs:96:31:96:34 | access to local variable name | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | User-provided value | -| XSS.cs:107:48:107:51 | access to local variable html | XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | XSS.cs:107:48:107:51 | access to local variable html | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | User-provided value | | XSS.cs:140:20:140:33 | access to property RawUrl | XSS.cs:140:20:140:33 | access to property RawUrl | XSS.cs:140:20:140:33 | access to property RawUrl | $@ flows to here and is written to HTML or JavaScript. | XSS.cs:140:20:140:33 | access to property RawUrl | User-provided value | | script.aspx:12:1:12:14 | <%= ... %> | script.aspx:12:1:12:14 | <%= ... %> | script.aspx:12:1:12:14 | <%= ... %> | $@ flows to here and is a remote source accessed inline in an ASPX page. | script.aspx:12:1:12:14 | <%= ... %> | User-provided value | | script.aspx:16:1:16:34 | <%= ... %> | script.aspx:16:1:16:34 | <%= ... %> | script.aspx:16:1:16:34 | <%= ... %> | $@ flows to here and is a remote source accessed inline in an ASPX page. | script.aspx:16:1:16:34 | <%= ... %> | User-provided value | @@ -46,10 +45,6 @@ edges | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | XSS.cs:95:20:95:23 | access to local variable name : String | provenance | | | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | XSS.cs:95:27:95:61 | access to indexer : String | provenance | MaD:6 | | XSS.cs:95:27:95:61 | access to indexer : String | XSS.cs:95:20:95:23 | access to local variable name : String | provenance | | -| XSS.cs:106:20:106:23 | access to local variable html : String | XSS.cs:107:48:107:51 | access to local variable html | provenance | | -| XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | XSS.cs:106:20:106:23 | access to local variable html : String | provenance | | -| XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | XSS.cs:106:27:106:61 | access to indexer : String | provenance | MaD:6 | -| XSS.cs:106:27:106:61 | access to indexer : String | XSS.cs:106:20:106:23 | access to local variable html : String | provenance | | | script.aspx:12:1:12:14 | <%= ... %> | script.aspx:12:1:12:14 | <%= ... %> | provenance | | | script.aspx:16:1:16:34 | <%= ... %> | script.aspx:16:1:16:34 | <%= ... %> | provenance | | | script.aspx:20:1:20:41 | <%= ... %> | script.aspx:20:1:20:41 | <%= ... %> | provenance | | @@ -94,10 +89,6 @@ nodes | XSS.cs:95:27:95:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | | XSS.cs:95:27:95:61 | access to indexer : String | semmle.label | access to indexer : String | | XSS.cs:96:31:96:34 | access to local variable name | semmle.label | access to local variable name | -| XSS.cs:106:20:106:23 | access to local variable html : String | semmle.label | access to local variable html : String | -| XSS.cs:106:27:106:53 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XSS.cs:106:27:106:61 | access to indexer : String | semmle.label | access to indexer : String | -| XSS.cs:107:48:107:51 | access to local variable html | semmle.label | access to local variable html | | XSS.cs:140:20:140:33 | access to property RawUrl | semmle.label | access to property RawUrl | | script.aspx:12:1:12:14 | <%= ... %> | semmle.label | <%= ... %> | | script.aspx:16:1:16:34 | <%= ... %> | semmle.label | <%= ... %> | From af80797eda316966264a8a063ae82ff007a05025 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 25 Sep 2024 13:50:06 +0200 Subject: [PATCH 134/162] C#: Add change note. --- .../src/change-notes/2024-09-25-attribute-collection-sink.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md diff --git a/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md b/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md new file mode 100644 index 000000000000..2c348f5ce4e7 --- /dev/null +++ b/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C#: The indexer and `Add` method on `System.Web.UI.AttributeCollection` is no longer considered a HTML sink. From 79620c1a890f77aa4b72561d6d123c959c83d9d7 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 25 Sep 2024 14:18:44 +0200 Subject: [PATCH 135/162] Address review comment --- .../codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index 6e5ef7a7a4ed..41a47f172c65 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -73,7 +73,7 @@ class BecomeExprTree extends StandardPostOrderTree instanceof BecomeExpr { } class BinaryOpExprTree extends StandardPostOrderTree instanceof BinaryExpr { - BinaryOpExprTree() { not this instanceof LogicalOrExpr and not this instanceof LogicalAndExpr } + BinaryOpExprTree() { not this instanceof BinaryLogicalOperation } override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getLhs() From 53e33d3ef39e790f4659ee2b5f2df2c963606768 Mon Sep 17 00:00:00 2001 From: Felicity Chapman Date: Wed, 25 Sep 2024 14:28:09 +0100 Subject: [PATCH 136/162] Fix link to change logs on landing page --- docs/codeql/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/index.html b/docs/codeql/index.html index d1e91bc89e32..de47832a997c 100644 --- a/docs/codeql/index.html +++ b/docs/codeql/index.html @@ -88,7 +88,7 @@

    latest release of CodeQL...
    - +
    Change logs
    Read about the improvements to the queries, libraries, and tooling in each release...
    From e8c68fff7fb3f1fd2f489a08d40500e498dbea2e Mon Sep 17 00:00:00 2001 From: Sid Gawri Date: Wed, 25 Sep 2024 10:01:59 -0400 Subject: [PATCH 137/162] resolve id conflict with dom based xss test ql --- .../Security/CWE-079/DomBasedXss/XssWithAdditionalSources.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.ql b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.ql index 9a27e9db4d41..df9c43e3b5b4 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.ql @@ -5,7 +5,7 @@ * @kind path-problem * @problem.severity error * @precision high - * @id js/xss + * @id js/xss-additional-sources-dom-test * @tags security * external/cwe/cwe-079 * external/cwe/cwe-116 From a8cad4963ec95ce4b090ac8526d3f4b7d9ce39d5 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 20 Sep 2024 14:36:08 +0100 Subject: [PATCH 138/162] Kotlin: 2.1.0 is supported --- docs/codeql/reusables/supported-versions-compilers.rst | 2 +- .../diagnostics/kotlin-version-too-new/diagnostics.expected | 2 +- java/ql/lib/change-notes/2024-09-20-kotlin-2.1.0.md | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 java/ql/lib/change-notes/2024-09-20-kotlin-2.1.0.md diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst index 4b941c7d17fc..d9869c35100b 100644 --- a/docs/codeql/reusables/supported-versions-compilers.rst +++ b/docs/codeql/reusables/supported-versions-compilers.rst @@ -20,7 +20,7 @@ Java,"Java 7 to 22 [5]_","javac (OpenJDK and Oracle JDK), Eclipse compiler for Java (ECJ) [6]_",``.java`` - Kotlin,"Kotlin 1.5.0 to 2.0.2\ *x*","kotlinc",``.kt`` + Kotlin,"Kotlin 1.5.0 to 2.1.0\ *x*","kotlinc",``.kt`` JavaScript,ECMAScript 2022 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhtm``, ``.xhtml``, ``.vue``, ``.hbs``, ``.ejs``, ``.njk``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [7]_" Python [8]_,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12",Not applicable,``.py`` Ruby [9]_,"up to 3.3",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``" diff --git a/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected index 4f7b421d600c..401eaa6ee9d1 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.0.30.", + "markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.1.10.", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/lib/change-notes/2024-09-20-kotlin-2.1.0.md b/java/ql/lib/change-notes/2024-09-20-kotlin-2.1.0.md new file mode 100644 index 000000000000..f9b19e63d320 --- /dev/null +++ b/java/ql/lib/change-notes/2024-09-20-kotlin-2.1.0.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Kotlin versions up to 2.1.0\ *x* are now supported. From f193084f9fb08255cc479159887655cd3042d43a Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 23 Sep 2024 17:42:50 +0100 Subject: [PATCH 139/162] Kotlin: Add 2.1.0-Beta1 jars --- java/kotlin-extractor/deps/kotlin-compiler-2.1.0-Beta1.jar | 3 +++ .../deps/kotlin-compiler-embeddable-2.1.0-Beta1.jar | 3 +++ java/kotlin-extractor/deps/kotlin-stdlib-2.1.0-Beta1.jar | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 java/kotlin-extractor/deps/kotlin-compiler-2.1.0-Beta1.jar create mode 100644 java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.1.0-Beta1.jar create mode 100644 java/kotlin-extractor/deps/kotlin-stdlib-2.1.0-Beta1.jar diff --git a/java/kotlin-extractor/deps/kotlin-compiler-2.1.0-Beta1.jar b/java/kotlin-extractor/deps/kotlin-compiler-2.1.0-Beta1.jar new file mode 100644 index 000000000000..6d94bcd231b9 --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-compiler-2.1.0-Beta1.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ec66b3523c69b3436b8c9777707db4da86d680d6652aeda539fff7d5a84aeab +size 59837198 diff --git a/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.1.0-Beta1.jar b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.1.0-Beta1.jar new file mode 100644 index 000000000000..b3abb08ad6e9 --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.1.0-Beta1.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b4581ffe576a33322fe51435a1b5ea4f4717bb6f7ce18b68106df63056e385c +size 58409745 diff --git a/java/kotlin-extractor/deps/kotlin-stdlib-2.1.0-Beta1.jar b/java/kotlin-extractor/deps/kotlin-stdlib-2.1.0-Beta1.jar new file mode 100644 index 000000000000..b517f360e216 --- /dev/null +++ b/java/kotlin-extractor/deps/kotlin-stdlib-2.1.0-Beta1.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ef9c5c246cd2e7d06cd5741995753c0b697107efae40657af3010c6c6311ab2 +size 1688722 From 5a03c35e9c91c0d9f9858a906284ea6da3f98ced Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 23 Sep 2024 17:44:44 +0100 Subject: [PATCH 140/162] Kotlin: Add 2.1.0-Beta1 --- MODULE.bazel | 3 +++ java/kotlin-extractor/versions.bzl | 1 + 2 files changed, 4 insertions(+) diff --git a/MODULE.bazel b/MODULE.bazel index d1ff8b0b8d2a..38f182d14bac 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -128,6 +128,7 @@ use_repo( "kotlin-compiler-1.9.20-Beta", "kotlin-compiler-2.0.0-RC1", "kotlin-compiler-2.0.20-Beta2", + "kotlin-compiler-2.1.0-Beta1", "kotlin-compiler-embeddable-1.5.0", "kotlin-compiler-embeddable-1.5.10", "kotlin-compiler-embeddable-1.5.20", @@ -141,6 +142,7 @@ use_repo( "kotlin-compiler-embeddable-1.9.20-Beta", "kotlin-compiler-embeddable-2.0.0-RC1", "kotlin-compiler-embeddable-2.0.20-Beta2", + "kotlin-compiler-embeddable-2.1.0-Beta1", "kotlin-stdlib-1.5.0", "kotlin-stdlib-1.5.10", "kotlin-stdlib-1.5.20", @@ -154,6 +156,7 @@ use_repo( "kotlin-stdlib-1.9.20-Beta", "kotlin-stdlib-2.0.0-RC1", "kotlin-stdlib-2.0.20-Beta2", + "kotlin-stdlib-2.1.0-Beta1", ) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") diff --git a/java/kotlin-extractor/versions.bzl b/java/kotlin-extractor/versions.bzl index e124d6e150a7..aecb170b6304 100644 --- a/java/kotlin-extractor/versions.bzl +++ b/java/kotlin-extractor/versions.bzl @@ -13,6 +13,7 @@ VERSIONS = [ "1.9.20-Beta", "2.0.0-RC1", "2.0.20-Beta2", + "2.1.0-Beta1", ] def _version_to_tuple(v): From a6fce19b0c2be78a24fae1e57b40108decce8e50 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 23 Sep 2024 19:11:16 +0100 Subject: [PATCH 141/162] Kotlin: Fix build with 2.1.0-Beta1 --- .../src/main/kotlin/KotlinFileExtractor.kt | 35 ++++--------------- .../src/main/kotlin/KotlinUsesExtractor.kt | 12 ++++--- .../src/main/kotlin/MetaAnnotationSupport.kt | 8 +---- .../src/main/kotlin/utils/JvmNames.kt | 4 +-- .../src/main/kotlin/utils/TypeSubstitution.kt | 2 +- .../utils/versions/v_1_5_0/CodeQLIrConst.kt | 5 +++ .../utils/versions/v_1_5_0/CodeQLIsRoot.kt | 5 +++ .../kotlin/utils/versions/v_1_5_0/Types.kt | 2 +- .../kotlin/utils/versions/v_1_6_20/Types.kt | 2 +- .../versions/v_2_1_0-Beta1/CodeQLIrConst.kt | 5 +++ .../versions/v_2_1_0-Beta1/CodeQLIsRoot.kt | 5 +++ 11 files changed, 39 insertions(+), 46 deletions(-) create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIrConst.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIsRoot.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIrConst.kt create mode 100644 java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIsRoot.kt diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 4b61447824de..e0b020b56734 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -27,30 +27,7 @@ import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection -import org.jetbrains.kotlin.ir.util.companionObject -import org.jetbrains.kotlin.ir.util.constructors -import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable -import org.jetbrains.kotlin.ir.util.hasAnnotation -import org.jetbrains.kotlin.ir.util.hasInterfaceParent -import org.jetbrains.kotlin.ir.util.isAnnotationClass -import org.jetbrains.kotlin.ir.util.isAnonymousObject -import org.jetbrains.kotlin.ir.util.isFakeOverride -import org.jetbrains.kotlin.ir.util.isFunctionOrKFunction -import org.jetbrains.kotlin.ir.util.isInterface -import org.jetbrains.kotlin.ir.util.isLocal -import org.jetbrains.kotlin.ir.util.isNonCompanionObject -import org.jetbrains.kotlin.ir.util.isObject -import org.jetbrains.kotlin.ir.util.isSuspend -import org.jetbrains.kotlin.ir.util.isSuspendFunctionOrKFunction -import org.jetbrains.kotlin.ir.util.isVararg -import org.jetbrains.kotlin.ir.util.kotlinFqName -import org.jetbrains.kotlin.ir.util.packageFqName -import org.jetbrains.kotlin.ir.util.parentAsClass -import org.jetbrains.kotlin.ir.util.parentClassOrNull -import org.jetbrains.kotlin.ir.util.parents -import org.jetbrains.kotlin.ir.util.primaryConstructor -import org.jetbrains.kotlin.ir.util.render -import org.jetbrains.kotlin.ir.util.target +import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.load.java.JvmAnnotationNames import org.jetbrains.kotlin.load.java.NOT_NULL_ANNOTATIONS import org.jetbrains.kotlin.load.java.NULLABLE_ANNOTATIONS @@ -826,7 +803,7 @@ open class KotlinFileExtractor( fun exprId() = tw.getLabelFor("@\"annotationExpr;{$parent};$idx\"") return when (v) { - is IrConst<*> -> { + is CodeQLIrConst<*> -> { extractConstant(v, parent, idx, null, null, overrideId = exprId()) } is IrGetEnumValue -> { @@ -5998,7 +5975,7 @@ open class KotlinFileExtractor( extractExpressionExpr(a, callable, id, i, exprParent.enclosingStmt) } } - is IrConst<*> -> { + is CodeQLIrConst<*> -> { val exprParent = parent.expr(e, callable) extractConstant( e, @@ -6210,9 +6187,9 @@ open class KotlinFileExtractor( if ( (isAndAnd || isOrOr) && e.branches.size == 2 && - (e.branches[1].condition as? IrConst<*>)?.value == true && + (e.branches[1].condition as? CodeQLIrConst<*>)?.value == true && (e.branches[if (e.origin == IrStatementOrigin.ANDAND) 1 else 0].result - as? IrConst<*>) + as? CodeQLIrConst<*>) ?.value == isOrOr ) { @@ -6868,7 +6845,7 @@ open class KotlinFileExtractor( } private fun extractConstant( - e: IrConst<*>, + e: CodeQLIrConst<*>, parent: Label, idx: Int, enclosingCallable: Label?, diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index a1c247340640..03b74db19fac 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -5,7 +5,7 @@ import com.github.codeql.utils.versions.* import com.semmle.extractor.java.OdasaOutput import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.backend.common.ir.* -import org.jetbrains.kotlin.backend.jvm.ir.propertyIfAccessor +import org.jetbrains.kotlin.backend.jvm.ir.* import org.jetbrains.kotlin.codegen.JvmCodegenUtil import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.load.kotlin.getJvmModuleNameForDeserializedDescripto import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.NameUtils import org.jetbrains.kotlin.name.SpecialNames +import org.jetbrains.kotlin.resolve.descriptorUtil.propertyIfAccessor import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.util.OperatorNameConventions @@ -84,7 +85,7 @@ open class KotlinUsesExtractor( } private fun extractFileClass(fqName: FqName): Label { - val pkg = if (fqName.isRoot()) "" else fqName.parent().asString() + val pkg = if (fqName.codeQlIsRoot()) "" else fqName.parent().asString() val jvmName = fqName.shortName().asString() return extractFileClass(pkg, jvmName) } @@ -906,7 +907,7 @@ open class KotlinUsesExtractor( return arrayInfo.componentTypeResults } owner is IrClass -> { - val args = if (s.isRawType()) null else s.arguments + val args = if (s.codeQlIsRawType()) null else s.arguments return useSimpleTypeClass(owner, args, s.isNullable()) } @@ -1232,9 +1233,10 @@ open class KotlinUsesExtractor( // false if it has `@JvmSuppressWildcards(false)`, // and null if the annotation is not present. @Suppress("UNCHECKED_CAST") - private fun getWildcardSuppressionDirective(t: IrAnnotationContainer) = + private fun getWildcardSuppressionDirective(t: IrAnnotationContainer): Boolean? = t.getAnnotation(jvmWildcardSuppressionAnnotation)?.let { - (it.getValueArgument(0) as? IrConst)?.value ?: true + @Suppress("USELESS_CAST") // `as? Boolean` is not needed for Kotlin < 2.1 + (it.getValueArgument(0) as? CodeQLIrConst)?.value as? Boolean ?: true } private fun addJavaLoweringArgumentWildcards( diff --git a/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt b/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt index 2dc7382bf166..e591eed3eca6 100644 --- a/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt +++ b/java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt @@ -27,13 +27,7 @@ import org.jetbrains.kotlin.ir.expressions.IrClassReference import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrGetEnumValue import org.jetbrains.kotlin.ir.expressions.IrVararg -import org.jetbrains.kotlin.ir.expressions.impl.IrClassReferenceImpl -import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl -import org.jetbrains.kotlin.ir.expressions.impl.IrGetEnumValueImpl -import org.jetbrains.kotlin.ir.expressions.impl.IrGetFieldImpl -import org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl -import org.jetbrains.kotlin.ir.expressions.impl.IrReturnImpl -import org.jetbrains.kotlin.ir.expressions.impl.IrVarargImpl +import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.types.typeWith import org.jetbrains.kotlin.ir.util.constructedClass diff --git a/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt b/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt index b6b51fde5430..ec7c17b39fc6 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt @@ -1,12 +1,12 @@ package com.github.codeql.utils import com.github.codeql.utils.versions.allOverriddenIncludingSelf +import com.github.codeql.utils.versions.CodeQLIrConst import org.jetbrains.kotlin.builtins.StandardNames import org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.expressions.IrConst import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable @@ -82,7 +82,7 @@ fun getJvmName(container: IrAnnotationContainer): String? { if (owner is IrClass) { val aPkg = owner.packageFqName?.asString() val name = owner.name.asString() - if (aPkg == "kotlin.jvm" && name == "JvmName" && v is IrConst<*>) { + if (aPkg == "kotlin.jvm" && name == "JvmName" && v is CodeQLIrConst<*>) { val value = v.value if (value is String) { return value diff --git a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt index 91cd5ec9f13d..6f8d0d33f373 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt @@ -15,7 +15,7 @@ import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl +import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol import org.jetbrains.kotlin.ir.symbols.impl.DescriptorlessExternalPackageFragmentSymbol import org.jetbrains.kotlin.ir.types.* diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIrConst.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIrConst.kt new file mode 100644 index 000000000000..0f8f6bda71ae --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIrConst.kt @@ -0,0 +1,5 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.expressions.IrConst + +typealias CodeQLIrConst = IrConst diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIsRoot.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIsRoot.kt new file mode 100644 index 000000000000..bf523ca88215 --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/CodeQLIsRoot.kt @@ -0,0 +1,5 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.name.FqName + +fun FqName.codeQlIsRoot() = this.isRoot() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/Types.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/Types.kt index 630d649907ca..61a580e2a279 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/Types.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_5_0/Types.kt @@ -3,4 +3,4 @@ package com.github.codeql.utils.versions import org.jetbrains.kotlin.backend.jvm.codegen.isRawType import org.jetbrains.kotlin.ir.types.IrSimpleType -fun IrSimpleType.isRawType() = this.isRawType() +fun IrSimpleType.codeQlIsRawType() = this.isRawType() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt index d44e44074005..7db5d520b29f 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_6_20/Types.kt @@ -3,4 +3,4 @@ package com.github.codeql.utils.versions import org.jetbrains.kotlin.backend.jvm.ir.isRawType import org.jetbrains.kotlin.ir.types.IrSimpleType -fun IrSimpleType.isRawType() = this.isRawType() +fun IrSimpleType.codeQlIsRawType() = this.isRawType() diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIrConst.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIrConst.kt new file mode 100644 index 000000000000..60ff588cd97f --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIrConst.kt @@ -0,0 +1,5 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.ir.expressions.IrConst + +typealias CodeQLIrConst = IrConst diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIsRoot.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIsRoot.kt new file mode 100644 index 000000000000..e8eff805f21a --- /dev/null +++ b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_1_0-Beta1/CodeQLIsRoot.kt @@ -0,0 +1,5 @@ +package com.github.codeql.utils.versions + +import org.jetbrains.kotlin.name.FqName + +fun FqName.codeQlIsRoot() = this.isRoot From 8f1c1a83999cf37a8490c2e02f15fdcb5a14a41f Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:33:21 +0100 Subject: [PATCH 142/162] Revert "Rust: remove queries that no longer work" This reverts commit e19bca0de8e31a2ba39ab449c1bd154b9d354b46. --- .../diagnostics/UnextractedElements.ql | 61 +++++++++++++++++++ .../diagnostics/UnextractedElements.expected | 16 +++++ .../diagnostics/UnextractedElements.qlref | 1 + 3 files changed, 78 insertions(+) create mode 100644 rust/ql/src/queries/diagnostics/UnextractedElements.ql create mode 100644 rust/ql/test/query-tests/diagnostics/UnextractedElements.expected create mode 100644 rust/ql/test/query-tests/diagnostics/UnextractedElements.qlref diff --git a/rust/ql/src/queries/diagnostics/UnextractedElements.ql b/rust/ql/src/queries/diagnostics/UnextractedElements.ql new file mode 100644 index 000000000000..ae368aac677f --- /dev/null +++ b/rust/ql/src/queries/diagnostics/UnextractedElements.ql @@ -0,0 +1,61 @@ +/** + * @name Unextracted Elements + * @description List all elements that weren't extracted due to unimplemented features or parse errors. + * @id rust/diagnostics/unextracted-elements + */ + +import rust + +/** + * Gets a location for an `Unimplemented` node. + */ +Location getUnimplementedLocation(Unimplemented node) { + result = node.(Locatable).getLocation() + or + not node instanceof Locatable and + result instanceof EmptyLocation +} + +/** + * Gets `l.toString()`, but with any locations outside of the source location prefix cleaned up. + */ +bindingset[l] +string cleanLocationString(Location l) { + if exists(l.getFile().getRelativePath()) or l instanceof EmptyLocation + then result = l.toString() + else l.getFile().getParentContainer().getAbsolutePath() + result = l.toString() // remove the directory from the string +} + +/** + * Gets a string along the lines of " (x2)", corresponding to the number `i`. For `i = 1`, the result is the empty string. + */ +bindingset[i] +string multipleString(int i) { + i = 1 and result = "" + or + i > 1 and result = " (x" + i.toString() + ")" +} + +query predicate listUnimplemented(string location, string msg) { + // something that is not extracted yet + exists(int c | + c = strictcount(Unimplemented n | cleanLocationString(getUnimplementedLocation(n)) = location) and + msg = "Not yet implemented" + multipleString(c) + "." + ) +} + +query predicate listMissingExpr(string location, string msg) { + // gaps in the AST due to parse errors + exists(int c | + c = strictcount(MissingExpr e | cleanLocationString(e.getLocation()) = location) and + msg = "Missing expression" + multipleString(c) + "." + ) +} + +query predicate listMissingPat(string location, string msg) { + // gaps in the AST due to parse errors + exists(int c | + c = strictcount(MissingPat p | cleanLocationString(p.getLocation()) = location) and + msg = "Missing pattern" + multipleString(c) + "." + ) +} diff --git a/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected b/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected new file mode 100644 index 000000000000..5ed70660c2b4 --- /dev/null +++ b/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected @@ -0,0 +1,16 @@ +listUnimplemented +| @0:0:0:0 | Not yet implemented (x14). | +| does_not_compile.rs@2:2:2:5 | Not yet implemented. | +| does_not_compile.rs@2:7:2:8 | Not yet implemented. | +| does_not_compile.rs@2:10:2:12 | Not yet implemented. | +| does_not_compile.rs@2:14:2:20 | Not yet implemented. | +| does_not_compile.rs@2:22:2:25 | Not yet implemented. | +| does_not_compile.rs@2:27:2:30 | Not yet implemented. | +| main.rs@16:5:16:22 | Not yet implemented. | +| main.rs@17:5:17:21 | Not yet implemented. | +| my_struct.rs@2:1:13:1 | Not yet implemented. | +| my_struct.rs@24:9:27:9 | Not yet implemented. | +| my_struct.rs@25:19:25:30 | Not yet implemented. | +| my_struct.rs@29:5:29:5 | Not yet implemented. | +listMissingExpr +listMissingPat diff --git a/rust/ql/test/query-tests/diagnostics/UnextractedElements.qlref b/rust/ql/test/query-tests/diagnostics/UnextractedElements.qlref new file mode 100644 index 000000000000..e02770f843d7 --- /dev/null +++ b/rust/ql/test/query-tests/diagnostics/UnextractedElements.qlref @@ -0,0 +1 @@ +queries/diagnostics/UnextractedElements.ql From ce2d959b7ecc472b77e0cfe2c4b38a499f961ed4 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 25 Sep 2024 15:23:51 +0200 Subject: [PATCH 143/162] Shared: Add CFG consistency check for scopes with missing entry points --- shared/controlflow/codeql/controlflow/Cfg.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/controlflow/codeql/controlflow/Cfg.qll b/shared/controlflow/codeql/controlflow/Cfg.qll index aa7a072e4cbb..7f1eb54b2b02 100644 --- a/shared/controlflow/codeql/controlflow/Cfg.qll +++ b/shared/controlflow/codeql/controlflow/Cfg.qll @@ -1387,9 +1387,13 @@ module Make Input> { strictcount(sk.getListOrder()) > 1 } + /** Holds if `n` has multiple textual representations. */ query predicate multipleToString(Node n, string s) { s = strictconcat(n.toString(), ",") and strictcount(n.toString()) > 1 } + + /** Holds if CFG scope `scope` lacks an initial AST node. */ + query predicate scopeNoFirst(CfgScope scope) { not scopeFirst(scope, _) } } } From 1bd504bf61d19139b5917ff2cf96e1b3a002eb0e Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 25 Sep 2024 16:43:15 +0200 Subject: [PATCH 144/162] C#: Restrict `CfgScope` --- .../controlflow/internal/ControlFlowGraphImpl.qll | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll index b6efc78e55cf..74383240f5e3 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll @@ -15,11 +15,19 @@ class CfgScope extends Element, @top_level_exprorstmt_parent { CfgScope() { this.getFile().fromSource() and ( - this instanceof Callable + this = + any(Callable c | + c.(Constructor).hasInitializer() + or + InitializerSplitting::constructorInitializes(c, _) + or + c.hasBody() + ) or // For now, static initializer values have their own scope. Eventually, they // should be treated like instance initializers. - this.(Assignable).(Modifiable).isStatic() + this.(Assignable).(Modifiable).isStatic() and + expr_parent_top_level_adjusted2(_, _, this) ) } } From 1dcc6ac2b1d8d15f04c4826e480d085f7d66feb8 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 25 Sep 2024 17:06:19 +0200 Subject: [PATCH 145/162] C#: Address review comments. --- .../lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll | 1 + .../ql/src/change-notes/2024-09-25-attribute-collection-sink.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll index 8075ab9708ff..362a993e5321 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll @@ -61,6 +61,7 @@ class HtmlTextWriterSink extends HtmlSink { deprecated class AttributeCollectionSink extends DataFlow::ExprNode { AttributeCollectionSink() { exists(SystemWebUIAttributeCollectionClass ac, Parameter p | + p = ac.getAddMethod().getParameter(1) or p = ac.getItemProperty().getSetter().getParameter(0) | this.getExpr() = p.getAnAssignedArgument() diff --git a/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md b/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md index 2c348f5ce4e7..35e959f6f3db 100644 --- a/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md +++ b/csharp/ql/src/change-notes/2024-09-25-attribute-collection-sink.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* C#: The indexer and `Add` method on `System.Web.UI.AttributeCollection` is no longer considered a HTML sink. +* C#: The indexer and `Add` method on `System.Web.UI.AttributeCollection` is no longer considered an HTML sink. From bc83106dd829e47b7bd37be001da15d8f00963ea Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:11:31 +0100 Subject: [PATCH 146/162] Rust: Repair rust/diagnostics/unextracted-elements. --- .../diagnostics/UnextractedElements.ql | 51 +++---------------- .../diagnostics/UnextractedElements.expected | 16 ------ 2 files changed, 7 insertions(+), 60 deletions(-) diff --git a/rust/ql/src/queries/diagnostics/UnextractedElements.ql b/rust/ql/src/queries/diagnostics/UnextractedElements.ql index ae368aac677f..dccf7d2ab09f 100644 --- a/rust/ql/src/queries/diagnostics/UnextractedElements.ql +++ b/rust/ql/src/queries/diagnostics/UnextractedElements.ql @@ -7,27 +7,8 @@ import rust /** - * Gets a location for an `Unimplemented` node. - */ -Location getUnimplementedLocation(Unimplemented node) { - result = node.(Locatable).getLocation() - or - not node instanceof Locatable and - result instanceof EmptyLocation -} - -/** - * Gets `l.toString()`, but with any locations outside of the source location prefix cleaned up. - */ -bindingset[l] -string cleanLocationString(Location l) { - if exists(l.getFile().getRelativePath()) or l instanceof EmptyLocation - then result = l.toString() - else l.getFile().getParentContainer().getAbsolutePath() + result = l.toString() // remove the directory from the string -} - -/** - * Gets a string along the lines of " (x2)", corresponding to the number `i`. For `i = 1`, the result is the empty string. + * Gets a string along the lines of " (x2)", corresponding to the number `i`. + * For `i = 1`, the result is the empty string. */ bindingset[i] string multipleString(int i) { @@ -36,26 +17,8 @@ string multipleString(int i) { i > 1 and result = " (x" + i.toString() + ")" } -query predicate listUnimplemented(string location, string msg) { - // something that is not extracted yet - exists(int c | - c = strictcount(Unimplemented n | cleanLocationString(getUnimplementedLocation(n)) = location) and - msg = "Not yet implemented" + multipleString(c) + "." - ) -} - -query predicate listMissingExpr(string location, string msg) { - // gaps in the AST due to parse errors - exists(int c | - c = strictcount(MissingExpr e | cleanLocationString(e.getLocation()) = location) and - msg = "Missing expression" + multipleString(c) + "." - ) -} - -query predicate listMissingPat(string location, string msg) { - // gaps in the AST due to parse errors - exists(int c | - c = strictcount(MissingPat p | cleanLocationString(p.getLocation()) = location) and - msg = "Missing pattern" + multipleString(c) + "." - ) -} +from string name, int c +where c = strictcount(Unextracted e | e.toString() = name) +// we don't have locations, so just list the number of each type of +// `Unextracted` element. +select name + multipleString(c) diff --git a/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected b/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected index 5ed70660c2b4..e69de29bb2d1 100644 --- a/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected +++ b/rust/ql/test/query-tests/diagnostics/UnextractedElements.expected @@ -1,16 +0,0 @@ -listUnimplemented -| @0:0:0:0 | Not yet implemented (x14). | -| does_not_compile.rs@2:2:2:5 | Not yet implemented. | -| does_not_compile.rs@2:7:2:8 | Not yet implemented. | -| does_not_compile.rs@2:10:2:12 | Not yet implemented. | -| does_not_compile.rs@2:14:2:20 | Not yet implemented. | -| does_not_compile.rs@2:22:2:25 | Not yet implemented. | -| does_not_compile.rs@2:27:2:30 | Not yet implemented. | -| main.rs@16:5:16:22 | Not yet implemented. | -| main.rs@17:5:17:21 | Not yet implemented. | -| my_struct.rs@2:1:13:1 | Not yet implemented. | -| my_struct.rs@24:9:27:9 | Not yet implemented. | -| my_struct.rs@25:19:25:30 | Not yet implemented. | -| my_struct.rs@29:5:29:5 | Not yet implemented. | -listMissingExpr -listMissingPat From 2c9488e475c9ccd009044f8b272a9aca2b5f4243 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 25 Sep 2024 21:32:24 +0100 Subject: [PATCH 147/162] Add change note for Java 23 support --- java/ql/lib/change-notes/2024-09-25-java-23.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 java/ql/lib/change-notes/2024-09-25-java-23.md diff --git a/java/ql/lib/change-notes/2024-09-25-java-23.md b/java/ql/lib/change-notes/2024-09-25-java-23.md new file mode 100644 index 000000000000..1d3921665378 --- /dev/null +++ b/java/ql/lib/change-notes/2024-09-25-java-23.md @@ -0,0 +1,5 @@ +--- +category: feature +--- +* The Java extractor and QL libraries now support Java 23. +* From ba5be80814f09b4cc70f4f6a8c63d6d72853d889 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 25 Sep 2024 21:32:52 +0100 Subject: [PATCH 148/162] Typo --- java/ql/lib/change-notes/2024-09-25-java-23.md | 1 - 1 file changed, 1 deletion(-) diff --git a/java/ql/lib/change-notes/2024-09-25-java-23.md b/java/ql/lib/change-notes/2024-09-25-java-23.md index 1d3921665378..cc620c54d6e7 100644 --- a/java/ql/lib/change-notes/2024-09-25-java-23.md +++ b/java/ql/lib/change-notes/2024-09-25-java-23.md @@ -2,4 +2,3 @@ category: feature --- * The Java extractor and QL libraries now support Java 23. -* From 6a0212ea44ea840fa714b2bfd9e0714a25543f01 Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Thu, 26 Sep 2024 08:57:08 +0100 Subject: [PATCH 149/162] C++: Add regression test --- .../WrongNumberOfFormatArguments.expected | 3 +++ .../Format/WrongNumberOfFormatArguments/custom_printf.cpp | 3 +++ .../Format/WrongNumberOfFormatArguments/test.c | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected index d6897f1bdddb..8061b3015642 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected @@ -10,3 +10,6 @@ | test.c:15:2:15:7 | call to printf | Format for printf expects 3 arguments but given 2 | | test.c:19:2:19:7 | call to printf | Format for printf expects 2 arguments but given 1 | | test.c:29:3:29:8 | call to printf | Format for printf expects 2 arguments but given 1 | +| test.c:51:2:51:10 | call to my_logger | Format for my_logger expects 6 arguments but given 1 | +| test.c:52:2:52:10 | call to my_logger | Format for my_logger expects 3 arguments but given 0 | +| test.c:53:2:53:10 | call to my_logger | Format for my_logger expects 3 arguments but given 0 | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/custom_printf.cpp b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/custom_printf.cpp index b80e14e7410e..9c04f7a00490 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/custom_printf.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/custom_printf.cpp @@ -44,3 +44,6 @@ void test_custom_printf2() printf("", "%i %i", 100, 200); // GOOD printf("%i %i", "" ); // GOOD } + +extern "C" void my_logger(int param, char *fmt, ...) __attribute__((format(printf, 2, 3))) {} + diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c index 2feb8db9a5a0..35dea066c925 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c @@ -46,4 +46,12 @@ void test(int i, const char *str) printf("%Y", 1, 2); // GOOD (unknown format character, this might be correct) printf("%1.1Y", 1, 2); // GOOD (unknown format character, this might be correct) printf("%*.*Y", 1, 2); // GOOD (unknown format character, this might be correct) + + // Implicit logger function declaration + my_logger(0, "%i %i %i %i %i %i\n", 1, 2, 3, 4, 5, 6); // GOOD (FP) + my_logger(0, "%i %i %i\n", 1, 2, 3); // GOOD (FP) + my_logger(0, "%i %i %i\n", 1, 2); // BAD (too few format arguments) } + +// A spurious definition of my_logger +extern void my_logger(int param, char *fmt, int, int, int, int, int); From 31684d254855fc1c01cc63a85d54c41983e8590a Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Mon, 23 Sep 2024 16:38:34 +0100 Subject: [PATCH 150/162] C++: Remove FPs in cpp/wrong-number-format-arguments due to BMN --- cpp/ql/lib/semmle/code/cpp/Function.qll | 2 ++ .../models/interfaces/FormattingFunction.qll | 31 ++++++++++++++----- .../WrongNumberOfFormatArguments.expected | 4 +-- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Function.qll b/cpp/ql/lib/semmle/code/cpp/Function.qll index f23b04e19d6b..1c6d58587e74 100644 --- a/cpp/ql/lib/semmle/code/cpp/Function.qll +++ b/cpp/ql/lib/semmle/code/cpp/Function.qll @@ -652,6 +652,8 @@ class FunctionDeclarationEntry extends DeclarationEntry, @fun_decl { /** * Holds if this declaration is an implicit function declaration, that is, * where a function is used before it is declared (under older C standards). + * This can also happen in standalone extraction when a function has not been + * properly declared. */ predicate isImplicit() { fun_implicit(underlyingElement(this)) } diff --git a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll index 7c1ea7231931..e4ae99468e55 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll @@ -121,16 +121,31 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction { * the first format specifier in the format string. */ int getFirstFormatArgumentIndex() { - result = this.getNumberOfParameters() and - // the formatting function either has a definition in the snapshot, or all + // The formatting function either has a definition in the snapshot, or all // `DeclarationEntry`s agree on the number of parameters (otherwise we don't // really know the correct number) - ( - this.hasDefinition() - or - forall(FunctionDeclarationEntry fde | fde = this.getADeclarationEntry() | - result = fde.getNumberOfParameters() - ) + if this.hasDefinition() + then result = this.getDefinition().getNumberOfParameters() + else result = this.getNumberOfExplicitParameters() + } + + /** + * Gets a non-implicit function declaration entry. + */ + FunctionDeclarationEntry getAnExplicitDeclarationEntry() { + result = this.getADeclarationEntry() and + not result.isImplicit() + } + + /** + * Gets the number of parameters, excluding any parameters that have been defined + * from implicit function declarations. If there is some inconsistency in the number + * of parameters, then don't return anything. + */ + int getNumberOfExplicitParameters() { + result = this.getAnExplicitDeclarationEntry().getNumberOfParameters() and + forall(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() | + result = fde.getNumberOfParameters() ) } diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected index 8061b3015642..d99190ef1eba 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected @@ -10,6 +10,4 @@ | test.c:15:2:15:7 | call to printf | Format for printf expects 3 arguments but given 2 | | test.c:19:2:19:7 | call to printf | Format for printf expects 2 arguments but given 1 | | test.c:29:3:29:8 | call to printf | Format for printf expects 2 arguments but given 1 | -| test.c:51:2:51:10 | call to my_logger | Format for my_logger expects 6 arguments but given 1 | -| test.c:52:2:52:10 | call to my_logger | Format for my_logger expects 3 arguments but given 0 | -| test.c:53:2:53:10 | call to my_logger | Format for my_logger expects 3 arguments but given 0 | +| test.c:53:2:53:10 | call to my_logger | Format for my_logger expects 3 arguments but given 2 | From 0ad2e193e5c6e0330cfe034865586cc8e8500ed1 Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Thu, 26 Sep 2024 09:31:18 +0100 Subject: [PATCH 151/162] C++: Update test case --- .../Likely Bugs/Format/WrongNumberOfFormatArguments/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c index 35dea066c925..0079d0f0d21b 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/test.c @@ -48,8 +48,8 @@ void test(int i, const char *str) printf("%*.*Y", 1, 2); // GOOD (unknown format character, this might be correct) // Implicit logger function declaration - my_logger(0, "%i %i %i %i %i %i\n", 1, 2, 3, 4, 5, 6); // GOOD (FP) - my_logger(0, "%i %i %i\n", 1, 2, 3); // GOOD (FP) + my_logger(0, "%i %i %i %i %i %i\n", 1, 2, 3, 4, 5, 6); // GOOD + my_logger(0, "%i %i %i\n", 1, 2, 3); // GOOD my_logger(0, "%i %i %i\n", 1, 2); // BAD (too few format arguments) } From 4a14a3cacb51c9878f85cae48c95922eab7023a1 Mon Sep 17 00:00:00 2001 From: Calum Grant <42069085+calumgrant@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:15:26 +0100 Subject: [PATCH 152/162] Update cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../semmle/code/cpp/models/interfaces/FormattingFunction.qll | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll index e4ae99468e55..148efd201b09 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll @@ -143,8 +143,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction { * of parameters, then don't return anything. */ int getNumberOfExplicitParameters() { - result = this.getAnExplicitDeclarationEntry().getNumberOfParameters() and - forall(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() | + forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() | result = fde.getNumberOfParameters() ) } From c2871f4def40853915fdcef164fcd725e47aa778 Mon Sep 17 00:00:00 2001 From: Calum Grant <42069085+calumgrant@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:15:37 +0100 Subject: [PATCH 153/162] Update cpp/ql/lib/semmle/code/cpp/Function.qll Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com> --- cpp/ql/lib/semmle/code/cpp/Function.qll | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Function.qll b/cpp/ql/lib/semmle/code/cpp/Function.qll index 1c6d58587e74..0648c6260ce5 100644 --- a/cpp/ql/lib/semmle/code/cpp/Function.qll +++ b/cpp/ql/lib/semmle/code/cpp/Function.qll @@ -651,9 +651,8 @@ class FunctionDeclarationEntry extends DeclarationEntry, @fun_decl { /** * Holds if this declaration is an implicit function declaration, that is, - * where a function is used before it is declared (under older C standards). - * This can also happen in standalone extraction when a function has not been - * properly declared. + * where a function is used before it is declared (under older C standards, + * or when there were parse errors). */ predicate isImplicit() { fun_implicit(underlyingElement(this)) } From 7f2d485ae907ca350bf3aa2747db6edb8e9e74ae Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Thu, 26 Sep 2024 09:07:20 +0100 Subject: [PATCH 154/162] C++: Update comment --- .../code/cpp/models/interfaces/FormattingFunction.qll | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll index 148efd201b09..d4ccee7036f1 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll @@ -118,7 +118,8 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction { /** * Gets the position of the first format argument, corresponding with - * the first format specifier in the format string. + * the first format specifier in the format string. We'll ignore all + * implicit function definitions. */ int getFirstFormatArgumentIndex() { // The formatting function either has a definition in the snapshot, or all @@ -132,7 +133,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction { /** * Gets a non-implicit function declaration entry. */ - FunctionDeclarationEntry getAnExplicitDeclarationEntry() { + private FunctionDeclarationEntry getAnExplicitDeclarationEntry() { result = this.getADeclarationEntry() and not result.isImplicit() } @@ -142,7 +143,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction { * from implicit function declarations. If there is some inconsistency in the number * of parameters, then don't return anything. */ - int getNumberOfExplicitParameters() { + private int getNumberOfExplicitParameters() { forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() | result = fde.getNumberOfParameters() ) From 9b5c9af48933edd8f938ac55128de985de55fc58 Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Thu, 26 Sep 2024 09:12:56 +0100 Subject: [PATCH 155/162] C++: Add change note --- .../src/change-notes/2024-09-26-wrong-number-format-arguments | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments diff --git a/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments b/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments new file mode 100644 index 000000000000..b35ac47658ac --- /dev/null +++ b/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Fixed false positives in the `cpp/wrong-number-format-arguments` ("Too few arguments to formatting function") query when the formatter function has been declared implicitly. From a3ad6f56975918fe9df5fec02bf0179b2a813aad Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 25 Sep 2024 16:43:33 +0200 Subject: [PATCH 156/162] Ruby: Weaken `scopeNoFirst` check --- ruby/ql/consistency-queries/CfgConsistency.ql | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ruby/ql/consistency-queries/CfgConsistency.ql b/ruby/ql/consistency-queries/CfgConsistency.ql index a57cb03ebb2b..c8d797b71f4c 100644 --- a/ruby/ql/consistency-queries/CfgConsistency.ql +++ b/ruby/ql/consistency-queries/CfgConsistency.ql @@ -1,4 +1,5 @@ -import codeql.ruby.controlflow.internal.ControlFlowGraphImpl::Consistency +import codeql.ruby.controlflow.internal.ControlFlowGraphImpl::Consistency as Consistency +import Consistency import codeql.ruby.AST import codeql.ruby.CFG import codeql.ruby.controlflow.internal.Completion @@ -19,3 +20,14 @@ query predicate nonPostOrderExpr(Expr e, string cls) { c instanceof NormalCompletion ) } + +query predicate scopeNoFirst(CfgScope scope) { + Consistency::scopeNoFirst(scope) and + not scope = any(StmtSequence seq | not exists(seq.getAStmt())) and + not scope = + any(Callable c | + not exists(c.getAParameter()) and + not c.(BodyStmt).hasEnsure() and + not exists(c.(BodyStmt).getARescue()) + ) +} From 24f39ccae2e503100c7f8809e31287ceae4e7f7d Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 26 Sep 2024 11:09:31 +0200 Subject: [PATCH 157/162] Rust: Weaken `scopeNoFirst` check --- rust/ql/consistency-queries/CfgConsistency.ql | 10 +++++++++- rust/ql/test/library-tests/controlflow/Cfg.ql | 4 ---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/rust/ql/consistency-queries/CfgConsistency.ql b/rust/ql/consistency-queries/CfgConsistency.ql index 6bcf8d88201c..ef7f9b6f2551 100644 --- a/rust/ql/consistency-queries/CfgConsistency.ql +++ b/rust/ql/consistency-queries/CfgConsistency.ql @@ -1,5 +1,7 @@ import rust -import codeql.rust.controlflow.internal.ControlFlowGraphImpl::Consistency +import codeql.rust.controlflow.internal.ControlFlowGraphImpl::Consistency as Consistency +import Consistency +import codeql.rust.controlflow.ControlFlowGraph import codeql.rust.controlflow.internal.ControlFlowGraphImpl as CfgImpl import codeql.rust.controlflow.internal.Completion @@ -17,3 +19,9 @@ query predicate nonPostOrderExpr(Expr e, string cls) { c instanceof NormalCompletion ) } + +query predicate scopeNoFirst(CfgScope scope) { + Consistency::scopeNoFirst(scope) and + not scope = any(Function f | not exists(f.getBody())) and + not scope = any(ClosureExpr c | not exists(c.getBody())) +} diff --git a/rust/ql/test/library-tests/controlflow/Cfg.ql b/rust/ql/test/library-tests/controlflow/Cfg.ql index dbafdaa6caa3..23b047b5b2ec 100644 --- a/rust/ql/test/library-tests/controlflow/Cfg.ql +++ b/rust/ql/test/library-tests/controlflow/Cfg.ql @@ -1,7 +1,3 @@ -/** - * @id rust/controlflow/cfg - */ - import rust import codeql.rust.controlflow.ControlFlowGraph import TestUtils From f389a889adaccfa6a98ed0e5fdee20eb917662b7 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 26 Sep 2024 11:05:16 +0200 Subject: [PATCH 158/162] Exclude consistency output from `.gitignore` files --- ql/.gitignore | 1 - ruby/.gitignore | 1 - 2 files changed, 2 deletions(-) diff --git a/ql/.gitignore b/ql/.gitignore index b8df693e8270..2e6fbbf1cc6e 100644 --- a/ql/.gitignore +++ b/ql/.gitignore @@ -3,5 +3,4 @@ target .cache ql/test/**/*.testproj ql/test/**/*.actual -ql/test/**/CONSISTENCY work diff --git a/ruby/.gitignore b/ruby/.gitignore index f0b40d44e7a3..2ad57b363153 100644 --- a/ruby/.gitignore +++ b/ruby/.gitignore @@ -3,5 +3,4 @@ extractor/target .cache ql/test/**/*.testproj ql/test/**/*.actual -ql/test/**/CONSISTENCY .codeql From 6777a34dfb231cab96ef2fb07f571e2ace7e7026 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 26 Sep 2024 12:40:25 +0200 Subject: [PATCH 159/162] Rust: run cargo fmt --- rust/generate-schema/src/codegen/grammar.rs | 128 ++++++++++++++---- .../src/codegen/grammar/ast_src.rs | 34 +++-- 2 files changed, 125 insertions(+), 37 deletions(-) diff --git a/rust/generate-schema/src/codegen/grammar.rs b/rust/generate-schema/src/codegen/grammar.rs index 85a84bf05f77..69875866ba52 100644 --- a/rust/generate-schema/src/codegen/grammar.rs +++ b/rust/generate-schema/src/codegen/grammar.rs @@ -180,8 +180,12 @@ fn generate_nodes(kinds: KindsSrc, grammar: &AstSrc) -> String { .enums .iter() .map(|en| { - let variants: Vec<_> = - en.variants.iter().map(|var| format_ident!("{}", var)).sorted().collect(); + let variants: Vec<_> = en + .variants + .iter() + .map(|var| format_ident!("{}", var)) + .sorted() + .collect(); let name = format_ident!("{}", en.name); let kinds: Vec<_> = variants .iter() @@ -311,8 +315,10 @@ fn generate_nodes(kinds: KindsSrc, grammar: &AstSrc) -> String { let enum_names = grammar.enums.iter().map(|it| &it.name); let node_names = grammar.nodes.iter().map(|it| &it.name); - let display_impls = - enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| { + let display_impls = enum_names + .chain(node_names.clone()) + .map(|it| format_ident!("{}", it)) + .map(|name| { quote! { impl std::fmt::Display for #name { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -356,8 +362,11 @@ fn generate_nodes(kinds: KindsSrc, grammar: &AstSrc) -> String { let mut res = String::with_capacity(ast.len() * 2); - let mut docs = - grammar.nodes.iter().map(|it| &it.doc).chain(grammar.enums.iter().map(|it| &it.doc)); + let mut docs = grammar + .nodes + .iter() + .map(|it| &it.doc) + .chain(grammar.enums.iter().map(|it| &it.doc)); for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") { res.push_str(chunk); @@ -393,16 +402,21 @@ fn generate_syntax_kinds(grammar: KindsSrc) -> String { quote! { #(#cs)* } } }); - let punctuation = - grammar.punct.iter().map(|(_token, name)| format_ident!("{}", name)).collect::>(); + let punctuation = grammar + .punct + .iter() + .map(|(_token, name)| format_ident!("{}", name)) + .collect::>(); let fmt_kw_as_variant = |&name| match name { "Self" => format_ident!("SELF_TYPE_KW"), name => format_ident!("{}_KW", to_upper_snake_case(name)), }; let strict_keywords = grammar.keywords; - let strict_keywords_variants = - strict_keywords.iter().map(fmt_kw_as_variant).collect::>(); + let strict_keywords_variants = strict_keywords + .iter() + .map(fmt_kw_as_variant) + .collect::>(); let strict_keywords_tokens = strict_keywords.iter().map(|it| format_ident!("{it}")); let edition_dependent_keywords_variants_match_arm = grammar @@ -425,15 +439,23 @@ fn generate_syntax_kinds(grammar: KindsSrc) -> String { .iter() .map(|(kw, _)| fmt_kw_as_variant(kw)) .collect::>(); - let edition_dependent_keywords_tokens = - grammar.edition_dependent_keywords.iter().map(|(it, _)| format_ident!("{it}")); + let edition_dependent_keywords_tokens = grammar + .edition_dependent_keywords + .iter() + .map(|(it, _)| format_ident!("{it}")); let contextual_keywords = grammar.contextual_keywords; - let contextual_keywords_variants = - contextual_keywords.iter().map(fmt_kw_as_variant).collect::>(); + let contextual_keywords_variants = contextual_keywords + .iter() + .map(fmt_kw_as_variant) + .collect::>(); let contextual_keywords_tokens = contextual_keywords.iter().map(|it| format_ident!("{it}")); let contextual_keywords_str_match_arm = grammar.contextual_keywords.iter().map(|kw| { - match grammar.edition_dependent_keywords.iter().find(|(ed_kw, _)| ed_kw == kw) { + match grammar + .edition_dependent_keywords + .iter() + .find(|(ed_kw, _)| ed_kw == kw) + { Some((_, ed)) => quote! { #kw if edition < #ed }, None => quote! { #kw }, } @@ -443,7 +465,11 @@ fn generate_syntax_kinds(grammar: KindsSrc) -> String { .iter() .map(|kw_s| { let kw = fmt_kw_as_variant(kw_s); - match grammar.edition_dependent_keywords.iter().find(|(ed_kw, _)| ed_kw == kw_s) { + match grammar + .edition_dependent_keywords + .iter() + .find(|(ed_kw, _)| ed_kw == kw_s) + { Some((_, ed)) => quote! { #kw if edition < #ed }, None => quote! { #kw }, } @@ -457,12 +483,23 @@ fn generate_syntax_kinds(grammar: KindsSrc) -> String { .dedup() .collect::>(); - let literals = - grammar.literals.iter().map(|name| format_ident!("{}", name)).collect::>(); + let literals = grammar + .literals + .iter() + .map(|name| format_ident!("{}", name)) + .collect::>(); - let tokens = grammar.tokens.iter().map(|name| format_ident!("{}", name)).collect::>(); + let tokens = grammar + .tokens + .iter() + .map(|name| format_ident!("{}", name)) + .collect::>(); - let nodes = grammar.nodes.iter().map(|name| format_ident!("{}", name)).collect::>(); + let nodes = grammar + .nodes + .iter() + .map(|name| format_ident!("{}", name)) + .collect::>(); let ast = quote! { #![allow(bad_style, missing_docs, unreachable_pub)] @@ -569,7 +606,10 @@ fn generate_syntax_kinds(grammar: KindsSrc) -> String { } }; - add_preamble(crate::flags::CodegenType::Grammar, reformat(ast.to_string())) + add_preamble( + crate::flags::CodegenType::Grammar, + reformat(ast.to_string()), + ) } fn to_upper_snake_case(s: &str) -> String { @@ -719,13 +759,23 @@ pub(crate) fn lower(grammar: &Grammar) -> AstSrc { let rule = &grammar[node].rule; match lower_enum(grammar, rule) { Some(variants) => { - let enum_src = AstEnumSrc { doc: Vec::new(), name, traits: Vec::new(), variants }; + let enum_src = AstEnumSrc { + doc: Vec::new(), + name, + traits: Vec::new(), + variants, + }; res.enums.push(enum_src); } None => { let mut fields = Vec::new(); lower_rule(&mut fields, grammar, None, rule); - res.nodes.push(AstNodeSrc { doc: Vec::new(), name, traits: Vec::new(), fields }); + res.nodes.push(AstNodeSrc { + doc: Vec::new(), + name, + traits: Vec::new(), + fields, + }); } } } @@ -776,7 +826,11 @@ fn lower_rule(acc: &mut Vec, grammar: &Grammar, label: Option<&String>, r Rule::Node(node) => { let ty = grammar[*node].name.clone(); let name = label.cloned().unwrap_or_else(|| to_lower_snake_case(&ty)); - let field = Field::Node { name, ty, cardinality: Cardinality::Optional }; + let field = Field::Node { + name, + ty, + cardinality: Cardinality::Optional, + }; acc.push(field); } Rule::Token(token) => { @@ -791,8 +845,14 @@ fn lower_rule(acc: &mut Vec, grammar: &Grammar, label: Option<&String>, r Rule::Rep(inner) => { if let Rule::Node(node) = &**inner { let ty = grammar[*node].name.clone(); - let name = label.cloned().unwrap_or_else(|| pluralize(&to_lower_snake_case(&ty))); - let field = Field::Node { name, ty, cardinality: Cardinality::Many }; + let name = label + .cloned() + .unwrap_or_else(|| pluralize(&to_lower_snake_case(&ty))); + let field = Field::Node { + name, + ty, + cardinality: Cardinality::Many, + }; acc.push(field); return; } @@ -863,8 +923,14 @@ fn lower_separated_list( return false; } let ty = grammar[*node].name.clone(); - let name = label.cloned().unwrap_or_else(|| pluralize(&to_lower_snake_case(&ty))); - let field = Field::Node { name, ty, cardinality: Cardinality::Many }; + let name = label + .cloned() + .unwrap_or_else(|| pluralize(&to_lower_snake_case(&ty))); + let field = Field::Node { + name, + ty, + cardinality: Cardinality::Many, + }; acc.push(field); true } @@ -900,7 +966,11 @@ fn extract_enums(ast: &mut AstSrc) { node.remove_field(to_remove); let ty = enm.name.clone(); let name = to_lower_snake_case(&ty); - node.fields.push(Field::Node { name, ty, cardinality: Cardinality::Optional }); + node.fields.push(Field::Node { + name, + ty, + cardinality: Cardinality::Optional, + }); } } } diff --git a/rust/generate-schema/src/codegen/grammar/ast_src.rs b/rust/generate-schema/src/codegen/grammar/ast_src.rs index 34151bd95876..606a51b499c7 100644 --- a/rust/generate-schema/src/codegen/grammar/ast_src.rs +++ b/rust/generate-schema/src/codegen/grammar/ast_src.rs @@ -110,8 +110,15 @@ const RESERVED: &[&str] = &[ ]; // keywords that are keywords only in specific parse contexts #[doc(alias = "WEAK_KEYWORDS")] -const CONTEXTUAL_KEYWORDS: &[&str] = - &["macro_rules", "union", "default", "raw", "dyn", "auto", "yeet"]; +const CONTEXTUAL_KEYWORDS: &[&str] = &[ + "macro_rules", + "union", + "default", + "raw", + "dyn", + "auto", + "yeet", +]; // keywords we use for special macro expansions const CONTEXTUAL_BUILTIN_KEYWORDS: &[&str] = &["builtin", "offset_of", "format_args", "asm"]; // keywords that are keywords depending on the edition @@ -128,8 +135,11 @@ pub(crate) fn generate_kind_src( enums: &[AstEnumSrc], grammar: &ungrammar::Grammar, ) -> KindsSrc { - let mut contextual_keywords: Vec<&_> = - CONTEXTUAL_KEYWORDS.iter().chain(CONTEXTUAL_BUILTIN_KEYWORDS).copied().collect(); + let mut contextual_keywords: Vec<&_> = CONTEXTUAL_KEYWORDS + .iter() + .chain(CONTEXTUAL_BUILTIN_KEYWORDS) + .copied() + .collect(); let mut keywords: Vec<&_> = Vec::new(); let mut tokens: Vec<&_> = TOKENS.to_vec(); @@ -162,9 +172,13 @@ pub(crate) fn generate_kind_src( } } }); - PUNCT.iter().zip(used_puncts).filter(|(_, used)| !used).for_each(|((punct, _), _)| { - panic!("Punctuation {punct:?} is not used in grammar"); - }); + PUNCT + .iter() + .zip(used_puncts) + .filter(|(_, used)| !used) + .for_each(|((punct, _), _)| { + panic!("Punctuation {punct:?} is not used in grammar"); + }); keywords.extend(RESERVED.iter().copied()); keywords.sort(); keywords.dedup(); @@ -226,7 +240,11 @@ pub(crate) struct AstNodeSrc { #[derive(Debug, Eq, PartialEq)] pub(crate) enum Field { Token(String), - Node { name: String, ty: String, cardinality: Cardinality }, + Node { + name: String, + ty: String, + cardinality: Cardinality, + }, } #[derive(Debug, Eq, PartialEq)] From 8045440d00c698455750e810ca5dfdba8eea9e53 Mon Sep 17 00:00:00 2001 From: Calum Grant <42069085+calumgrant@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:04:52 +0100 Subject: [PATCH 160/162] Update cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com> --- .../semmle/code/cpp/models/interfaces/FormattingFunction.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll index d4ccee7036f1..8ae48181ae18 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll @@ -118,7 +118,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction { /** * Gets the position of the first format argument, corresponding with - * the first format specifier in the format string. We'll ignore all + * the first format specifier in the format string. We ignore all * implicit function definitions. */ int getFirstFormatArgumentIndex() { From dcb75f490fd3683c898d3ad05802cf8003aa689d Mon Sep 17 00:00:00 2001 From: Calum Grant <42069085+calumgrant@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:05:06 +0100 Subject: [PATCH 161/162] Update cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com> --- .../src/change-notes/2024-09-26-wrong-number-format-arguments | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments b/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments index b35ac47658ac..826a2365e24b 100644 --- a/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments +++ b/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* Fixed false positives in the `cpp/wrong-number-format-arguments` ("Too few arguments to formatting function") query when the formatter function has been declared implicitly. +* Fixed false positives in the `cpp/wrong-number-format-arguments` ("Too few arguments to formatting function") query when the formatting function has been declared implicitly. From 8967989c7b0ac774194d19d7a560158fd48305d7 Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Thu, 26 Sep 2024 13:36:38 +0100 Subject: [PATCH 162/162] C++: Rename change-note --- ...rmat-arguments => 2024-09-26-wrong-number-format-arguments.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cpp/ql/src/change-notes/{2024-09-26-wrong-number-format-arguments => 2024-09-26-wrong-number-format-arguments.md} (100%) diff --git a/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments b/cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments.md similarity index 100% rename from cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments rename to cpp/ql/src/change-notes/2024-09-26-wrong-number-format-arguments.md