From afec8b3153c7b564c1e73a971ba3121ecd1c3688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 3 Jun 2025 20:29:58 +0200 Subject: [PATCH 01/35] Swift: mass enable diff-informed data flow An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on https://github.com/github/codeql/pull/18343 and https://github.com/github/codeql-patch/pull/88 --- swift/ql/lib/codeql/swift/security/CleartextLoggingQuery.qll | 2 ++ .../ql/lib/codeql/swift/security/CleartextTransmissionQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/CommandInjectionQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/ConstantPasswordQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/ConstantSaltQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/ECBEncryptionQuery.qll | 2 ++ .../lib/codeql/swift/security/HardcodedEncryptionKeyQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll | 2 ++ .../codeql/swift/security/InsufficientHashIterationsQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/PathInjectionQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/PredicateInjectionQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/SqlInjectionQuery.qll | 2 ++ .../codeql/swift/security/StaticInitializationVectorQuery.qll | 2 ++ .../lib/codeql/swift/security/StringLengthConflationQuery.qll | 2 ++ .../lib/codeql/swift/security/UncontrolledFormatStringQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/UnsafeJsEvalQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/UnsafeUnpackQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/WeakPasswordHashingQuery.qll | 2 ++ .../lib/codeql/swift/security/WeakSensitiveDataHashingQuery.qll | 2 ++ swift/ql/lib/codeql/swift/security/XXEQuery.qll | 2 ++ .../ql/lib/codeql/swift/security/regex/RegexInjectionQuery.qll | 2 ++ 21 files changed, 42 insertions(+) diff --git a/swift/ql/lib/codeql/swift/security/CleartextLoggingQuery.qll b/swift/ql/lib/codeql/swift/security/CleartextLoggingQuery.qll index 740fccefe97..40010eba649 100644 --- a/swift/ql/lib/codeql/swift/security/CleartextLoggingQuery.qll +++ b/swift/ql/lib/codeql/swift/security/CleartextLoggingQuery.qll @@ -25,6 +25,8 @@ module CleartextLoggingConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { any(CleartextLoggingAdditionalFlowStep s).step(n1, n2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/CleartextTransmissionQuery.qll b/swift/ql/lib/codeql/swift/security/CleartextTransmissionQuery.qll index 3952d7a89b1..42e9b68328f 100644 --- a/swift/ql/lib/codeql/swift/security/CleartextTransmissionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/CleartextTransmissionQuery.qll @@ -28,6 +28,8 @@ module CleartextTransmissionConfig implements DataFlow::ConfigSig { // make sources barriers so that we only report the closest instance isSource(node) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/CommandInjectionQuery.qll b/swift/ql/lib/codeql/swift/security/CommandInjectionQuery.qll index 10dbc137726..ebeb9c4b6f4 100644 --- a/swift/ql/lib/codeql/swift/security/CommandInjectionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/CommandInjectionQuery.qll @@ -23,6 +23,8 @@ module CommandInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(CommandInjectionAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/ConstantPasswordQuery.qll b/swift/ql/lib/codeql/swift/security/ConstantPasswordQuery.qll index 7f6475a6ee4..91d46b764df 100644 --- a/swift/ql/lib/codeql/swift/security/ConstantPasswordQuery.qll +++ b/swift/ql/lib/codeql/swift/security/ConstantPasswordQuery.qll @@ -38,6 +38,8 @@ module ConstantPasswordConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(ConstantPasswordAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module ConstantPasswordFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/ConstantSaltQuery.qll b/swift/ql/lib/codeql/swift/security/ConstantSaltQuery.qll index e9b91d23570..68c1e6ef17a 100644 --- a/swift/ql/lib/codeql/swift/security/ConstantSaltQuery.qll +++ b/swift/ql/lib/codeql/swift/security/ConstantSaltQuery.qll @@ -39,6 +39,8 @@ module ConstantSaltConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(ConstantSaltAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module ConstantSaltFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/ECBEncryptionQuery.qll b/swift/ql/lib/codeql/swift/security/ECBEncryptionQuery.qll index 133e7d6c2cd..a9463937555 100644 --- a/swift/ql/lib/codeql/swift/security/ECBEncryptionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/ECBEncryptionQuery.qll @@ -22,6 +22,8 @@ module EcbEncryptionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(EcbEncryptionAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module EcbEncryptionFlow = DataFlow::Global; diff --git a/swift/ql/lib/codeql/swift/security/HardcodedEncryptionKeyQuery.qll b/swift/ql/lib/codeql/swift/security/HardcodedEncryptionKeyQuery.qll index 9e0cb16b7c6..5eb379f248a 100644 --- a/swift/ql/lib/codeql/swift/security/HardcodedEncryptionKeyQuery.qll +++ b/swift/ql/lib/codeql/swift/security/HardcodedEncryptionKeyQuery.qll @@ -46,6 +46,8 @@ module HardcodedKeyConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(HardcodedEncryptionKeyAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module HardcodedKeyFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll b/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll index 769c385d4d6..a5c857e573b 100644 --- a/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll +++ b/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll @@ -21,6 +21,8 @@ module InsecureTlsConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(InsecureTlsExtensionsAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module InsecureTlsFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/InsufficientHashIterationsQuery.qll b/swift/ql/lib/codeql/swift/security/InsufficientHashIterationsQuery.qll index 122d5b2b0d8..0a7fea3d3c5 100644 --- a/swift/ql/lib/codeql/swift/security/InsufficientHashIterationsQuery.qll +++ b/swift/ql/lib/codeql/swift/security/InsufficientHashIterationsQuery.qll @@ -34,6 +34,8 @@ module InsufficientHashIterationsConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(InsufficientHashIterationsAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module InsufficientHashIterationsFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/PathInjectionQuery.qll b/swift/ql/lib/codeql/swift/security/PathInjectionQuery.qll index c74dae787ed..64cf208b878 100644 --- a/swift/ql/lib/codeql/swift/security/PathInjectionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/PathInjectionQuery.qll @@ -23,6 +23,8 @@ module PathInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(PathInjectionAdditionalFlowStep s).step(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/PredicateInjectionQuery.qll b/swift/ql/lib/codeql/swift/security/PredicateInjectionQuery.qll index 86d04364774..97acbc074bd 100644 --- a/swift/ql/lib/codeql/swift/security/PredicateInjectionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/PredicateInjectionQuery.qll @@ -22,6 +22,8 @@ module PredicateInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { any(PredicateInjectionAdditionalFlowStep s).step(n1, n2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/SqlInjectionQuery.qll b/swift/ql/lib/codeql/swift/security/SqlInjectionQuery.qll index 5b5a2c920fe..8ee164a4c23 100644 --- a/swift/ql/lib/codeql/swift/security/SqlInjectionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/SqlInjectionQuery.qll @@ -23,6 +23,8 @@ module SqlInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(SqlInjectionAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/StaticInitializationVectorQuery.qll b/swift/ql/lib/codeql/swift/security/StaticInitializationVectorQuery.qll index 5f281191d99..3c4359e02db 100644 --- a/swift/ql/lib/codeql/swift/security/StaticInitializationVectorQuery.qll +++ b/swift/ql/lib/codeql/swift/security/StaticInitializationVectorQuery.qll @@ -40,6 +40,8 @@ module StaticInitializationVectorConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(StaticInitializationVectorAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module StaticInitializationVectorFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/StringLengthConflationQuery.qll b/swift/ql/lib/codeql/swift/security/StringLengthConflationQuery.qll index 8e608776a20..eb17306f22f 100644 --- a/swift/ql/lib/codeql/swift/security/StringLengthConflationQuery.qll +++ b/swift/ql/lib/codeql/swift/security/StringLengthConflationQuery.qll @@ -39,6 +39,8 @@ module StringLengthConflationConfig implements DataFlow::StateConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(StringLengthConflationAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringQuery.qll b/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringQuery.qll index 37e40774bf9..baee65773d6 100644 --- a/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringQuery.qll +++ b/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringQuery.qll @@ -23,6 +23,8 @@ module TaintedFormatConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(UncontrolledFormatStringAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/UnsafeJsEvalQuery.qll b/swift/ql/lib/codeql/swift/security/UnsafeJsEvalQuery.qll index b79219ab633..92b061b2af4 100644 --- a/swift/ql/lib/codeql/swift/security/UnsafeJsEvalQuery.qll +++ b/swift/ql/lib/codeql/swift/security/UnsafeJsEvalQuery.qll @@ -22,6 +22,8 @@ module UnsafeJsEvalConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(UnsafeJsEvalAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/UnsafeUnpackQuery.qll b/swift/ql/lib/codeql/swift/security/UnsafeUnpackQuery.qll index 59be3a7eb31..e79bce5ba14 100644 --- a/swift/ql/lib/codeql/swift/security/UnsafeUnpackQuery.qll +++ b/swift/ql/lib/codeql/swift/security/UnsafeUnpackQuery.qll @@ -24,6 +24,8 @@ module UnsafeUnpackConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(UnsafeUnpackAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingQuery.qll b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingQuery.qll index b2ad35c2bf8..6532d8a6a7f 100644 --- a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingQuery.qll +++ b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingQuery.qll @@ -37,6 +37,8 @@ module WeakPasswordHashingConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(WeakPasswordHashingAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module WeakPasswordHashingFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingQuery.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingQuery.qll index ade9d9f1437..d38e78a1ded 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingQuery.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingQuery.qll @@ -38,6 +38,8 @@ module WeakSensitiveDataHashingConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(WeakSensitiveDataHashingAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } module WeakSensitiveDataHashingFlow = TaintTracking::Global; diff --git a/swift/ql/lib/codeql/swift/security/XXEQuery.qll b/swift/ql/lib/codeql/swift/security/XXEQuery.qll index 0a16417bd72..afd6c068452 100644 --- a/swift/ql/lib/codeql/swift/security/XXEQuery.qll +++ b/swift/ql/lib/codeql/swift/security/XXEQuery.qll @@ -22,6 +22,8 @@ module XxeConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { any(XxeAdditionalFlowStep s).step(n1, n2) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/swift/ql/lib/codeql/swift/security/regex/RegexInjectionQuery.qll b/swift/ql/lib/codeql/swift/security/regex/RegexInjectionQuery.qll index 8fee12442d3..8b5929c4064 100644 --- a/swift/ql/lib/codeql/swift/security/regex/RegexInjectionQuery.qll +++ b/swift/ql/lib/codeql/swift/security/regex/RegexInjectionQuery.qll @@ -22,6 +22,8 @@ module RegexInjectionConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(RegexInjectionAdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** From 2078a34763d2d6f5c518eb04336d6d4bec662edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Wed, 4 Jun 2025 13:38:01 +0200 Subject: [PATCH 02/35] Disable diff-informed on InsecureTLSQuery due to DIFF-INFORMED test failures --- swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll | 2 -- 1 file changed, 2 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll b/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll index a5c857e573b..769c385d4d6 100644 --- a/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll +++ b/swift/ql/lib/codeql/swift/security/InsecureTLSQuery.qll @@ -21,8 +21,6 @@ module InsecureTlsConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(InsecureTlsExtensionsAdditionalFlowStep s).step(nodeFrom, nodeTo) } - - predicate observeDiffInformedIncrementalMode() { any() } } module InsecureTlsFlow = TaintTracking::Global; From e23350114425ec9a369964c10a8069b93d58eabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 3 Jun 2025 20:09:40 +0200 Subject: [PATCH 03/35] Go: mass enable diff-informed data flow An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on https://github.com/github/codeql/pull/18345 and https://github.com/github/codeql-patch/pull/88 --- go/ql/lib/semmle/go/security/CleartextLogging.qll | 2 ++ go/ql/lib/semmle/go/security/ExternalAPIs.qll | 2 ++ go/ql/lib/semmle/go/security/LogInjection.qll | 2 ++ go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll | 2 ++ go/ql/lib/semmle/go/security/OpenUrlRedirect.qll | 2 ++ go/ql/lib/semmle/go/security/SqlInjection.qll | 2 ++ go/ql/lib/semmle/go/security/StoredCommand.qll | 2 ++ go/ql/lib/semmle/go/security/StoredXss.qll | 2 ++ go/ql/lib/semmle/go/security/StringBreak.qll | 2 ++ go/ql/lib/semmle/go/security/TaintedPath.qll | 2 ++ go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll | 2 ++ go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll | 2 ++ go/ql/lib/semmle/go/security/XPathInjection.qll | 2 ++ go/ql/lib/semmle/go/security/ZipSlip.qll | 2 ++ go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql | 2 ++ go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql | 2 ++ go/ql/src/Security/CWE-020/SuspiciousCharacterInRegexp.ql | 2 ++ go/ql/src/Security/CWE-209/StackTraceExposure.ql | 2 ++ go/ql/src/Security/CWE-326/InsufficientKeySize.ql | 2 ++ go/ql/src/Security/CWE-352/ConstantOauth2State.ql | 2 ++ go/ql/src/Security/CWE-640/EmailInjection.qll | 2 ++ go/ql/src/experimental/CWE-090/LDAPInjection.qll | 2 ++ go/ql/src/experimental/CWE-203/Timing.ql | 2 ++ go/ql/src/experimental/CWE-285/PamAuthBypass.ql | 4 ++++ .../experimental/CWE-287/ImproperLdapAuthCustomizations.qll | 2 ++ go/ql/src/experimental/CWE-321-V2/HardCodedKeys.ql | 2 ++ .../CWE-327/WeakCryptoAlgorithmCustomizations.qll | 2 ++ go/ql/src/experimental/CWE-369/DivideByZero.ql | 2 ++ go/ql/src/experimental/CWE-74/DsnInjectionCustomizations.qll | 2 ++ go/ql/src/experimental/frameworks/DecompressionBombs.qll | 2 ++ 30 files changed, 62 insertions(+) diff --git a/go/ql/lib/semmle/go/security/CleartextLogging.qll b/go/ql/lib/semmle/go/security/CleartextLogging.qll index 2e0c9665c4b..5218d03d908 100644 --- a/go/ql/lib/semmle/go/security/CleartextLogging.qll +++ b/go/ql/lib/semmle/go/security/CleartextLogging.qll @@ -46,6 +46,8 @@ module CleartextLogging { // Also exclude protobuf field fetches, since they amount to single field reads. not any(Protobuf::GetMethod gm).taintStep(src, trg) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/lib/semmle/go/security/ExternalAPIs.qll b/go/ql/lib/semmle/go/security/ExternalAPIs.qll index 6799099b999..4a561c17136 100644 --- a/go/ql/lib/semmle/go/security/ExternalAPIs.qll +++ b/go/ql/lib/semmle/go/security/ExternalAPIs.qll @@ -197,6 +197,8 @@ private module UntrustedDataToUnknownExternalApiConfig implements DataFlow::Conf predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } predicate isSink(DataFlow::Node sink) { sink instanceof UnknownExternalApiDataNode } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/lib/semmle/go/security/LogInjection.qll b/go/ql/lib/semmle/go/security/LogInjection.qll index d8bc586ed91..3db7e27c781 100644 --- a/go/ql/lib/semmle/go/security/LogInjection.qll +++ b/go/ql/lib/semmle/go/security/LogInjection.qll @@ -21,6 +21,8 @@ module LogInjection { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about log injection vulnerabilities. */ diff --git a/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll b/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll index 73605d65b02..15afe81944f 100644 --- a/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll +++ b/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll @@ -23,6 +23,8 @@ module MissingJwtSignatureCheck { predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { any(AdditionalFlowStep s).step(nodeFrom, nodeTo) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about JWT vulnerabilities. */ diff --git a/go/ql/lib/semmle/go/security/OpenUrlRedirect.qll b/go/ql/lib/semmle/go/security/OpenUrlRedirect.qll index bfe47f260cd..1d2d7a1c60b 100644 --- a/go/ql/lib/semmle/go/security/OpenUrlRedirect.qll +++ b/go/ql/lib/semmle/go/security/OpenUrlRedirect.qll @@ -54,6 +54,8 @@ module OpenUrlRedirect { or hostnameSanitizingPrefixEdge(node, _) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow from unvalidated, untrusted data to URL redirections. */ diff --git a/go/ql/lib/semmle/go/security/SqlInjection.qll b/go/ql/lib/semmle/go/security/SqlInjection.qll index e24b30f40d3..5b751309025 100644 --- a/go/ql/lib/semmle/go/security/SqlInjection.qll +++ b/go/ql/lib/semmle/go/security/SqlInjection.qll @@ -23,6 +23,8 @@ module SqlInjection { } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about SQL-injection vulnerabilities. */ diff --git a/go/ql/lib/semmle/go/security/StoredCommand.qll b/go/ql/lib/semmle/go/security/StoredCommand.qll index 38555370cfc..983f739bdab 100644 --- a/go/ql/lib/semmle/go/security/StoredCommand.qll +++ b/go/ql/lib/semmle/go/security/StoredCommand.qll @@ -26,6 +26,8 @@ module StoredCommand { predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjection::Sink } predicate isBarrier(DataFlow::Node node) { node instanceof CommandInjection::Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about command-injection vulnerabilities. */ diff --git a/go/ql/lib/semmle/go/security/StoredXss.qll b/go/ql/lib/semmle/go/security/StoredXss.qll index 2bf6bf24804..3bea8e8c1e0 100644 --- a/go/ql/lib/semmle/go/security/StoredXss.qll +++ b/go/ql/lib/semmle/go/security/StoredXss.qll @@ -22,6 +22,8 @@ module StoredXss { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about XSS. */ diff --git a/go/ql/lib/semmle/go/security/StringBreak.qll b/go/ql/lib/semmle/go/security/StringBreak.qll index 02b4c5b3313..87a676b6f97 100644 --- a/go/ql/lib/semmle/go/security/StringBreak.qll +++ b/go/ql/lib/semmle/go/security/StringBreak.qll @@ -26,6 +26,8 @@ module StringBreak { predicate isBarrier(DataFlow::Node node, FlowState state) { state = node.(Sanitizer).getQuote() } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/lib/semmle/go/security/TaintedPath.qll b/go/ql/lib/semmle/go/security/TaintedPath.qll index 674cda1157c..b814ad5d4ac 100644 --- a/go/ql/lib/semmle/go/security/TaintedPath.qll +++ b/go/ql/lib/semmle/go/security/TaintedPath.qll @@ -17,6 +17,8 @@ module TaintedPath { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about path-traversal vulnerabilities. */ diff --git a/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll b/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll index 885aa7a7053..91bbcfaa1ed 100644 --- a/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll +++ b/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll @@ -27,6 +27,8 @@ module UncontrolledAllocationSize { node2 = cn.getResult(0) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about uncontrolled allocation size issues. */ diff --git a/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll b/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll index 1d18ac5f639..19047b12b78 100644 --- a/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll +++ b/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll @@ -44,6 +44,8 @@ module UnsafeUnzipSymlink { predicate isSink(DataFlow::Node sink) { sink instanceof SymlinkSink } predicate isBarrier(DataFlow::Node node) { node instanceof SymlinkSanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/lib/semmle/go/security/XPathInjection.qll b/go/ql/lib/semmle/go/security/XPathInjection.qll index 61bd00977da..900b8105337 100644 --- a/go/ql/lib/semmle/go/security/XPathInjection.qll +++ b/go/ql/lib/semmle/go/security/XPathInjection.qll @@ -19,6 +19,8 @@ module XPathInjection { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/lib/semmle/go/security/ZipSlip.qll b/go/ql/lib/semmle/go/security/ZipSlip.qll index f16daf84c3d..6de2be91509 100644 --- a/go/ql/lib/semmle/go/security/ZipSlip.qll +++ b/go/ql/lib/semmle/go/security/ZipSlip.qll @@ -17,6 +17,8 @@ module ZipSlip { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about zip-slip vulnerabilities. */ diff --git a/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql b/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql index 89954b08f99..f6e3df7d1d9 100644 --- a/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql +++ b/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql @@ -103,6 +103,8 @@ module IncompleteHostNameRegexpConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { StringOps::Concatenation::taintStep(node1, node2) } + + predicate observeDiffInformedIncrementalMode() { any() } } module Flow = DataFlow::Global; diff --git a/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql b/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql index a478968e58b..d1c501b37ec 100644 --- a/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql +++ b/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql @@ -72,6 +72,8 @@ module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { isSourceString(source, _) } predicate isSink(DataFlow::Node sink) { sink instanceof RegexpPattern } + + predicate observeDiffInformedIncrementalMode() { any() } } module Flow = DataFlow::Global; diff --git a/go/ql/src/Security/CWE-020/SuspiciousCharacterInRegexp.ql b/go/ql/src/Security/CWE-020/SuspiciousCharacterInRegexp.ql index e58cf864490..96688298ec3 100644 --- a/go/ql/src/Security/CWE-020/SuspiciousCharacterInRegexp.ql +++ b/go/ql/src/Security/CWE-020/SuspiciousCharacterInRegexp.ql @@ -40,6 +40,8 @@ module SuspiciousCharacterInRegexpConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { isSourceString(source, _) } predicate isSink(DataFlow::Node sink) { sink instanceof RegexpPattern } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/Security/CWE-209/StackTraceExposure.ql b/go/ql/src/Security/CWE-209/StackTraceExposure.ql index 3440fdba314..408e12b3c15 100644 --- a/go/ql/src/Security/CWE-209/StackTraceExposure.ql +++ b/go/ql/src/Security/CWE-209/StackTraceExposure.ql @@ -62,6 +62,8 @@ module StackTraceExposureConfig implements DataFlow::ConfigSig { cgn.dominates(node.getBasicBlock()) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/Security/CWE-326/InsufficientKeySize.ql b/go/ql/src/Security/CWE-326/InsufficientKeySize.ql index 19db3ef63ae..6fa421baaeb 100644 --- a/go/ql/src/Security/CWE-326/InsufficientKeySize.ql +++ b/go/ql/src/Security/CWE-326/InsufficientKeySize.ql @@ -25,6 +25,8 @@ module Config implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node = DataFlow::BarrierGuard::getABarrierNode() } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/Security/CWE-352/ConstantOauth2State.ql b/go/ql/src/Security/CWE-352/ConstantOauth2State.ql index 31b6907ffdd..8898a6bb101 100644 --- a/go/ql/src/Security/CWE-352/ConstantOauth2State.ql +++ b/go/ql/src/Security/CWE-352/ConstantOauth2State.ql @@ -40,6 +40,8 @@ module ConstantStateFlowConfig implements DataFlow::ConfigSig { } predicate isSink(DataFlow::Node sink) { isSinkCall(sink, _) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/Security/CWE-640/EmailInjection.qll b/go/ql/src/Security/CWE-640/EmailInjection.qll index 35b7795ad55..e3016b44aa1 100644 --- a/go/ql/src/Security/CWE-640/EmailInjection.qll +++ b/go/ql/src/Security/CWE-640/EmailInjection.qll @@ -20,6 +20,8 @@ module EmailInjection { predicate isSource(DataFlow::Node source) { source instanceof Source } predicate isSink(DataFlow::Node sink) { sink instanceof Sink } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about email-injection vulnerabilities. */ diff --git a/go/ql/src/experimental/CWE-090/LDAPInjection.qll b/go/ql/src/experimental/CWE-090/LDAPInjection.qll index fd138fa0645..a770666fe93 100644 --- a/go/ql/src/experimental/CWE-090/LDAPInjection.qll +++ b/go/ql/src/experimental/CWE-090/LDAPInjection.qll @@ -101,6 +101,8 @@ private module LdapInjectionConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof LdapSink } predicate isBarrier(DataFlow::Node node) { node instanceof LdapSanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/experimental/CWE-203/Timing.ql b/go/ql/src/experimental/CWE-203/Timing.ql index ab0b50a657a..e488adf2f97 100644 --- a/go/ql/src/experimental/CWE-203/Timing.ql +++ b/go/ql/src/experimental/CWE-203/Timing.ql @@ -102,6 +102,8 @@ module Config implements DataFlow::ConfigSig { } predicate isSink(DataFlow::Node sink) { sink instanceof Sink and not isBadResult(sink) } + + predicate observeDiffInformedIncrementalMode() { any() } } module Flow = TaintTracking::Global; diff --git a/go/ql/src/experimental/CWE-285/PamAuthBypass.ql b/go/ql/src/experimental/CWE-285/PamAuthBypass.ql index 02f47ba2b73..db2dc94f8f0 100644 --- a/go/ql/src/experimental/CWE-285/PamAuthBypass.ql +++ b/go/ql/src/experimental/CWE-285/PamAuthBypass.ql @@ -42,6 +42,8 @@ module PamStartToAcctMgmtConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { exists(PamAcctMgmt p | p.getACall().getReceiver() = sink) } + + predicate observeDiffInformedIncrementalMode() { any() } } module PamStartToAcctMgmtFlow = TaintTracking::Global; @@ -55,6 +57,8 @@ module PamStartToAuthenticateConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { exists(PamAuthenticate p | p.getACall().getReceiver() = sink) } + + predicate observeDiffInformedIncrementalMode() { any() } } module PamStartToAuthenticateFlow = TaintTracking::Global; diff --git a/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll b/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll index 7a62041a774..0a2739eabc7 100644 --- a/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll +++ b/go/ql/src/experimental/CWE-287/ImproperLdapAuthCustomizations.qll @@ -74,6 +74,8 @@ module ImproperLdapAuth { predicate isSink(DataFlow::Node sink) { sink instanceof LdapAuthSink } predicate isBarrier(DataFlow::Node node) { node instanceof LdapSanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/experimental/CWE-321-V2/HardCodedKeys.ql b/go/ql/src/experimental/CWE-321-V2/HardCodedKeys.ql index 39cc2ca9917..0cd5246519b 100644 --- a/go/ql/src/experimental/CWE-321-V2/HardCodedKeys.ql +++ b/go/ql/src/experimental/CWE-321-V2/HardCodedKeys.ql @@ -33,6 +33,8 @@ module JwtParseWithConstantKeyConfig implements DataFlow::ConfigSig { // second part is the JWT Parsing Functions that get a string or byte as an argument sink = any(JwtParse jp).getKeyArg() } + + predicate observeDiffInformedIncrementalMode() { any() } } module GolangJwtKeyFuncConfig implements DataFlow::ConfigSig { diff --git a/go/ql/src/experimental/CWE-327/WeakCryptoAlgorithmCustomizations.qll b/go/ql/src/experimental/CWE-327/WeakCryptoAlgorithmCustomizations.qll index 1d64d731f50..b9104f1fe09 100644 --- a/go/ql/src/experimental/CWE-327/WeakCryptoAlgorithmCustomizations.qll +++ b/go/ql/src/experimental/CWE-327/WeakCryptoAlgorithmCustomizations.qll @@ -54,6 +54,8 @@ module WeakCryptoAlgorithm { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/experimental/CWE-369/DivideByZero.ql b/go/ql/src/experimental/CWE-369/DivideByZero.ql index b6709b97d71..99cd120dbf8 100644 --- a/go/ql/src/experimental/CWE-369/DivideByZero.ql +++ b/go/ql/src/experimental/CWE-369/DivideByZero.ql @@ -45,6 +45,8 @@ module Config implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink = DataFlow::exprNode(any(QuoExpr e).getRightOperand()) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/experimental/CWE-74/DsnInjectionCustomizations.qll b/go/ql/src/experimental/CWE-74/DsnInjectionCustomizations.qll index 2c320855072..88a45d70ba5 100644 --- a/go/ql/src/experimental/CWE-74/DsnInjectionCustomizations.qll +++ b/go/ql/src/experimental/CWE-74/DsnInjectionCustomizations.qll @@ -19,6 +19,8 @@ private module DsnInjectionConfig implements DataFlow::ConfigSig { } predicate isBarrier(DataFlow::Node node) { node instanceof RegexpCheckBarrier } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/go/ql/src/experimental/frameworks/DecompressionBombs.qll b/go/ql/src/experimental/frameworks/DecompressionBombs.qll index 5828cd60e52..170104ebd43 100644 --- a/go/ql/src/experimental/frameworks/DecompressionBombs.qll +++ b/go/ql/src/experimental/frameworks/DecompressionBombs.qll @@ -56,6 +56,8 @@ module DecompressionBomb { addStep.isAdditionalFlowStep(fromNode, fromState, toNode, toState) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks taint flow for reasoning about decompression bomb vulnerabilities. */ From 4dd07f475b7c7ecfba42ea4d7f3a1003f166b69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 3 Jun 2025 20:39:31 +0200 Subject: [PATCH 04/35] C++: mass enable diff-informed data flow An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on https://github.com/github/codeql/pull/18342 and https://github.com/github/codeql-patch/pull/88 --- .../semmle/code/cpp/security/PrivateCleartextWrite.qll | 2 ++ cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql | 2 ++ cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll | 2 ++ cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql | 2 ++ cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql | 2 ++ cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql | 2 ++ cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql | 2 ++ cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql | 2 ++ cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql | 2 ++ cpp/ql/src/Security/CWE/CWE-611/XXE.ql | 2 ++ cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql | 2 ++ .../Security/CWE/CWE-190/AllocMultiplicationOverflow.ql | 2 ++ 12 files changed, 24 insertions(+) diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll b/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll index 99cd8bfb7fd..e6495f9a2aa 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll @@ -42,6 +42,8 @@ module PrivateCleartextWrite { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } module WriteFlow = TaintTracking::Global; diff --git a/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql b/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql index d1645007a32..23240d385ad 100644 --- a/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql +++ b/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql @@ -48,6 +48,8 @@ module CastToPointerArithFlowConfig implements DataFlow::StateConfigSig { predicate isBarrierIn(DataFlow::Node node) { isSource(node, _) } predicate isBarrierOut(DataFlow::Node node) { isSink(node, _) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll b/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll index ecb60d113d8..40c0f2173d9 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll +++ b/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll @@ -141,6 +141,8 @@ private module NetworkToBufferSizeConfig implements DataFlow::ConfigSig { gc.controls(node.asExpr().getBasicBlock(), _) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } module NetworkToBufferSizeFlow = DataFlow::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql b/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql index e5fd1a94f18..aedb21da516 100644 --- a/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql +++ b/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql @@ -39,6 +39,8 @@ module Config implements DataFlow::ConfigSig { or node.asCertainDefinition().getUnspecifiedType() instanceof ArithmeticType } + + predicate observeDiffInformedIncrementalMode() { any() } } module Flow = TaintTracking::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql b/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql index b5dc4d893b2..17c1b09c3e6 100644 --- a/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql +++ b/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql @@ -66,6 +66,8 @@ module ImproperArrayIndexValidationConfig implements DataFlow::ConfigSig { not offsetIsAlwaysInBounds(arrayExpr, offsetExpr) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } module ImproperArrayIndexValidation = TaintTracking::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql index 04b4fe45fcf..37e3fa0c49f 100644 --- a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql +++ b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql @@ -44,6 +44,8 @@ module Config implements DataFlow::ConfigSig { or isArithmeticNonCharType(node.asCertainDefinition().getUnspecifiedType()) } + + predicate observeDiffInformedIncrementalMode() { any() } } module Flow = TaintTracking::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql index 8e6bbefbaac..6ff06d355b9 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql @@ -94,6 +94,8 @@ module Config implements DataFlow::ConfigSig { not iTo instanceof PointerArithmeticInstruction ) } + + predicate observeDiffInformedIncrementalMode() { any() } } module Flow = TaintTracking::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql b/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql index 5a6b50675e8..121595e61b0 100644 --- a/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql +++ b/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql @@ -34,6 +34,8 @@ module ExposedSystemDataConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node.asIndirectArgument() = any(MemsetFunction func).getACallToThisFunction().getAnArgument() } + + predicate observeDiffInformedIncrementalMode() { any() } } module ExposedSystemData = TaintTracking::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql b/cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql index f3c9ca189b9..2a22f122ca5 100644 --- a/cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql +++ b/cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql @@ -54,6 +54,8 @@ module PotentiallyExposedSystemDataConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node.asIndirectArgument() = any(MemsetFunction func).getACallToThisFunction().getAnArgument() } + + predicate observeDiffInformedIncrementalMode() { any() } } module PotentiallyExposedSystemData = TaintTracking::Global; diff --git a/cpp/ql/src/Security/CWE/CWE-611/XXE.ql b/cpp/ql/src/Security/CWE/CWE-611/XXE.ql index 56a74d2f70b..ba09e797491 100644 --- a/cpp/ql/src/Security/CWE/CWE-611/XXE.ql +++ b/cpp/ql/src/Security/CWE/CWE-611/XXE.ql @@ -45,6 +45,8 @@ module XxeConfig implements DataFlow::StateConfigSig { } predicate neverSkip(DataFlow::Node node) { none() } + + predicate observeDiffInformedIncrementalMode() { any() } } module XxeFlow = DataFlow::GlobalWithState; diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql b/cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql index d5b7b97c136..cfe04ba23bf 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql @@ -48,6 +48,8 @@ module WordexpTaintConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { node.asExpr().getUnspecifiedType() instanceof IntegralType } + + predicate observeDiffInformedIncrementalMode() { any() } } module WordexpTaint = TaintTracking::Global; diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql b/cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql index 00cf017297f..397a0325d77 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql @@ -30,6 +30,8 @@ module MultToAllocConfig implements DataFlow::ConfigSig { // something that affects an allocation size node.asExpr() = any(HeuristicAllocationExpr ae).getSizeExpr().getAChild*() } + + predicate observeDiffInformedIncrementalMode() { any() } } module MultToAlloc = DataFlow::Global; From f2085c22930f08b9145e631e893628e0ad6381a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 3 Jun 2025 20:25:28 +0200 Subject: [PATCH 05/35] C#: mass enable diff-informed data flow An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on https://github.com/github/codeql/pull/18344 and https://github.com/github/codeql-patch/pull/88 --- .../csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll | 2 ++ .../security/cryptography/HardcodedSymmetricEncryptionKey.qll | 2 ++ .../code/csharp/security/dataflow/CleartextStorageQuery.qll | 2 ++ .../semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll | 2 ++ .../code/csharp/security/dataflow/CommandInjectionQuery.qll | 2 ++ .../security/dataflow/ExposureOfPrivateInformationQuery.qll | 2 ++ .../semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll | 2 ++ .../semmle/code/csharp/security/dataflow/LogForgingQuery.qll | 2 ++ .../code/csharp/security/dataflow/MissingXMLValidationQuery.qll | 2 ++ .../ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll | 2 ++ .../code/csharp/security/dataflow/RegexInjectionQuery.qll | 2 ++ .../code/csharp/security/dataflow/ResourceInjectionQuery.qll | 2 ++ .../semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll | 2 ++ .../semmle/code/csharp/security/dataflow/TaintedPathQuery.qll | 2 ++ .../semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll | 2 ++ .../code/csharp/security/dataflow/XPathInjectionQuery.qll | 2 ++ .../lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll | 2 ++ csharp/ql/src/Likely Bugs/LeapYear/UnsafeYearConstruction.ql | 2 ++ csharp/ql/src/Security Features/CWE-091/XMLInjection.ql | 2 ++ .../ql/src/Security Features/CWE-114/AssemblyPathInjection.ql | 2 ++ .../src/Security Features/CWE-134/UncontrolledFormatString.ql | 2 ++ .../src/Security Features/CWE-201/ExposureInTransmittedData.ql | 2 ++ .../Security Features/CWE-209/ExceptionInformationExposure.ql | 2 ++ csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql | 2 ++ .../ql/src/Security Features/CWE-327/InsecureSQLConnection.ql | 2 ++ csharp/ql/src/Security Features/InsecureRandomness.ql | 2 ++ 26 files changed, 52 insertions(+) diff --git a/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll index 82bd0d30cab..61c036f031b 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll @@ -70,6 +70,8 @@ private module SymmetricKeyConfig implements DataFlow::ConfigSig { /** Holds if the node is a key sanitizer. */ predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof KeySanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll b/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll index 2e387cc2da6..37690c169c0 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll @@ -82,6 +82,8 @@ module HardcodedSymmetricEncryptionKey { succ.asExpr() = mc ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll index cbb10146a6a..3e4642411f0 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll @@ -32,6 +32,8 @@ private module ClearTextStorageConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 8ec9122864f..20d5bbe10ca 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll @@ -33,6 +33,8 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 84352389c41..9528676af8e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll @@ -42,6 +42,8 @@ module CommandInjectionConfig implements DataFlow::ConfigSig { * `node` from the data flow graph. */ predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll index 0726acb05ed..85782fe4936 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll @@ -32,6 +32,8 @@ private module ExposureOfPrivateInformationConfig implements DataFlow::ConfigSig predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 e2e96034c41..c2e25f0e522 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll @@ -45,6 +45,8 @@ module LdapInjectionConfig implements DataFlow::ConfigSig { * `node` from the data flow graph. */ predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 422b5dc717a..e06e728514d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll @@ -35,6 +35,8 @@ private module LogForgingConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 3401dab7ea2..3fcdc2b88ca 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll @@ -39,6 +39,8 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { exists(sink.(Sink).getReason()) } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 94dbf1d4cdc..c3fdbc2dc3e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll @@ -33,6 +33,8 @@ private module ReDoSConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 620c07a9ea2..5cd23258829 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll @@ -33,6 +33,8 @@ private module RegexInjectionConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 40814729e55..e1542986411 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll @@ -32,6 +32,8 @@ private module ResourceInjectionConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 cc7b61c31f2..510b0381143 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll @@ -43,6 +43,8 @@ module SqlInjectionConfig implements DataFlow::ConfigSig { * `node` from the data flow graph. */ predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 bdc7245aeb2..2f20eb6e342 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll @@ -35,6 +35,8 @@ private module TaintedPathConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 0838fe7be4b..b095305742d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll @@ -37,6 +37,8 @@ private module UrlRedirectConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** 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 140870c70fa..5cf934ef43e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll @@ -43,6 +43,8 @@ module XpathInjectionConfig implements DataFlow::ConfigSig { * `node` from the data flow graph. */ predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll index fad3917553d..1639563e964 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll @@ -30,6 +30,8 @@ private module ZipSlipConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof Sink } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/src/Likely Bugs/LeapYear/UnsafeYearConstruction.ql b/csharp/ql/src/Likely Bugs/LeapYear/UnsafeYearConstruction.ql index c98f2bef8a2..8da3a910b0d 100644 --- a/csharp/ql/src/Likely Bugs/LeapYear/UnsafeYearConstruction.ql +++ b/csharp/ql/src/Likely Bugs/LeapYear/UnsafeYearConstruction.ql @@ -26,6 +26,8 @@ module UnsafeYearCreationFromArithmeticConfig implements DataFlow::ConfigSig { oc.getObjectType().getABaseType*().hasFullyQualifiedName("System", "DateTime") ) } + + predicate observeDiffInformedIncrementalMode() { any() } } module UnsafeYearCreationFromArithmetic = diff --git a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql index 16eca675e6a..2276b660f9f 100644 --- a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql +++ b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql @@ -45,6 +45,8 @@ module XmlInjectionConfig implements DataFlow::ConfigSig { mc = node.asExpr() ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql index 118591f3f9e..9cd6fc68b4c 100644 --- a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql +++ b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql @@ -41,6 +41,8 @@ module AssemblyPathInjectionConfig implements DataFlow::ConfigSig { name = "UnsafeLoadFrom" and arg = 0 ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql index b99839226c5..8a699abfba8 100644 --- a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql +++ b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql @@ -22,6 +22,8 @@ module FormatStringConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(FormatStringParseCall call).getFormatExpr() } + + predicate observeDiffInformedIncrementalMode() { any() } } module FormatString = TaintTracking::Global; diff --git a/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql b/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql index 0d71a08fe97..a29919fc09d 100644 --- a/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql +++ b/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql @@ -41,6 +41,8 @@ module ExposureInTransmittedDataConfig implements DataFlow::ConfigSig { } predicate isSink(DataFlow::Node sink) { sink instanceof RemoteFlowSink } + + predicate observeDiffInformedIncrementalMode() { any() } } module ExposureInTransmittedData = TaintTracking::Global; diff --git a/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql b/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql index 114bdf7ccea..7ec34b7c3cc 100644 --- a/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql +++ b/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql @@ -59,6 +59,8 @@ module ExceptionInformationExposureConfig implements DataFlow::ConfigSig { // Do not flow through Message sanitizer.asExpr().getType().(RefType).getABaseType*() instanceof SystemExceptionClass } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql b/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql index 15da9c2d824..b48ddbf0f35 100644 --- a/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql +++ b/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql @@ -37,6 +37,8 @@ module AddCertToRootStoreConfig implements DataFlow::ConfigSig { sink.asExpr() = mc.getQualifier() ) } + + predicate observeDiffInformedIncrementalMode() { any() } } module AddCertToRootStore = DataFlow::Global; diff --git a/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql b/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql index adde1b948e4..330ad1c1c32 100644 --- a/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql +++ b/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql @@ -40,6 +40,8 @@ module InsecureSqlConnectionConfig implements DataFlow::ConfigSig { ) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** diff --git a/csharp/ql/src/Security Features/InsecureRandomness.ql b/csharp/ql/src/Security Features/InsecureRandomness.ql index 504756e1db5..2c2df7010c6 100644 --- a/csharp/ql/src/Security Features/InsecureRandomness.ql +++ b/csharp/ql/src/Security Features/InsecureRandomness.ql @@ -49,6 +49,8 @@ module Random { // succ = array_or_indexer[pred] - use of random numbers in an index succ.asExpr().(ElementAccess).getAnIndex() = pred.asExpr() } + + predicate observeDiffInformedIncrementalMode() { any() } } /** From f2bd454e99af38e6b232e631aeb4754c5c969b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 3 Jun 2025 20:04:05 +0200 Subject: [PATCH 06/35] Actions: mass enable diff-informed data flow An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on https://github.com/github/codeql/pull/18346 and https://github.com/github/codeql-patch/pull/88 --- .../ql/lib/codeql/actions/security/OutputClobberingQuery.qll | 2 ++ actions/ql/lib/codeql/actions/security/RequestForgeryQuery.qll | 2 ++ .../ql/lib/codeql/actions/security/SecretExfiltrationQuery.qll | 2 ++ actions/ql/src/Models/CompositeActionsSinks.ql | 2 ++ actions/ql/src/Models/CompositeActionsSources.ql | 2 ++ actions/ql/src/Models/CompositeActionsSummaries.ql | 2 ++ actions/ql/src/Models/ReusableWorkflowsSinks.ql | 2 ++ actions/ql/src/Models/ReusableWorkflowsSources.ql | 2 ++ actions/ql/src/Models/ReusableWorkflowsSummaries.ql | 2 ++ 9 files changed, 18 insertions(+) diff --git a/actions/ql/lib/codeql/actions/security/OutputClobberingQuery.qll b/actions/ql/lib/codeql/actions/security/OutputClobberingQuery.qll index 1d0de83afa3..485d2762798 100644 --- a/actions/ql/lib/codeql/actions/security/OutputClobberingQuery.qll +++ b/actions/ql/lib/codeql/actions/security/OutputClobberingQuery.qll @@ -214,6 +214,8 @@ private module OutputClobberingConfig implements DataFlow::ConfigSig { ) ) } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unsafe user input that is used to construct and evaluate an environment variable. */ diff --git a/actions/ql/lib/codeql/actions/security/RequestForgeryQuery.qll b/actions/ql/lib/codeql/actions/security/RequestForgeryQuery.qll index ca0ac267131..fb89ebdc8ba 100644 --- a/actions/ql/lib/codeql/actions/security/RequestForgeryQuery.qll +++ b/actions/ql/lib/codeql/actions/security/RequestForgeryQuery.qll @@ -16,6 +16,8 @@ private module RequestForgeryConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unsafe user input that is used to construct and evaluate a system command. */ diff --git a/actions/ql/lib/codeql/actions/security/SecretExfiltrationQuery.qll b/actions/ql/lib/codeql/actions/security/SecretExfiltrationQuery.qll index 18a480b1cec..b3d59210053 100644 --- a/actions/ql/lib/codeql/actions/security/SecretExfiltrationQuery.qll +++ b/actions/ql/lib/codeql/actions/security/SecretExfiltrationQuery.qll @@ -15,6 +15,8 @@ private module SecretExfiltrationConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } predicate isSink(DataFlow::Node sink) { sink instanceof SecretExfiltrationSink } + + predicate observeDiffInformedIncrementalMode() { any() } } /** Tracks flow of unsafe user input that is used in a context where it may lead to a secret exfiltration. */ diff --git a/actions/ql/src/Models/CompositeActionsSinks.ql b/actions/ql/src/Models/CompositeActionsSinks.ql index b5ce78fe062..82f0754f03e 100644 --- a/actions/ql/src/Models/CompositeActionsSinks.ql +++ b/actions/ql/src/Models/CompositeActionsSinks.ql @@ -24,6 +24,8 @@ private module MyConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof CodeInjectionSink and not madSink(sink, "code-injection") } + + predicate observeDiffInformedIncrementalMode() { any() } } module MyFlow = TaintTracking::Global; diff --git a/actions/ql/src/Models/CompositeActionsSources.ql b/actions/ql/src/Models/CompositeActionsSources.ql index 8e4275f27c7..c9974cd7361 100644 --- a/actions/ql/src/Models/CompositeActionsSources.ql +++ b/actions/ql/src/Models/CompositeActionsSources.ql @@ -34,6 +34,8 @@ private module MyConfig implements DataFlow::ConfigSig { isSink(node) and set instanceof DataFlow::FieldContent } + + predicate observeDiffInformedIncrementalMode() { any() } } module MyFlow = TaintTracking::Global; diff --git a/actions/ql/src/Models/CompositeActionsSummaries.ql b/actions/ql/src/Models/CompositeActionsSummaries.ql index 8b8b5af3c45..814498f639e 100644 --- a/actions/ql/src/Models/CompositeActionsSummaries.ql +++ b/actions/ql/src/Models/CompositeActionsSummaries.ql @@ -25,6 +25,8 @@ private module MyConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { exists(CompositeAction c | c.getAnOutputExpr() = sink.asExpr()) } + + predicate observeDiffInformedIncrementalMode() { any() } } module MyFlow = TaintTracking::Global; diff --git a/actions/ql/src/Models/ReusableWorkflowsSinks.ql b/actions/ql/src/Models/ReusableWorkflowsSinks.ql index 05334a533dd..8d02debbdb4 100644 --- a/actions/ql/src/Models/ReusableWorkflowsSinks.ql +++ b/actions/ql/src/Models/ReusableWorkflowsSinks.ql @@ -24,6 +24,8 @@ private module MyConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { sink instanceof CodeInjectionSink and not madSink(sink, "code-injection") } + + predicate observeDiffInformedIncrementalMode() { any() } } module MyFlow = TaintTracking::Global; diff --git a/actions/ql/src/Models/ReusableWorkflowsSources.ql b/actions/ql/src/Models/ReusableWorkflowsSources.ql index e5612d06343..a7112bf3758 100644 --- a/actions/ql/src/Models/ReusableWorkflowsSources.ql +++ b/actions/ql/src/Models/ReusableWorkflowsSources.ql @@ -34,6 +34,8 @@ private module MyConfig implements DataFlow::ConfigSig { isSink(node) and set instanceof DataFlow::FieldContent } + + predicate observeDiffInformedIncrementalMode() { any() } } module MyFlow = TaintTracking::Global; diff --git a/actions/ql/src/Models/ReusableWorkflowsSummaries.ql b/actions/ql/src/Models/ReusableWorkflowsSummaries.ql index 444ce028954..a05bec744f8 100644 --- a/actions/ql/src/Models/ReusableWorkflowsSummaries.ql +++ b/actions/ql/src/Models/ReusableWorkflowsSummaries.ql @@ -25,6 +25,8 @@ private module MyConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node sink) { exists(ReusableWorkflow w | w.getAnOutputExpr() = sink.asExpr()) } + + predicate observeDiffInformedIncrementalMode() { any() } } module MyFlow = TaintTracking::Global; From b112b93d7527a87614b8c9f72567060433f04540 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 16 Jun 2025 11:30:19 +0200 Subject: [PATCH 07/35] C++: add `namespaceattributes` table to store namespace attributes --- cpp/ql/lib/semmlecode.cpp.dbscheme | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index a8c2176e9a5..9baef67d1ff 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -1139,6 +1139,11 @@ varattributes( int spec_id: @attribute ref ); +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + stmtattributes( int stmt_id: @stmt ref, int spec_id: @attribute ref From e6f118374f8aabe5d9f98c44713878f22051ca7a Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 16 Jun 2025 11:41:01 +0200 Subject: [PATCH 08/35] C++: add predicate to `Namespace` class to retrieve associated attributes --- cpp/ql/lib/semmle/code/cpp/Namespace.qll | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/ql/lib/semmle/code/cpp/Namespace.qll b/cpp/ql/lib/semmle/code/cpp/Namespace.qll index dc138f67524..b63beef3f4a 100644 --- a/cpp/ql/lib/semmle/code/cpp/Namespace.qll +++ b/cpp/ql/lib/semmle/code/cpp/Namespace.qll @@ -99,6 +99,11 @@ class Namespace extends NameQualifyingElement, @namespace { /** Gets a file which declares (part of) this namespace. */ File getAFile() { result = this.getADeclarationEntry().getLocation().getFile() } + + /** Gets an attribute of this namespace. */ + Attribute getAnAttribute() { + namespaceattributes(underlyingElement(this), unresolveElement(result)) + } } /** From 927c220ddca201c44c18c4ea18ff24bbc1140cc3 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 16 Jun 2025 11:41:34 +0200 Subject: [PATCH 09/35] C++: add change note for `Namespace` --- cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md diff --git a/cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md b/cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md new file mode 100644 index 00000000000..cbed27e109c --- /dev/null +++ b/cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added a predicate `getAnAttribute` to `Namespace` to retrieve a namespace attribute. From fc9e5bdbf7b9806174d0c35b1bd7a4a3ca9abe80 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 16 Jun 2025 12:01:24 +0200 Subject: [PATCH 10/35] C++: add upgrade and downgrade scripts --- .../old.dbscheme | 2499 +++++++++++++++++ .../semmlecode.cpp.dbscheme | 2494 ++++++++++++++++ .../upgrade.properties | 3 + .../old.dbscheme | 2494 ++++++++++++++++ .../semmlecode.cpp.dbscheme | 2499 +++++++++++++++++ .../upgrade.properties | 2 + 6 files changed, 9991 insertions(+) create mode 100644 cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme create mode 100644 cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme create mode 100644 cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties create mode 100644 cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/old.dbscheme create mode 100644 cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/semmlecode.cpp.dbscheme create mode 100644 cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/upgrade.properties diff --git a/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme b/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme new file mode 100644 index 00000000000..9baef67d1ff --- /dev/null +++ b/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme @@ -0,0 +1,2499 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * 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: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file 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 +); + +/** + * 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( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int 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`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + 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 +); + +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 +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* 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; diff --git a/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme b/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..a8c2176e9a5 --- /dev/null +++ b/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme @@ -0,0 +1,2494 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * 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: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file 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 +); + +/** + * 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( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int 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`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + 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 +); + +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 +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* 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; diff --git a/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties b/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties new file mode 100644 index 00000000000..07a8d70b052 --- /dev/null +++ b/cpp/downgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties @@ -0,0 +1,3 @@ +description: Add a predicate `getAnAttribute` to `Namespace` +compatibility: full +namespaceattributes.rel: delete diff --git a/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/old.dbscheme b/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/old.dbscheme new file mode 100644 index 00000000000..a8c2176e9a5 --- /dev/null +++ b/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/old.dbscheme @@ -0,0 +1,2494 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * 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: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file 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 +); + +/** + * 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( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int 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`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + 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 +); + +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 +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* 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; diff --git a/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..9baef67d1ff --- /dev/null +++ b/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/semmlecode.cpp.dbscheme @@ -0,0 +1,2499 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * 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: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file 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 +); + +/** + * 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( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int 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`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + 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 +); + +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 +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* 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; diff --git a/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/upgrade.properties b/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/upgrade.properties new file mode 100644 index 00000000000..9a6e7e428a7 --- /dev/null +++ b/cpp/ql/lib/upgrades/a8c2176e9a5cf9be8d17053a4c8e7e56b5aced6d/upgrade.properties @@ -0,0 +1,2 @@ +description: Add a predicate `getAnAttribute` to `Namespace` +compatibility: backwards From 09bc57a003fc70ae8d1ac13dc61c31e2b7eca513 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 16 Jun 2025 14:25:45 +0200 Subject: [PATCH 11/35] C++: update stats file --- cpp/ql/lib/semmlecode.cpp.dbscheme.stats | 10228 +++++++++++---------- 1 file changed, 5263 insertions(+), 4965 deletions(-) diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index 089d69c641c..a09e3c44d34 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -2,7 +2,7 @@ @compilation - 15785 + 14477 @externalDataElement @@ -18,63 +18,63 @@ @location_default - 36090723 + 36187125 @location_stmt - 5203175 + 5217074 @location_expr - 17959858 + 18007831 @diagnostic - 1588 + 1484 @file - 81417 + 74673 @folder - 15468 + 14187 @macro_expansion - 39234203 + 39310397 @other_macro_reference - 312446 + 300692 @function - 4000085 + 4010769 @fun_decl - 4138135 + 4149688 @var_decl - 9237636 + 9262560 @type_decl - 1840533 + 1687983 @namespace_decl - 429821 + 430961 @using_declaration - 334532 + 306602 @using_directive - 8117 + 6474 @using_enum_declaration @@ -82,27 +82,27 @@ @static_assert - 183028 + 183513 @parameter - 6939004 + 6957539 @membervariable - 1489415 + 1493394 @globalvariable - 486788 + 488088 @localvariable - 727548 + 725943 @enumconstant - 343845 + 344763 @errortype @@ -334,35 +334,35 @@ @pointer - 470186 + 455607 @type_with_specifiers - 693863 + 695716 @array - 98055 + 98317 @routineptr - 857913 + 684228 @reference - 966848 + 969430 @gnu_vector - 843 + 774 @routinereference - 469 + 374 @rvalue_reference - 290677 + 291453 @block @@ -370,51 +370,51 @@ @decltype - 102076 + 102348 @type_operator - 8519 + 7960 @usertype - 4863363 + 4459321 @mangledname - 6313668 + 6330532 @type_mention - 5813149 + 5828677 @concept_template - 3868 + 3614 @routinetype - 757852 + 604424 @ptrtomember - 12026 + 11030 @specifier - 7724 + 7745 @gnuattribute - 559459 + 559628 @stdattribute - 349236 + 350169 @declspec - 328850 + 329728 @msattribute @@ -422,19 +422,19 @@ @alignas - 2171 + 2166 @attribute_arg_token - 20935 + 16696 @attribute_arg_constant_expr - 86916 + 82159 @attribute_arg_expr - 1753 + 1608 @attribute_arg_empty @@ -446,23 +446,23 @@ @attribute_arg_type - 461 + 460 @derivation - 598061 + 476983 @frienddecl - 878379 + 700584 @comment - 11190894 + 11220785 @namespace - 10800 + 9905 @specialnamequalifyingelement @@ -470,15 +470,15 @@ @namequalifier - 3255226 + 3041824 @value - 13438640 + 13474536 @initialiser - 2334426 + 2340619 @address_of @@ -486,131 +486,131 @@ @indirect - 403075 + 404151 @array_to_pointer - 1948652 + 1953741 @parexpr - 4902380 + 4915183 @arithnegexpr - 585003 + 586531 @unaryplusexpr - 4081 + 4072 @complementexpr - 38098 + 38199 @notexpr - 357277 + 355762 @postincrexpr - 84372 + 84597 @postdecrexpr - 57244 + 57394 @preincrexpr - 96455 + 96713 @predecrexpr - 35725 + 35820 @conditionalexpr - 895536 + 897875 @addexpr - 570027 + 571550 @subexpr - 465581 + 466797 @mulexpr - 434630 + 435791 @divexpr - 58999 + 54099 @remexpr - 20080 + 16015 @paddexpr - 118353 + 118669 @psubexpr - 67856 + 68037 @pdiffexpr - 43732 + 43849 @lshiftexpr - 550224 + 551693 @rshiftexpr - 200019 + 200553 @andexpr - 479933 + 481215 @orexpr - 193537 + 194054 @xorexpr - 73778 + 73975 @eqexpr - 641655 + 643368 @neexpr - 410795 + 411868 @gtexpr - 110852 + 111148 @ltexpr - 139057 + 139428 @geexpr - 81166 + 81383 @leexpr - 291256 + 292034 @assignexpr - 1277725 + 1281138 @assignaddexpr @@ -618,23 +618,23 @@ @assignsubexpr - 15266 + 15307 @assignmulexpr - 13754 + 12614 @assigndivexpr - 6791 + 6809 @assignremexpr - 872 + 874 @assignlshiftexpr - 3694 + 3704 @assignrshiftexpr @@ -642,95 +642,95 @@ @assignandexpr - 6510 + 6528 @assignorexpr - 19554 + 19606 @assignxorexpr - 29829 + 29909 @assignpaddexpr - 18578 + 18627 @assignpsubexpr - 1571 + 1575 @andlogicalexpr - 345664 + 346587 @orlogicalexpr - 1100577 + 1103517 @commaexpr - 168450 + 168900 @subscriptexpr - 433981 + 435140 @callexpr - 300697 + 261549 @vastartexpr - 5071 + 5085 @vaargexpr - 1300 + 1303 @vaendexpr - 2933 + 2941 @vacopyexpr - 170 + 136 @varaccess - 8232599 + 8254589 @runtime_sizeof - 400974 + 402045 @runtime_alignof - 62549 + 49885 @expr_stmt - 147968 + 148363 @routineexpr - 6134317 + 5732152 @type_operand - 1401612 + 1405356 @offsetofexpr - 148626 + 149023 @typescompexpr - 700060 + 701930 @literal - 6102027 + 7967615 @aggregateliteral @@ -738,43 +738,43 @@ @c_style_cast - 6026988 + 6026987 @temp_init - 1073608 + 992498 @errorexpr - 57293 + 45694 @reference_to - 2182339 + 1902971 @ref_indirect - 2642699 + 2107682 @vacuous_destructor_call - 9826 + 7837 @assume - 4383 + 4394 @conjugation - 13 + 12 @realpartexpr - 92 + 84 @imagpartexpr - 92 + 84 @jmulexpr @@ -814,35 +814,35 @@ @thisaccess - 1514601 + 1518618 @new_expr - 57934 + 46205 @delete_expr - 14398 + 11483 @throw_expr - 26079 + 24109 @condition_decl - 437589 + 408900 @braced_init_list - 2328 + 2152 @type_id - 60071 + 47909 @sizeof_pack - 2178 + 1737 @hasassignexpr @@ -886,15 +886,15 @@ @isabstractexpr - 74 + 68 @isbaseofexpr - 276 + 259 @isclassexpr - 2531 + 2538 @isconvtoexpr @@ -902,15 +902,15 @@ @isemptyexpr - 8846 + 8869 @isenumexpr - 2990 + 2998 @ispodexpr - 1041 + 955 @ispolyexpr @@ -926,75 +926,75 @@ @hastrivialdestructor - 3503 + 2794 @uuidof - 27985 + 28060 @delete_array_expr - 1556 + 1427 @new_array_expr - 6914 + 6933 @foldexpr - 1367 + 1247 @ctordirectinit - 141461 + 112822 @ctorvirtualinit - 5041 + 4020 @ctorfieldinit - 257929 + 206503 @ctordelegatinginit - 3613 + 3622 @dtordirectdestruct - 49432 + 39424 @dtorvirtualdestruct - 4998 + 3986 @dtorfielddestruct - 49945 + 39833 @static_cast - 387985 + 389021 @reinterpret_cast - 41729 + 41839 @const_cast - 30676 + 24465 @dynamic_cast - 989 + 907 @lambdaexpr - 17730 + 16482 @param_ref - 177449 + 164043 @noopexpr @@ -1002,7 +1002,7 @@ @istriviallyconstructibleexpr - 3737 + 3747 @isdestructibleexpr @@ -1014,19 +1014,19 @@ @istriviallydestructibleexpr - 996 + 999 @istriviallyassignableexpr - 3737 + 3747 @isnothrowassignableexpr - 5108 + 5121 @istrivialexpr - 3644 + 3369 @isstandardlayoutexpr @@ -1034,7 +1034,7 @@ @istriviallycopyableexpr - 1538 + 1226 @isliteraltypeexpr @@ -1054,11 +1054,11 @@ @isconstructibleexpr - 3613 + 3622 @isnothrowconstructibleexpr - 20682 + 20737 @hasfinalizerexpr @@ -1094,11 +1094,11 @@ @isfinalexpr - 11792 + 9404 @noexceptexpr - 30678 + 28361 @builtinshufflevector @@ -1106,11 +1106,11 @@ @builtinchooseexpr - 20646 + 20701 @builtinaddressof - 16278 + 15490 @vec_fill @@ -1126,7 +1126,7 @@ @spaceshipexpr - 1404 + 1312 @co_await @@ -1138,7 +1138,7 @@ @isassignable - 437 + 408 @isaggregate @@ -1146,7 +1146,7 @@ @hasuniqueobjectrepresentations - 46 + 43 @builtinbitcast @@ -1154,7 +1154,7 @@ @builtinshuffle - 764 + 701 @blockassignexpr @@ -1162,7 +1162,7 @@ @issame - 4858 + 4539 @isfunction @@ -1270,7 +1270,7 @@ @reuseexpr - 906424 + 846996 @istriviallycopyassignable @@ -1326,7 +1326,7 @@ @referenceconstructsfromtemporary - 46 + 43 @referenceconvertsfromtemporary @@ -1334,7 +1334,7 @@ @isconvertible - 138 + 129 @isvalidwinrttype @@ -1366,99 +1366,99 @@ @c11_generic - 30036 + 30117 @requires_expr - 17660 + 16502 @nested_requirement - 736 + 688 @compound_requirement - 11719 + 10951 @concept_id - 96774 + 90429 @lambdacapture - 28450 + 28526 @stmt_expr - 2026191 + 2031604 @stmt_if - 987571 + 990209 @stmt_while - 39542 + 39647 @stmt_goto - 151183 + 151587 @stmt_label - 72512 + 72705 @stmt_return - 1507458 + 1254954 @stmt_block - 1839752 + 1844666 @stmt_end_test_while - 233017 + 233640 @stmt_for - 84163 + 84388 @stmt_switch_case - 894774 + 836109 @stmt_switch - 440744 + 411847 @stmt_asm - 64027 + 64198 @stmt_decl - 767031 + 769065 @stmt_empty - 459509 + 429382 @stmt_continue - 28016 + 28091 @stmt_break - 139921 + 140292 @stmt_try_block - 28885 + 26703 @stmt_microsoft_try - 223 + 224 @stmt_set_vla_size @@ -1470,19 +1470,19 @@ @stmt_assigned_goto - 12393 + 12426 @stmt_range_based_for - 7391 + 6388 @stmt_handler - 47330 + 43754 @stmt_constexpr_if - 103537 + 103814 @stmt_co_return @@ -1502,51 +1502,51 @@ @ppd_if - 587335 + 588904 @ppd_ifdef - 213791 + 214362 @ppd_ifndef - 157824 + 158245 @ppd_elif - 27363 + 25096 @ppd_else - 235606 + 236236 @ppd_endif - 883245 + 885604 @ppd_plain_include - 397725 + 364778 @ppd_define - 2739070 + 2746387 @ppd_undef - 100671 + 100940 @ppd_pragma - 405677 + 406761 @ppd_include_next - 213 + 170 @ppd_line - 18866 + 18825 @ppd_error @@ -1574,7 +1574,7 @@ @link_target - 923 + 846 @xmldtd @@ -1604,15 +1604,15 @@ compilations - 15785 + 14477 id - 15785 + 14477 cwd - 13 + 12 @@ -1626,7 +1626,7 @@ 1 2 - 15785 + 14477 @@ -1642,7 +1642,7 @@ 1197 1198 - 13 + 12 @@ -1652,19 +1652,19 @@ compilation_args - 1263740 + 1159054 id - 15785 + 14477 num - 1833 + 1681 arg - 36541 + 33514 @@ -1678,77 +1678,77 @@ 36 42 - 1252 + 1149 42 43 - 1371 + 1257 43 44 - 896 + 822 44 45 - 632 + 580 45 51 - 1186 + 1088 51 70 - 606 + 556 71 72 - 883 + 810 72 90 - 1120 + 1028 94 96 - 487 + 447 98 99 - 1674 + 1536 100 102 - 118 + 108 103 104 - 2492 + 2285 104 119 - 1331 + 1221 120 138 - 1160 + 1064 139 140 - 567 + 520 @@ -1764,72 +1764,72 @@ 34 38 - 738 + 677 38 39 - 1872 + 1717 39 40 - 1226 + 1124 40 42 - 1358 + 1245 42 53 - 751 + 689 53 54 - 883 + 810 54 63 - 1120 + 1028 64 67 - 501 + 459 67 68 - 1753 + 1608 68 70 - 1213 + 1112 70 71 - 1753 + 1608 73 79 - 1186 + 1088 79 89 - 1411 + 1294 89 90 - 13 + 12 @@ -1845,57 +1845,57 @@ 43 90 - 79 + 72 90 108 - 145 + 133 108 183 - 131 + 120 198 422 - 145 + 133 422 595 - 158 + 145 595 605 - 158 + 145 605 749 - 145 + 133 750 778 - 145 + 133 781 883 - 145 + 133 930 1190 - 105 + 96 1197 1198 - 474 + 435 @@ -1911,72 +1911,72 @@ 1 5 - 158 + 145 5 7 - 145 + 133 9 12 - 92 + 84 12 15 - 145 + 133 15 18 - 118 + 108 18 22 - 145 + 133 22 27 - 158 + 145 27 29 - 105 + 96 29 34 - 145 + 133 34 44 - 158 + 145 45 63 - 145 + 133 67 94 - 145 + 133 94 164 - 145 + 133 171 199 - 26 + 24 @@ -1992,22 +1992,22 @@ 1 2 - 16734 + 15348 2 3 - 15837 + 14525 3 103 - 2742 + 2515 104 1198 - 1226 + 1124 @@ -2023,17 +2023,17 @@ 1 2 - 24198 + 22193 2 3 - 10892 + 9990 3 62 - 1450 + 1330 @@ -2043,15 +2043,15 @@ compilation_build_mode - 15785 + 14477 id - 15785 + 14477 mode - 13 + 12 @@ -2065,7 +2065,7 @@ 1 2 - 15785 + 14477 @@ -2081,7 +2081,7 @@ 1197 1198 - 13 + 12 @@ -2091,19 +2091,19 @@ compilation_compiling_files - 15785 + 15742 id - 15785 + 2723 num - 13 + 4521 file - 7226 + 13672 @@ -2117,7 +2117,42 @@ 1 2 - 15785 + 1361 + + + 2 + 3 + 163 + + + 3 + 4 + 163 + + + 4 + 5 + 326 + + + 5 + 8 + 163 + + + 8 + 9 + 163 + + + 9 + 13 + 217 + + + 21 + 84 + 163 @@ -2133,7 +2168,42 @@ 1 2 - 15785 + 1361 + + + 2 + 3 + 163 + + + 3 + 4 + 163 + + + 4 + 5 + 326 + + + 5 + 8 + 163 + + + 8 + 9 + 163 + + + 9 + 13 + 217 + + + 21 + 84 + 163 @@ -2147,9 +2217,29 @@ 12 - 1197 - 1198 - 13 + 1 + 2 + 2396 + + + 2 + 3 + 980 + + + 3 + 4 + 490 + + + 4 + 13 + 381 + + + 13 + 51 + 272 @@ -2163,9 +2253,29 @@ 12 - 548 - 549 - 13 + 1 + 2 + 2396 + + + 2 + 3 + 980 + + + 3 + 4 + 490 + + + 4 + 13 + 381 + + + 13 + 49 + 272 @@ -2181,17 +2291,17 @@ 1 2 - 171 + 12311 2 - 3 - 7028 + 4 + 1143 - 28 - 91 - 26 + 4 + 6 + 217 @@ -2207,7 +2317,17 @@ 1 2 - 7226 + 12528 + + + 2 + 4 + 1089 + + + 4 + 5 + 54 @@ -2217,23 +2337,23 @@ compilation_time - 62876 + 62971 id - 15719 + 2723 num - 13 + 4521 kind - 52 + 217 seconds - 17473 + 13346 @@ -2247,160 +2367,290 @@ 1 2 - 15719 + 1361 - - - - - - id - kind - - - 12 - - - 4 - 5 - 15719 - - - - - - - id - seconds - - - 12 - 2 3 - 145 + 163 3 4 - 7819 + 163 4 5 - 7754 + 326 - - - - - - num - id - - - 12 - - 1192 - 1193 - 13 + 5 + 8 + 163 - - - - - - num - kind - - - 12 - - 4 - 5 - 13 + 8 + 9 + 163 - - - - - - num - seconds - - - 12 - - - 1325 - 1326 - 13 - - - - - - - kind - id - - - 12 - - - 1192 - 1193 - 52 - - - - - - - kind - num - - - 12 - - - 1 - 2 - 52 - - - - - - - kind - seconds - - - 12 - 9 - 10 - 13 - - - 12 13 - 13 + 217 - 705 - 706 - 13 + 21 + 84 + 163 + + + + + + + id + kind + + + 12 + + + 4 + 5 + 2723 + + + + + + + id + seconds + + + 12 + + + 3 + 4 + 708 - 795 - 796 - 13 + 4 + 5 + 653 + + + 6 + 8 + 217 + + + 8 + 9 + 108 + + + 10 + 11 + 163 + + + 11 + 13 + 217 + + + 14 + 16 + 108 + + + 16 + 20 + 217 + + + 20 + 38 + 217 + + + 48 + 87 + 108 + + + + + + + num + id + + + 12 + + + 1 + 2 + 2396 + + + 2 + 3 + 980 + + + 3 + 4 + 490 + + + 4 + 13 + 381 + + + 13 + 51 + 272 + + + + + + + num + kind + + + 12 + + + 4 + 5 + 4521 + + + + + + + num + seconds + + + 12 + + + 3 + 4 + 1470 + + + 4 + 5 + 926 + + + 5 + 6 + 326 + + + 6 + 7 + 490 + + + 7 + 8 + 163 + + + 8 + 9 + 326 + + + 9 + 17 + 381 + + + 22 + 48 + 381 + + + 87 + 88 + 54 + + + + + + + kind + id + + + 12 + + + 50 + 51 + 217 + + + + + + + kind + num + + + 12 + + + 83 + 84 + 217 + + + + + + + kind + seconds + + + 12 + + + 3 + 4 + 54 + + + 4 + 5 + 54 + + + 132 + 133 + 54 + + + 142 + 143 + 54 @@ -2416,22 +2666,27 @@ 1 2 - 11195 + 7190 2 3 - 3626 + 3322 3 4 - 1384 + 1470 4 - 703 - 1265 + 7 + 1089 + + + 7 + 45 + 272 @@ -2447,7 +2702,32 @@ 1 2 - 17473 + 6373 + + + 2 + 3 + 2941 + + + 3 + 4 + 1525 + + + 4 + 5 + 926 + + + 5 + 8 + 1089 + + + 8 + 75 + 490 @@ -2463,17 +2743,12 @@ 1 2 - 14914 + 11384 2 3 - 2531 - - - 3 - 4 - 26 + 1961 @@ -2483,23 +2758,23 @@ diagnostic_for - 4443 + 4152 diagnostic - 1588 + 1484 compilation - 1450 + 1355 file_number - 23 + 21 file_number_diagnostic_number - 115 + 107 @@ -2513,12 +2788,12 @@ 1 2 - 1542 + 1441 63 64 - 46 + 43 @@ -2534,7 +2809,7 @@ 1 2 - 1588 + 1484 @@ -2550,7 +2825,7 @@ 1 2 - 1588 + 1484 @@ -2566,12 +2841,12 @@ 3 4 - 1404 + 1312 5 6 - 46 + 43 @@ -2587,7 +2862,7 @@ 1 2 - 1450 + 1355 @@ -2603,12 +2878,12 @@ 3 4 - 1404 + 1312 5 6 - 46 + 43 @@ -2624,7 +2899,7 @@ 69 70 - 23 + 21 @@ -2640,7 +2915,7 @@ 63 64 - 23 + 21 @@ -2656,7 +2931,7 @@ 5 6 - 23 + 21 @@ -2672,17 +2947,17 @@ 1 2 - 46 + 43 2 3 - 46 + 43 63 64 - 23 + 21 @@ -2698,12 +2973,12 @@ 2 3 - 46 + 43 63 64 - 69 + 64 @@ -2719,7 +2994,7 @@ 1 2 - 115 + 107 @@ -2729,19 +3004,19 @@ compilation_finished - 15785 + 14477 id - 15785 + 14477 cpu_seconds - 11894 + 10957 elapsed_seconds - 224 + 217 @@ -2755,7 +3030,7 @@ 1 2 - 15785 + 14477 @@ -2771,7 +3046,7 @@ 1 2 - 15785 + 14477 @@ -2787,17 +3062,17 @@ 1 2 - 10075 + 9204 2 3 - 1345 + 1306 3 - 36 - 474 + 34 + 447 @@ -2813,12 +3088,12 @@ 1 2 - 10984 + 10353 2 3 - 909 + 604 @@ -2831,70 +3106,75 @@ 12 + + 1 + 2 + 12 + 2 3 - 52 + 60 - 3 - 4 - 13 + 9 + 10 + 12 - 5 - 6 - 13 - - - 7 - 8 - 13 + 10 + 11 + 12 12 13 - 13 + 12 13 14 - 13 + 12 - 17 - 18 - 26 + 14 + 15 + 12 + + + 21 + 22 + 12 30 31 - 13 + 12 - 52 - 53 - 13 + 50 + 51 + 12 - 145 - 146 - 13 + 160 + 161 + 12 261 262 - 13 + 12 - 303 - 304 - 13 + 278 + 279 + 12 - 324 - 325 - 13 + 328 + 329 + 12 @@ -2907,70 +3187,70 @@ 12 + + 1 + 2 + 12 + 2 3 - 52 + 60 - 3 - 4 - 13 - - - 5 - 6 - 13 - - - 7 - 8 - 13 + 9 + 10 + 24 12 13 - 13 + 12 13 14 - 13 + 12 - 17 - 18 - 26 + 14 + 15 + 12 - 30 - 31 - 13 + 21 + 22 + 12 + + + 29 + 30 + 12 49 50 - 13 + 12 - 141 - 142 - 13 + 150 + 151 + 12 - 174 - 175 - 13 + 172 + 173 + 12 - 239 - 240 - 13 + 227 + 228 + 12 - 256 - 257 - 13 + 240 + 241 + 12 @@ -4742,31 +5022,31 @@ locations_default - 36090723 + 36187125 id - 36090723 + 36187125 container - 40866 + 40975 startLine - 7467157 + 7487103 startColumn - 21180 + 21237 endLine - 7469151 + 7489102 endColumn - 53326 + 53468 @@ -4780,7 +5060,7 @@ 1 2 - 36090723 + 36187125 @@ -4796,7 +5076,7 @@ 1 2 - 36090723 + 36187125 @@ -4812,7 +5092,7 @@ 1 2 - 36090723 + 36187125 @@ -4828,7 +5108,7 @@ 1 2 - 36090723 + 36187125 @@ -4844,7 +5124,7 @@ 1 2 - 36090723 + 36187125 @@ -4860,67 +5140,67 @@ 1 15 - 3114 + 3123 15 41 - 3114 + 3123 42 66 - 3364 + 3373 67 95 - 3114 + 3123 98 124 - 3239 + 3248 124 174 - 3364 + 3373 175 228 - 3114 + 3123 230 303 - 3114 + 3123 305 406 - 3114 + 3123 408 596 - 3239 + 3248 598 943 - 3114 + 3123 986 2568 - 3114 + 3123 2587 57658 - 2741 + 2748 @@ -4936,67 +5216,67 @@ 1 13 - 3488 + 3497 13 29 - 3239 + 3248 29 42 - 3114 + 3123 42 58 - 3364 + 3373 58 76 - 3114 + 3123 77 102 - 3239 + 3248 102 134 - 3114 + 3123 134 173 - 3114 + 3123 173 242 - 3114 + 3123 243 348 - 3114 + 3123 348 489 - 3114 + 3123 493 1269 - 3114 + 3123 1337 57597 - 2616 + 2623 @@ -5012,67 +5292,67 @@ 1 4 - 2242 + 2248 4 7 - 3114 + 3123 7 12 - 3488 + 3497 12 16 - 3114 + 3123 16 22 - 3364 + 3373 22 28 - 3114 + 3123 28 33 - 3239 + 3248 33 39 - 3364 + 3373 39 48 - 3364 + 3373 48 60 - 3364 + 3373 60 82 - 3364 + 3373 83 98 - 3239 + 3248 98 141 - 2491 + 2498 @@ -5088,67 +5368,67 @@ 1 13 - 3488 + 3497 13 29 - 3239 + 3248 29 42 - 3114 + 3123 42 58 - 3364 + 3373 58 76 - 3114 + 3123 77 102 - 3239 + 3248 102 134 - 3114 + 3123 134 173 - 3239 + 3248 174 244 - 3114 + 3123 246 348 - 3114 + 3123 348 494 - 3114 + 3123 513 1349 - 3114 + 3123 1407 57597 - 2491 + 2498 @@ -5164,67 +5444,67 @@ 1 12 - 3364 + 3373 13 24 - 3239 + 3248 25 33 - 3239 + 3248 33 39 - 3364 + 3373 39 45 - 3613 + 3622 45 54 - 3114 + 3123 54 62 - 3613 + 3622 62 71 - 3364 + 3373 71 83 - 3488 + 3497 83 99 - 3114 + 3123 99 114 - 3114 + 3123 114 143 - 3114 + 3123 147 363 - 1121 + 1124 @@ -5240,32 +5520,32 @@ 1 2 - 4941391 + 4954590 2 3 - 797649 + 799780 3 4 - 564160 + 565667 4 12 - 590823 + 592402 12 210 - 560173 + 561670 210 534 - 12957 + 12992 @@ -5281,27 +5561,27 @@ 1 2 - 4999452 + 5012806 2 3 - 1229865 + 1233150 3 6 - 661593 + 663360 6 106 - 560173 + 561670 107 329 - 16072 + 16115 @@ -5317,27 +5597,27 @@ 1 2 - 5633884 + 5648932 2 3 - 530645 + 532062 3 7 - 577118 + 578660 7 24 - 569269 + 570789 24 72 - 156240 + 156658 @@ -5353,12 +5633,12 @@ 1 2 - 7292975 + 7312456 2 81 - 174182 + 174647 @@ -5374,27 +5654,27 @@ 1 2 - 5008049 + 5021426 2 3 - 764632 + 766674 3 4 - 557682 + 559171 4 12 - 602037 + 603645 12 235 - 534756 + 536185 @@ -5410,67 +5690,67 @@ 1 2 - 1495 + 1499 2 4 - 1868 + 1873 4 9 - 1619 + 1624 9 19 - 1744 + 1748 20 74 - 1619 + 1624 81 173 - 1619 + 1624 173 435 - 1619 + 1624 468 904 - 1619 + 1624 945 1309 - 1619 + 1624 1328 1510 - 1619 + 1624 1531 1774 - 1619 + 1624 1834 2887 - 1619 + 1624 3491 119749 - 1495 + 1499 @@ -5486,67 +5766,67 @@ 1 2 - 1868 + 1873 2 4 - 1744 + 1748 4 6 - 1495 + 1499 6 11 - 1744 + 1748 11 33 - 1619 + 1624 34 45 - 1619 + 1624 50 75 - 1744 + 1748 78 98 - 1744 + 1748 101 131 - 1619 + 1624 131 147 - 1868 + 1873 149 161 - 1619 + 1624 162 198 - 1619 + 1624 202 329 - 872 + 874 @@ -5562,67 +5842,67 @@ 1 2 - 1619 + 1624 2 4 - 1868 + 1873 4 9 - 1619 + 1624 9 19 - 1744 + 1748 20 74 - 1619 + 1624 80 169 - 1619 + 1624 171 432 - 1619 + 1624 467 822 - 1619 + 1624 861 1001 - 1619 + 1624 1002 1190 - 1619 + 1624 1201 1338 - 1619 + 1624 1347 1920 - 1619 + 1624 2210 59360 - 1370 + 1374 @@ -5638,67 +5918,67 @@ 1 2 - 1619 + 1624 2 4 - 1868 + 1873 4 9 - 1619 + 1624 9 19 - 1744 + 1748 20 74 - 1619 + 1624 80 169 - 1619 + 1624 171 432 - 1619 + 1624 467 822 - 1619 + 1624 861 1003 - 1619 + 1624 1003 1198 - 1619 + 1624 1201 1338 - 1619 + 1624 1347 1920 - 1619 + 1624 2220 59375 - 1370 + 1374 @@ -5714,67 +5994,67 @@ 1 2 - 1868 + 1873 2 4 - 1744 + 1748 4 7 - 1868 + 1873 7 13 - 1744 + 1748 13 21 - 1744 + 1748 21 29 - 1619 + 1624 29 37 - 1495 + 1499 37 50 - 1619 + 1624 50 58 - 1619 + 1624 61 67 - 1744 + 1748 67 76 - 1619 + 1624 76 137 - 1619 + 1624 139 299 - 872 + 874 @@ -5790,32 +6070,32 @@ 1 2 - 4941017 + 4954215 2 3 - 804876 + 807026 3 4 - 559301 + 560795 4 12 - 591197 + 592776 12 214 - 560298 + 561795 214 530 - 12459 + 12492 @@ -5831,27 +6111,27 @@ 1 2 - 4997957 + 5011307 2 3 - 1232980 + 1236274 3 6 - 661967 + 663735 6 107 - 560298 + 561795 107 329 - 15948 + 15990 @@ -5867,12 +6147,12 @@ 1 2 - 7288490 + 7307958 2 7 - 180661 + 181143 @@ -5888,27 +6168,27 @@ 1 2 - 5636500 + 5651556 2 3 - 529274 + 530688 3 7 - 577990 + 579534 7 24 - 568895 + 570415 24 72 - 156489 + 156907 @@ -5924,27 +6204,27 @@ 1 2 - 5007924 + 5021301 2 3 - 771235 + 773295 3 4 - 553072 + 554549 4 12 - 603034 + 604644 12 235 - 533884 + 535310 @@ -5960,52 +6240,52 @@ 1 2 - 15698 + 15740 2 3 - 5606 + 5621 3 7 - 4485 + 4497 7 17 - 4111 + 4122 17 32 - 4236 + 4247 35 103 - 4111 + 4122 147 635 - 4111 + 4122 651 2069 - 4111 + 4122 2137 3404 - 4111 + 4122 3430 33692 - 2741 + 2748 @@ -6021,52 +6301,52 @@ 1 2 - 18564 + 18614 2 3 - 5606 + 5621 3 5 - 4236 + 4247 5 7 - 3364 + 3373 7 15 - 4609 + 4622 15 78 - 4111 + 4122 78 143 - 4236 + 4247 150 202 - 4111 + 4122 203 263 - 4111 + 4122 266 329 - 373 + 374 @@ -6082,52 +6362,52 @@ 1 2 - 15948 + 15990 2 3 - 5980 + 5996 3 7 - 4111 + 4122 7 17 - 4236 + 4247 17 35 - 4111 + 4122 35 140 - 4111 + 4122 157 601 - 4111 + 4122 610 1714 - 4111 + 4122 1749 2382 - 4111 + 4122 2421 30689 - 2491 + 2498 @@ -6143,52 +6423,52 @@ 1 2 - 17318 + 17364 2 3 - 6354 + 6371 3 4 - 3114 + 3123 4 6 - 3862 + 3872 6 11 - 4609 + 4622 11 22 - 4111 + 4122 22 40 - 4236 + 4247 42 60 - 4859 + 4872 60 68 - 4111 + 4122 68 73 - 747 + 749 @@ -6204,52 +6484,52 @@ 1 2 - 15948 + 15990 2 3 - 5980 + 5996 3 7 - 4111 + 4122 7 17 - 4360 + 4372 17 36 - 4236 + 4247 36 170 - 4111 + 4122 173 620 - 4111 + 4122 622 1824 - 4111 + 4122 1843 2449 - 4111 + 4122 2460 30688 - 2242 + 2248 @@ -6259,31 +6539,31 @@ locations_stmt - 5203175 + 5217074 id - 5203175 + 5217074 container - 4153 + 4164 startLine - 272866 + 273595 startColumn - 2553 + 2560 endLine - 265036 + 265744 endColumn - 3227 + 3235 @@ -6297,7 +6577,7 @@ 1 2 - 5203175 + 5217074 @@ -6313,7 +6593,7 @@ 1 2 - 5203175 + 5217074 @@ -6329,7 +6609,7 @@ 1 2 - 5203175 + 5217074 @@ -6345,7 +6625,7 @@ 1 2 - 5203175 + 5217074 @@ -6361,7 +6641,7 @@ 1 2 - 5203175 + 5217074 @@ -6377,62 +6657,62 @@ 1 18 - 336 + 337 18 60 - 336 + 337 61 180 - 336 + 337 190 450 - 336 + 337 454 628 - 336 + 337 653 883 - 336 + 337 906 1161 - 336 + 337 1167 1466 - 336 + 337 1508 1785 - 336 + 337 1858 2296 - 336 + 337 2347 2833 - 336 + 337 2871 4105 - 336 + 337 4275 @@ -6453,62 +6733,62 @@ 1 18 - 336 + 337 18 49 - 336 + 337 59 170 - 336 + 337 170 394 - 336 + 337 434 603 - 336 + 337 610 846 - 336 + 337 880 1132 - 336 + 337 1135 1395 - 336 + 337 1409 1727 - 336 + 337 1761 2226 - 336 + 337 2250 2778 - 336 + 337 2800 3886 - 336 + 337 3965 @@ -6529,67 +6809,67 @@ 1 3 - 280 + 281 3 7 - 308 + 309 7 9 - 308 + 309 9 11 - 336 + 337 11 13 - 308 + 309 13 14 - 308 + 309 14 16 - 336 + 337 16 17 - 224 + 225 17 19 - 280 + 281 19 21 - 252 + 253 21 23 - 336 + 337 23 29 - 336 + 337 29 43 - 336 + 337 48 @@ -6610,62 +6890,62 @@ 1 15 - 336 + 337 15 44 - 336 + 337 47 137 - 336 + 337 141 314 - 336 + 337 328 472 - 336 + 337 488 643 - 336 + 337 675 858 - 364 + 365 865 1107 - 336 + 337 1178 1343 - 336 + 337 1401 1768 - 336 + 337 1782 2165 - 336 + 337 2254 3130 - 336 + 337 3343 @@ -6686,62 +6966,62 @@ 1 7 - 336 + 337 8 26 - 364 + 365 26 47 - 364 + 365 47 59 - 336 + 337 59 64 - 308 + 309 64 67 - 280 + 281 67 69 - 336 + 337 69 71 - 308 + 309 71 72 - 336 + 337 72 74 - 336 + 337 74 76 - 336 + 337 76 80 - 336 + 337 81 @@ -6762,67 +7042,67 @@ 1 2 - 29411 + 29489 2 3 - 20879 + 20935 3 4 - 17034 + 17080 4 6 - 19728 + 19781 6 8 - 17090 + 17136 8 11 - 22816 + 22876 11 16 - 23573 + 23636 16 22 - 20935 + 20991 22 29 - 23236 + 23299 29 37 - 23686 + 23749 37 45 - 20627 + 20682 45 56 - 22142 + 22201 56 73 - 11702 + 11733 @@ -6838,67 +7118,67 @@ 1 2 - 30449 + 30530 2 3 - 21468 + 21526 3 4 - 17315 + 17361 4 6 - 19644 + 19697 6 8 - 17371 + 17418 8 11 - 23994 + 24058 11 16 - 22338 + 22398 16 22 - 22142 + 22201 22 29 - 23152 + 23214 29 36 - 21861 + 21920 36 44 - 22310 + 22370 44 54 - 21665 + 21723 54 68 - 9148 + 9173 @@ -6914,57 +7194,57 @@ 1 2 - 36623 + 36721 2 3 - 28456 + 28532 3 4 - 22956 + 23017 4 5 - 21974 + 22032 5 6 - 23798 + 23861 6 7 - 27109 + 27182 7 8 - 31066 + 31149 8 9 - 27895 + 27970 9 10 - 20430 + 20485 10 12 - 22703 + 22764 12 18 - 9850 + 9876 @@ -6980,67 +7260,67 @@ 1 2 - 47231 + 47357 2 3 - 35220 + 35314 3 4 - 25173 + 25240 4 5 - 22114 + 22173 5 6 - 17455 + 17502 6 7 - 16473 + 16517 7 8 - 13919 + 13956 8 9 - 15070 + 15110 9 10 - 14733 + 14772 10 11 - 14396 + 14435 11 12 - 13863 + 13900 12 14 - 21581 + 21638 14 24 - 15631 + 15673 @@ -7056,67 +7336,67 @@ 1 2 - 30224 + 30305 2 3 - 22114 + 22173 3 4 - 17680 + 17727 4 6 - 21946 + 22004 6 8 - 20065 + 20119 8 10 - 18017 + 18065 10 14 - 24948 + 25015 14 18 - 23236 + 23299 18 22 - 24078 + 24143 22 26 - 25229 + 25296 26 30 - 22535 + 22595 30 36 - 20683 + 20738 36 42 - 2104 + 2110 @@ -7132,7 +7412,7 @@ 1 2 - 308 + 309 2 @@ -7142,7 +7422,7 @@ 3 7 - 224 + 225 7 @@ -7152,7 +7432,7 @@ 12 20 - 224 + 225 21 @@ -7208,7 +7488,7 @@ 1 2 - 392 + 393 2 @@ -7218,12 +7498,12 @@ 3 5 - 224 + 225 5 8 - 224 + 225 8 @@ -7279,7 +7559,7 @@ 1 2 - 308 + 309 2 @@ -7289,7 +7569,7 @@ 3 7 - 224 + 225 7 @@ -7299,7 +7579,7 @@ 12 20 - 224 + 225 21 @@ -7355,7 +7635,7 @@ 1 2 - 308 + 309 2 @@ -7365,7 +7645,7 @@ 3 7 - 224 + 225 7 @@ -7375,7 +7655,7 @@ 12 20 - 224 + 225 21 @@ -7431,7 +7711,7 @@ 1 2 - 392 + 393 2 @@ -7446,12 +7726,12 @@ 4 5 - 224 + 225 5 8 - 224 + 225 8 @@ -7461,7 +7741,7 @@ 11 15 - 224 + 225 15 @@ -7502,72 +7782,72 @@ 1 2 - 23770 + 23833 2 3 - 19672 + 19725 3 4 - 15687 + 15729 4 6 - 21300 + 21357 6 8 - 17062 + 17108 8 11 - 21104 + 21160 11 15 - 20009 + 20063 15 21 - 21946 + 22004 21 27 - 21076 + 21132 27 34 - 20374 + 20428 34 42 - 21553 + 21610 42 51 - 19925 + 19978 51 68 - 20262 + 20316 68 130 - 1290 + 1294 @@ -7583,62 +7863,62 @@ 1 2 - 34069 + 34160 2 3 - 22030 + 22089 3 4 - 17427 + 17474 4 6 - 21384 + 21441 6 8 - 20486 + 20541 8 11 - 21693 + 21751 11 16 - 23798 + 23861 16 20 - 19925 + 19978 20 26 - 23433 + 23496 26 32 - 22226 + 22286 32 39 - 20458 + 20513 39 58 - 18101 + 18149 @@ -7654,62 +7934,62 @@ 1 2 - 44341 + 44459 2 3 - 32413 + 32500 3 4 - 25201 + 25268 4 5 - 20795 + 20850 5 6 - 18859 + 18909 6 7 - 15856 + 15898 7 8 - 16249 + 16292 8 9 - 14930 + 14969 9 10 - 13919 + 13956 10 12 - 24443 + 24509 12 15 - 24191 + 24255 15 100 - 13835 + 13872 @@ -7725,57 +8005,57 @@ 1 2 - 34069 + 34160 2 3 - 27839 + 27913 3 4 - 22984 + 23045 4 5 - 24331 + 24396 5 6 - 25341 + 25409 6 7 - 27951 + 28026 7 8 - 30617 + 30699 8 9 - 25594 + 25662 9 10 - 17624 + 17671 10 12 - 20458 + 20513 12 18 - 8222 + 8244 @@ -7791,67 +8071,67 @@ 1 2 - 33732 + 33823 2 3 - 22703 + 22764 3 4 - 17119 + 17164 4 6 - 24331 + 24396 6 8 - 20935 + 20991 8 10 - 17483 + 17530 10 13 - 19700 + 19753 13 16 - 20514 + 20569 16 19 - 20065 + 20119 19 22 - 18971 + 19021 22 26 - 23686 + 23749 26 31 - 20963 + 21019 31 39 - 4827 + 4839 @@ -7867,67 +8147,67 @@ 1 2 - 252 + 253 2 4 - 252 + 253 4 7 - 224 + 225 7 16 - 252 + 253 23 131 - 252 + 253 149 388 - 252 + 253 392 675 - 252 + 253 710 1137 - 252 + 253 1139 1672 - 252 + 253 1883 2794 - 252 + 253 2937 4095 - 252 + 253 4146 4771 - 252 + 253 5032 15404 - 224 + 225 @@ -7943,47 +8223,47 @@ 1 2 - 280 + 281 2 3 - 252 + 253 3 6 - 252 + 253 6 21 - 252 + 253 31 67 - 252 + 253 68 93 - 252 + 253 94 106 - 252 + 253 107 112 - 252 + 253 112 118 - 252 + 253 118 @@ -7998,12 +8278,12 @@ 123 124 - 224 + 225 124 127 - 252 + 253 127 @@ -8024,67 +8304,67 @@ 1 2 - 252 + 253 2 4 - 252 + 253 4 7 - 224 + 225 7 15 - 252 + 253 22 129 - 252 + 253 143 374 - 252 + 253 379 646 - 252 + 253 666 963 - 252 + 253 1000 1430 - 252 + 253 1586 2172 - 252 + 253 2265 2916 - 252 + 253 2948 3215 - 252 + 253 3417 5821 - 224 + 225 @@ -8100,27 +8380,27 @@ 1 2 - 280 + 281 2 3 - 224 + 225 3 5 - 280 + 281 5 8 - 252 + 253 8 12 - 252 + 253 12 @@ -8130,7 +8410,7 @@ 14 16 - 252 + 253 16 @@ -8140,27 +8420,27 @@ 19 21 - 224 + 225 21 23 - 252 + 253 23 25 - 252 + 253 25 28 - 252 + 253 28 33 - 280 + 281 45 @@ -8181,62 +8461,62 @@ 1 2 - 280 + 281 2 4 - 224 + 225 4 7 - 280 + 281 7 27 - 252 + 253 42 130 - 252 + 253 139 325 - 252 + 253 364 584 - 252 + 253 610 967 - 252 + 253 1056 1409 - 252 + 253 1420 2038 - 252 + 253 2065 2627 - 252 + 253 2651 3073 - 252 + 253 3086 @@ -8251,31 +8531,31 @@ locations_expr - 17959858 + 18007831 id - 17959858 + 18007831 container - 6342 + 6359 startLine - 262033 + 262733 startColumn - 3367 + 3376 endLine - 262005 + 262705 endColumn - 3816 + 3826 @@ -8289,7 +8569,7 @@ 1 2 - 17959858 + 18007831 @@ -8305,7 +8585,7 @@ 1 2 - 17959858 + 18007831 @@ -8321,7 +8601,7 @@ 1 2 - 17959858 + 18007831 @@ -8337,7 +8617,7 @@ 1 2 - 17959858 + 18007831 @@ -8353,7 +8633,7 @@ 1 2 - 17959858 + 18007831 @@ -8369,67 +8649,67 @@ 1 2 - 561 + 562 2 6 - 477 + 478 6 11 - 477 + 478 12 26 - 505 + 506 27 87 - 477 + 478 95 514 - 477 + 478 525 1401 - 477 + 478 1526 2343 - 477 + 478 2404 3615 - 477 + 478 3668 5162 - 477 + 478 5341 7345 - 477 + 478 7399 9307 - 477 + 478 9382 16759 - 477 + 478 18811 @@ -8450,67 +8730,67 @@ 1 2 - 673 + 675 2 4 - 477 + 478 4 10 - 533 + 534 10 20 - 505 + 506 20 66 - 477 + 478 67 162 - 477 + 478 166 362 - 477 + 478 376 591 - 477 + 478 593 929 - 477 + 478 960 1269 - 477 + 478 1291 1782 - 477 + 478 1851 2492 - 477 + 478 2594 4241 - 336 + 337 @@ -8526,72 +8806,72 @@ 1 2 - 673 + 675 2 4 - 505 + 506 4 7 - 533 + 534 7 16 - 477 + 478 16 34 - 505 + 506 36 59 - 477 + 478 59 66 - 505 + 506 66 68 - 364 + 365 68 69 - 280 + 281 69 70 - 420 + 422 70 71 - 252 + 253 71 72 - 420 + 422 72 74 - 364 + 365 74 92 - 505 + 506 94 @@ -8612,67 +8892,67 @@ 1 2 - 673 + 675 2 4 - 477 + 478 4 10 - 533 + 534 10 20 - 505 + 506 20 68 - 477 + 478 68 163 - 477 + 478 166 362 - 477 + 478 376 592 - 477 + 478 593 931 - 477 + 478 960 1273 - 477 + 478 1292 1786 - 477 + 478 1855 2501 - 477 + 478 2593 4416 - 336 + 337 @@ -8688,47 +8968,47 @@ 1 2 - 617 + 619 2 4 - 477 + 478 4 7 - 505 + 506 7 15 - 477 + 478 15 36 - 477 + 478 36 62 - 477 + 478 62 71 - 533 + 534 71 73 - 280 + 281 73 75 - 449 + 450 75 @@ -8738,22 +9018,22 @@ 76 77 - 561 + 562 77 79 - 477 + 478 79 84 - 477 + 478 84 116 - 364 + 365 @@ -8769,67 +9049,67 @@ 1 5 - 22002 + 22060 5 9 - 22507 + 22567 9 15 - 21889 + 21948 15 23 - 20627 + 20682 23 32 - 20683 + 20738 32 44 - 20486 + 20541 44 60 - 20149 + 20203 60 80 - 20290 + 20344 80 103 - 19953 + 20006 103 130 - 20093 + 20147 130 159 - 19897 + 19950 159 194 - 19953 + 20006 194 297 - 13498 + 13534 @@ -8845,62 +9125,62 @@ 1 2 - 32105 + 32190 2 3 - 21328 + 21385 3 4 - 15491 + 15532 4 6 - 22338 + 22398 6 8 - 18606 + 18656 8 11 - 22423 + 22483 11 16 - 23686 + 23749 16 21 - 22507 + 22567 21 28 - 22675 + 22736 28 35 - 21637 + 21695 35 43 - 21777 + 21835 43 61 - 17455 + 17502 @@ -8916,62 +9196,62 @@ 1 4 - 21805 + 21863 4 7 - 23938 + 24002 7 11 - 22787 + 22848 11 16 - 23770 + 23833 16 21 - 23910 + 23974 21 26 - 20570 + 20625 26 31 - 22086 + 22145 31 36 - 24106 + 24171 36 40 - 21468 + 21526 40 44 - 22619 + 22679 44 49 - 22759 + 22820 49 63 - 12207 + 12240 @@ -8987,27 +9267,27 @@ 1 2 - 138972 + 139344 2 3 - 61123 + 61286 3 4 - 37689 + 37790 4 6 - 19981 + 20034 6 23 - 4265 + 4277 @@ -9023,62 +9303,62 @@ 1 4 - 23152 + 23214 4 7 - 22731 + 22792 7 11 - 22423 + 22483 11 16 - 22142 + 22201 16 21 - 22451 + 22511 21 27 - 22872 + 22933 27 33 - 22479 + 22539 33 38 - 19757 + 19809 38 43 - 21300 + 21357 43 47 - 19953 + 20006 47 52 - 23040 + 23102 52 66 - 19672 + 19725 68 @@ -9099,62 +9379,62 @@ 1 2 - 420 + 422 2 4 - 252 + 253 4 8 - 280 + 281 8 26 - 280 + 281 43 253 - 252 + 253 278 844 - 252 + 253 949 1891 - 252 + 253 2093 4169 - 252 + 253 4251 7004 - 252 + 253 7173 11370 - 252 + 253 12331 15107 - 252 + 253 15374 30162 - 252 + 253 30211 @@ -9175,7 +9455,7 @@ 1 2 - 449 + 450 2 @@ -9190,52 +9470,52 @@ 4 6 - 252 + 253 7 32 - 252 + 253 43 99 - 252 + 253 101 121 - 252 + 253 121 130 - 252 + 253 130 138 - 252 + 253 138 142 - 280 + 281 142 144 - 224 + 225 144 150 - 280 + 281 151 158 - 252 + 253 @@ -9251,62 +9531,62 @@ 1 2 - 420 + 422 2 4 - 252 + 253 4 7 - 252 + 253 7 19 - 252 + 253 20 152 - 252 + 253 199 588 - 252 + 253 633 1287 - 252 + 253 1365 2343 - 252 + 253 2576 3504 - 252 + 253 3522 4709 - 252 + 253 4736 5298 - 252 + 253 5332 5999 - 252 + 253 6157 @@ -9327,62 +9607,62 @@ 1 2 - 420 + 422 2 4 - 252 + 253 4 7 - 252 + 253 7 19 - 252 + 253 20 152 - 252 + 253 199 588 - 252 + 253 648 1289 - 252 + 253 1365 2347 - 252 + 253 2579 3510 - 252 + 253 3529 4710 - 252 + 253 4739 5323 - 252 + 253 5346 6023 - 252 + 253 6201 @@ -9403,7 +9683,7 @@ 1 2 - 449 + 450 2 @@ -9413,52 +9693,52 @@ 3 5 - 252 + 253 5 9 - 252 + 253 9 13 - 252 + 253 13 20 - 252 + 253 20 30 - 252 + 253 30 42 - 252 + 253 44 60 - 280 + 281 60 69 - 252 + 253 69 74 - 252 + 253 74 84 - 308 + 309 84 @@ -9479,67 +9759,67 @@ 1 5 - 22030 + 22089 5 9 - 22507 + 22567 9 15 - 21581 + 21638 15 23 - 20598 + 20653 23 32 - 21356 + 21413 32 44 - 20121 + 20175 44 60 - 19785 + 19837 60 80 - 20879 + 20935 80 103 - 19813 + 19866 103 130 - 20009 + 20063 130 159 - 19953 + 20006 159 193 - 19672 + 19725 193 296 - 13695 + 13731 @@ -9555,67 +9835,67 @@ 1 2 - 32105 + 32190 2 3 - 21244 + 21301 3 4 - 15491 + 15532 4 6 - 21917 + 21976 6 8 - 18409 + 18459 8 11 - 22507 + 22567 11 15 - 19785 + 19837 15 20 - 22816 + 22876 20 26 - 20458 + 20513 26 33 - 21917 + 21976 33 40 - 19897 + 19950 40 49 - 20037 + 20091 49 61 - 5416 + 5430 @@ -9631,27 +9911,27 @@ 1 2 - 130273 + 130621 2 3 - 68223 + 68405 3 4 - 40159 + 40266 4 6 - 21384 + 21441 6 11 - 1964 + 1969 @@ -9667,62 +9947,62 @@ 1 4 - 21609 + 21666 4 7 - 23826 + 23889 7 11 - 22507 + 22567 11 16 - 23686 + 23749 16 21 - 23629 + 23692 21 26 - 20683 + 20738 26 31 - 22282 + 22342 31 36 - 24078 + 24143 36 40 - 20879 + 20935 40 44 - 22591 + 22651 44 49 - 23152 + 23214 49 63 - 13077 + 13112 @@ -9738,62 +10018,62 @@ 1 4 - 23461 + 23524 4 7 - 22928 + 22989 7 11 - 22423 + 22483 11 16 - 23040 + 23102 16 21 - 21861 + 21920 21 26 - 19813 + 19866 26 32 - 22058 + 22117 32 38 - 23882 + 23946 38 43 - 22114 + 22173 43 47 - 19785 + 19837 47 52 - 22759 + 22820 52 69 - 17876 + 17924 @@ -9809,62 +10089,62 @@ 1 2 - 308 + 309 2 4 - 308 + 309 4 10 - 280 + 281 10 16 - 336 + 337 16 51 - 308 + 309 56 618 - 308 + 309 841 2290 - 308 + 309 2328 4142 - 308 + 309 4177 7140 - 308 + 309 8235 11725 - 308 + 309 12344 15458 - 308 + 309 15684 18219 - 308 + 309 18696 @@ -9885,62 +10165,62 @@ 1 2 - 449 + 450 2 4 - 280 + 281 4 6 - 280 + 281 6 12 - 308 + 309 12 41 - 308 + 309 50 114 - 308 + 309 115 128 - 308 + 309 128 137 - 280 + 281 137 142 - 336 + 337 142 146 - 280 + 281 146 148 - 280 + 281 148 152 - 308 + 309 152 @@ -9961,62 +10241,62 @@ 1 2 - 420 + 422 2 4 - 224 + 225 4 8 - 336 + 337 8 15 - 308 + 309 18 54 - 308 + 309 74 489 - 308 + 309 511 1338 - 308 + 309 1390 2420 - 308 + 309 2767 3740 - 308 + 309 3802 4530 - 308 + 309 4643 5303 - 308 + 309 5379 5736 - 308 + 309 5747 @@ -10037,62 +10317,62 @@ 1 2 - 364 + 365 2 4 - 280 + 281 4 9 - 336 + 337 9 14 - 336 + 337 14 22 - 336 + 337 23 28 - 308 + 309 28 36 - 308 + 309 36 41 - 308 + 309 41 47 - 308 + 309 47 56 - 308 + 309 56 64 - 308 + 309 64 72 - 308 + 309 @@ -10108,62 +10388,62 @@ 1 2 - 420 + 422 2 4 - 224 + 225 4 8 - 336 + 337 8 15 - 308 + 309 17 54 - 308 + 309 74 471 - 308 + 309 500 1307 - 308 + 309 1356 2389 - 308 + 309 2629 3660 - 308 + 309 3731 4490 - 308 + 309 4640 5281 - 308 + 309 5368 5729 - 308 + 309 5734 @@ -10178,23 +10458,23 @@ numlines - 806371 + 808525 element_id - 805249 + 807400 num_lines - 39371 + 39476 num_code - 33889 + 33980 num_comment - 18315 + 18364 @@ -10208,12 +10488,12 @@ 1 2 - 804128 + 806276 2 3 - 1121 + 1124 @@ -10229,12 +10509,12 @@ 1 2 - 804128 + 806276 2 3 - 1121 + 1124 @@ -10250,7 +10530,7 @@ 1 2 - 805000 + 807151 2 @@ -10271,27 +10551,27 @@ 1 2 - 26663 + 26734 2 3 - 3737 + 3747 3 5 - 3364 + 3373 5 37 - 3114 + 3123 41 1978 - 2491 + 2498 @@ -10307,27 +10587,27 @@ 1 2 - 27161 + 27234 2 3 - 4111 + 4122 3 4 - 2491 + 2498 4 7 - 3488 + 3497 7 12 - 2118 + 2123 @@ -10343,27 +10623,27 @@ 1 2 - 26787 + 26859 2 3 - 4111 + 4122 3 4 - 2491 + 2498 4 6 - 3114 + 3123 6 11 - 2865 + 2873 @@ -10379,32 +10659,32 @@ 1 2 - 21554 + 21612 2 3 - 3737 + 3747 3 4 - 2367 + 2373 4 13 - 2865 + 2873 14 197 - 2616 + 2623 205 2101 - 747 + 749 @@ -10420,32 +10700,32 @@ 1 2 - 21928 + 21987 2 3 - 3737 + 3747 3 4 - 2118 + 2123 4 6 - 1868 + 1873 6 9 - 2741 + 2748 9 13 - 1495 + 1499 @@ -10461,27 +10741,27 @@ 1 2 - 21679 + 21737 2 3 - 4360 + 4372 3 5 - 2865 + 2873 5 8 - 3114 + 3123 8 12 - 1868 + 1873 @@ -10497,32 +10777,32 @@ 1 2 - 11338 + 11368 2 3 - 1744 + 1748 3 4 - 1495 + 1499 4 7 - 1370 + 1374 8 22 - 1495 + 1499 42 3650 - 872 + 874 @@ -10538,32 +10818,32 @@ 1 2 - 11338 + 11368 2 3 - 1744 + 1748 3 4 - 1495 + 1499 4 7 - 1495 + 1499 8 27 - 1495 + 1499 30 48 - 747 + 749 @@ -10579,32 +10859,32 @@ 1 2 - 11338 + 11368 2 3 - 1744 + 1748 3 4 - 1744 + 1748 4 9 - 1495 + 1499 10 36 - 1619 + 1624 36 43 - 373 + 374 @@ -10614,31 +10894,31 @@ diagnostics - 1588 + 1484 id - 1588 + 1484 severity - 23 + 21 error_tag - 46 + 43 error_message - 161 + 150 full_error_message - 161 + 150 location - 69 + 64 @@ -10652,7 +10932,7 @@ 1 2 - 1588 + 1484 @@ -10668,7 +10948,7 @@ 1 2 - 1588 + 1484 @@ -10684,7 +10964,7 @@ 1 2 - 1588 + 1484 @@ -10700,7 +10980,7 @@ 1 2 - 1588 + 1484 @@ -10716,7 +10996,7 @@ 1 2 - 1588 + 1484 @@ -10732,7 +11012,7 @@ 69 70 - 23 + 21 @@ -10748,7 +11028,7 @@ 2 3 - 23 + 21 @@ -10764,7 +11044,7 @@ 7 8 - 23 + 21 @@ -10780,7 +11060,7 @@ 7 8 - 23 + 21 @@ -10796,7 +11076,7 @@ 3 4 - 23 + 21 @@ -10812,12 +11092,12 @@ 6 7 - 23 + 21 63 64 - 23 + 21 @@ -10833,7 +11113,7 @@ 1 2 - 46 + 43 @@ -10849,12 +11129,12 @@ 1 2 - 23 + 21 6 7 - 23 + 21 @@ -10870,12 +11150,12 @@ 1 2 - 23 + 21 6 7 - 23 + 21 @@ -10891,12 +11171,12 @@ 1 2 - 23 + 21 2 3 - 23 + 21 @@ -10912,12 +11192,12 @@ 1 2 - 138 + 129 63 64 - 23 + 21 @@ -10933,7 +11213,7 @@ 1 2 - 161 + 150 @@ -10949,7 +11229,7 @@ 1 2 - 161 + 150 @@ -10965,7 +11245,7 @@ 1 2 - 161 + 150 @@ -10981,7 +11261,7 @@ 1 2 - 161 + 150 @@ -10997,12 +11277,12 @@ 1 2 - 138 + 129 63 64 - 23 + 21 @@ -11018,7 +11298,7 @@ 1 2 - 161 + 150 @@ -11034,7 +11314,7 @@ 1 2 - 161 + 150 @@ -11050,7 +11330,7 @@ 1 2 - 161 + 150 @@ -11066,7 +11346,7 @@ 1 2 - 161 + 150 @@ -11082,12 +11362,12 @@ 3 4 - 46 + 43 63 64 - 23 + 21 @@ -11103,7 +11383,7 @@ 1 2 - 69 + 64 @@ -11119,7 +11399,7 @@ 1 2 - 69 + 64 @@ -11135,12 +11415,12 @@ 1 2 - 23 + 21 3 4 - 46 + 43 @@ -11156,12 +11436,12 @@ 1 2 - 23 + 21 3 4 - 46 + 43 @@ -11171,15 +11451,15 @@ files - 81417 + 74673 id - 81417 + 74673 name - 81417 + 74673 @@ -11193,7 +11473,7 @@ 1 2 - 81417 + 74673 @@ -11209,7 +11489,7 @@ 1 2 - 81417 + 74673 @@ -11219,15 +11499,15 @@ folders - 15468 + 14187 id - 15468 + 14187 name - 15468 + 14187 @@ -11241,7 +11521,7 @@ 1 2 - 15468 + 14187 @@ -11257,7 +11537,7 @@ 1 2 - 15468 + 14187 @@ -11267,15 +11547,15 @@ containerparent - 96859 + 88836 parent - 15468 + 14187 child - 96859 + 88836 @@ -11289,42 +11569,42 @@ 1 2 - 7529 + 6906 2 3 - 1898 + 1741 3 4 - 830 + 761 4 6 - 1252 + 1149 6 10 - 1213 + 1112 10 16 - 1252 + 1149 16 44 - 1160 + 1064 44 151 - 329 + 302 @@ -11340,7 +11620,7 @@ 1 2 - 96859 + 88836 @@ -11350,23 +11630,23 @@ fileannotations - 5244354 + 4809925 id - 7200 + 6603 kind - 26 + 24 name - 73307 + 67234 value - 49333 + 45246 @@ -11380,12 +11660,12 @@ 1 2 - 250 + 229 2 3 - 6949 + 6373 @@ -11401,62 +11681,62 @@ 1 86 - 540 + 495 88 206 - 540 + 495 212 291 - 553 + 507 291 359 - 540 + 495 362 401 - 540 + 495 402 479 - 540 + 495 480 549 - 316 + 290 550 551 - 1661 + 1523 553 628 - 540 + 495 631 753 - 567 + 520 753 1231 - 553 + 507 1234 2155 - 303 + 278 @@ -11472,67 +11752,67 @@ 1 98 - 540 + 495 102 244 - 540 + 495 244 351 - 540 + 495 352 434 - 553 + 507 434 490 - 553 + 507 490 628 - 540 + 495 632 702 - 79 + 72 706 707 - 1661 + 1523 710 939 - 540 + 495 939 1038 - 540 + 495 1066 1853 - 540 + 495 1853 3292 - 540 + 495 3423 3742 - 26 + 24 @@ -11548,12 +11828,12 @@ 527 528 - 13 + 12 546 547 - 13 + 12 @@ -11569,12 +11849,12 @@ 2 3 - 13 + 12 5557 5558 - 13 + 12 @@ -11590,12 +11870,12 @@ 1 2 - 13 + 12 3741 3742 - 13 + 12 @@ -11611,62 +11891,62 @@ 1 2 - 13767 + 12626 2 3 - 5446 + 4995 3 5 - 6316 + 5793 5 7 - 5116 + 4692 7 9 - 5736 + 5261 9 16 - 5406 + 4958 16 19 - 6105 + 5599 19 27 - 5314 + 4874 27 47 - 6039 + 5539 47 128 - 6145 + 5636 128 459 - 5775 + 5297 459 546 - 2136 + 1959 @@ -11682,7 +11962,7 @@ 1 2 - 73307 + 67234 @@ -11698,57 +11978,57 @@ 1 2 - 14466 + 13267 2 3 - 9600 + 8805 3 4 - 5116 + 4692 4 6 - 5077 + 4656 6 8 - 4272 + 3918 8 11 - 5921 + 5430 11 17 - 6738 + 6180 17 23 - 5868 + 5382 23 41 - 5841 + 5357 41 95 - 5578 + 5116 95 1726 - 4826 + 4426 @@ -11764,72 +12044,72 @@ 1 2 - 4193 + 3846 2 4 - 2044 + 1874 4 5 - 3982 + 3652 5 8 - 3072 + 2818 8 14 - 3705 + 3398 14 17 - 2413 + 2213 17 24 - 3797 + 3483 24 51 - 4417 + 4051 51 58 - 3784 + 3471 58 80 - 3718 + 3410 81 151 - 3850 + 3531 151 334 - 3718 + 3410 334 473 - 3745 + 3434 473 547 - 2887 + 2648 @@ -11845,12 +12125,12 @@ 1 2 - 49320 + 45234 2 3 - 13 + 12 @@ -11866,72 +12146,72 @@ 1 2 - 4246 + 3894 2 4 - 2386 + 2189 4 5 - 3811 + 3495 5 8 - 3098 + 2842 8 14 - 4351 + 3991 14 18 - 4312 + 3954 18 28 - 3995 + 3664 28 34 - 3929 + 3604 34 41 - 3995 + 3664 41 66 - 3731 + 3422 66 92 - 3837 + 3519 92 113 - 3731 + 3422 113 145 - 3784 + 3471 145 172 - 118 + 108 @@ -11941,15 +12221,15 @@ inmacroexpansion - 149602994 + 149995198 id - 24604999 + 24670750 inv - 3694108 + 3705246 @@ -11963,37 +12243,37 @@ 1 3 - 2202143 + 2209385 3 5 - 1471128 + 1474970 5 6 - 1616140 + 1620361 6 7 - 6565365 + 6582512 7 8 - 8696245 + 8718957 8 9 - 3547765 + 3557031 9 22 - 506210 + 507532 @@ -12009,57 +12289,57 @@ 1 2 - 528780 + 531651 2 3 - 741268 + 743204 3 4 - 480255 + 481510 4 7 - 274584 + 275301 7 8 - 281416 + 282151 8 9 - 329385 + 330245 9 10 - 3038 + 3046 10 11 - 443489 + 444648 11 337 - 306995 + 307797 339 423 - 281020 + 281754 423 7616 - 23872 + 23934 @@ -12069,15 +12349,15 @@ affectedbymacroexpansion - 48608644 + 48735594 id - 7026354 + 7044705 inv - 3793196 + 3803102 @@ -12091,37 +12371,37 @@ 1 2 - 3836670 + 3846690 2 3 - 764305 + 766301 3 4 - 360897 + 361840 4 5 - 770719 + 772732 5 12 - 533763 + 535157 12 50 - 554815 + 556264 50 9900 - 205182 + 205718 @@ -12137,67 +12417,67 @@ 1 4 - 312431 + 313247 4 7 - 315781 + 316606 7 9 - 300302 + 301086 9 12 - 342043 + 342937 12 13 - 454814 + 456002 13 14 - 225509 + 226098 14 15 - 406973 + 408036 15 16 - 165994 + 166428 16 17 - 376692 + 377676 17 18 - 200113 + 200635 18 20 - 343357 + 344253 20 25 - 284648 + 285391 25 207 - 64533 + 64702 @@ -12207,23 +12487,23 @@ macroinvocations - 39528251 + 39390474 id - 39528251 + 39390474 macro_id - 106974 + 181996 location - 1041654 + 5904613 kind - 26 + 108 @@ -12237,7 +12517,7 @@ 1 2 - 39528251 + 39390474 @@ -12253,7 +12533,7 @@ 1 2 - 39528251 + 39390474 @@ -12269,7 +12549,7 @@ 1 2 - 39528251 + 39390474 @@ -12285,98 +12565,98 @@ 1 2 - 22721 + 60738 2 3 - 20018 + 27781 3 4 - 7318 + 17921 4 - 6 - 9798 + 5 + 9805 - 6 - 11 - 9204 + 5 + 7 + 14272 - 11 - 21 - 8848 - - - 21 - 48 - 8149 - - - 48 - 145 - 8096 - - - 145 - 955 - 8030 - - - 955 - 175302 - 4786 - - - - - - - macro_id - location - - - 12 - - - 1 - 2 - 58643 - - - 2 - 3 - 13279 - - - 3 - 4 - 6699 - - - 4 - 6 - 8492 - - - 6 + 7 13 - 9191 + 14381 13 - 67 - 8070 + 33 + 13890 - 67 - 4815 - 2597 + 33 + 185 + 13672 + + + 190 + 70079 + 9532 + + + + + + + macro_id + location + + + 12 + + + 1 + 2 + 77243 + + + 2 + 3 + 30559 + + + 3 + 4 + 14326 + + + 4 + 5 + 10349 + + + 5 + 8 + 14054 + + + 8 + 18 + 14108 + + + 18 + 88 + 13672 + + + 88 + 12162 + 7680 @@ -12392,12 +12672,12 @@ 1 2 - 98745 + 177475 2 3 - 8228 + 4521 @@ -12413,37 +12693,17 @@ 1 2 - 414921 + 5248369 2 3 - 246099 + 248072 3 - 4 - 110337 - - - 4 - 6 - 75496 - - - 6 - 11 - 79967 - - - 11 - 41 - 78595 - - - 41 - 226300 - 36238 + 70079 + 408170 @@ -12459,12 +12719,12 @@ 1 2 - 982813 + 5882442 2 - 367 - 58841 + 37 + 22170 @@ -12480,7 +12740,7 @@ 1 2 - 1041654 + 5904613 @@ -12494,14 +12754,14 @@ 12 - 22298 - 22299 - 13 + 1470 + 1471 + 54 - 2975179 - 2975180 - 13 + 721641 + 721642 + 54 @@ -12515,14 +12775,14 @@ 12 - 2368 - 2369 - 13 + 281 + 282 + 54 - 6368 - 6369 - 13 + 3143 + 3144 + 54 @@ -12536,14 +12796,14 @@ 12 - 7695 - 7696 - 13 + 1060 + 1061 + 54 - 71295 - 71296 - 13 + 107334 + 107335 + 54 @@ -12553,15 +12813,15 @@ macroparent - 34859187 + 32844542 id - 34859187 + 32844542 parent_id - 27314145 + 15561370 @@ -12575,7 +12835,7 @@ 1 2 - 34859187 + 32844542 @@ -12591,17 +12851,27 @@ 1 2 - 21276819 + 7669068 2 3 - 5036827 + 1551190 3 - 91 - 1000497 + 4 + 4552687 + + + 4 + 5 + 1263079 + + + 5 + 205 + 525343 @@ -12611,15 +12881,15 @@ macrolocationbind - 5544606 + 6882795 id - 3882779 + 4222137 location - 2759101 + 2746999 @@ -12633,22 +12903,27 @@ 1 2 - 3057283 + 2459682 2 3 - 469944 + 1326273 3 - 7 - 314994 + 4 + 8261 - 7 - 57 - 40556 + 4 + 5 + 413547 + + + 5 + 17 + 14372 @@ -12664,22 +12939,27 @@ 1 2 - 2198674 + 1393982 2 3 - 240048 + 907153 3 - 8 - 216611 + 4 + 8735 - 8 - 723 - 103767 + 4 + 5 + 410836 + + + 5 + 522 + 26291 @@ -12689,19 +12969,19 @@ macro_argument_unexpanded - 100507893 + 94316565 invocation - 30398388 + 30014759 argument_index - 870 + 798 text - 428569 + 393068 @@ -12715,22 +12995,22 @@ 1 2 - 9719830 + 11049162 2 3 - 12168939 + 11160894 3 4 - 6225849 + 5710115 4 67 - 2283768 + 2094586 @@ -12746,22 +13026,22 @@ 1 2 - 9947850 + 11258293 2 3 - 12189867 + 11180088 3 4 - 6031233 + 5531620 4 67 - 2229436 + 2044755 @@ -12777,17 +13057,17 @@ 46457 46458 - 764 + 701 46659 173182 - 65 + 60 645295 - 2305149 - 39 + 2481630 + 36 @@ -12803,17 +13083,17 @@ 2 3 - 764 + 701 13 1115 - 65 + 60 7702 22873 - 39 + 36 @@ -12829,57 +13109,57 @@ 1 2 - 50559 + 46371 2 3 - 77883 + 71431 3 4 - 28879 + 26487 4 5 - 43319 + 39731 5 6 - 48845 + 44799 6 9 - 35684 + 32728 9 15 - 35829 + 32861 15 27 - 32651 + 29946 27 57 - 33205 + 30454 57 517 - 32374 + 29692 518 485092 - 9336 + 8563 @@ -12895,17 +13175,17 @@ 1 2 - 303608 + 278458 2 3 - 112209 + 102914 3 9 - 12751 + 11695 @@ -12915,19 +13195,19 @@ macro_argument_expanded - 100507893 + 94316565 invocation - 30398388 + 30014759 argument_index - 870 + 798 text - 259602 + 238097 @@ -12941,22 +13221,22 @@ 1 2 - 9719830 + 11049162 2 3 - 12168939 + 11160894 3 4 - 6225849 + 5710115 4 67 - 2283768 + 2094586 @@ -12972,22 +13252,22 @@ 1 2 - 13403008 + 14427235 2 3 - 10499153 + 9629429 3 4 - 5260653 + 4824874 4 9 - 1235572 + 1133220 @@ -13003,17 +13283,17 @@ 46457 46458 - 764 + 701 46659 173182 - 65 + 60 645295 - 2305149 - 39 + 2481630 + 36 @@ -13029,17 +13309,17 @@ 1 2 - 751 + 689 2 96 - 65 + 60 950 16176 - 52 + 48 @@ -13055,57 +13335,57 @@ 1 2 - 27534 + 25253 2 3 - 34167 + 31337 3 4 - 56942 + 52225 4 5 - 20070 + 18408 5 6 - 3863 + 3543 6 7 - 22734 + 20851 7 10 - 21112 + 19363 10 19 - 22444 + 20585 19 51 - 19477 + 17863 51 253 - 19622 + 17997 254 - 990275 - 11631 + 1166756 + 10667 @@ -13121,17 +13401,17 @@ 1 2 - 131199 + 120330 2 3 - 111009 + 101813 3 66 - 17393 + 15953 @@ -13141,19 +13421,19 @@ functions - 4000085 + 4010769 id - 4000085 + 4010769 name - 1644140 + 1648531 kind - 996 + 999 @@ -13167,7 +13447,7 @@ 1 2 - 4000085 + 4010769 @@ -13183,7 +13463,7 @@ 1 2 - 4000085 + 4010769 @@ -13199,17 +13479,17 @@ 1 2 - 1398565 + 1402301 2 4 - 138797 + 139168 4 3162 - 106776 + 107062 @@ -13225,12 +13505,12 @@ 1 2 - 1641274 + 1645658 2 3 - 2865 + 2873 @@ -13342,15 +13622,15 @@ function_entry_point - 1430682 + 1141039 id - 1425982 + 1137291 entry_point - 1430682 + 1141039 @@ -13364,12 +13644,12 @@ 1 2 - 1421966 + 1134088 2 17 - 4016 + 3203 @@ -13385,7 +13665,7 @@ 1 2 - 1430682 + 1141039 @@ -13395,15 +13675,15 @@ function_return_type - 4017528 + 4028259 id - 4000085 + 4010769 return_type - 621224 + 622884 @@ -13417,12 +13697,12 @@ 1 2 - 3982642 + 3993280 2 3 - 17443 + 17489 @@ -13438,27 +13718,27 @@ 1 2 - 312107 + 312941 2 3 - 212930 + 213499 3 5 - 48342 + 48471 5 354 - 46598 + 46722 358 9897 - 1245 + 1249 @@ -13738,59 +14018,59 @@ purefunctions - 138354 + 138721 id - 138354 + 138721 function_deleted - 94264 + 88084 id - 94264 + 88084 function_defaulted - 55306 + 51679 id - 55306 + 51679 function_prototyped - 3998590 + 4009270 id - 3998590 + 4009270 deduction_guide_for_class - 5855 + 5871 id - 5855 + 5871 class_template - 2242 + 2248 @@ -13804,7 +14084,7 @@ 1 2 - 5855 + 5871 @@ -13820,12 +14100,12 @@ 1 2 - 1121 + 1124 2 3 - 373 + 374 3 @@ -13855,15 +14135,15 @@ member_function_this_type - 840354 + 676227 id - 840354 + 676227 this_type - 239686 + 177645 @@ -13877,7 +14157,7 @@ 1 2 - 840354 + 676227 @@ -13893,37 +14173,37 @@ 1 2 - 73657 + 48721 2 3 - 70154 + 36853 3 4 - 33709 + 32855 4 5 - 15380 + 19988 5 - 7 - 21832 + 6 + 12867 - 7 - 13 - 18884 + 6 + 10 + 14491 - 13 - 530 - 6066 + 10 + 65 + 11868 @@ -13933,27 +14213,27 @@ fun_decls - 4144115 + 4155684 id - 4138135 + 4149688 function - 3975664 + 3986284 type_id - 613250 + 614888 name - 1642645 + 1647032 location - 2762494 + 2769873 @@ -13967,7 +14247,7 @@ 1 2 - 4138135 + 4149688 @@ -13983,12 +14263,12 @@ 1 2 - 4132154 + 4143691 2 3 - 5980 + 5996 @@ -14004,7 +14284,7 @@ 1 2 - 4138135 + 4149688 @@ -14020,7 +14300,7 @@ 1 2 - 4138135 + 4149688 @@ -14036,12 +14316,12 @@ 1 2 - 3826525 + 3836247 2 4 - 149138 + 150036 @@ -14057,12 +14337,12 @@ 1 2 - 3957224 + 3967795 2 3 - 18439 + 18489 @@ -14078,7 +14358,7 @@ 1 2 - 3975664 + 3986284 @@ -14094,12 +14374,12 @@ 1 2 - 3832755 + 3842993 2 4 - 142909 + 143290 @@ -14115,27 +14395,27 @@ 1 2 - 297405 + 298199 2 3 - 219783 + 220370 3 5 - 48716 + 48846 5 354 - 46099 + 46222 358 - 10242 - 1245 + 10246 + 1249 @@ -14151,22 +14431,22 @@ 1 2 - 307497 + 308318 2 3 - 211061 + 211625 3 5 - 48342 + 48471 5 1033 - 46099 + 46222 1483 @@ -14187,22 +14467,22 @@ 1 2 - 493267 + 494584 2 3 - 52578 + 52719 3 7 - 50958 + 51094 7 2211 - 16446 + 16490 @@ -14218,22 +14498,22 @@ 1 2 - 456761 + 457981 2 3 - 69274 + 69459 3 6 - 55693 + 55842 6 4728 - 31522 + 31606 @@ -14249,22 +14529,22 @@ 1 2 - 1294529 + 1297737 2 3 - 183152 + 183892 3 10 - 125341 + 125551 10 3169 - 39620 + 39851 @@ -14280,17 +14560,17 @@ 1 2 - 1398067 + 1401801 2 4 - 139171 + 139543 4 3162 - 105406 + 105687 @@ -14306,12 +14586,12 @@ 1 2 - 1552813 + 1556960 2 1596 - 89832 + 90072 @@ -14327,17 +14607,17 @@ 1 2 - 1318576 + 1322098 2 3 - 207947 + 208502 3 1592 - 116121 + 116431 @@ -14353,17 +14633,17 @@ 1 2 - 2383729 + 2390096 2 3 - 237102 + 237735 3 211 - 141663 + 142041 @@ -14379,17 +14659,17 @@ 1 2 - 2387467 + 2393844 2 3 - 233862 + 234487 3 211 - 141164 + 141541 @@ -14405,12 +14685,12 @@ 1 2 - 2647494 + 2654566 2 211 - 115000 + 115307 @@ -14426,12 +14706,12 @@ 1 2 - 2723372 + 2730646 2 8 - 39122 + 39226 @@ -14441,48 +14721,48 @@ fun_def - 1583380 + 1413170 id - 1583380 + 1413170 fun_specialized - 8413 + 8435 id - 8413 + 8435 fun_implicit - 271 + 272 id - 271 + 272 fun_decl_specifiers - 4091287 + 4102216 id - 1683761 + 1688258 name - 1370 + 1374 @@ -14496,22 +14776,22 @@ 1 2 - 360574 + 361537 2 3 - 261771 + 262470 3 4 - 1038489 + 1041263 4 5 - 22925 + 22986 @@ -14708,26 +14988,26 @@ fun_decl_empty_throws - 435875 + 437031 fun_decl - 435875 + 437031 fun_decl_noexcept - 177863 + 141854 fun_decl - 177863 + 141854 constant - 177265 + 141377 @@ -14741,7 +15021,7 @@ 1 2 - 177863 + 141854 @@ -14757,12 +15037,12 @@ 1 2 - 176709 + 140934 2 4 - 555 + 442 @@ -14772,22 +15052,22 @@ fun_decl_empty_noexcept - 1160716 + 1163816 fun_decl - 1160716 + 1163816 fun_decl_typedef_type - 2769 + 2763 fun_decl - 2769 + 2763 typedeftype_id @@ -14805,7 +15085,7 @@ 1 2 - 2769 + 2763 @@ -14881,19 +15161,19 @@ fun_requires - 31152 + 29110 id - 10821 + 10112 kind - 46 + 43 constraint - 30899 + 28873 @@ -14907,12 +15187,12 @@ 1 2 - 10752 + 10047 2 3 - 69 + 64 @@ -14928,32 +15208,32 @@ 1 2 - 7782 + 7272 2 3 - 529 + 494 3 6 - 920 + 860 6 13 - 345 + 322 13 14 - 1220 + 1140 19 20 - 23 + 21 @@ -14969,12 +15249,12 @@ 208 209 - 23 + 21 265 266 - 23 + 21 @@ -14990,12 +15270,12 @@ 580 581 - 23 + 21 762 763 - 23 + 21 @@ -15011,12 +15291,12 @@ 1 2 - 30645 + 28636 2 3 - 253 + 236 @@ -15032,7 +15312,7 @@ 1 2 - 30899 + 28873 @@ -15042,19 +15322,19 @@ param_decl_bind - 7170500 + 7189902 id - 7170500 + 7189902 index - 7974 + 7995 fun_decl - 3468567 + 3478082 @@ -15068,7 +15348,7 @@ 1 2 - 7170500 + 7189902 @@ -15084,7 +15364,7 @@ 1 2 - 7170500 + 7189902 @@ -15100,31 +15380,31 @@ 2 3 - 3987 + 3997 6 7 - 1993 + 1998 16 20 - 622 + 624 25 143 - 622 + 624 332 15841 - 622 + 624 - 27839 - 27840 + 27841 + 27842 124 @@ -15141,31 +15421,31 @@ 2 3 - 3987 + 3997 6 7 - 1993 + 1998 16 20 - 622 + 624 25 143 - 622 + 624 332 15841 - 622 + 624 - 27839 - 27840 + 27841 + 27842 124 @@ -15182,27 +15462,27 @@ 1 2 - 1495001 + 1499244 2 3 - 954264 + 956813 3 4 - 578364 + 579909 4 5 - 282329 + 283083 5 65 - 158607 + 159031 @@ -15218,27 +15498,27 @@ 1 2 - 1495001 + 1499244 2 3 - 954264 + 956813 3 4 - 578364 + 579909 4 5 - 282329 + 283083 5 65 - 158607 + 159031 @@ -15248,27 +15528,27 @@ var_decls - 9244489 + 9269431 id - 9237636 + 9262560 variable - 8948454 + 8972356 type_id - 1458495 + 1462391 name - 850103 + 852374 location - 6187953 + 6204481 @@ -15282,7 +15562,7 @@ 1 2 - 9237636 + 9262560 @@ -15298,12 +15578,12 @@ 1 2 - 9230783 + 9255689 2 3 - 6852 + 6870 @@ -15319,7 +15599,7 @@ 1 2 - 9237636 + 9262560 @@ -15335,7 +15615,7 @@ 1 2 - 9237636 + 9262560 @@ -15351,12 +15631,12 @@ 1 2 - 8672229 + 8695144 2 4 - 276224 + 277212 @@ -15372,12 +15652,12 @@ 1 2 - 8909830 + 8933629 2 3 - 38624 + 38727 @@ -15393,12 +15673,12 @@ 1 2 - 8843047 + 8866668 2 4 - 105406 + 105687 @@ -15414,12 +15694,12 @@ 1 2 - 8697272 + 8720504 2 4 - 251181 + 251852 @@ -15435,27 +15715,27 @@ 1 2 - 852471 + 854748 2 3 - 284198 + 284957 3 5 - 127708 + 128049 5 11 - 112632 + 112933 11 2944 - 81484 + 81702 @@ -15471,27 +15751,27 @@ 1 2 - 872779 + 875111 2 3 - 269745 + 270466 3 5 - 123098 + 123427 5 11 - 112632 + 112933 11 2859 - 80238 + 80452 @@ -15507,22 +15787,22 @@ 1 2 - 1121967 + 1124964 2 3 - 192622 + 193136 3 7 - 114875 + 115182 7 1038 - 29030 + 29107 @@ -15538,27 +15818,27 @@ 1 2 - 988278 + 990918 2 3 - 218537 + 219121 3 6 - 133689 + 134046 6 95 - 109517 + 109810 97 2570 - 8472 + 8495 @@ -15574,32 +15854,32 @@ 1 2 - 464610 + 465851 2 3 - 165336 + 165777 3 4 - 59929 + 60089 4 7 - 65785 + 65961 7 26 - 64165 + 64337 26 - 26620 - 30276 + 26622 + 30357 @@ -15615,32 +15895,32 @@ 1 2 - 477443 + 478718 2 3 - 164588 + 165028 3 4 - 54821 + 54967 4 8 - 71641 + 71832 8 46 - 63792 + 63962 46 26187 - 17816 + 17864 @@ -15656,22 +15936,22 @@ 1 2 - 653120 + 654865 2 3 - 110140 + 110435 3 11 - 65162 + 65336 11 3460 - 21679 + 21737 @@ -15687,27 +15967,27 @@ 1 2 - 491771 + 493085 2 3 - 182779 + 183267 3 4 - 52204 + 52344 4 8 - 65037 + 65211 8 22104 - 58309 + 58465 @@ -15723,12 +16003,12 @@ 1 2 - 5741533 + 5756869 2 - 2941 - 446419 + 2943 + 447612 @@ -15744,12 +16024,12 @@ 1 2 - 5765455 + 5780855 2 2935 - 422497 + 423626 @@ -15765,12 +16045,12 @@ 1 2 - 5904751 + 5920523 2 2555 - 283201 + 283958 @@ -15786,12 +16066,12 @@ 1 2 - 6175493 + 6191988 2 5 - 12459 + 12492 @@ -15801,37 +16081,37 @@ var_def - 3721867 + 3731808 id - 3721867 + 3731808 var_specialized - 690 + 645 id - 690 + 645 var_decl_specifiers - 487660 + 488962 id - 487660 + 488962 name - 498 + 499 @@ -15845,7 +16125,7 @@ 1 2 - 487660 + 488962 @@ -15886,26 +16166,26 @@ is_structured_binding - 1013 + 946 id - 1013 + 946 var_requires - 414 + 387 id - 69 + 64 constraint - 414 + 387 @@ -15919,17 +16199,17 @@ 2 3 - 23 + 21 3 4 - 23 + 21 13 14 - 23 + 21 @@ -15938,6 +16218,325 @@ constraint id + + + 12 + + + 1 + 2 + 387 + + + + + + + + + type_decls + 1687983 + + + id + 1687983 + + + type_id + 1651022 + + + location + 1326265 + + + + + id + type_id + + + 12 + + + 1 + 2 + 1687983 + + + + + + + id + location + + + 12 + + + 1 + 2 + 1687983 + + + + + + + type_id + id + + + 12 + + + 1 + 2 + 1624425 + + + 2 + 24 + 26596 + + + + + + + type_id + location + + + 12 + + + 1 + 2 + 1625611 + + + 2 + 24 + 25411 + + + + + + + location + id + + + 12 + + + 1 + 2 + 1257941 + + + 2 + 651 + 68323 + + + + + + + location + type_id + + + 12 + + + 1 + 2 + 1259139 + + + 2 + 651 + 67126 + + + + + + + + + type_def + 1158256 + + + id + 1158256 + + + + + + type_decl_top + 672531 + + + type_decl + 672531 + + + + + + type_requires + 7680 + + + id + 2043 + + + constraint + 7659 + + + + + id + constraint + + + 12 + + + 1 + 2 + 1011 + + + 2 + 5 + 107 + + + 5 + 6 + 602 + + + 6 + 13 + 172 + + + 13 + 14 + 150 + + + + + + + constraint + id + + + 12 + + + 1 + 2 + 7637 + + + 2 + 3 + 21 + + + + + + + + + namespace_decls + 430961 + + + id + 430961 + + + namespace_id + 1959 + + + location + 430961 + + + bodylocation + 430961 + + + + + id + namespace_id + + + 12 + + + 1 + 2 + 430961 + + + + + + + id + location + + + 12 + + + 1 + 2 + 430961 + + + + + + + id + bodylocation + + + 12 + + + 1 + 2 + 430961 + + + + + + + namespace_id + id 12 @@ -15947,325 +16546,6 @@ 2 414 - - - - - - - - type_decls - 1840533 - - - id - 1840533 - - - type_id - 1800233 - - - location - 1446052 - - - - - id - type_id - - - 12 - - - 1 - 2 - 1840533 - - - - - - - id - location - - - 12 - - - 1 - 2 - 1840533 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 1771235 - - - 2 - 24 - 28998 - - - - - - - type_id - location - - - 12 - - - 1 - 2 - 1772527 - - - 2 - 24 - 27706 - - - - - - - location - id - - - 12 - - - 1 - 2 - 1371558 - - - 2 - 651 - 74494 - - - - - - - location - type_id - - - 12 - - - 1 - 2 - 1372863 - - - 2 - 651 - 73188 - - - - - - - - - type_def - 1262896 - - - id - 1262896 - - - - - - type_decl_top - 670739 - - - type_decl - 670739 - - - - - - type_requires - 8219 - - - id - 2187 - - - constraint - 8196 - - - - - id - constraint - - - 12 - - - 1 - 2 - 1082 - - - 2 - 5 - 115 - - - 5 - 6 - 644 - - - 6 - 13 - 184 - - - 13 - 14 - 161 - - - - - - - constraint - id - - - 12 - - - 1 - 2 - 8173 - - - 2 - 3 - 23 - - - - - - - - - namespace_decls - 429821 - - - id - 429821 - - - namespace_id - 1954 - - - location - 429821 - - - bodylocation - 429821 - - - - - id - namespace_id - - - 12 - - - 1 - 2 - 429821 - - - - - - - id - location - - - 12 - - - 1 - 2 - 429821 - - - - - - - id - bodylocation - - - 12 - - - 1 - 2 - 429821 - - - - - - - namespace_id - id - - - 12 - - - 1 - 2 - 413 - 2 3 @@ -16274,42 +16554,42 @@ 3 6 - 180 + 181 6 15 - 163 + 164 15 34 - 154 + 155 35 62 - 163 + 164 63 87 - 154 + 155 90 142 - 154 + 155 143 219 - 154 + 155 263 1505 - 154 + 155 1854 @@ -16330,7 +16610,7 @@ 1 2 - 413 + 414 2 @@ -16340,42 +16620,42 @@ 3 6 - 180 + 181 6 15 - 163 + 164 15 34 - 154 + 155 35 62 - 163 + 164 63 87 - 154 + 155 90 142 - 154 + 155 143 219 - 154 + 155 263 1505 - 154 + 155 1854 @@ -16396,7 +16676,7 @@ 1 2 - 413 + 414 2 @@ -16406,42 +16686,42 @@ 3 6 - 180 + 181 6 15 - 163 + 164 15 34 - 154 + 155 35 62 - 163 + 164 63 87 - 154 + 155 90 142 - 154 + 155 143 219 - 154 + 155 263 1505 - 154 + 155 1854 @@ -16462,7 +16742,7 @@ 1 2 - 429821 + 430961 @@ -16478,7 +16758,7 @@ 1 2 - 429821 + 430961 @@ -16494,7 +16774,7 @@ 1 2 - 429821 + 430961 @@ -16510,7 +16790,7 @@ 1 2 - 429821 + 430961 @@ -16526,7 +16806,7 @@ 1 2 - 429821 + 430961 @@ -16542,7 +16822,7 @@ 1 2 - 429821 + 430961 @@ -16552,23 +16832,23 @@ usings - 339714 + 311355 id - 339714 + 311355 element_id - 73742 + 67416 location - 33521 + 30744 kind - 26 + 24 @@ -16582,7 +16862,7 @@ 1 2 - 339714 + 311355 @@ -16598,7 +16878,7 @@ 1 2 - 339714 + 311355 @@ -16614,7 +16894,7 @@ 1 2 - 339714 + 311355 @@ -16630,17 +16910,17 @@ 1 2 - 64089 + 58562 2 5 - 6725 + 6168 5 134 - 2927 + 2685 @@ -16656,17 +16936,17 @@ 1 2 - 64089 + 58562 2 5 - 6725 + 6168 5 134 - 2927 + 2685 @@ -16682,7 +16962,7 @@ 1 2 - 73742 + 67416 @@ -16698,22 +16978,22 @@ 1 2 - 26440 + 24250 2 4 - 2861 + 2624 4 132 - 2439 + 2237 145 - 367 - 1780 + 365 + 1632 @@ -16729,22 +17009,22 @@ 1 2 - 26440 + 24250 2 4 - 2861 + 2624 4 132 - 2439 + 2237 145 - 367 - 1780 + 365 + 1632 @@ -16760,7 +17040,7 @@ 1 2 - 33521 + 30744 @@ -16776,12 +17056,12 @@ 393 394 - 13 + 12 - 25368 - 25369 - 13 + 25350 + 25351 + 12 @@ -16797,12 +17077,12 @@ 214 215 - 13 + 12 - 5378 - 5379 - 13 + 5360 + 5361 + 12 @@ -16818,12 +17098,12 @@ 356 357 - 13 + 12 2186 2187 - 13 + 12 @@ -16833,15 +17113,15 @@ using_container - 722789 + 662697 parent - 26479 + 24250 child - 339714 + 311355 @@ -16855,42 +17135,42 @@ 1 2 - 12250 + 11236 2 3 - 1951 + 1790 3 6 - 2241 + 2056 6 7 - 2861 + 2588 7 27 - 2017 + 1850 27 136 - 1028 + 943 145 146 - 3270 + 2999 146 437 - 857 + 786 @@ -16906,27 +17186,27 @@ 1 2 - 121282 + 111017 2 3 - 150162 + 137723 3 4 - 24567 + 22532 4 5 - 33323 + 30563 5 65 - 10378 + 9518 @@ -16936,27 +17216,27 @@ static_asserts - 183028 + 183513 id - 183028 + 183513 condition - 183028 + 183513 message - 40988 + 41097 location - 23861 + 23924 enclosing - 6630 + 6648 @@ -16970,7 +17250,7 @@ 1 2 - 183028 + 183513 @@ -16986,7 +17266,7 @@ 1 2 - 183028 + 183513 @@ -17002,7 +17282,7 @@ 1 2 - 183028 + 183513 @@ -17018,7 +17298,7 @@ 1 2 - 183028 + 183513 @@ -17034,7 +17314,7 @@ 1 2 - 183028 + 183513 @@ -17050,7 +17330,7 @@ 1 2 - 183028 + 183513 @@ -17066,7 +17346,7 @@ 1 2 - 183028 + 183513 @@ -17082,7 +17362,7 @@ 1 2 - 183028 + 183513 @@ -17098,32 +17378,32 @@ 1 2 - 30155 + 30235 2 3 - 671 + 673 3 4 - 3866 + 3876 4 12 - 2178 + 2184 12 17 - 3306 + 3315 17 513 - 809 + 811 @@ -17139,32 +17419,32 @@ 1 2 - 30155 + 30235 2 3 - 671 + 673 3 4 - 3866 + 3876 4 12 - 2178 + 2184 12 17 - 3306 + 3315 17 513 - 809 + 811 @@ -17180,12 +17460,12 @@ 1 2 - 37983 + 38084 2 33 - 3005 + 3013 @@ -17201,7 +17481,7 @@ 1 2 - 32084 + 32169 2 @@ -17211,17 +17491,17 @@ 3 4 - 3616 + 3626 4 12 - 1980 + 1985 12 43 - 2953 + 2961 @@ -17237,37 +17517,37 @@ 1 2 - 4477 + 4489 2 3 - 3883 + 3893 3 4 - 1868 + 1873 4 5 - 111 + 112 5 6 - 5011 + 5024 6 13 - 456 + 457 14 15 - 2807 + 2814 16 @@ -17277,12 +17557,12 @@ 17 18 - 4658 + 4670 19 52 - 525 + 526 @@ -17298,37 +17578,37 @@ 1 2 - 4477 + 4489 2 3 - 3883 + 3893 3 4 - 1868 + 1873 4 5 - 111 + 112 5 6 - 5011 + 5024 6 13 - 456 + 457 14 15 - 2807 + 2814 16 @@ -17338,12 +17618,12 @@ 17 18 - 4658 + 4670 19 52 - 525 + 526 @@ -17359,22 +17639,22 @@ 1 2 - 7224 + 7243 2 3 - 8137 + 8159 3 4 - 8249 + 8271 4 7 - 249 + 250 @@ -17390,32 +17670,32 @@ 1 2 - 5313 + 5327 2 3 - 8516 + 8538 3 4 - 1593 + 1597 4 5 - 5028 + 5042 5 13 - 516 + 518 13 14 - 2807 + 2814 16 @@ -17436,17 +17716,17 @@ 1 2 - 5468 + 5482 2 3 - 559 + 561 3 210 - 499 + 500 223 @@ -17467,17 +17747,17 @@ 1 2 - 5468 + 5482 2 3 - 559 + 561 3 210 - 499 + 500 223 @@ -17498,17 +17778,17 @@ 1 2 - 5631 + 5646 2 3 - 551 + 552 3 2936 - 447 + 448 @@ -17524,17 +17804,17 @@ 1 2 - 5614 + 5629 2 3 - 568 + 569 3 1929 - 447 + 448 @@ -17544,23 +17824,23 @@ params - 6965543 + 6984148 id - 6939004 + 6957539 function - 3356931 + 3365898 index - 7974 + 7995 type_id - 1222140 + 1225405 @@ -17574,7 +17854,7 @@ 1 2 - 6939004 + 6957539 @@ -17590,7 +17870,7 @@ 1 2 - 6939004 + 6957539 @@ -17606,12 +17886,12 @@ 1 2 - 6912466 + 6930930 2 3 - 26538 + 26609 @@ -17627,27 +17907,27 @@ 1 2 - 1458993 + 1462890 2 3 - 906295 + 908716 3 4 - 559675 + 561170 4 5 - 276598 + 277337 5 65 - 155368 + 155783 @@ -17663,27 +17943,27 @@ 1 2 - 1458993 + 1462890 2 3 - 906295 + 908716 3 4 - 559675 + 561170 4 5 - 276598 + 277337 5 65 - 155368 + 155783 @@ -17699,22 +17979,22 @@ 1 2 - 1758766 + 1763464 2 3 - 1005721 + 1008407 3 4 - 435829 + 436993 4 11 - 156614 + 157032 @@ -17730,27 +18010,27 @@ 2 3 - 3987 + 3997 6 7 - 1993 + 1998 14 18 - 622 + 624 23 138 - 622 + 624 323 15234 - 622 + 624 26943 @@ -17771,27 +18051,27 @@ 2 3 - 3987 + 3997 6 7 - 1993 + 1998 14 18 - 622 + 624 23 138 - 622 + 624 323 15234 - 622 + 624 26943 @@ -17812,27 +18092,27 @@ 1 2 - 3987 + 3997 2 3 - 1993 + 1998 4 7 - 622 + 624 9 54 - 622 + 624 115 2700 - 622 + 624 7528 @@ -17853,27 +18133,27 @@ 1 2 - 738841 + 740814 2 3 - 241338 + 241982 3 5 - 93569 + 93819 5 13 - 93445 + 93694 13 2570 - 54945 + 55092 @@ -17889,27 +18169,27 @@ 1 2 - 820948 + 823141 2 3 - 180661 + 181143 3 6 - 106278 + 106562 6 27 - 92199 + 92445 27 2558 - 22053 + 22112 @@ -17925,17 +18205,17 @@ 1 2 - 997373 + 1000037 2 3 - 166581 + 167026 3 65 - 58185 + 58340 @@ -17945,15 +18225,15 @@ overrides - 169371 + 169820 new - 160140 + 160564 old - 19073 + 19124 @@ -17967,12 +18247,12 @@ 1 2 - 150917 + 151317 2 4 - 9222 + 9246 @@ -17988,32 +18268,32 @@ 1 2 - 10436 + 10464 2 3 - 2583 + 2590 3 4 - 1730 + 1735 4 6 - 1575 + 1580 6 18 - 1438 + 1441 18 230 - 1308 + 1312 @@ -18023,19 +18303,19 @@ membervariables - 1491860 + 1495845 id - 1489415 + 1493394 type_id - 453914 + 455127 name - 639011 + 640718 @@ -18049,12 +18329,12 @@ 1 2 - 1487079 + 1491051 2 4 - 2336 + 2342 @@ -18070,7 +18350,7 @@ 1 2 - 1489415 + 1493394 @@ -18086,22 +18366,22 @@ 1 2 - 336836 + 337736 2 3 - 71930 + 72123 3 10 - 35041 + 35135 10 4422 - 10105 + 10132 @@ -18117,22 +18397,22 @@ 1 2 - 354330 + 355276 2 3 - 63944 + 64115 3 49 - 34118 + 34209 56 2175 - 1521 + 1525 @@ -18148,22 +18428,22 @@ 1 2 - 419850 + 420972 2 3 - 121804 + 122129 3 5 - 57316 + 57469 5 654 - 40040 + 40147 @@ -18179,17 +18459,17 @@ 1 2 - 522314 + 523709 2 3 - 72311 + 72504 3 658 - 44386 + 44504 @@ -18199,19 +18479,19 @@ globalvariables - 486788 + 488088 id - 486788 + 488088 type_id - 10341 + 10368 name - 112134 + 112433 @@ -18225,7 +18505,7 @@ 1 2 - 486788 + 488088 @@ -18241,7 +18521,7 @@ 1 2 - 486788 + 488088 @@ -18257,32 +18537,32 @@ 1 2 - 6977 + 6995 2 3 - 373 + 374 3 5 - 747 + 749 5 20 - 872 + 874 20 74 - 872 + 874 152 2214 - 498 + 499 @@ -18298,32 +18578,32 @@ 1 2 - 7101 + 7120 2 3 - 373 + 374 3 5 - 747 + 749 5 20 - 747 + 749 20 74 - 872 + 874 124 226 - 498 + 499 @@ -18339,17 +18619,17 @@ 1 2 - 95065 + 95319 2 7 - 8721 + 8744 7 604 - 8347 + 8370 @@ -18365,12 +18645,12 @@ 1 2 - 96684 + 96943 2 3 - 15200 + 15241 3 @@ -18385,19 +18665,19 @@ localvariables - 727548 + 725943 id - 727548 + 725943 type_id - 53530 + 53416 name - 101739 + 101515 @@ -18411,7 +18691,7 @@ 1 2 - 727548 + 725943 @@ -18427,7 +18707,7 @@ 1 2 - 727548 + 725943 @@ -18443,37 +18723,37 @@ 1 2 - 28944 + 28884 2 3 - 7842 + 7824 3 4 - 4033 + 4024 4 6 - 4057 + 4048 6 12 - 4157 + 4148 12 166 - 4017 + 4008 168 19320 - 477 + 476 @@ -18489,22 +18769,22 @@ 1 2 - 38444 + 38363 2 3 - 6714 + 6699 3 5 - 4474 + 4465 5 3502 - 3897 + 3888 @@ -18520,32 +18800,32 @@ 1 2 - 62592 + 62454 2 3 - 16077 + 16042 3 4 - 6545 + 6531 4 8 - 8147 + 8129 8 135 - 7633 + 7616 135 7544 - 742 + 740 @@ -18561,22 +18841,22 @@ 1 2 - 84658 + 84471 2 3 - 8436 + 8417 3 15 - 7689 + 7672 15 1509 - 955 + 953 @@ -18586,15 +18866,15 @@ autoderivation - 228629 + 229240 var - 228629 + 229240 derivation_type - 622 + 624 @@ -18608,7 +18888,7 @@ 1 2 - 228629 + 229240 @@ -18654,15 +18934,15 @@ orphaned_variables - 55584 + 44331 var - 55584 + 44331 function - 51483 + 41060 @@ -18676,7 +18956,7 @@ 1 2 - 55584 + 44331 @@ -18692,12 +18972,12 @@ 1 2 - 50415 + 40208 2 47 - 1068 + 851 @@ -18707,19 +18987,19 @@ enumconstants - 343845 + 344763 id - 343845 + 344763 parent - 41181 + 41291 index - 13908 + 13945 type_id @@ -18727,11 +19007,11 @@ name - 343464 + 344382 location - 316517 + 317363 @@ -18745,7 +19025,7 @@ 1 2 - 343845 + 344763 @@ -18761,7 +19041,7 @@ 1 2 - 343845 + 344763 @@ -18777,7 +19057,7 @@ 1 2 - 343845 + 344763 @@ -18793,7 +19073,7 @@ 1 2 - 343845 + 344763 @@ -18809,7 +19089,7 @@ 1 2 - 343845 + 344763 @@ -18825,57 +19105,57 @@ 1 2 - 1521 + 1525 2 3 - 5704 + 5719 3 4 - 8692 + 8715 4 5 - 5487 + 5501 5 6 - 4617 + 4630 6 7 - 2662 + 2669 7 8 - 1955 + 1961 8 11 - 3802 + 3813 11 17 - 3151 + 3159 17 64 - 3096 + 3104 79 257 - 488 + 490 @@ -18891,57 +19171,57 @@ 1 2 - 1521 + 1525 2 3 - 5704 + 5719 3 4 - 8692 + 8715 4 5 - 5487 + 5501 5 6 - 4617 + 4630 6 7 - 2662 + 2669 7 8 - 1955 + 1961 8 11 - 3802 + 3813 11 17 - 3151 + 3159 17 64 - 3096 + 3104 79 257 - 488 + 490 @@ -18957,7 +19237,7 @@ 1 2 - 41181 + 41291 @@ -18973,57 +19253,57 @@ 1 2 - 1521 + 1525 2 3 - 5704 + 5719 3 4 - 8692 + 8715 4 5 - 5487 + 5501 5 6 - 4617 + 4630 6 7 - 2662 + 2669 7 8 - 1955 + 1961 8 11 - 3802 + 3813 11 17 - 3151 + 3159 17 64 - 3096 + 3104 79 257 - 488 + 490 @@ -19039,52 +19319,52 @@ 1 2 - 2118 + 2124 2 3 - 5921 + 5937 3 4 - 8746 + 8770 4 5 - 5432 + 5447 5 6 - 4617 + 4630 6 7 - 2607 + 2614 7 8 - 1847 + 1852 8 11 - 3694 + 3704 11 18 - 3096 + 3104 18 257 - 3096 + 3104 @@ -19100,47 +19380,47 @@ 1 2 - 2770 + 2778 2 3 - 2227 + 2233 3 4 - 2281 + 2287 4 5 - 1249 + 1252 5 9 - 1086 + 1089 9 12 - 1086 + 1089 12 19 - 1086 + 1089 19 55 - 1086 + 1089 58 759 - 1032 + 1034 @@ -19156,47 +19436,47 @@ 1 2 - 2770 + 2778 2 3 - 2227 + 2233 3 4 - 2281 + 2287 4 5 - 1249 + 1252 5 9 - 1086 + 1089 9 12 - 1086 + 1089 12 19 - 1086 + 1089 19 55 - 1086 + 1089 58 759 - 1032 + 1034 @@ -19212,7 +19492,7 @@ 1 2 - 13908 + 13945 @@ -19228,47 +19508,47 @@ 1 2 - 2770 + 2778 2 3 - 2227 + 2233 3 4 - 2281 + 2287 4 5 - 1249 + 1252 5 9 - 1086 + 1089 9 12 - 1086 + 1089 12 19 - 1086 + 1089 19 55 - 1086 + 1089 58 756 - 1032 + 1034 @@ -19284,47 +19564,47 @@ 1 2 - 2770 + 2778 2 3 - 2227 + 2233 3 4 - 2281 + 2287 4 5 - 1249 + 1252 5 9 - 1086 + 1089 9 12 - 1086 + 1089 12 19 - 1086 + 1089 19 55 - 1086 + 1089 58 759 - 1032 + 1034 @@ -19420,12 +19700,12 @@ 1 2 - 343084 + 344000 2 3 - 380 + 381 @@ -19441,12 +19721,12 @@ 1 2 - 343084 + 344000 2 3 - 380 + 381 @@ -19462,7 +19742,7 @@ 1 2 - 343464 + 344382 @@ -19478,7 +19758,7 @@ 1 2 - 343464 + 344382 @@ -19494,12 +19774,12 @@ 1 2 - 343084 + 344000 2 3 - 380 + 381 @@ -19515,12 +19795,12 @@ 1 2 - 315485 + 316328 2 205 - 1032 + 1034 @@ -19536,7 +19816,7 @@ 1 2 - 316517 + 317363 @@ -19552,12 +19832,12 @@ 1 2 - 315485 + 316328 2 205 - 1032 + 1034 @@ -19573,7 +19853,7 @@ 1 2 - 316517 + 317363 @@ -19589,12 +19869,12 @@ 1 2 - 315485 + 316328 2 205 - 1032 + 1034 @@ -19604,31 +19884,31 @@ builtintypes - 7101 + 7120 id - 7101 + 7120 name - 7101 + 7120 kind - 7101 + 7120 size - 872 + 874 sign - 373 + 374 alignment - 622 + 624 @@ -19642,7 +19922,7 @@ 1 2 - 7101 + 7120 @@ -19658,7 +19938,7 @@ 1 2 - 7101 + 7120 @@ -19674,7 +19954,7 @@ 1 2 - 7101 + 7120 @@ -19690,7 +19970,7 @@ 1 2 - 7101 + 7120 @@ -19706,7 +19986,7 @@ 1 2 - 7101 + 7120 @@ -19722,7 +20002,7 @@ 1 2 - 7101 + 7120 @@ -19738,7 +20018,7 @@ 1 2 - 7101 + 7120 @@ -19754,7 +20034,7 @@ 1 2 - 7101 + 7120 @@ -19770,7 +20050,7 @@ 1 2 - 7101 + 7120 @@ -19786,7 +20066,7 @@ 1 2 - 7101 + 7120 @@ -19802,7 +20082,7 @@ 1 2 - 7101 + 7120 @@ -19818,7 +20098,7 @@ 1 2 - 7101 + 7120 @@ -19834,7 +20114,7 @@ 1 2 - 7101 + 7120 @@ -19850,7 +20130,7 @@ 1 2 - 7101 + 7120 @@ -19866,7 +20146,7 @@ 1 2 - 7101 + 7120 @@ -20025,7 +20305,7 @@ 3 4 - 622 + 624 @@ -20041,12 +20321,12 @@ 1 2 - 498 + 499 2 3 - 373 + 374 @@ -20161,7 +20441,7 @@ 5 6 - 373 + 374 @@ -20285,7 +20565,7 @@ 2 3 - 622 + 624 @@ -20301,7 +20581,7 @@ 3 4 - 622 + 624 @@ -20311,23 +20591,23 @@ derivedtypes - 3036227 + 3044337 id - 3036227 + 3044337 name - 1470331 + 1474259 kind - 747 + 749 type_id - 1942542 + 1947731 @@ -20341,7 +20621,7 @@ 1 2 - 3036227 + 3044337 @@ -20357,7 +20637,7 @@ 1 2 - 3036227 + 3044337 @@ -20373,7 +20653,7 @@ 1 2 - 3036227 + 3044337 @@ -20389,17 +20669,17 @@ 1 2 - 1353712 + 1357327 2 30 - 110514 + 110809 30 4274 - 6105 + 6121 @@ -20415,7 +20695,7 @@ 1 2 - 1470331 + 1474259 @@ -20431,17 +20711,17 @@ 1 2 - 1353836 + 1357452 2 30 - 110390 + 110685 30 4274 - 6105 + 6121 @@ -20580,22 +20860,22 @@ 1 2 - 1312097 + 1315602 2 3 - 377145 + 378152 3 4 - 122475 + 122802 4 135 - 130823 + 131172 @@ -20611,22 +20891,22 @@ 1 2 - 1313592 + 1317101 2 3 - 377145 + 378152 3 4 - 120980 + 121303 4 135 - 130823 + 131172 @@ -20642,22 +20922,22 @@ 1 2 - 1313966 + 1317476 2 3 - 378017 + 379027 3 4 - 122475 + 122802 4 6 - 128082 + 128424 @@ -20667,11 +20947,11 @@ pointerishsize - 2244308 + 2250303 id - 2244308 + 2250303 size @@ -20693,7 +20973,7 @@ 1 2 - 2244308 + 2250303 @@ -20709,7 +20989,7 @@ 1 2 - 2244308 + 2250303 @@ -20793,23 +21073,23 @@ arraysizes - 88337 + 88572 id - 88337 + 88572 num_elements - 18439 + 18489 bytesize - 22800 + 22861 alignment - 622 + 624 @@ -20823,7 +21103,7 @@ 1 2 - 88337 + 88572 @@ -20839,7 +21119,7 @@ 1 2 - 88337 + 88572 @@ -20855,7 +21135,7 @@ 1 2 - 88337 + 88572 @@ -20876,7 +21156,7 @@ 2 3 - 8846 + 8869 3 @@ -20886,22 +21166,22 @@ 4 5 - 5606 + 5621 6 7 - 1619 + 1624 8 27 - 1495 + 1499 34 57 - 373 + 374 @@ -20917,22 +21197,22 @@ 1 2 - 9469 + 9494 2 3 - 6603 + 6621 3 5 - 1245 + 1249 5 11 - 1121 + 1124 @@ -20948,22 +21228,22 @@ 1 2 - 9469 + 9494 2 3 - 6603 + 6621 3 4 - 996 + 999 4 6 - 1370 + 1374 @@ -20979,37 +21259,37 @@ 1 2 - 622 + 624 2 3 - 14702 + 14741 3 4 - 373 + 374 4 5 - 3239 + 3248 5 7 - 1495 + 1499 7 17 - 1744 + 1748 17 45 - 622 + 624 @@ -21025,22 +21305,22 @@ 1 2 - 16446 + 16490 2 3 - 3987 + 3997 3 5 - 1744 + 1748 5 7 - 622 + 624 @@ -21056,22 +21336,22 @@ 1 2 - 16570 + 16615 2 3 - 3987 + 3997 3 5 - 1868 + 1873 5 6 - 373 + 374 @@ -21184,15 +21464,15 @@ typedefbase - 2162643 + 1827993 id - 2162643 + 1827993 type_id - 900467 + 885785 @@ -21206,7 +21486,7 @@ 1 2 - 2162643 + 1827993 @@ -21222,22 +21502,22 @@ 1 2 - 726620 + 706685 2 3 - 81262 + 83828 3 - 6 - 69598 + 7 + 74588 - 6 - 2848 - 22985 + 7 + 4525 + 20682 @@ -21247,15 +21527,15 @@ decltypes - 812302 + 814471 id - 27490 + 27563 expr - 812302 + 814471 kind @@ -21263,7 +21543,7 @@ base_type - 3332 + 3341 parentheses_would_change_meaning @@ -21281,32 +21561,32 @@ 1 2 - 9711 + 9737 2 3 - 3639 + 3648 4 5 - 3617 + 3626 6 9 - 548 + 549 23 24 - 3244 + 3253 29 30 - 3134 + 3143 32 @@ -21316,12 +21596,12 @@ 171 172 - 3069 + 3077 173 224 - 394 + 395 @@ -21337,7 +21617,7 @@ 1 2 - 27490 + 27563 @@ -21353,7 +21633,7 @@ 1 2 - 27490 + 27563 @@ -21369,7 +21649,7 @@ 1 2 - 27490 + 27563 @@ -21385,7 +21665,7 @@ 1 2 - 812302 + 814471 @@ -21401,7 +21681,7 @@ 1 2 - 812302 + 814471 @@ -21417,7 +21697,7 @@ 1 2 - 812302 + 814471 @@ -21433,7 +21713,7 @@ 1 2 - 812302 + 814471 @@ -21513,17 +21793,17 @@ 1 2 - 1205 + 1208 2 3 - 1030 + 1033 3 4 - 350 + 351 4 @@ -21533,7 +21813,7 @@ 5 8 - 284 + 285 8 @@ -21559,27 +21839,27 @@ 1 2 - 1161 + 1164 2 3 - 854 + 857 3 4 - 328 + 329 4 7 - 284 + 285 7 201 - 306 + 307 340 @@ -21605,7 +21885,7 @@ 1 2 - 3332 + 3341 @@ -21621,7 +21901,7 @@ 1 2 - 3332 + 3341 @@ -21695,23 +21975,23 @@ type_operators - 8519 + 7960 id - 8519 + 7960 arg_type - 7690 + 7186 kind - 92 + 86 base_type - 5618 + 5249 @@ -21725,7 +22005,7 @@ 1 2 - 8519 + 7960 @@ -21741,7 +22021,7 @@ 1 2 - 8519 + 7960 @@ -21757,7 +22037,7 @@ 1 2 - 8519 + 7960 @@ -21773,12 +22053,12 @@ 1 2 - 6861 + 6411 2 3 - 828 + 774 @@ -21794,12 +22074,12 @@ 1 2 - 6861 + 6411 2 3 - 828 + 774 @@ -21815,12 +22095,12 @@ 1 2 - 7667 + 7164 2 3 - 23 + 21 @@ -21836,22 +22116,22 @@ 1 2 - 23 + 21 7 8 - 23 + 21 96 97 - 23 + 21 266 267 - 23 + 21 @@ -21867,22 +22147,22 @@ 1 2 - 23 + 21 7 8 - 23 + 21 96 97 - 23 + 21 266 267 - 23 + 21 @@ -21898,22 +22178,22 @@ 1 2 - 23 + 21 4 5 - 23 + 21 72 73 - 23 + 21 222 223 - 23 + 21 @@ -21929,22 +22209,22 @@ 1 2 - 3891 + 3636 2 3 - 967 + 903 3 4 - 368 + 344 4 6 - 391 + 365 @@ -21960,22 +22240,22 @@ 1 2 - 4052 + 3786 2 3 - 1059 + 989 3 4 - 483 + 451 4 5 - 23 + 21 @@ -21991,17 +22271,17 @@ 1 2 - 4374 + 4087 2 3 - 1220 + 1140 3 4 - 23 + 21 @@ -22011,19 +22291,19 @@ usertypes - 4863363 + 4459321 id - 4863363 + 4459321 name - 1051136 + 964062 kind - 158 + 145 @@ -22037,7 +22317,7 @@ 1 2 - 4863363 + 4459321 @@ -22053,7 +22333,7 @@ 1 2 - 4863363 + 4459321 @@ -22069,22 +22349,22 @@ 1 2 - 727655 + 667498 2 3 - 192440 + 176378 3 7 - 83738 + 76801 7 30282 - 47302 + 43383 @@ -22100,12 +22380,12 @@ 1 2 - 986532 + 904810 2 10 - 64603 + 59252 @@ -22121,62 +22401,62 @@ 28 29 - 13 + 12 64 65 - 13 + 12 579 580 - 13 + 12 1042 1043 - 13 + 12 - 1563 - 1564 - 13 + 1562 + 1563 + 12 1874 1875 - 13 + 12 4586 4587 - 13 + 12 - 19666 - 19667 - 13 + 19665 + 19666 + 12 - 20075 - 20076 - 13 + 20069 + 20070 + 12 82092 82093 - 13 + 12 - 86007 - 86008 - 13 + 85998 + 85999 + 12 - 151219 - 151220 - 13 + 151139 + 151140 + 12 @@ -22192,62 +22472,62 @@ 19 20 - 13 + 12 47 48 - 13 + 12 50 51 - 13 + 12 153 154 - 13 + 12 417 418 - 13 + 12 771 772 - 13 + 12 1565 1566 - 13 + 12 3066 3067 - 13 + 12 5585 5586 - 13 + 12 10838 10839 - 13 + 12 10903 10904 - 13 + 12 51707 51708 - 13 + 12 @@ -22257,19 +22537,19 @@ usertypesize - 1595582 + 1463274 id - 1595582 + 1463274 size - 1846 + 1693 alignment - 105 + 96 @@ -22283,7 +22563,7 @@ 1 2 - 1595582 + 1463274 @@ -22299,7 +22579,7 @@ 1 2 - 1595582 + 1463274 @@ -22315,52 +22595,52 @@ 1 2 - 580 + 532 2 3 - 250 + 229 3 4 - 105 + 96 4 6 - 118 + 108 6 8 - 145 + 133 8 14 - 145 + 133 14 26 - 145 + 133 26 86 - 145 + 133 96 - 1592 - 145 + 1588 + 133 1733 - 93158 - 65 + 93157 + 60 @@ -22376,17 +22656,17 @@ 1 2 - 1516 + 1390 2 3 - 210 + 193 3 6 - 118 + 108 @@ -22402,42 +22682,42 @@ 1 2 - 13 + 12 3 4 - 13 + 12 7 8 - 13 + 12 54 55 - 13 + 12 56 57 - 13 + 12 - 2046 - 2047 - 13 + 2045 + 2046 + 12 - 10484 - 10485 - 13 + 10475 + 10476 + 12 - 108344 - 108345 - 13 + 108343 + 108344 + 12 @@ -22453,37 +22733,37 @@ 1 2 - 26 + 24 3 4 - 13 + 12 11 12 - 13 + 12 12 13 - 13 + 12 17 18 - 13 + 12 27 28 - 13 + 12 110 111 - 13 + 12 @@ -22493,26 +22773,26 @@ usertype_final - 11462 + 11493 id - 11462 + 11493 usertype_uuid - 50280 + 50413 id - 50280 + 50413 uuid - 49771 + 49904 @@ -22526,7 +22806,7 @@ 1 2 - 50280 + 50413 @@ -22542,12 +22822,12 @@ 1 2 - 49263 + 49394 2 3 - 508 + 509 @@ -22557,15 +22837,15 @@ usertype_alias_kind - 2162686 + 1827993 id - 2162643 + 1827993 alias_kind - 85 + 24 @@ -22579,12 +22859,7 @@ 1 2 - 2162600 - - - 2 - 3 - 42 + 1827993 @@ -22598,14 +22873,14 @@ 12 - 21658 - 21659 - 42 + 36585 + 36586 + 12 - 28961 - 28962 - 42 + 114554 + 114555 + 12 @@ -22615,26 +22890,26 @@ nontype_template_parameters - 960966 + 766417 id - 960966 + 766417 type_template_type_constraint - 29057 + 27152 id - 14321 + 13382 constraint - 27836 + 26012 @@ -22648,27 +22923,27 @@ 1 2 - 10936 + 10219 2 3 - 967 + 903 3 5 - 1105 + 1032 5 14 - 1197 + 1118 14 17 - 115 + 107 @@ -22684,12 +22959,12 @@ 1 2 - 26616 + 24871 2 3 - 1220 + 1140 @@ -22699,15 +22974,15 @@ mangled_name - 7805181 + 7826029 id - 7805181 + 7826029 mangled_name - 6313668 + 6330532 is_complete @@ -22725,7 +23000,7 @@ 1 2 - 7805181 + 7826029 @@ -22741,7 +23016,7 @@ 1 2 - 7805181 + 7826029 @@ -22757,12 +23032,12 @@ 1 2 - 5984989 + 6000976 2 1127 - 328678 + 329556 @@ -22778,7 +23053,7 @@ 1 2 - 6313668 + 6330532 @@ -22830,59 +23105,59 @@ is_pod_class - 744607 + 593861 id - 744607 + 593861 is_standard_layout_class - 1314787 + 1205789 id - 1314787 + 1205789 is_complete - 1574126 + 1443608 id - 1574126 + 1443608 is_class_template - 284420 + 260848 id - 284420 + 260848 class_instantiation - 1297973 + 1190271 to - 1294176 + 1186788 from - 89303 + 81905 @@ -22896,12 +23171,12 @@ 1 2 - 1291512 + 1184345 2 8 - 2663 + 2443 @@ -22917,47 +23192,47 @@ 1 2 - 25952 + 23802 2 3 - 16154 + 14816 3 4 - 8835 + 8103 4 5 - 5841 + 5357 5 7 - 7529 + 6906 7 10 - 6830 + 6265 10 17 - 7226 + 6627 17 53 - 6765 + 6204 53 4219 - 4167 + 3821 @@ -22967,19 +23242,19 @@ class_template_argument - 3419922 + 3136346 type_id - 1594052 + 1461871 index - 1476 + 1354 arg_type - 1008977 + 925359 @@ -22993,27 +23268,27 @@ 1 2 - 663407 + 608427 2 3 - 479235 + 439439 3 4 - 302012 + 276994 4 7 - 120820 + 110800 7 113 - 28576 + 26209 @@ -23029,22 +23304,22 @@ 1 2 - 697654 + 639838 2 3 - 493648 + 452659 3 4 - 300047 + 275192 4 113 - 102701 + 94182 @@ -23060,37 +23335,37 @@ 2 3 - 13 + 12 4 5 - 936 + 858 5 30 - 118 + 108 33 90 - 118 + 108 95 453 - 118 + 108 643 - 6819 - 118 + 6818 + 108 - 11329 - 120877 - 52 + 11328 + 120866 + 48 @@ -23106,37 +23381,37 @@ 2 3 - 13 + 12 4 5 - 936 + 858 5 16 - 131 + 120 16 35 - 118 + 108 37 155 - 118 + 108 196 3251 - 118 + 108 10075 - 43772 - 39 + 43770 + 36 @@ -23152,27 +23427,27 @@ 1 2 - 633050 + 580609 2 3 - 206959 + 189791 3 4 - 60608 + 55575 4 11 - 76762 + 70403 11 - 11634 - 31596 + 11632 + 28979 @@ -23188,17 +23463,17 @@ 1 2 - 889448 + 815732 2 3 - 96886 + 88860 3 22 - 22642 + 20766 @@ -23208,19 +23483,19 @@ class_template_argument_value - 639675 + 510172 type_id - 258100 + 205847 index - 384 + 306 arg_value - 639504 + 510036 @@ -23234,17 +23509,17 @@ 1 2 - 195380 + 155825 2 3 - 54388 + 43377 3 8 - 8331 + 6644 @@ -23260,22 +23535,22 @@ 1 2 - 185511 + 147954 2 3 - 50757 + 40481 3 45 - 19482 + 15538 45 154 - 2349 + 1874 @@ -23291,47 +23566,47 @@ 2 3 - 42 + 34 20 21 - 42 + 34 49 50 - 42 + 34 84 85 - 42 + 34 105 106 - 42 + 34 278 279 - 42 + 34 981 982 - 42 + 34 2471 2472 - 42 + 34 3753 3754 - 42 + 34 @@ -23347,47 +23622,47 @@ 3 4 - 42 + 34 74 75 - 42 + 34 105 106 - 42 + 34 273 274 - 42 + 34 336 337 - 42 + 34 892 893 - 42 + 34 2433 2434 - 42 + 34 4801 4802 - 42 + 34 6051 6052 - 42 + 34 @@ -23403,12 +23678,12 @@ 1 2 - 639333 + 509900 2 3 - 170 + 136 @@ -23424,7 +23699,7 @@ 1 2 - 639504 + 510036 @@ -23434,15 +23709,15 @@ is_proxy_class_for - 60476 + 55466 id - 60476 + 55466 templ_param_id - 57140 + 52406 @@ -23456,7 +23731,7 @@ 1 2 - 60476 + 55466 @@ -23472,12 +23747,12 @@ 1 2 - 56243 + 51584 2 79 - 896 + 822 @@ -23487,19 +23762,19 @@ type_mentions - 5813149 + 5828677 id - 5813149 + 5828677 type_id - 275282 + 276017 location - 5767568 + 5782974 kind @@ -23517,7 +23792,7 @@ 1 2 - 5813149 + 5828677 @@ -23533,7 +23808,7 @@ 1 2 - 5813149 + 5828677 @@ -23549,7 +23824,7 @@ 1 2 - 5813149 + 5828677 @@ -23565,42 +23840,42 @@ 1 2 - 136147 + 136510 2 3 - 30912 + 30995 3 4 - 11137 + 11167 4 5 - 14668 + 14707 5 7 - 19938 + 19991 7 12 - 21785 + 21843 12 28 - 21025 + 21081 28 8907 - 19666 + 19719 @@ -23616,42 +23891,42 @@ 1 2 - 136147 + 136510 2 3 - 30912 + 30995 3 4 - 11137 + 11167 4 5 - 14668 + 14707 5 7 - 19938 + 19991 7 12 - 21785 + 21843 12 28 - 21025 + 21081 28 8907 - 19666 + 19719 @@ -23667,7 +23942,7 @@ 1 2 - 275282 + 276017 @@ -23683,12 +23958,12 @@ 1 2 - 5721986 + 5737270 2 3 - 45581 + 45703 @@ -23704,12 +23979,12 @@ 1 2 - 5721986 + 5737270 2 3 - 45581 + 45703 @@ -23725,7 +24000,7 @@ 1 2 - 5767568 + 5782974 @@ -23783,26 +24058,26 @@ is_function_template - 1382147 + 1335965 id - 1382147 + 1335965 function_instantiation - 1220177 + 973151 to - 1220177 + 973151 from - 228919 + 182574 @@ -23816,7 +24091,7 @@ 1 2 - 1220177 + 973151 @@ -23832,27 +24107,27 @@ 1 2 - 139240 + 111050 2 3 - 52978 + 42253 3 9 - 18029 + 14379 9 103 - 17175 + 13698 103 1532 - 1495 + 1192 @@ -23862,19 +24137,19 @@ function_template_argument - 3116090 + 2485235 function_id - 1822511 + 1453542 index - 598 + 477 arg_type - 373713 + 298055 @@ -23888,22 +24163,22 @@ 1 2 - 981943 + 783148 2 3 - 518123 + 413229 3 4 - 215461 + 171840 4 15 - 106982 + 85324 @@ -23919,22 +24194,22 @@ 1 2 - 1005955 + 802298 2 3 - 515731 + 411320 3 4 - 212726 + 169660 4 9 - 88098 + 70262 @@ -23950,52 +24225,52 @@ 1 2 - 213 + 170 7 8 - 42 + 34 45 46 - 42 + 34 77 78 - 42 + 34 138 139 - 42 + 34 280 281 - 42 + 34 2504 2505 - 42 + 34 7547 7548 - 42 + 34 19674 19675 - 42 + 34 42657 42658 - 42 + 34 @@ -24011,52 +24286,52 @@ 1 2 - 213 + 170 4 5 - 42 + 34 17 18 - 42 + 34 27 28 - 42 + 34 52 53 - 42 + 34 112 113 - 42 + 34 315 316 - 42 + 34 972 973 - 42 + 34 2754 2755 - 42 + 34 6081 6082 - 42 + 34 @@ -24072,37 +24347,37 @@ 1 2 - 219178 + 174805 2 3 - 33026 + 26340 3 4 - 25079 + 20002 4 6 - 28411 + 22659 6 11 - 29138 + 23239 11 76 - 29309 + 23375 79 2452 - 9570 + 7632 @@ -24118,17 +24393,17 @@ 1 2 - 322059 + 256858 2 3 - 40289 + 32132 3 15 - 11364 + 9063 @@ -24138,19 +24413,19 @@ function_template_argument_value - 567812 + 452858 function_id - 246778 + 196817 index - 598 + 477 arg_value - 564437 + 450166 @@ -24164,17 +24439,17 @@ 1 2 - 189868 + 151429 2 3 - 53790 + 42900 3 8 - 3118 + 2487 @@ -24190,22 +24465,22 @@ 1 2 - 181195 + 144512 2 3 - 46014 + 36698 3 54 - 18628 + 14856 54 113 - 939 + 749 @@ -24221,52 +24496,52 @@ 1 2 - 213 + 170 2 3 - 42 + 34 3 4 - 42 + 34 4 5 - 42 + 34 15 16 - 42 + 34 27 28 - 42 + 34 1345 1346 - 42 + 34 1388 1389 - 42 + 34 1850 1851 - 42 + 34 2547 2548 - 42 + 34 @@ -24282,52 +24557,52 @@ 1 2 - 213 + 170 2 3 - 42 + 34 3 4 - 42 + 34 4 5 - 42 + 34 51 52 - 42 + 34 63 64 - 42 + 34 1906 1907 - 42 + 34 3295 3296 - 42 + 34 3702 3703 - 42 + 34 4180 4181 - 42 + 34 @@ -24343,12 +24618,12 @@ 1 2 - 561062 + 447474 2 3 - 3375 + 2691 @@ -24364,7 +24639,7 @@ 1 2 - 564437 + 450166 @@ -24374,26 +24649,26 @@ is_variable_template - 58559 + 58715 id - 58559 + 58715 variable_instantiation - 420379 + 421502 to - 420379 + 421502 from - 35010 + 35104 @@ -24407,7 +24682,7 @@ 1 2 - 420379 + 421502 @@ -24423,47 +24698,47 @@ 1 2 - 15075 + 15116 2 3 - 3987 + 3997 3 4 - 2242 + 2248 4 6 - 2865 + 2873 6 8 - 2242 + 2248 8 11 - 2741 + 2748 11 30 - 2741 + 2748 30 105 - 2741 + 2748 180 546 - 373 + 374 @@ -24473,19 +24748,19 @@ variable_template_argument - 766875 + 768923 variable_id - 399697 + 400764 index - 1993 + 1998 arg_type - 256164 + 256849 @@ -24499,22 +24774,22 @@ 1 2 - 155493 + 155908 2 3 - 189631 + 190138 3 4 - 36381 + 36478 4 17 - 18190 + 18239 @@ -24530,22 +24805,22 @@ 1 2 - 170444 + 170899 2 3 - 179788 + 180269 3 4 - 33640 + 33730 4 17 - 15823 + 15865 @@ -24561,12 +24836,12 @@ 28 29 - 872 + 874 34 35 - 373 + 374 37 @@ -24612,12 +24887,12 @@ 1 2 - 872 + 874 2 3 - 373 + 374 5 @@ -24663,22 +24938,22 @@ 1 2 - 175552 + 176021 2 3 - 44604 + 44723 3 6 - 21679 + 21737 6 206 - 14328 + 14366 @@ -24694,17 +24969,17 @@ 1 2 - 227757 + 228365 2 3 - 24794 + 24860 3 7 - 3613 + 3622 @@ -24714,19 +24989,19 @@ variable_template_argument_value - 19935 + 19988 variable_id - 14826 + 14866 index - 498 + 499 arg_value - 19935 + 19988 @@ -24740,12 +25015,12 @@ 1 2 - 13331 + 13367 2 3 - 1495 + 1499 @@ -24761,17 +25036,17 @@ 1 2 - 10465 + 10493 2 3 - 3987 + 3997 4 5 - 373 + 374 @@ -24849,7 +25124,7 @@ 1 2 - 19935 + 19988 @@ -24865,7 +25140,7 @@ 1 2 - 19935 + 19988 @@ -24875,15 +25150,15 @@ template_template_instantiation - 7239 + 6640 to - 6791 + 6228 from - 4800 + 4402 @@ -24897,12 +25172,12 @@ 1 2 - 6646 + 6095 2 15 - 145 + 133 @@ -24918,17 +25193,17 @@ 1 2 - 3138 + 2878 2 3 - 1490 + 1366 3 20 - 171 + 157 @@ -24938,19 +25213,19 @@ template_template_argument - 12079 + 11078 type_id - 7635 + 7002 index - 131 + 120 arg_type - 11340 + 10401 @@ -24964,22 +25239,22 @@ 1 2 - 6263 + 5745 2 3 - 527 + 483 3 8 - 632 + 580 8 11 - 210 + 193 @@ -24995,22 +25270,22 @@ 1 2 - 6290 + 5769 2 4 - 698 + 641 4 10 - 580 + 532 10 11 - 65 + 60 @@ -25026,52 +25301,52 @@ 6 7 - 13 + 12 11 12 - 13 + 12 16 17 - 13 + 12 21 22 - 13 + 12 27 28 - 13 + 12 38 39 - 13 + 12 50 51 - 13 + 12 64 65 - 13 + 12 104 105 - 13 + 12 579 580 - 13 + 12 @@ -25087,52 +25362,52 @@ 6 7 - 13 + 12 11 12 - 13 + 12 16 17 - 13 + 12 21 22 - 13 + 12 27 28 - 13 + 12 38 39 - 13 + 12 50 51 - 13 + 12 64 65 - 13 + 12 99 100 - 13 + 12 538 539 - 13 + 12 @@ -25148,12 +25423,12 @@ 1 2 - 11301 + 10365 3 43 - 39 + 36 @@ -25169,12 +25444,12 @@ 1 2 - 11314 + 10377 2 11 - 26 + 24 @@ -25184,19 +25459,19 @@ template_template_argument_value - 778 + 713 type_id - 659 + 604 index - 26 + 24 arg_value - 778 + 713 @@ -25210,7 +25485,7 @@ 1 2 - 659 + 604 @@ -25226,17 +25501,17 @@ 1 2 - 567 + 520 2 3 - 65 + 60 3 4 - 26 + 24 @@ -25252,12 +25527,12 @@ 8 9 - 13 + 12 42 43 - 13 + 12 @@ -25273,12 +25548,12 @@ 17 18 - 13 + 12 42 43 - 13 + 12 @@ -25294,7 +25569,7 @@ 1 2 - 778 + 713 @@ -25310,7 +25585,7 @@ 1 2 - 778 + 713 @@ -25320,19 +25595,19 @@ concept_templates - 3868 + 3614 concept_id - 3868 + 3614 name - 3868 + 3614 location - 3868 + 3614 @@ -25346,7 +25621,7 @@ 1 2 - 3868 + 3614 @@ -25362,7 +25637,7 @@ 1 2 - 3868 + 3614 @@ -25378,7 +25653,7 @@ 1 2 - 3868 + 3614 @@ -25394,7 +25669,7 @@ 1 2 - 3868 + 3614 @@ -25410,7 +25685,7 @@ 1 2 - 3868 + 3614 @@ -25426,7 +25701,7 @@ 1 2 - 3868 + 3614 @@ -25436,15 +25711,15 @@ concept_instantiation - 96774 + 90429 to - 96774 + 90429 from - 3683 + 3442 @@ -25458,7 +25733,7 @@ 1 2 - 96774 + 90429 @@ -25474,77 +25749,77 @@ 1 2 - 253 + 236 2 3 - 115 + 107 3 4 - 391 + 365 4 5 - 138 + 129 5 6 - 322 + 301 6 8 - 253 + 236 8 10 - 115 + 107 10 12 - 299 + 279 12 15 - 230 + 215 15 19 - 230 + 215 19 25 - 276 + 258 25 37 - 276 + 258 38 49 - 276 + 258 50 72 - 276 + 258 78 387 - 230 + 215 @@ -25554,30 +25829,30 @@ is_type_constraint - 39487 + 36898 concept_id - 39487 + 36898 concept_template_argument - 120973 + 113041 concept_id - 81738 + 76379 index - 138 + 129 arg_type - 22932 + 21429 @@ -25591,17 +25866,17 @@ 1 2 - 49733 + 46473 2 3 - 26409 + 24678 3 7 - 5595 + 5228 @@ -25617,17 +25892,17 @@ 1 2 - 53602 + 50087 2 3 - 23945 + 22376 3 7 - 4190 + 3915 @@ -25643,32 +25918,32 @@ 11 12 - 23 + 21 26 27 - 23 + 21 34 35 - 23 + 21 243 244 - 23 + 21 1390 1391 - 23 + 21 3550 3551 - 23 + 21 @@ -25684,32 +25959,32 @@ 11 12 - 23 + 21 23 24 - 23 + 21 31 32 - 23 + 21 96 97 - 23 + 21 359 360 - 23 + 21 640 641 - 23 + 21 @@ -25725,42 +26000,42 @@ 1 2 - 11121 + 10391 2 3 - 3177 + 2969 3 4 - 1128 + 1054 4 5 - 1450 + 1355 5 6 - 1243 + 1161 6 9 - 1726 + 1613 9 14 - 2118 + 1979 14 259 - 967 + 903 @@ -25776,17 +26051,17 @@ 1 2 - 19294 + 18029 2 3 - 3499 + 3270 3 4 - 138 + 129 @@ -25796,19 +26071,19 @@ concept_template_argument_value - 115 + 106 concept_id - 90 + 83 index - 16 + 15 arg_value - 115 + 106 @@ -25822,7 +26097,7 @@ 1 2 - 90 + 83 @@ -25838,12 +26113,12 @@ 1 2 - 65 + 60 2 3 - 24 + 22 @@ -25859,12 +26134,12 @@ 3 4 - 8 + 7 8 9 - 8 + 7 @@ -25880,12 +26155,12 @@ 4 5 - 8 + 7 10 11 - 8 + 7 @@ -25901,7 +26176,7 @@ 1 2 - 115 + 106 @@ -25917,7 +26192,7 @@ 1 2 - 115 + 106 @@ -25927,15 +26202,15 @@ routinetypes - 757852 + 604424 id - 757852 + 604424 return_type - 355982 + 283913 @@ -25949,7 +26224,7 @@ 1 2 - 757852 + 604424 @@ -25965,17 +26240,17 @@ 1 2 - 293732 + 234266 2 3 - 44006 + 35097 3 4676 - 18243 + 14550 @@ -25985,19 +26260,19 @@ routinetypeargs - 1166052 + 1169167 routine - 412136 + 413236 index - 977 + 980 type_id - 111101 + 111398 @@ -26011,32 +26286,32 @@ 1 2 - 82144 + 82364 2 3 - 125498 + 125834 3 4 - 106864 + 107149 4 5 - 48624 + 48753 5 7 - 32488 + 32575 7 19 - 16515 + 16559 @@ -26052,27 +26327,27 @@ 1 2 - 88120 + 88356 2 3 - 138048 + 138417 3 4 - 113546 + 113849 4 5 - 40148 + 40256 5 10 - 32162 + 32248 10 @@ -26270,47 +26545,47 @@ 1 2 - 33194 + 33283 2 3 - 14994 + 15034 3 4 - 13201 + 13237 4 5 - 9833 + 9859 5 6 - 6356 + 6373 6 8 - 9507 + 9532 8 13 - 9453 + 9478 13 26 - 8746 + 8770 26 916 - 5813 + 5828 @@ -26326,22 +26601,22 @@ 1 2 - 78504 + 78714 2 3 - 17548 + 17594 3 5 - 9453 + 9478 5 17 - 5595 + 5610 @@ -26351,19 +26626,19 @@ ptrtomembers - 12026 + 11030 id - 12026 + 11030 type_id - 9890 + 9071 class_id - 5960 + 5466 @@ -26377,7 +26652,7 @@ 1 2 - 12026 + 11030 @@ -26393,7 +26668,7 @@ 1 2 - 12026 + 11030 @@ -26409,12 +26684,12 @@ 1 2 - 9613 + 8817 2 84 - 276 + 253 @@ -26430,12 +26705,12 @@ 1 2 - 9613 + 8817 2 84 - 276 + 253 @@ -26451,22 +26726,22 @@ 1 2 - 4747 + 4354 2 3 - 659 + 604 8 9 - 501 + 459 10 65 - 52 + 48 @@ -26482,22 +26757,22 @@ 1 2 - 4747 + 4354 2 3 - 659 + 604 8 9 - 501 + 459 10 65 - 52 + 48 @@ -26507,15 +26782,15 @@ specifiers - 7724 + 7745 id - 7724 + 7745 str - 7724 + 7745 @@ -26529,7 +26804,7 @@ 1 2 - 7724 + 7745 @@ -26545,7 +26820,7 @@ 1 2 - 7724 + 7745 @@ -26555,15 +26830,15 @@ typespecifiers - 969178 + 888530 type_id - 962756 + 882640 spec_id - 118 + 108 @@ -26577,12 +26852,12 @@ 1 2 - 956333 + 876750 2 3 - 6422 + 5890 @@ -26598,47 +26873,47 @@ 164 165 - 13 + 12 215 216 - 13 + 12 224 225 - 13 + 12 - 532 - 533 - 13 + 529 + 530 + 12 821 822 - 13 + 12 1568 1569 - 13 + 12 - 4150 - 4151 - 13 + 4147 + 4148 + 12 - 17496 - 17497 - 13 + 17494 + 17495 + 12 - 48324 - 48325 - 13 + 48302 + 48303 + 12 @@ -26648,15 +26923,15 @@ funspecifiers - 9674560 + 9688310 func_id - 3322023 + 3970168 spec_id - 811 + 2373 @@ -26670,32 +26945,27 @@ 1 2 - 435451 + 1483628 2 3 - 673556 + 506577 3 4 - 1416284 + 1038015 4 5 - 456941 + 696216 5 - 6 - 223835 - - - 6 8 - 115955 + 245730 @@ -26709,94 +26979,99 @@ 12 - 2 - 3 - 85 + 17 + 18 + 124 - 106 - 107 - 42 + 18 + 19 + 124 - 214 - 215 - 42 + 53 + 54 + 124 - 301 - 302 - 42 + 114 + 115 + 124 - 308 - 309 - 42 + 206 + 207 + 124 - 562 - 563 - 42 + 272 + 273 + 124 - 1589 - 1590 - 42 + 354 + 355 + 124 - 1631 - 1632 - 42 + 653 + 654 + 124 - 3749 - 3750 - 42 + 766 + 767 + 124 - 3881 - 3882 - 42 + 823 + 824 + 124 - 6569 - 6570 - 42 + 1075 + 1076 + 124 - 6803 - 6804 - 42 + 1258 + 1259 + 124 - 12221 - 12222 - 42 + 1662 + 1663 + 124 - 14693 - 14694 - 42 + 3340 + 3341 + 124 - 15715 - 15716 - 42 + 3351 + 3352 + 124 - 42406 - 42407 - 42 + 6166 + 6167 + 124 - 51943 - 51944 - 42 + 15136 + 15137 + 124 - 63744 - 63745 - 42 + 19863 + 19864 + 124 + + + 22425 + 22426 + 124 @@ -26806,15 +27081,15 @@ varspecifiers - 3064883 + 3073070 var_id - 2308848 + 2315015 spec_id - 1121 + 1124 @@ -26828,17 +27103,17 @@ 1 2 - 1655229 + 1659650 2 3 - 551701 + 553175 3 5 - 101917 + 102189 @@ -26904,15 +27179,15 @@ explicit_specifier_exprs - 41240 + 41350 func_id - 41240 + 41350 constant - 41240 + 41350 @@ -26926,7 +27201,7 @@ 1 2 - 41240 + 41350 @@ -26942,7 +27217,7 @@ 1 2 - 41240 + 41350 @@ -26952,19 +27227,19 @@ attributes - 649383 + 651117 id - 649383 + 651117 kind - 373 + 374 name - 2118 + 2123 name_space @@ -26972,7 +27247,7 @@ location - 643277 + 644996 @@ -26986,7 +27261,7 @@ 1 2 - 649383 + 651117 @@ -27002,7 +27277,7 @@ 1 2 - 649383 + 651117 @@ -27018,7 +27293,7 @@ 1 2 - 649383 + 651117 @@ -27034,7 +27309,7 @@ 1 2 - 649383 + 651117 @@ -27235,7 +27510,7 @@ 1 2 - 1868 + 1873 2 @@ -27256,7 +27531,7 @@ 1 2 - 2118 + 2123 @@ -27442,12 +27717,12 @@ 1 2 - 637422 + 639124 2 5 - 5855 + 5871 @@ -27463,7 +27738,7 @@ 1 2 - 643277 + 644996 @@ -27479,12 +27754,12 @@ 1 2 - 638169 + 639874 2 3 - 5108 + 5121 @@ -27500,7 +27775,7 @@ 1 2 - 643277 + 644996 @@ -27510,27 +27785,27 @@ attribute_args - 96187 + 90662 id - 96187 + 90662 kind - 52 + 48 attribute - 83066 + 78543 index - 65 + 60 location - 89501 + 84445 @@ -27544,7 +27819,7 @@ 1 2 - 96187 + 90662 @@ -27560,7 +27835,7 @@ 1 2 - 96187 + 90662 @@ -27576,7 +27851,7 @@ 1 2 - 96187 + 90662 @@ -27592,7 +27867,7 @@ 1 2 - 96187 + 90662 @@ -27608,22 +27883,22 @@ 10 11 - 13 + 12 133 134 - 13 + 12 560 561 - 13 + 12 - 6591 - 6592 - 13 + 6793 + 6794 + 12 @@ -27639,22 +27914,22 @@ 10 11 - 13 + 12 133 134 - 13 + 12 156 157 - 13 + 12 - 6170 - 6171 - 13 + 6365 + 6366 + 12 @@ -27670,17 +27945,17 @@ 1 2 - 26 + 24 4 5 - 13 + 12 5 6 - 13 + 12 @@ -27696,22 +27971,22 @@ 8 9 - 13 + 12 18 19 - 13 + 12 535 536 - 13 + 12 - 6242 - 6243 - 13 + 6437 + 6438 + 12 @@ -27727,17 +28002,17 @@ 1 2 - 75430 + 71455 2 - 4 - 6316 + 5 + 5902 - 4 + 5 18 - 1318 + 1185 @@ -27753,12 +28028,12 @@ 1 2 - 80824 + 76487 2 3 - 2241 + 2056 @@ -27774,12 +28049,12 @@ 1 2 - 76947 + 72931 2 6 - 6118 + 5611 @@ -27795,12 +28070,12 @@ 1 2 - 78516 + 74370 2 6 - 4549 + 4172 @@ -27816,27 +28091,27 @@ 94 95 - 13 + 12 96 97 - 13 + 12 166 167 - 13 + 12 464 465 - 13 + 12 - 6474 - 6475 - 13 + 6676 + 6677 + 12 @@ -27852,17 +28127,17 @@ 1 2 - 13 + 12 2 3 - 39 + 36 4 5 - 13 + 12 @@ -27878,27 +28153,27 @@ 94 95 - 13 + 12 96 97 - 13 + 12 166 167 - 13 + 12 464 465 - 13 + 12 - 6299 - 6300 - 13 + 6494 + 6495 + 12 @@ -27914,27 +28189,27 @@ 94 95 - 13 + 12 96 97 - 13 + 12 166 167 - 13 + 12 349 350 - 13 + 12 - 6123 - 6124 - 13 + 6318 + 6319 + 12 @@ -27950,12 +28225,12 @@ 1 2 - 87259 + 82304 2 23 - 2241 + 2140 @@ -27971,12 +28246,12 @@ 1 2 - 89290 + 84252 2 3 - 210 + 193 @@ -27992,12 +28267,12 @@ 1 2 - 89105 + 84082 2 18 - 395 + 362 @@ -28013,12 +28288,12 @@ 1 2 - 88960 + 83949 2 3 - 540 + 495 @@ -28028,15 +28303,15 @@ attribute_arg_value - 20935 + 16696 arg - 20935 + 16696 value - 640 + 511 @@ -28050,7 +28325,7 @@ 1 2 - 20935 + 16696 @@ -28066,52 +28341,52 @@ 1 2 - 256 + 204 5 6 - 42 + 34 6 7 - 42 + 34 15 16 - 42 + 34 25 26 - 42 + 34 51 52 - 42 + 34 52 53 - 42 + 34 71 72 - 42 + 34 76 77 - 42 + 34 183 184 - 42 + 34 @@ -28121,11 +28396,11 @@ attribute_arg_type - 461 + 460 arg - 461 + 460 type_id @@ -28143,7 +28418,7 @@ 1 2 - 461 + 460 @@ -28184,15 +28459,15 @@ attribute_arg_constant - 86916 + 82159 arg - 86916 + 82159 constant - 86916 + 82159 @@ -28206,7 +28481,7 @@ 1 2 - 86916 + 82159 @@ -28222,7 +28497,7 @@ 1 2 - 86916 + 82159 @@ -28232,15 +28507,15 @@ attribute_arg_expr - 1753 + 1608 arg - 1753 + 1608 expr - 1753 + 1608 @@ -28254,7 +28529,7 @@ 1 2 - 1753 + 1608 @@ -28270,7 +28545,7 @@ 1 2 - 1753 + 1608 @@ -28333,15 +28608,15 @@ typeattributes - 91950 + 92195 type_id - 90330 + 90571 spec_id - 29154 + 29232 @@ -28355,12 +28630,12 @@ 1 2 - 88710 + 88947 2 3 - 1619 + 1624 @@ -28376,17 +28651,17 @@ 1 2 - 24669 + 24735 2 7 - 2242 + 2248 7 58 - 2242 + 2248 @@ -28396,15 +28671,15 @@ funcattributes - 842628 + 844878 func_id - 797898 + 800030 spec_id - 615493 + 617137 @@ -28418,12 +28693,12 @@ 1 2 - 757655 + 759678 2 7 - 40243 + 40351 @@ -28439,12 +28714,12 @@ 1 2 - 569892 + 571414 2 213 - 45601 + 45723 @@ -28516,16 +28791,74 @@ - stmtattributes - 2371 + namespaceattributes + 5997 - stmt_id - 2371 + namespace_id + 136 spec_id - 598 + 5997 + + + + + namespace_id + spec_id + + + 12 + + + 1 + 2 + 68 + + + 11 + 12 + 34 + + + 163 + 164 + 34 + + + + + + + spec_id + namespace_id + + + 12 + + + 1 + 2 + 5997 + + + + + + + + + stmtattributes + 2216 + + + stmt_id + 2216 + + + spec_id + 559 @@ -28539,7 +28872,7 @@ 1 2 - 2371 + 2216 @@ -28555,27 +28888,27 @@ 1 2 - 230 + 215 2 3 - 161 + 150 3 4 - 46 + 43 9 10 - 115 + 107 13 16 - 46 + 43 @@ -28585,15 +28918,15 @@ unspecifiedtype - 8145638 + 7468031 type_id - 8145638 + 7468031 unspecified_type_id - 4690387 + 4300698 @@ -28607,7 +28940,7 @@ 1 2 - 8145638 + 7468031 @@ -28623,17 +28956,17 @@ 1 2 - 3130938 + 2870853 2 3 - 1275568 + 1169674 3 6277 - 283880 + 260170 @@ -28643,19 +28976,19 @@ member - 4659651 + 4200783 parent - 559011 + 544555 index - 10681 + 29732 child - 4543098 + 4195536 @@ -28669,52 +29002,57 @@ 1 2 - 232892 + 129174 2 3 - 24524 + 83450 3 4 - 29266 + 32605 4 5 - 37555 + 44848 5 + 6 + 42475 + + + 6 7 - 47595 + 34979 7 - 11 - 43109 + 9 + 41725 - 11 - 14 - 41528 + 9 + 13 + 41600 - 14 - 19 - 45117 + 13 + 18 + 41100 - 19 - 53 - 42083 + 18 + 42 + 40851 - 53 - 251 - 15338 + 42 + 239 + 11743 @@ -28730,52 +29068,57 @@ 1 2 - 232764 + 128924 2 3 - 24652 + 83575 3 4 - 29309 + 32356 4 5 - 37640 + 44973 5 + 6 + 42599 + + + 6 7 - 47381 + 33980 7 - 11 - 43536 + 9 + 42225 - 11 - 14 - 41443 + 9 + 13 + 41725 - 14 - 19 - 44903 + 13 + 18 + 41225 - 19 - 53 - 42083 + 18 + 42 + 40975 - 53 - 255 - 15295 + 42 + 265 + 11992 @@ -28791,57 +29134,57 @@ 1 2 - 2819 + 6496 2 - 4 - 811 + 3 + 2623 - 4 - 22 - 811 + 3 + 8 + 1873 - 22 - 31 - 811 + 9 + 10 + 2873 - 31 - 53 - 854 + 10 + 20 + 2373 - 53 - 108 - 811 + 20 + 27 + 2248 - 110 - 218 - 811 + 27 + 36 + 2373 - 223 - 328 - 811 + 36 + 50 + 2248 - 328 - 581 - 811 + 54 + 141 + 2248 - 653 - 2518 - 811 + 150 + 467 + 2248 - 2899 - 12735 - 512 + 480 + 4314 + 2123 @@ -28857,62 +29200,57 @@ 1 2 - 1751 + 5496 2 3 - 1367 + 3622 3 - 8 - 811 + 9 + 1873 - 8 - 31 - 854 + 9 + 10 + 2873 - 31 - 41 - 854 + 10 + 20 + 2248 - 41 - 97 - 811 + 20 + 28 + 2373 - 97 - 161 - 811 + 28 + 37 + 2498 - 164 - 314 - 854 + 37 + 56 + 2373 - 318 - 386 - 811 + 58 + 156 + 2248 - 435 - 1127 - 811 + 163 + 528 + 2248 - 1145 - 6168 - 811 - - - 6496 - 12747 - 128 + 547 + 4334 + 1873 @@ -28928,7 +29266,7 @@ 1 2 - 4543098 + 4195536 @@ -28944,12 +29282,12 @@ 1 2 - 4455726 + 4190289 2 - 13 - 87372 + 3 + 5246 @@ -28959,15 +29297,15 @@ enclosingfunction - 143982 + 114833 child - 143982 + 114833 parent - 89465 + 71353 @@ -28981,7 +29319,7 @@ 1 2 - 143982 + 114833 @@ -28997,22 +29335,22 @@ 1 2 - 61865 + 49340 2 3 - 5810 + 4634 3 4 - 19268 + 15367 4 37 - 2520 + 2010 @@ -29022,27 +29360,27 @@ derivations - 598061 + 476983 derivation - 598061 + 476983 sub - 570803 + 455243 index - 299 + 238 super - 295399 + 235595 location - 44391 + 35404 @@ -29056,7 +29394,7 @@ 1 2 - 598061 + 476983 @@ -29072,7 +29410,7 @@ 1 2 - 598061 + 476983 @@ -29088,7 +29426,7 @@ 1 2 - 598061 + 476983 @@ -29104,7 +29442,7 @@ 1 2 - 598061 + 476983 @@ -29120,12 +29458,12 @@ 1 2 - 550081 + 438717 2 9 - 20721 + 16526 @@ -29141,12 +29479,12 @@ 1 2 - 550081 + 438717 2 8 - 20721 + 16526 @@ -29162,12 +29500,12 @@ 1 2 - 550081 + 438717 2 9 - 20721 + 16526 @@ -29183,12 +29521,12 @@ 1 2 - 550081 + 438717 2 8 - 20721 + 16526 @@ -29204,27 +29542,27 @@ 25 26 - 128 + 102 26 27 - 42 + 34 52 53 - 42 + 34 485 486 - 42 + 34 13360 13361 - 42 + 34 @@ -29240,22 +29578,22 @@ 25 26 - 170 + 136 52 53 - 42 + 34 485 486 - 42 + 34 13360 13361 - 42 + 34 @@ -29271,32 +29609,32 @@ 23 24 - 42 + 34 24 25 - 42 + 34 25 26 - 85 + 68 32 33 - 42 + 34 289 290 - 42 + 34 6510 6511 - 42 + 34 @@ -29312,22 +29650,22 @@ 1 2 - 170 + 136 7 8 - 42 + 34 65 66 - 42 + 34 963 964 - 42 + 34 @@ -29343,12 +29681,12 @@ 1 2 - 283094 + 225781 2 1655 - 12304 + 9813 @@ -29364,12 +29702,12 @@ 1 2 - 283094 + 225781 2 1655 - 12304 + 9813 @@ -29385,12 +29723,12 @@ 1 2 - 294843 + 235152 2 4 - 555 + 442 @@ -29406,12 +29744,12 @@ 1 2 - 288691 + 230245 2 81 - 6707 + 5349 @@ -29427,27 +29765,27 @@ 1 2 - 33239 + 26510 2 5 - 3930 + 3134 5 22 - 3460 + 2760 22 383 - 3375 + 2691 388 928 - 384 + 306 @@ -29463,27 +29801,27 @@ 1 2 - 33239 + 26510 2 5 - 3930 + 3134 5 22 - 3460 + 2760 22 383 - 3375 + 2691 388 928 - 384 + 306 @@ -29499,7 +29837,7 @@ 1 2 - 44391 + 35404 @@ -29515,22 +29853,22 @@ 1 2 - 36017 + 28725 2 4 - 3289 + 2623 4 26 - 3546 + 2828 26 928 - 1538 + 1226 @@ -29540,15 +29878,15 @@ derspecifiers - 600283 + 478755 der_id - 597506 + 476540 spec_id - 170 + 136 @@ -29562,12 +29900,12 @@ 1 2 - 594729 + 474325 2 3 - 2777 + 2214 @@ -29583,22 +29921,22 @@ 65 66 - 42 + 34 92 93 - 42 + 34 1104 1105 - 42 + 34 12789 12790 - 42 + 34 @@ -29608,15 +29946,15 @@ direct_base_offsets - 564309 + 450064 der_id - 564309 + 450064 offset - 640 + 511 @@ -29630,7 +29968,7 @@ 1 2 - 564309 + 450064 @@ -29646,42 +29984,42 @@ 1 2 - 128 + 102 2 3 - 170 + 136 3 4 - 128 + 102 4 5 - 42 + 34 7 8 - 42 + 34 9 10 - 42 + 34 110 111 - 42 + 34 13058 13059 - 42 + 34 @@ -29691,19 +30029,19 @@ virtual_base_offsets - 7305 + 5826 sub - 7305 + 5826 super - 128 + 102 offset - 427 + 340 @@ -29717,7 +30055,7 @@ 1 2 - 7305 + 5826 @@ -29733,7 +30071,7 @@ 1 2 - 7305 + 5826 @@ -29749,12 +30087,12 @@ 9 10 - 85 + 68 153 154 - 42 + 34 @@ -29770,12 +30108,12 @@ 1 2 - 42 + 34 9 10 - 85 + 68 @@ -29791,12 +30129,12 @@ 2 3 - 384 + 306 153 154 - 42 + 34 @@ -29812,12 +30150,12 @@ 1 2 - 42 + 34 2 3 - 384 + 306 @@ -29827,23 +30165,23 @@ frienddecls - 878379 + 700584 id - 878379 + 700584 type_id - 53192 + 42423 decl_id - 97626 + 77861 location - 7647 + 6099 @@ -29857,7 +30195,7 @@ 1 2 - 878379 + 700584 @@ -29873,7 +30211,7 @@ 1 2 - 878379 + 700584 @@ -29889,7 +30227,7 @@ 1 2 - 878379 + 700584 @@ -29905,47 +30243,47 @@ 1 2 - 7775 + 6167 2 3 - 17474 + 13970 3 7 - 4486 + 3577 7 12 - 4315 + 3441 12 20 - 4571 + 3646 20 32 - 4144 + 3305 33 50 - 4742 + 3782 50 80 - 4742 + 3782 101 120 - 939 + 749 @@ -29961,47 +30299,47 @@ 1 2 - 7775 + 6167 2 3 - 17474 + 13970 3 7 - 4486 + 3577 7 12 - 4315 + 3441 12 20 - 4571 + 3646 20 32 - 4144 + 3305 33 50 - 4742 + 3782 50 80 - 4742 + 3782 101 120 - 939 + 749 @@ -30017,12 +30355,12 @@ 1 2 - 51483 + 41060 2 13 - 1708 + 1363 @@ -30038,32 +30376,32 @@ 1 2 - 60327 + 48079 2 3 - 7434 + 5963 3 8 - 7519 + 5997 8 15 - 7605 + 6065 15 40 - 7605 + 6065 40 164 - 7135 + 5690 @@ -30079,32 +30417,32 @@ 1 2 - 60327 + 48079 2 3 - 7434 + 5963 3 8 - 7519 + 5997 8 15 - 7605 + 6065 15 40 - 7605 + 6065 40 164 - 7135 + 5690 @@ -30120,12 +30458,12 @@ 1 2 - 96771 + 77180 2 5 - 854 + 681 @@ -30141,12 +30479,12 @@ 1 2 - 7177 + 5724 2 - 20370 - 469 + 20371 + 374 @@ -30162,12 +30500,12 @@ 1 2 - 7476 + 5963 2 1148 - 170 + 136 @@ -30183,12 +30521,12 @@ 1 2 - 7220 + 5758 2 2132 - 427 + 340 @@ -30198,19 +30536,19 @@ comments - 11190894 + 11220785 id - 11190894 + 11220785 contents - 4279922 + 4291355 location - 11190894 + 11220785 @@ -30224,7 +30562,7 @@ 1 2 - 11190894 + 11220785 @@ -30240,7 +30578,7 @@ 1 2 - 11190894 + 11220785 @@ -30256,17 +30594,17 @@ 1 2 - 3906889 + 3917324 2 6 - 321078 + 321935 6 34359 - 51955 + 52094 @@ -30282,17 +30620,17 @@ 1 2 - 3906889 + 3917324 2 6 - 321078 + 321935 6 34359 - 51955 + 52094 @@ -30308,7 +30646,7 @@ 1 2 - 11190894 + 11220785 @@ -30324,7 +30662,7 @@ 1 2 - 11190894 + 11220785 @@ -30334,15 +30672,15 @@ commentbinding - 3828145 + 3838371 id - 3342603 + 3351531 element - 3662560 + 3672343 @@ -30356,12 +30694,12 @@ 1 2 - 3286536 + 3295314 2 1706 - 56067 + 56216 @@ -30377,12 +30715,12 @@ 1 2 - 3496975 + 3506316 2 3 - 165585 + 166027 @@ -30392,15 +30730,15 @@ exprconv - 9607946 + 9633039 converted - 9607841 + 9632934 conversion - 9607946 + 9633039 @@ -30414,7 +30752,7 @@ 1 2 - 9607736 + 9632828 2 @@ -30435,7 +30773,7 @@ 1 2 - 9607946 + 9633039 @@ -30445,30 +30783,30 @@ compgenerated - 10701538 + 9893080 id - 10701538 + 9893080 synthetic_destructor_call - 1788903 + 1671616 element - 1332248 + 1244902 i - 414 + 387 destructor_call - 1788903 + 1671616 @@ -30482,17 +30820,17 @@ 1 2 - 886784 + 828643 2 3 - 438188 + 409459 3 19 - 7275 + 6798 @@ -30508,17 +30846,17 @@ 1 2 - 886784 + 828643 2 3 - 438188 + 409459 3 19 - 7275 + 6798 @@ -30534,57 +30872,57 @@ 1 2 - 46 + 43 2 3 - 92 + 86 3 4 - 92 + 86 13 14 - 23 + 21 23 24 - 23 + 21 27 28 - 23 + 21 32 33 - 23 + 21 53 54 - 23 + 21 316 317 - 23 + 21 19347 19348 - 23 + 21 57861 57862 - 23 + 21 @@ -30600,57 +30938,57 @@ 1 2 - 46 + 43 2 3 - 92 + 86 3 4 - 92 + 86 13 14 - 23 + 21 23 24 - 23 + 21 27 28 - 23 + 21 32 33 - 23 + 21 53 54 - 23 + 21 316 317 - 23 + 21 19347 19348 - 23 + 21 57861 57862 - 23 + 21 @@ -30666,7 +31004,7 @@ 1 2 - 1788903 + 1671616 @@ -30682,7 +31020,7 @@ 1 2 - 1788903 + 1671616 @@ -30692,15 +31030,15 @@ namespaces - 10800 + 9905 id - 10800 + 9905 name - 5710 + 5237 @@ -30714,7 +31052,7 @@ 1 2 - 10800 + 9905 @@ -30730,17 +31068,17 @@ 1 2 - 4668 + 4281 2 3 - 659 + 604 3 149 - 382 + 350 @@ -30750,26 +31088,26 @@ namespace_inline - 498 + 499 id - 498 + 499 namespacembrs - 2036610 + 2042050 parentid - 3987 + 3997 memberid - 2036610 + 2042050 @@ -30783,7 +31121,7 @@ 1 2 - 498 + 499 2 @@ -30793,12 +31131,12 @@ 3 4 - 498 + 499 4 5 - 622 + 624 5 @@ -30859,7 +31197,7 @@ 1 2 - 2036610 + 2042050 @@ -30869,19 +31207,19 @@ exprparents - 19402291 + 19454117 expr_id - 19402291 + 19454117 child_index - 19981 + 20034 parent_id - 12905450 + 12939921 @@ -30895,7 +31233,7 @@ 1 2 - 19402291 + 19454117 @@ -30911,7 +31249,7 @@ 1 2 - 19402291 + 19454117 @@ -30927,42 +31265,42 @@ 1 2 - 3844 + 3855 2 3 - 1515 + 1519 3 4 - 364 + 365 4 5 - 8952 + 8976 5 8 - 1655 + 1660 8 11 - 1627 + 1632 11 53 - 1515 + 1519 56 354800 - 505 + 506 @@ -30978,42 +31316,42 @@ 1 2 - 3844 + 3855 2 3 - 1515 + 1519 3 4 - 364 + 365 4 5 - 8952 + 8976 5 8 - 1655 + 1660 8 11 - 1627 + 1632 11 53 - 1515 + 1519 56 354800 - 505 + 506 @@ -31029,17 +31367,17 @@ 1 2 - 7375020 + 7394719 2 3 - 5069114 + 5082654 3 712 - 461315 + 462548 @@ -31055,17 +31393,17 @@ 1 2 - 7375020 + 7394719 2 3 - 5069114 + 5082654 3 712 - 461315 + 462548 @@ -31075,22 +31413,22 @@ expr_isload - 6834844 + 6853100 expr_id - 6834844 + 6853100 conversionkinds - 6050435 + 6050434 expr_id - 6050435 + 6050434 kind @@ -31108,7 +31446,7 @@ 1 2 - 6050435 + 6050434 @@ -31152,8 +31490,8 @@ 1 - 5831536 - 5831537 + 5831535 + 5831536 1 @@ -31164,15 +31502,15 @@ iscall - 6209631 + 5802529 caller - 6209631 + 5802529 kind - 69 + 64 @@ -31186,7 +31524,7 @@ 1 2 - 6209631 + 5802529 @@ -31202,17 +31540,17 @@ 230 231 - 23 + 21 1408 1409 - 23 + 21 - 268053 - 268054 - 23 + 268054 + 268055 + 21 @@ -31222,15 +31560,15 @@ numtemplatearguments - 719400 + 625757 expr_id - 719400 + 625757 num - 384 + 374 @@ -31244,7 +31582,7 @@ 1 2 - 719400 + 625757 @@ -31258,44 +31596,19 @@ 12 - 1 - 2 - 85 + 7 + 8 + 124 - 3 - 4 - 42 + 1264 + 1265 + 124 - 5 - 6 - 42 - - - 32 - 33 - 42 - - - 107 - 108 - 42 - - - 362 - 363 - 42 - - - 754 - 755 - 42 - - - 15573 - 15574 - 42 + 3738 + 3739 + 124 @@ -31353,23 +31666,23 @@ namequalifiers - 3255226 + 3041824 id - 3255226 + 3041824 qualifiableelement - 3255226 + 3041824 qualifyingelement - 50816 + 47484 location - 591189 + 552429 @@ -31383,7 +31696,7 @@ 1 2 - 3255226 + 3041824 @@ -31399,7 +31712,7 @@ 1 2 - 3255226 + 3041824 @@ -31415,7 +31728,7 @@ 1 2 - 3255226 + 3041824 @@ -31431,7 +31744,7 @@ 1 2 - 3255226 + 3041824 @@ -31447,7 +31760,7 @@ 1 2 - 3255226 + 3041824 @@ -31463,7 +31776,7 @@ 1 2 - 3255226 + 3041824 @@ -31479,27 +31792,27 @@ 1 2 - 33754 + 31541 2 3 - 8749 + 8175 3 5 - 4397 + 4109 5 - 6810 - 3822 + 6811 + 3571 19018 41956 - 92 + 86 @@ -31515,27 +31828,27 @@ 1 2 - 33754 + 31541 2 3 - 8749 + 8175 3 5 - 4397 + 4109 5 - 6810 - 3822 + 6811 + 3571 19018 41956 - 92 + 86 @@ -31551,22 +31864,22 @@ 1 2 - 36816 + 34403 2 3 - 7874 + 7358 3 6 - 3822 + 3571 6 20057 - 2302 + 2151 @@ -31582,22 +31895,22 @@ 1 2 - 84708 + 79133 2 6 - 40754 + 38103 6 7 - 426975 + 398981 7 192 - 38751 + 36210 @@ -31613,22 +31926,22 @@ 1 2 - 84708 + 79133 2 6 - 40754 + 38103 6 7 - 426975 + 398981 7 192 - 38751 + 36210 @@ -31644,22 +31957,22 @@ 1 2 - 119361 + 111535 2 4 - 14229 + 13296 4 5 - 444428 + 415290 5 33 - 13170 + 12306 @@ -31669,15 +31982,15 @@ varbind - 8232599 + 8254589 expr - 8232599 + 8254589 var - 1047572 + 1050370 @@ -31691,7 +32004,7 @@ 1 2 - 8232599 + 8254589 @@ -31707,52 +32020,52 @@ 1 2 - 171078 + 171535 2 3 - 188197 + 188699 3 4 - 145259 + 145647 4 5 - 116325 + 116635 5 6 - 82929 + 83150 6 7 - 65641 + 65817 7 9 - 80599 + 80815 9 13 - 81357 + 81574 13 27 - 78915 + 79126 27 5137 - 37268 + 37368 @@ -31762,15 +32075,15 @@ funbind - 6220039 + 5812232 expr - 6217391 + 5809758 fun - 295295 + 275934 @@ -31784,12 +32097,12 @@ 1 2 - 6214743 + 5807284 2 3 - 2647 + 2474 @@ -31805,27 +32118,27 @@ 1 2 - 194169 + 181439 2 3 - 41560 + 38835 3 4 - 18396 + 17190 4 8 - 24337 + 22741 8 37798 - 16831 + 15727 @@ -31835,19 +32148,19 @@ expr_allocator - 56738 + 45251 expr - 56738 + 45251 func - 128 + 102 form - 42 + 34 @@ -31861,7 +32174,7 @@ 1 2 - 56738 + 45251 @@ -31877,7 +32190,7 @@ 1 2 - 56738 + 45251 @@ -31893,17 +32206,17 @@ 1 2 - 42 + 34 591 592 - 42 + 34 736 737 - 42 + 34 @@ -31919,7 +32232,7 @@ 1 2 - 128 + 102 @@ -31935,7 +32248,7 @@ 1328 1329 - 42 + 34 @@ -31951,7 +32264,7 @@ 3 4 - 42 + 34 @@ -31961,19 +32274,19 @@ expr_deallocator - 67505 + 53838 expr - 67505 + 53838 func - 128 + 102 form - 85 + 68 @@ -31987,7 +32300,7 @@ 1 2 - 67505 + 53838 @@ -32003,7 +32316,7 @@ 1 2 - 67505 + 53838 @@ -32019,17 +32332,17 @@ 1 2 - 42 + 34 723 724 - 42 + 34 856 857 - 42 + 34 @@ -32045,7 +32358,7 @@ 1 2 - 128 + 102 @@ -32061,12 +32374,12 @@ 723 724 - 42 + 34 857 858 - 42 + 34 @@ -32082,12 +32395,12 @@ 1 2 - 42 + 34 2 3 - 42 + 34 @@ -32097,26 +32410,26 @@ expr_cond_two_operand - 652 + 653 cond - 652 + 653 expr_cond_guard - 895536 + 897875 cond - 895536 + 897875 guard - 895536 + 897875 @@ -32130,7 +32443,7 @@ 1 2 - 895536 + 897875 @@ -32146,7 +32459,7 @@ 1 2 - 895536 + 897875 @@ -32156,15 +32469,15 @@ expr_cond_true - 895533 + 897871 cond - 895533 + 897871 true - 895533 + 897871 @@ -32178,7 +32491,7 @@ 1 2 - 895533 + 897871 @@ -32194,7 +32507,7 @@ 1 2 - 895533 + 897871 @@ -32204,15 +32517,15 @@ expr_cond_false - 895536 + 897875 cond - 895536 + 897875 false - 895536 + 897875 @@ -32226,7 +32539,7 @@ 1 2 - 895536 + 897875 @@ -32242,7 +32555,7 @@ 1 2 - 895536 + 897875 @@ -32252,15 +32565,15 @@ values - 13438640 + 13474536 id - 13438640 + 13474536 str - 114260 + 114565 @@ -32274,7 +32587,7 @@ 1 2 - 13438640 + 13474536 @@ -32290,27 +32603,27 @@ 1 2 - 78093 + 78302 2 3 - 15260 + 15301 3 6 - 8871 + 8895 6 52 - 8605 + 8628 52 674264 - 3428 + 3437 @@ -32320,15 +32633,15 @@ valuetext - 6647587 + 6647484 id - 6647587 + 6647484 text - 1095411 + 1095412 @@ -32342,7 +32655,7 @@ 1 2 - 6647587 + 6647484 @@ -32368,7 +32681,7 @@ 3 7 - 86536 + 86537 7 @@ -32383,15 +32696,15 @@ valuebind - 13546933 + 13583118 val - 13438640 + 13474536 expr - 13546933 + 13583118 @@ -32405,12 +32718,12 @@ 1 2 - 13348327 + 13383982 2 6 - 90313 + 90554 @@ -32426,7 +32739,7 @@ 1 2 - 13546933 + 13583118 @@ -32436,19 +32749,19 @@ fieldoffsets - 1489415 + 1493394 id - 1489415 + 1493394 byteoffset - 31293 + 31376 bitoffset - 434 + 435 @@ -32462,7 +32775,7 @@ 1 2 - 1489415 + 1493394 @@ -32478,7 +32791,7 @@ 1 2 - 1489415 + 1493394 @@ -32494,37 +32807,37 @@ 1 2 - 17656 + 17703 2 3 - 2444 + 2451 3 5 - 2662 + 2669 5 12 - 2607 + 2614 12 34 - 2390 + 2396 34 198 - 2390 + 2396 209 5931 - 1140 + 1143 @@ -32540,12 +32853,12 @@ 1 2 - 30315 + 30396 2 9 - 977 + 980 @@ -32612,7 +32925,7 @@ 12 13 - 162 + 163 13 @@ -32637,19 +32950,19 @@ bitfield - 30276 + 30357 id - 30276 + 30357 bits - 3488 + 3497 declared_bits - 3488 + 3497 @@ -32663,7 +32976,7 @@ 1 2 - 30276 + 30357 @@ -32679,7 +32992,7 @@ 1 2 - 30276 + 30357 @@ -32695,12 +33008,12 @@ 1 2 - 996 + 999 2 3 - 747 + 749 3 @@ -32710,7 +33023,7 @@ 4 5 - 498 + 499 5 @@ -32746,7 +33059,7 @@ 1 2 - 3488 + 3497 @@ -32762,12 +33075,12 @@ 1 2 - 996 + 999 2 3 - 747 + 749 3 @@ -32777,7 +33090,7 @@ 4 5 - 498 + 499 5 @@ -32813,7 +33126,7 @@ 1 2 - 3488 + 3497 @@ -32823,23 +33136,23 @@ initialisers - 2334426 + 2340619 init - 2334426 + 2340619 var - 988525 + 991147 expr - 2334426 + 2340619 location - 537813 + 539239 @@ -32853,7 +33166,7 @@ 1 2 - 2334426 + 2340619 @@ -32869,7 +33182,7 @@ 1 2 - 2334426 + 2340619 @@ -32885,7 +33198,7 @@ 1 2 - 2334426 + 2340619 @@ -32901,17 +33214,17 @@ 1 2 - 871776 + 874088 2 15 - 39395 + 39500 16 25 - 77353 + 77558 @@ -32927,17 +33240,17 @@ 1 2 - 871776 + 874088 2 15 - 39395 + 39500 16 25 - 77353 + 77558 @@ -32953,7 +33266,7 @@ 1 2 - 988516 + 991138 2 @@ -32974,7 +33287,7 @@ 1 2 - 2334426 + 2340619 @@ -32990,7 +33303,7 @@ 1 2 - 2334426 + 2340619 @@ -33006,7 +33319,7 @@ 1 2 - 2334426 + 2340619 @@ -33022,22 +33335,22 @@ 1 2 - 438122 + 439284 2 3 - 32980 + 33067 3 15 - 42099 + 42211 15 111796 - 24610 + 24675 @@ -33053,17 +33366,17 @@ 1 2 - 469174 + 470418 2 4 - 49479 + 49610 4 12163 - 19159 + 19210 @@ -33079,22 +33392,22 @@ 1 2 - 438122 + 439284 2 3 - 32980 + 33067 3 15 - 42099 + 42211 15 111796 - 24610 + 24675 @@ -33104,26 +33417,26 @@ braced_initialisers - 74076 + 68480 init - 74076 + 68480 expr_ancestor - 1795304 + 1677598 exp - 1795304 + 1677598 ancestor - 898527 + 839616 @@ -33137,7 +33450,7 @@ 1 2 - 1795304 + 1677598 @@ -33153,17 +33466,17 @@ 1 2 - 18281 + 17083 2 3 - 869469 + 812464 3 19 - 10775 + 10069 @@ -33173,19 +33486,19 @@ exprs - 25143286 + 25210446 id - 25143286 + 25210446 kind - 1446 + 1450 location - 10554424 + 10582616 @@ -33199,7 +33512,7 @@ 1 2 - 25143286 + 25210446 @@ -33215,7 +33528,7 @@ 1 2 - 25143286 + 25210446 @@ -33393,22 +33706,22 @@ 1 2 - 8876944 + 8900655 2 3 - 818418 + 820604 3 16 - 795071 + 797195 16 71733 - 63990 + 64161 @@ -33424,17 +33737,17 @@ 1 2 - 9015974 + 9040056 2 3 - 772206 + 774269 3 32 - 766243 + 768290 @@ -33444,19 +33757,19 @@ expr_reuse - 906424 + 846996 reuse - 906424 + 846996 original - 906424 + 846996 value_category - 46 + 43 @@ -33470,7 +33783,7 @@ 1 2 - 906424 + 846996 @@ -33486,7 +33799,7 @@ 1 2 - 906424 + 846996 @@ -33502,7 +33815,7 @@ 1 2 - 906424 + 846996 @@ -33518,7 +33831,7 @@ 1 2 - 906424 + 846996 @@ -33534,12 +33847,12 @@ 58 59 - 23 + 21 39309 39310 - 23 + 21 @@ -33555,12 +33868,12 @@ 58 59 - 23 + 21 39309 39310 - 23 + 21 @@ -33570,15 +33883,15 @@ expr_types - 25143286 + 25210446 id - 25143286 + 25210446 typeid - 213631 + 214201 value_category @@ -33596,7 +33909,7 @@ 1 2 - 25143286 + 25210446 @@ -33612,7 +33925,7 @@ 1 2 - 25143286 + 25210446 @@ -33628,52 +33941,52 @@ 1 2 - 52371 + 52511 2 3 - 35097 + 35191 3 4 - 14468 + 14507 4 5 - 14490 + 14529 5 8 - 17515 + 17562 8 14 - 17340 + 17386 14 24 - 16397 + 16441 24 49 - 16025 + 16067 49 134 - 16134 + 16177 134 441505 - 13789 + 13825 @@ -33689,12 +34002,12 @@ 1 2 - 185417 + 185912 2 3 - 28213 + 28289 @@ -33746,26 +34059,26 @@ compound_requirement_is_noexcept - 69 + 64 expr - 69 + 64 new_allocated_type - 57934 + 46205 expr - 57934 + 46205 type_id - 34350 + 27396 @@ -33779,7 +34092,7 @@ 1 2 - 57934 + 46205 @@ -33795,17 +34108,17 @@ 1 2 - 14440 + 11517 2 3 - 18158 + 14481 3 19 - 1751 + 1397 @@ -33815,15 +34128,15 @@ new_array_allocated_type - 6914 + 6933 expr - 6914 + 6933 type_id - 2970 + 2978 @@ -33837,7 +34150,7 @@ 1 2 - 6914 + 6933 @@ -33858,12 +34171,12 @@ 2 3 - 2626 + 2633 3 5 - 223 + 224 6 @@ -35214,15 +35527,15 @@ condition_decl_bind - 437589 + 408900 expr - 437589 + 408900 decl - 437589 + 408900 @@ -35236,7 +35549,7 @@ 1 2 - 437589 + 408900 @@ -35252,7 +35565,7 @@ 1 2 - 437589 + 408900 @@ -35262,15 +35575,15 @@ typeid_bind - 60071 + 47909 expr - 60071 + 47909 type_id - 19995 + 15947 @@ -35284,7 +35597,7 @@ 1 2 - 60071 + 47909 @@ -35300,17 +35613,17 @@ 1 2 - 3717 + 2964 2 3 - 15765 + 12573 3 328 - 512 + 408 @@ -35320,15 +35633,15 @@ uuidof_bind - 27985 + 28060 expr - 27985 + 28060 type_id - 27719 + 27792 @@ -35342,7 +35655,7 @@ 1 2 - 27985 + 28060 @@ -35358,12 +35671,12 @@ 1 2 - 27495 + 27568 2 4 - 223 + 224 @@ -35373,15 +35686,15 @@ sizeof_bind - 241381 + 242025 expr - 241381 + 242025 type_id - 11180 + 11210 @@ -35395,7 +35708,7 @@ 1 2 - 241381 + 242025 @@ -35411,37 +35724,37 @@ 1 2 - 3867 + 3877 2 3 - 2776 + 2783 3 4 - 1021 + 1024 4 5 - 1137 + 1140 5 6 - 294 + 295 6 7 - 1062 + 1064 7 40 - 854 + 856 40 @@ -35504,23 +35817,23 @@ lambdas - 17730 + 16482 expr - 17730 + 16482 default_capture - 128 + 25 has_explicit_return_type - 85 + 17 has_explicit_parameter_list - 85 + 17 @@ -35534,7 +35847,7 @@ 1 2 - 17730 + 16482 @@ -35550,7 +35863,7 @@ 1 2 - 17730 + 16482 @@ -35566,7 +35879,7 @@ 1 2 - 17730 + 16482 @@ -35580,19 +35893,19 @@ 12 - 37 - 38 - 42 + 276 + 277 + 8 - 82 - 83 - 42 + 697 + 698 + 8 - 296 - 297 - 42 + 936 + 937 + 8 @@ -35605,15 +35918,10 @@ 12 - - 1 - 2 - 42 - 2 3 - 85 + 25 @@ -35626,15 +35934,10 @@ 12 - - 1 - 2 - 42 - 2 3 - 85 + 25 @@ -35648,14 +35951,14 @@ 12 - 55 - 56 - 42 + 813 + 814 + 8 - 360 - 361 - 42 + 1096 + 1097 + 8 @@ -35668,15 +35971,10 @@ 12 - - 2 - 3 - 42 - 3 4 - 42 + 17 @@ -35692,12 +35990,12 @@ 1 2 - 42 + 8 2 3 - 42 + 8 @@ -35711,14 +36009,14 @@ 12 - 45 - 46 - 42 + 34 + 35 + 8 - 370 - 371 - 42 + 1875 + 1876 + 8 @@ -35731,15 +36029,10 @@ 12 - - 2 - 3 - 42 - 3 4 - 42 + 17 @@ -35755,12 +36048,12 @@ 1 2 - 42 + 8 2 3 - 42 + 8 @@ -35770,15 +36063,15 @@ lambda_capture - 28450 + 28526 id - 28450 + 28526 lambda - 13261 + 13296 index @@ -35786,7 +36079,7 @@ field - 28450 + 28526 captured_by_reference @@ -35798,7 +36091,7 @@ location - 18350 + 18398 @@ -35812,7 +36105,7 @@ 1 2 - 28450 + 28526 @@ -35828,7 +36121,7 @@ 1 2 - 28450 + 28526 @@ -35844,7 +36137,7 @@ 1 2 - 28450 + 28526 @@ -35860,7 +36153,7 @@ 1 2 - 28450 + 28526 @@ -35876,7 +36169,7 @@ 1 2 - 28450 + 28526 @@ -35892,7 +36185,7 @@ 1 2 - 28450 + 28526 @@ -35908,27 +36201,27 @@ 1 2 - 6656 + 6674 2 3 - 3074 + 3082 3 4 - 1610 + 1614 4 6 - 1222 + 1226 6 18 - 697 + 699 @@ -35944,27 +36237,27 @@ 1 2 - 6656 + 6674 2 3 - 3074 + 3082 3 4 - 1610 + 1614 4 6 - 1222 + 1226 6 18 - 697 + 699 @@ -35980,27 +36273,27 @@ 1 2 - 6656 + 6674 2 3 - 3074 + 3082 3 4 - 1610 + 1614 4 6 - 1222 + 1226 6 18 - 697 + 699 @@ -36016,12 +36309,12 @@ 1 2 - 12692 + 12726 2 3 - 568 + 569 @@ -36037,7 +36330,7 @@ 1 2 - 13235 + 13270 2 @@ -36058,27 +36351,27 @@ 1 2 - 7284 + 7304 2 3 - 3237 + 3246 3 4 - 1326 + 1329 4 7 - 1084 + 1087 7 18 - 327 + 328 @@ -36387,7 +36680,7 @@ 2 3 - 111 + 112 @@ -36520,7 +36813,7 @@ 1 2 - 28450 + 28526 @@ -36536,7 +36829,7 @@ 1 2 - 28450 + 28526 @@ -36552,7 +36845,7 @@ 1 2 - 28450 + 28526 @@ -36568,7 +36861,7 @@ 1 2 - 28450 + 28526 @@ -36584,7 +36877,7 @@ 1 2 - 28450 + 28526 @@ -36600,7 +36893,7 @@ 1 2 - 28450 + 28526 @@ -36858,17 +37151,17 @@ 1 2 - 16524 + 16568 2 6 - 1394 + 1398 6 68 - 430 + 431 @@ -36884,12 +37177,12 @@ 1 2 - 17136 + 17181 2 68 - 1214 + 1217 @@ -36905,12 +37198,12 @@ 1 2 - 17618 + 17664 2 8 - 731 + 733 @@ -36926,17 +37219,17 @@ 1 2 - 16524 + 16568 2 6 - 1394 + 1398 6 68 - 430 + 431 @@ -36952,7 +37245,7 @@ 1 2 - 18324 + 18372 2 @@ -36973,7 +37266,7 @@ 1 2 - 18350 + 18398 @@ -36983,19 +37276,19 @@ fold - 1367 + 1247 expr - 1367 + 1247 operator - 85 + 86 is_left_fold - 42 + 21 @@ -37009,7 +37302,7 @@ 1 2 - 1367 + 1247 @@ -37025,7 +37318,7 @@ 1 2 - 1367 + 1247 @@ -37039,14 +37332,19 @@ 12 - 2 - 3 - 42 + 1 + 2 + 43 - 30 - 31 - 42 + 2 + 3 + 21 + + + 54 + 55 + 21 @@ -37062,7 +37360,7 @@ 1 2 - 85 + 86 @@ -37076,9 +37374,9 @@ 12 - 32 - 33 - 42 + 58 + 59 + 21 @@ -37092,9 +37390,9 @@ 12 - 2 - 3 - 42 + 4 + 5 + 21 @@ -37104,11 +37402,11 @@ stmts - 6243069 + 6259629 id - 6243069 + 6259629 kind @@ -37116,7 +37414,7 @@ location - 2747715 + 2755003 @@ -37130,7 +37428,7 @@ 1 2 - 6243069 + 6259629 @@ -37146,7 +37444,7 @@ 1 2 - 6243069 + 6259629 @@ -37384,17 +37682,17 @@ 1 2 - 2346947 + 2353172 2 4 - 238475 + 239107 4 1581 - 162292 + 162723 @@ -37410,12 +37708,12 @@ 1 2 - 2661225 + 2668284 2 10 - 86489 + 86719 @@ -37532,15 +37830,15 @@ if_initialization - 373 + 374 if_stmt - 373 + 374 init_id - 373 + 374 @@ -37554,7 +37852,7 @@ 1 2 - 373 + 374 @@ -37570,7 +37868,7 @@ 1 2 - 373 + 374 @@ -37580,15 +37878,15 @@ if_then - 987571 + 990209 if_stmt - 987571 + 990209 then_id - 987571 + 990209 @@ -37602,7 +37900,7 @@ 1 2 - 987571 + 990209 @@ -37618,7 +37916,7 @@ 1 2 - 987571 + 990209 @@ -37628,15 +37926,15 @@ if_else - 467752 + 437085 if_stmt - 467752 + 437085 else_id - 467752 + 437085 @@ -37650,7 +37948,7 @@ 1 2 - 467752 + 437085 @@ -37666,7 +37964,7 @@ 1 2 - 467752 + 437085 @@ -37724,15 +38022,15 @@ constexpr_if_then - 103537 + 103814 constexpr_if_stmt - 103537 + 103814 then_id - 103537 + 103814 @@ -37746,7 +38044,7 @@ 1 2 - 103537 + 103814 @@ -37762,7 +38060,7 @@ 1 2 - 103537 + 103814 @@ -37772,15 +38070,15 @@ constexpr_if_else - 73759 + 73956 constexpr_if_stmt - 73759 + 73956 else_id - 73759 + 73956 @@ -37794,7 +38092,7 @@ 1 2 - 73759 + 73956 @@ -37810,7 +38108,7 @@ 1 2 - 73759 + 73956 @@ -37916,15 +38214,15 @@ while_body - 39542 + 39647 while_stmt - 39542 + 39647 body_id - 39542 + 39647 @@ -37938,7 +38236,7 @@ 1 2 - 39542 + 39647 @@ -37954,7 +38252,7 @@ 1 2 - 39542 + 39647 @@ -37964,15 +38262,15 @@ do_body - 233017 + 233640 do_stmt - 233017 + 233640 body_id - 233017 + 233640 @@ -37986,7 +38284,7 @@ 1 2 - 233017 + 233640 @@ -38002,7 +38300,7 @@ 1 2 - 233017 + 233640 @@ -38060,19 +38358,19 @@ switch_case - 894774 + 836109 switch_stmt - 440744 + 411847 index - 414 + 387 case_id - 894774 + 836109 @@ -38086,17 +38384,17 @@ 1 2 - 23 + 21 2 3 - 437658 + 408964 3 19 - 3062 + 2861 @@ -38112,17 +38410,17 @@ 1 2 - 23 + 21 2 3 - 437658 + 408964 3 19 - 3062 + 2861 @@ -38138,62 +38436,62 @@ 5 6 - 161 + 150 10 11 - 23 + 21 19 20 - 23 + 21 27 28 - 23 + 21 48 49 - 23 + 21 51 52 - 23 + 21 58 59 - 23 + 21 83 84 - 23 + 21 114 115 - 23 + 21 133 134 - 23 + 21 19141 19142 - 23 + 21 19142 19143 - 23 + 21 @@ -38209,62 +38507,62 @@ 5 6 - 161 + 150 10 11 - 23 + 21 19 20 - 23 + 21 27 28 - 23 + 21 48 49 - 23 + 21 51 52 - 23 + 21 58 59 - 23 + 21 83 84 - 23 + 21 114 115 - 23 + 21 133 134 - 23 + 21 19141 19142 - 23 + 21 19142 19143 - 23 + 21 @@ -38280,7 +38578,7 @@ 1 2 - 894774 + 836109 @@ -38296,7 +38594,7 @@ 1 2 - 894774 + 836109 @@ -38306,15 +38604,15 @@ switch_body - 440744 + 411847 switch_stmt - 440744 + 411847 body_id - 440744 + 411847 @@ -38328,7 +38626,7 @@ 1 2 - 440744 + 411847 @@ -38344,7 +38642,7 @@ 1 2 - 440744 + 411847 @@ -38354,15 +38652,15 @@ for_initialization - 73050 + 73245 for_stmt - 73050 + 73245 init_id - 73050 + 73245 @@ -38376,7 +38674,7 @@ 1 2 - 73050 + 73245 @@ -38392,7 +38690,7 @@ 1 2 - 73050 + 73245 @@ -38402,15 +38700,15 @@ for_condition - 76137 + 76340 for_stmt - 76137 + 76340 condition_id - 76137 + 76340 @@ -38424,7 +38722,7 @@ 1 2 - 76137 + 76340 @@ -38440,7 +38738,7 @@ 1 2 - 76137 + 76340 @@ -38450,15 +38748,15 @@ for_update - 73190 + 73386 for_stmt - 73190 + 73386 update_id - 73190 + 73386 @@ -38472,7 +38770,7 @@ 1 2 - 73190 + 73386 @@ -38488,7 +38786,7 @@ 1 2 - 73190 + 73386 @@ -38498,15 +38796,15 @@ for_body - 84163 + 84388 for_stmt - 84163 + 84388 body_id - 84163 + 84388 @@ -38520,7 +38818,7 @@ 1 2 - 84163 + 84388 @@ -38536,7 +38834,7 @@ 1 2 - 84163 + 84388 @@ -38546,19 +38844,19 @@ stmtparents - 5509819 + 5524434 id - 5509819 + 5524434 index - 16722 + 16767 parent - 2336424 + 2342622 @@ -38572,7 +38870,7 @@ 1 2 - 5509819 + 5524434 @@ -38588,7 +38886,7 @@ 1 2 - 5509819 + 5524434 @@ -38604,52 +38902,52 @@ 1 2 - 5493 + 5508 2 3 - 1369 + 1372 3 4 - 301 + 302 4 5 - 2126 + 2132 7 8 - 1394 + 1398 8 12 - 1084 + 1087 12 29 - 1472 + 1476 29 38 - 1257 + 1260 41 77 - 1265 + 1269 77 195079 - 955 + 958 @@ -38665,52 +38963,52 @@ 1 2 - 5493 + 5508 2 3 - 1369 + 1372 3 4 - 301 + 302 4 5 - 2126 + 2132 7 8 - 1394 + 1398 8 12 - 1084 + 1087 12 29 - 1472 + 1476 29 38 - 1257 + 1260 41 77 - 1265 + 1269 77 195079 - 955 + 958 @@ -38726,32 +39024,32 @@ 1 2 - 1341036 + 1344593 2 3 - 506485 + 507829 3 4 - 143753 + 144134 4 6 - 151038 + 151438 6 16 - 175330 + 175795 16 1943 - 18780 + 18830 @@ -38767,32 +39065,32 @@ 1 2 - 1341036 + 1344593 2 3 - 506485 + 507829 3 4 - 143753 + 144134 4 6 - 151038 + 151438 6 16 - 175330 + 175795 16 1943 - 18780 + 18830 @@ -38802,22 +39100,22 @@ ishandler - 47330 + 43754 block - 47330 + 43754 stmt_decl_bind - 723033 + 721438 stmt - 682991 + 681485 num @@ -38825,7 +39123,7 @@ decl - 722964 + 721370 @@ -38839,12 +39137,12 @@ 1 2 - 660998 + 659540 2 32 - 21993 + 21944 @@ -38860,12 +39158,12 @@ 1 2 - 660998 + 659540 2 32 - 21993 + 21944 @@ -39003,7 +39301,7 @@ 1 2 - 722940 + 721346 2 @@ -39024,7 +39322,7 @@ 1 2 - 722964 + 721370 @@ -39034,11 +39332,11 @@ stmt_decl_entry_bind - 723033 + 721438 stmt - 682991 + 681485 num @@ -39046,7 +39344,7 @@ decl_entry - 723033 + 721438 @@ -39060,12 +39358,12 @@ 1 2 - 660998 + 659540 2 32 - 21993 + 21944 @@ -39081,12 +39379,12 @@ 1 2 - 660998 + 659540 2 32 - 21993 + 21944 @@ -39224,7 +39522,7 @@ 1 2 - 723033 + 721438 @@ -39240,7 +39538,7 @@ 1 2 - 723033 + 721438 @@ -39250,15 +39548,15 @@ blockscope - 1757769 + 1762465 block - 1757769 + 1762465 enclosing - 1503349 + 1507364 @@ -39272,7 +39570,7 @@ 1 2 - 1757769 + 1762465 @@ -39288,17 +39586,17 @@ 1 2 - 1332655 + 1336215 2 3 - 128207 + 128549 3 28 - 42486 + 42599 @@ -39308,19 +39606,19 @@ jumpinfo - 347391 + 348319 id - 347391 + 348319 str - 28871 + 28948 target - 72512 + 72705 @@ -39334,7 +39632,7 @@ 1 2 - 347391 + 348319 @@ -39350,7 +39648,7 @@ 1 2 - 347391 + 348319 @@ -39366,37 +39664,37 @@ 2 3 - 13560 + 13596 3 4 - 6042 + 6058 4 5 - 2008 + 2014 5 6 - 1883 + 1888 6 10 - 2192 + 2197 10 25 - 2183 + 2189 25 13711 - 1000 + 1002 @@ -39412,17 +39710,17 @@ 1 2 - 23128 + 23190 2 3 - 3617 + 3626 3 3321 - 2125 + 2131 @@ -39443,27 +39741,27 @@ 2 3 - 36114 + 36210 3 4 - 17586 + 17633 4 5 - 7359 + 7379 5 8 - 6401 + 6418 8 2124 - 5017 + 5030 @@ -39479,7 +39777,7 @@ 1 2 - 72512 + 72705 @@ -39489,19 +39787,19 @@ preprocdirects - 5386939 + 5401328 id - 5386939 + 5401328 kind - 1370 + 1374 location - 5383699 + 5398080 @@ -39515,7 +39813,7 @@ 1 2 - 5386939 + 5401328 @@ -39531,7 +39829,7 @@ 1 2 - 5386939 + 5401328 @@ -39679,7 +39977,7 @@ 1 2 - 5383575 + 5397955 27 @@ -39700,7 +39998,7 @@ 1 2 - 5383699 + 5398080 @@ -39710,15 +40008,15 @@ preprocpair - 1136918 + 1139955 begin - 883245 + 885604 elseelifend - 1136918 + 1139955 @@ -39732,17 +40030,17 @@ 1 2 - 643153 + 644871 2 3 - 230498 + 231114 3 9 - 9593 + 9619 @@ -39758,7 +40056,7 @@ 1 2 - 1136918 + 1139955 @@ -39768,41 +40066,41 @@ preproctrue - 436078 + 437243 branch - 436078 + 437243 preprocfalse - 283575 + 284333 branch - 283575 + 284333 preproctext - 4335865 + 4347447 id - 4335865 + 4347447 head - 2943529 + 2951391 body - 1674914 + 1679388 @@ -39816,7 +40114,7 @@ 1 2 - 4335865 + 4347447 @@ -39832,7 +40130,7 @@ 1 2 - 4335865 + 4347447 @@ -39848,12 +40146,12 @@ 1 2 - 2747543 + 2754882 2 798 - 195986 + 196509 @@ -39869,12 +40167,12 @@ 1 2 - 2864163 + 2871813 2 5 - 79366 + 79578 @@ -39890,17 +40188,17 @@ 1 2 - 1526897 + 1530975 2 10 - 127210 + 127550 10 13579 - 20807 + 20862 @@ -39916,17 +40214,17 @@ 1 2 - 1531133 + 1535223 2 12 - 126836 + 127175 12 3231 - 16944 + 16990 @@ -39936,15 +40234,15 @@ includes - 397817 + 364863 id - 397817 + 364863 included - 73281 + 67210 @@ -39958,7 +40256,7 @@ 1 2 - 397817 + 364863 @@ -39974,37 +40272,37 @@ 1 2 - 36264 + 33260 2 3 - 11789 + 10812 3 4 - 6184 + 5672 4 6 - 6685 + 6132 6 11 - 5644 + 5176 11 47 - 5499 + 5043 47 793 - 1213 + 1112 @@ -40014,15 +40312,15 @@ link_targets - 923 + 846 id - 923 + 846 binary - 923 + 846 @@ -40036,7 +40334,7 @@ 1 2 - 923 + 846 @@ -40052,7 +40350,7 @@ 1 2 - 923 + 846 @@ -40062,15 +40360,15 @@ link_parent - 38113722 + 30397565 element - 4847512 + 3866129 link_target - 427 + 340 @@ -40084,17 +40382,17 @@ 1 2 - 665225 + 530549 2 9 - 33795 + 26953 9 10 - 4148492 + 3308626 @@ -40110,52 +40408,52 @@ 3 4 - 42 + 34 97356 97357 - 42 + 34 97475 97476 - 42 + 34 97528 97529 - 42 + 34 97555 97556 - 42 + 34 97577 97578 - 42 + 34 97609 97610 - 42 + 34 99616 99617 - 42 + 34 102996 102997 - 42 + 34 104360 104361 - 42 + 34 From 7355f555a56fdb2c04eba75ca4ef235946b463af Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 16 Jun 2025 17:27:11 +0100 Subject: [PATCH 12/35] C++: Add an exception edge out of calls inside try statements. --- .../cpp/ir/implementation/raw/internal/TranslatedCall.qll | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll index db46f6807cd..1a5c65d364d 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll @@ -4,6 +4,7 @@ private import semmle.code.cpp.ir.implementation.internal.OperandTag private import semmle.code.cpp.ir.internal.CppType private import semmle.code.cpp.models.interfaces.SideEffect private import semmle.code.cpp.models.interfaces.Throwing +private import semmle.code.cpp.models.interfaces.NonThrowing private import InstructionTag private import SideEffects private import TranslatedElement @@ -366,6 +367,10 @@ class TranslatedFunctionCall extends TranslatedCallExpr, TranslatedDirectCall { or exists(MicrosoftTryStmt tryStmt | tryStmt.getStmt() = expr.getEnclosingStmt().getParent*()) and e instanceof SehExceptionEdge + or + not expr.getTarget() instanceof NonCppThrowingFunction and + exists(TryStmt tryStmt | tryStmt.getStmt() = expr.getEnclosingStmt().getParent*()) and + e instanceof CppExceptionEdge } final override predicate mustThrowException(ExceptionEdge e) { From 9f3569b980a51564adcd939cbf4991115ba182bb Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 16 Jun 2025 17:27:18 +0100 Subject: [PATCH 13/35] C++: Accept test changes. --- .../controlflow/guards-ir/tests.expected | 9 +- .../controlflow/guards/GuardsControl.expected | 1 - .../controlflow/guards/GuardsEnsure.expected | 2 - .../library-tests/ir/ir/aliased_ir.expected | 1606 ++++++++++------- .../test/library-tests/ir/ir/raw_ir.expected | 708 ++++---- 5 files changed, 1300 insertions(+), 1026 deletions(-) diff --git a/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected b/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected index 472e48a05b0..1d138afcbea 100644 --- a/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected +++ b/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected @@ -448,7 +448,6 @@ astGuardsControl | test.cpp:31:7:31:13 | ... == ... | false | 34 | 34 | | test.cpp:31:7:31:13 | ... == ... | true | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | true | 31 | 32 | -| test.cpp:42:13:42:20 | call to getABool | false | 53 | 53 | | test.cpp:42:13:42:20 | call to getABool | true | 43 | 45 | astGuardsEnsure | test.c:7:9:7:13 | ... > ... | test.c:7:9:7:9 | x | < | test.c:7:13:7:13 | 0 | 1 | 10 | 11 | @@ -893,8 +892,6 @@ astGuardsEnsure_const | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 1 | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 1 | 31 | 32 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | != | 0 | 43 | 45 | -| test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | != | 1 | 53 | 53 | -| test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | == | 0 | 53 | 53 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | == | 1 | 43 | 45 | irGuards | test.c:7:9:7:13 | CompareGT: ... > ... | @@ -1301,8 +1298,8 @@ irGuardsControl | test.cpp:31:7:31:13 | CompareEQ: ... == ... | false | 34 | 34 | | test.cpp:31:7:31:13 | CompareEQ: ... == ... | true | 30 | 30 | | test.cpp:31:7:31:13 | CompareEQ: ... == ... | true | 32 | 32 | -| test.cpp:42:13:42:20 | Call: call to getABool | false | 53 | 53 | | test.cpp:42:13:42:20 | Call: call to getABool | true | 44 | 44 | +| test.cpp:42:13:42:20 | Call: call to getABool | true | 45 | 45 | irGuardsEnsure | test.c:7:9:7:13 | CompareGT: ... > ... | test.c:7:9:7:9 | Load: x | < | test.c:7:13:7:13 | Constant: 0 | 1 | 11 | 11 | | test.c:7:9:7:13 | CompareGT: ... > ... | test.c:7:9:7:9 | Load: x | >= | test.c:7:13:7:13 | Constant: 0 | 1 | 8 | 8 | @@ -1781,6 +1778,6 @@ irGuardsEnsure_const | test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:13 | CompareEQ: ... == ... | == | 1 | 30 | 30 | | test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:13 | CompareEQ: ... == ... | == | 1 | 32 | 32 | | test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | != | 0 | 44 | 44 | -| test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | != | 1 | 53 | 53 | -| test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | == | 0 | 53 | 53 | +| test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | != | 0 | 45 | 45 | | test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | == | 1 | 44 | 44 | +| test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | == | 1 | 45 | 45 | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsControl.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsControl.expected index 57f5fe4065d..a60784a0e10 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsControl.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsControl.expected @@ -104,7 +104,6 @@ | test.cpp:31:7:31:13 | ... == ... | false | 34 | 34 | | test.cpp:31:7:31:13 | ... == ... | true | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | true | 31 | 32 | -| test.cpp:42:13:42:20 | call to getABool | false | 53 | 53 | | test.cpp:42:13:42:20 | call to getABool | true | 43 | 45 | | test.cpp:61:10:61:10 | i | Case[0] | 62 | 64 | | test.cpp:61:10:61:10 | i | Case[1] | 65 | 66 | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected index 0f57d5e0450..67dd6f68ed4 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected @@ -635,8 +635,6 @@ unary | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 1 | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 1 | 31 | 32 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | != | 0 | 43 | 45 | -| test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | != | 1 | 53 | 53 | -| test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | == | 0 | 53 | 53 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | == | 1 | 43 | 45 | | test.cpp:61:10:61:10 | i | test.cpp:61:10:61:10 | i | == | 0 | 62 | 64 | | test.cpp:61:10:61:10 | i | test.cpp:61:10:61:10 | i | == | 1 | 65 | 66 | diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index 850168dd6d5..c6f2bb1639e 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -887,14 +887,13 @@ coroutines.cpp: #-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~m0_15 #-----| m0_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_11 #-----| m0_18(unknown) = Chi : total:m0_15, partial:m0_17 -# 88| v88_1(void) = NoOp : -#-----| v0_19(void) = NoOp : -#-----| Goto (back edge) -> Block 3 +#-----| C++ Exception -> Block 4 +#-----| Goto -> Block 3 # 87| Block 2 # 87| r87_42(suspend_always *) = CopyValue : r87_27 # 87| r87_43(glval) = CopyValue : r87_42 -#-----| r0_20(glval) = Convert : r87_43 +#-----| r0_19(glval) = Convert : r87_43 # 87| r87_44(glval) = FunctionAddress[await_suspend] : # 87| r87_45(glval>) = VariableAddress[#temp87:20] : # 87| m87_46(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_45 @@ -910,87 +909,116 @@ coroutines.cpp: # 87| m87_56(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_45 # 87| m87_57(unknown) = Chi : total:m87_54, partial:m87_56 # 87| r87_58(coroutine_handle) = Load[#temp87:20] : &:r87_45, ~m87_57 -# 87| v87_59(void) = Call[await_suspend] : func:r87_44, this:r0_20, 0:r87_58 +# 87| v87_59(void) = Call[await_suspend] : func:r87_44, this:r0_19, 0:r87_58 # 87| m87_60(unknown) = ^CallSideEffect : ~m87_57 # 87| m87_61(unknown) = Chi : total:m87_57, partial:m87_60 -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m87_61 +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m87_61 #-----| Goto -> Block 1 -#-----| Block 3 -#-----| v0_22(void) = NoOp : -# 87| r87_62(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_63(glval) = FunctionAddress[final_suspend] : -# 87| r87_64(suspend_always) = Call[final_suspend] : func:r87_63, this:r87_62 -# 87| m87_65(unknown) = ^CallSideEffect : ~m0_18 -# 87| m87_66(unknown) = Chi : total:m0_18, partial:m87_65 -# 87| v87_67(void) = ^IndirectReadSideEffect[-1] : &:r87_62, ~m87_66 -# 87| m87_68(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_62 -# 87| m87_69(unknown) = Chi : total:m87_66, partial:m87_68 -#-----| r0_23(glval) = VariableAddress[#temp0:0] : -# 87| r87_70(glval) = VariableAddress[#temp87:20] : -# 87| r87_71(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_72(glval) = FunctionAddress[final_suspend] : -# 87| r87_73(suspend_always) = Call[final_suspend] : func:r87_72, this:r87_71 -# 87| m87_74(unknown) = ^CallSideEffect : ~m87_69 -# 87| m87_75(unknown) = Chi : total:m87_69, partial:m87_74 -# 87| v87_76(void) = ^IndirectReadSideEffect[-1] : &:r87_71, ~m87_75 -# 87| m87_77(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_71 -# 87| m87_78(unknown) = Chi : total:m87_75, partial:m87_77 -# 87| m87_79(suspend_always) = Store[#temp87:20] : &:r87_70, r87_73 -# 87| m87_80(unknown) = Chi : total:m87_78, partial:m87_79 -# 87| r87_81(suspend_always *) = CopyValue : r87_70 -# 87| m87_82(suspend_always *) = Store[#temp0:0] : &:r0_23, r87_81 -#-----| r0_24(suspend_always *) = Load[#temp0:0] : &:r0_23, m87_82 -# 87| r87_83(glval) = CopyValue : r0_24 -# 87| r87_84(glval) = Convert : r87_83 -# 87| r87_85(glval) = FunctionAddress[await_ready] : -# 87| r87_86(bool) = Call[await_ready] : func:r87_85, this:r87_84 -# 87| m87_87(unknown) = ^CallSideEffect : ~m87_80 -# 87| m87_88(unknown) = Chi : total:m87_80, partial:m87_87 -# 87| v87_89(void) = ^IndirectReadSideEffect[-1] : &:r87_84, ~m87_88 -#-----| v0_25(void) = ConditionalBranch : r87_86 -#-----| False -> Block 5 -#-----| True -> Block 4 +# 88| Block 3 +# 88| v88_1(void) = NoOp : +#-----| v0_21(void) = NoOp : +#-----| Goto (back edge) -> Block 6 -# 87| Block 4 -# 87| m87_90(unknown) = Phi : from 3:~m87_88, from 5:~m87_120 -# 87| r87_91(suspend_always *) = CopyValue : r87_81 -# 87| r87_92(glval) = CopyValue : r87_91 -#-----| r0_26(glval) = Convert : r87_92 -# 87| r87_93(glval) = FunctionAddress[await_resume] : -# 87| v87_94(void) = Call[await_resume] : func:r87_93, this:r0_26 -# 87| m87_95(unknown) = ^CallSideEffect : ~m87_90 -# 87| m87_96(unknown) = Chi : total:m87_90, partial:m87_95 -#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~m87_96 -# 87| r87_97(glval) = VariableAddress[#return] : -# 87| v87_98(void) = ReturnValue : &:r87_97, ~m87_96 -# 87| v87_99(void) = AliasedUse : ~m87_96 -# 87| v87_100(void) = ExitFunction : +#-----| Block 4 +#-----| v0_22(void) = CatchAny : +#-----| r0_23(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_24(bool) = Load[(unnamed local variable)] : &:r0_23, m0_7 +#-----| r0_25(bool) = LogicalNot : r0_24 +#-----| v0_26(void) = ConditionalBranch : r0_25 +#-----| False -> Block 5 +#-----| True -> Block 9 # 87| Block 5 -# 87| r87_101(suspend_always *) = CopyValue : r87_81 -# 87| r87_102(glval) = CopyValue : r87_101 -#-----| r0_28(glval) = Convert : r87_102 -# 87| r87_103(glval) = FunctionAddress[await_suspend] : -# 87| r87_104(glval>) = VariableAddress[#temp87:20] : -# 87| m87_105(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_104 -# 87| m87_106(unknown) = Chi : total:m87_88, partial:m87_105 -# 87| r87_107(glval) = FunctionAddress[coroutine_handle] : -# 87| r87_108(glval>) = VariableAddress[(unnamed local variable)] : -# 87| r87_109(glval>) = Convert : r87_108 -# 87| r87_110(coroutine_handle &) = CopyValue : r87_109 -# 87| v87_111(void) = Call[coroutine_handle] : func:r87_107, this:r87_104, 0:r87_110 -# 87| m87_112(unknown) = ^CallSideEffect : ~m87_106 -# 87| m87_113(unknown) = Chi : total:m87_106, partial:m87_112 -# 87| v87_114(void) = ^BufferReadSideEffect[0] : &:r87_110, ~m87_113 -# 87| m87_115(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_104 -# 87| m87_116(unknown) = Chi : total:m87_113, partial:m87_115 -# 87| r87_117(coroutine_handle) = Load[#temp87:20] : &:r87_104, ~m87_116 -# 87| v87_118(void) = Call[await_suspend] : func:r87_103, this:r0_28, 0:r87_117 -# 87| m87_119(unknown) = ^CallSideEffect : ~m87_116 -# 87| m87_120(unknown) = Chi : total:m87_116, partial:m87_119 -#-----| v0_29(void) = ^IndirectReadSideEffect[-1] : &:r0_28, ~m87_120 -#-----| Goto -> Block 4 +# 87| r87_62(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_63(glval) = FunctionAddress[unhandled_exception] : +# 87| v87_64(void) = Call[unhandled_exception] : func:r87_63, this:r87_62 +# 87| m87_65(unknown) = ^CallSideEffect : ~m0_18 +# 87| m87_66(unknown) = Chi : total:m0_18, partial:m87_65 +# 87| v87_67(void) = ^IndirectReadSideEffect[-1] : &:r87_62, ~m87_66 +# 87| m87_68(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_62 +# 87| m87_69(unknown) = Chi : total:m87_66, partial:m87_68 +#-----| Goto -> Block 6 + +#-----| Block 6 +#-----| m0_27(unknown) = Phi : from 3:~m0_18, from 5:~m87_69 +#-----| v0_28(void) = NoOp : +# 87| r87_70(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_71(glval) = FunctionAddress[final_suspend] : +# 87| r87_72(suspend_always) = Call[final_suspend] : func:r87_71, this:r87_70 +# 87| m87_73(unknown) = ^CallSideEffect : ~m0_27 +# 87| m87_74(unknown) = Chi : total:m0_27, partial:m87_73 +# 87| v87_75(void) = ^IndirectReadSideEffect[-1] : &:r87_70, ~m87_74 +# 87| m87_76(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_70 +# 87| m87_77(unknown) = Chi : total:m87_74, partial:m87_76 +#-----| r0_29(glval) = VariableAddress[#temp0:0] : +# 87| r87_78(glval) = VariableAddress[#temp87:20] : +# 87| r87_79(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_80(glval) = FunctionAddress[final_suspend] : +# 87| r87_81(suspend_always) = Call[final_suspend] : func:r87_80, this:r87_79 +# 87| m87_82(unknown) = ^CallSideEffect : ~m87_77 +# 87| m87_83(unknown) = Chi : total:m87_77, partial:m87_82 +# 87| v87_84(void) = ^IndirectReadSideEffect[-1] : &:r87_79, ~m87_83 +# 87| m87_85(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_79 +# 87| m87_86(unknown) = Chi : total:m87_83, partial:m87_85 +# 87| m87_87(suspend_always) = Store[#temp87:20] : &:r87_78, r87_81 +# 87| m87_88(unknown) = Chi : total:m87_86, partial:m87_87 +# 87| r87_89(suspend_always *) = CopyValue : r87_78 +# 87| m87_90(suspend_always *) = Store[#temp0:0] : &:r0_29, r87_89 +#-----| r0_30(suspend_always *) = Load[#temp0:0] : &:r0_29, m87_90 +# 87| r87_91(glval) = CopyValue : r0_30 +# 87| r87_92(glval) = Convert : r87_91 +# 87| r87_93(glval) = FunctionAddress[await_ready] : +# 87| r87_94(bool) = Call[await_ready] : func:r87_93, this:r87_92 +# 87| m87_95(unknown) = ^CallSideEffect : ~m87_88 +# 87| m87_96(unknown) = Chi : total:m87_88, partial:m87_95 +# 87| v87_97(void) = ^IndirectReadSideEffect[-1] : &:r87_92, ~m87_96 +#-----| v0_31(void) = ConditionalBranch : r87_94 +#-----| False -> Block 8 +#-----| True -> Block 7 + +# 87| Block 7 +# 87| m87_98(unknown) = Phi : from 6:~m87_96, from 8:~m87_128 +# 87| r87_99(suspend_always *) = CopyValue : r87_89 +# 87| r87_100(glval) = CopyValue : r87_99 +#-----| r0_32(glval) = Convert : r87_100 +# 87| r87_101(glval) = FunctionAddress[await_resume] : +# 87| v87_102(void) = Call[await_resume] : func:r87_101, this:r0_32 +# 87| m87_103(unknown) = ^CallSideEffect : ~m87_98 +# 87| m87_104(unknown) = Chi : total:m87_98, partial:m87_103 +#-----| v0_33(void) = ^IndirectReadSideEffect[-1] : &:r0_32, ~m87_104 +# 87| r87_105(glval) = VariableAddress[#return] : +# 87| v87_106(void) = ReturnValue : &:r87_105, ~m87_104 +# 87| v87_107(void) = AliasedUse : ~m87_104 +# 87| v87_108(void) = ExitFunction : + +# 87| Block 8 +# 87| r87_109(suspend_always *) = CopyValue : r87_89 +# 87| r87_110(glval) = CopyValue : r87_109 +#-----| r0_34(glval) = Convert : r87_110 +# 87| r87_111(glval) = FunctionAddress[await_suspend] : +# 87| r87_112(glval>) = VariableAddress[#temp87:20] : +# 87| m87_113(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_112 +# 87| m87_114(unknown) = Chi : total:m87_96, partial:m87_113 +# 87| r87_115(glval) = FunctionAddress[coroutine_handle] : +# 87| r87_116(glval>) = VariableAddress[(unnamed local variable)] : +# 87| r87_117(glval>) = Convert : r87_116 +# 87| r87_118(coroutine_handle &) = CopyValue : r87_117 +# 87| v87_119(void) = Call[coroutine_handle] : func:r87_115, this:r87_112, 0:r87_118 +# 87| m87_120(unknown) = ^CallSideEffect : ~m87_114 +# 87| m87_121(unknown) = Chi : total:m87_114, partial:m87_120 +# 87| v87_122(void) = ^BufferReadSideEffect[0] : &:r87_118, ~m87_121 +# 87| m87_123(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_112 +# 87| m87_124(unknown) = Chi : total:m87_121, partial:m87_123 +# 87| r87_125(coroutine_handle) = Load[#temp87:20] : &:r87_112, ~m87_124 +# 87| v87_126(void) = Call[await_suspend] : func:r87_111, this:r0_34, 0:r87_125 +# 87| m87_127(unknown) = ^CallSideEffect : ~m87_124 +# 87| m87_128(unknown) = Chi : total:m87_124, partial:m87_127 +#-----| v0_35(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~m87_128 +#-----| Goto -> Block 7 + +# 87| Block 9 +# 87| v87_129(void) = Unreached : # 91| co_returnable_value co_return_int(int) # 91| Block 0 @@ -1065,14 +1093,13 @@ coroutines.cpp: #-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m0_19 #-----| m0_21(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_15 #-----| m0_22(unknown) = Chi : total:m0_19, partial:m0_21 -# 92| v92_3(void) = NoOp : -#-----| v0_23(void) = NoOp : -#-----| Goto (back edge) -> Block 3 +#-----| C++ Exception -> Block 4 +#-----| Goto -> Block 3 # 91| Block 2 # 91| r91_44(suspend_always *) = CopyValue : r91_29 # 91| r91_45(glval) = CopyValue : r91_44 -#-----| r0_24(glval) = Convert : r91_45 +#-----| r0_23(glval) = Convert : r91_45 # 91| r91_46(glval) = FunctionAddress[await_suspend] : # 91| r91_47(glval>) = VariableAddress[#temp91:21] : # 91| m91_48(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_47 @@ -1088,87 +1115,116 @@ coroutines.cpp: # 91| m91_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_47 # 91| m91_59(unknown) = Chi : total:m91_56, partial:m91_58 # 91| r91_60(coroutine_handle) = Load[#temp91:21] : &:r91_47, ~m91_59 -# 91| v91_61(void) = Call[await_suspend] : func:r91_46, this:r0_24, 0:r91_60 +# 91| v91_61(void) = Call[await_suspend] : func:r91_46, this:r0_23, 0:r91_60 # 91| m91_62(unknown) = ^CallSideEffect : ~m91_59 # 91| m91_63(unknown) = Chi : total:m91_59, partial:m91_62 -#-----| v0_25(void) = ^IndirectReadSideEffect[-1] : &:r0_24, ~m91_63 +#-----| v0_24(void) = ^IndirectReadSideEffect[-1] : &:r0_23, ~m91_63 #-----| Goto -> Block 1 -#-----| Block 3 -#-----| v0_26(void) = NoOp : -# 91| r91_64(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_65(glval) = FunctionAddress[final_suspend] : -# 91| r91_66(suspend_always) = Call[final_suspend] : func:r91_65, this:r91_64 -# 91| m91_67(unknown) = ^CallSideEffect : ~m0_22 -# 91| m91_68(unknown) = Chi : total:m0_22, partial:m91_67 -# 91| v91_69(void) = ^IndirectReadSideEffect[-1] : &:r91_64, ~m91_68 -# 91| m91_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_64 -# 91| m91_71(unknown) = Chi : total:m91_68, partial:m91_70 -#-----| r0_27(glval) = VariableAddress[#temp0:0] : -# 91| r91_72(glval) = VariableAddress[#temp91:21] : -# 91| r91_73(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_74(glval) = FunctionAddress[final_suspend] : -# 91| r91_75(suspend_always) = Call[final_suspend] : func:r91_74, this:r91_73 -# 91| m91_76(unknown) = ^CallSideEffect : ~m91_71 -# 91| m91_77(unknown) = Chi : total:m91_71, partial:m91_76 -# 91| v91_78(void) = ^IndirectReadSideEffect[-1] : &:r91_73, ~m91_77 -# 91| m91_79(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_73 -# 91| m91_80(unknown) = Chi : total:m91_77, partial:m91_79 -# 91| m91_81(suspend_always) = Store[#temp91:21] : &:r91_72, r91_75 -# 91| m91_82(unknown) = Chi : total:m91_80, partial:m91_81 -# 91| r91_83(suspend_always *) = CopyValue : r91_72 -# 91| m91_84(suspend_always *) = Store[#temp0:0] : &:r0_27, r91_83 -#-----| r0_28(suspend_always *) = Load[#temp0:0] : &:r0_27, m91_84 -# 91| r91_85(glval) = CopyValue : r0_28 -# 91| r91_86(glval) = Convert : r91_85 -# 91| r91_87(glval) = FunctionAddress[await_ready] : -# 91| r91_88(bool) = Call[await_ready] : func:r91_87, this:r91_86 -# 91| m91_89(unknown) = ^CallSideEffect : ~m91_82 -# 91| m91_90(unknown) = Chi : total:m91_82, partial:m91_89 -# 91| v91_91(void) = ^IndirectReadSideEffect[-1] : &:r91_86, ~m91_90 -#-----| v0_29(void) = ConditionalBranch : r91_88 -#-----| False -> Block 5 -#-----| True -> Block 4 +# 92| Block 3 +# 92| v92_3(void) = NoOp : +#-----| v0_25(void) = NoOp : +#-----| Goto (back edge) -> Block 6 -# 91| Block 4 -# 91| m91_92(unknown) = Phi : from 3:~m91_90, from 5:~m91_122 -# 91| r91_93(suspend_always *) = CopyValue : r91_83 -# 91| r91_94(glval) = CopyValue : r91_93 -#-----| r0_30(glval) = Convert : r91_94 -# 91| r91_95(glval) = FunctionAddress[await_resume] : -# 91| v91_96(void) = Call[await_resume] : func:r91_95, this:r0_30 -# 91| m91_97(unknown) = ^CallSideEffect : ~m91_92 -# 91| m91_98(unknown) = Chi : total:m91_92, partial:m91_97 -#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m91_98 -# 91| r91_99(glval) = VariableAddress[#return] : -# 91| v91_100(void) = ReturnValue : &:r91_99, ~m91_98 -# 91| v91_101(void) = AliasedUse : ~m91_98 -# 91| v91_102(void) = ExitFunction : +#-----| Block 4 +#-----| v0_26(void) = CatchAny : +#-----| r0_27(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_28(bool) = Load[(unnamed local variable)] : &:r0_27, m0_11 +#-----| r0_29(bool) = LogicalNot : r0_28 +#-----| v0_30(void) = ConditionalBranch : r0_29 +#-----| False -> Block 5 +#-----| True -> Block 9 # 91| Block 5 -# 91| r91_103(suspend_always *) = CopyValue : r91_83 -# 91| r91_104(glval) = CopyValue : r91_103 -#-----| r0_32(glval) = Convert : r91_104 -# 91| r91_105(glval) = FunctionAddress[await_suspend] : -# 91| r91_106(glval>) = VariableAddress[#temp91:21] : -# 91| m91_107(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_106 -# 91| m91_108(unknown) = Chi : total:m91_90, partial:m91_107 -# 91| r91_109(glval) = FunctionAddress[coroutine_handle] : -# 91| r91_110(glval>) = VariableAddress[(unnamed local variable)] : -# 91| r91_111(glval>) = Convert : r91_110 -# 91| r91_112(coroutine_handle &) = CopyValue : r91_111 -# 91| v91_113(void) = Call[coroutine_handle] : func:r91_109, this:r91_106, 0:r91_112 -# 91| m91_114(unknown) = ^CallSideEffect : ~m91_108 -# 91| m91_115(unknown) = Chi : total:m91_108, partial:m91_114 -# 91| v91_116(void) = ^BufferReadSideEffect[0] : &:r91_112, ~m91_115 -# 91| m91_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_106 -# 91| m91_118(unknown) = Chi : total:m91_115, partial:m91_117 -# 91| r91_119(coroutine_handle) = Load[#temp91:21] : &:r91_106, ~m91_118 -# 91| v91_120(void) = Call[await_suspend] : func:r91_105, this:r0_32, 0:r91_119 -# 91| m91_121(unknown) = ^CallSideEffect : ~m91_118 -# 91| m91_122(unknown) = Chi : total:m91_118, partial:m91_121 -#-----| v0_33(void) = ^IndirectReadSideEffect[-1] : &:r0_32, ~m91_122 -#-----| Goto -> Block 4 +# 91| r91_64(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_65(glval) = FunctionAddress[unhandled_exception] : +# 91| v91_66(void) = Call[unhandled_exception] : func:r91_65, this:r91_64 +# 91| m91_67(unknown) = ^CallSideEffect : ~m0_22 +# 91| m91_68(unknown) = Chi : total:m0_22, partial:m91_67 +# 91| v91_69(void) = ^IndirectReadSideEffect[-1] : &:r91_64, ~m91_68 +# 91| m91_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_64 +# 91| m91_71(unknown) = Chi : total:m91_68, partial:m91_70 +#-----| Goto -> Block 6 + +#-----| Block 6 +#-----| m0_31(unknown) = Phi : from 3:~m0_22, from 5:~m91_71 +#-----| v0_32(void) = NoOp : +# 91| r91_72(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_73(glval) = FunctionAddress[final_suspend] : +# 91| r91_74(suspend_always) = Call[final_suspend] : func:r91_73, this:r91_72 +# 91| m91_75(unknown) = ^CallSideEffect : ~m0_31 +# 91| m91_76(unknown) = Chi : total:m0_31, partial:m91_75 +# 91| v91_77(void) = ^IndirectReadSideEffect[-1] : &:r91_72, ~m91_76 +# 91| m91_78(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_72 +# 91| m91_79(unknown) = Chi : total:m91_76, partial:m91_78 +#-----| r0_33(glval) = VariableAddress[#temp0:0] : +# 91| r91_80(glval) = VariableAddress[#temp91:21] : +# 91| r91_81(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_82(glval) = FunctionAddress[final_suspend] : +# 91| r91_83(suspend_always) = Call[final_suspend] : func:r91_82, this:r91_81 +# 91| m91_84(unknown) = ^CallSideEffect : ~m91_79 +# 91| m91_85(unknown) = Chi : total:m91_79, partial:m91_84 +# 91| v91_86(void) = ^IndirectReadSideEffect[-1] : &:r91_81, ~m91_85 +# 91| m91_87(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_81 +# 91| m91_88(unknown) = Chi : total:m91_85, partial:m91_87 +# 91| m91_89(suspend_always) = Store[#temp91:21] : &:r91_80, r91_83 +# 91| m91_90(unknown) = Chi : total:m91_88, partial:m91_89 +# 91| r91_91(suspend_always *) = CopyValue : r91_80 +# 91| m91_92(suspend_always *) = Store[#temp0:0] : &:r0_33, r91_91 +#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m91_92 +# 91| r91_93(glval) = CopyValue : r0_34 +# 91| r91_94(glval) = Convert : r91_93 +# 91| r91_95(glval) = FunctionAddress[await_ready] : +# 91| r91_96(bool) = Call[await_ready] : func:r91_95, this:r91_94 +# 91| m91_97(unknown) = ^CallSideEffect : ~m91_90 +# 91| m91_98(unknown) = Chi : total:m91_90, partial:m91_97 +# 91| v91_99(void) = ^IndirectReadSideEffect[-1] : &:r91_94, ~m91_98 +#-----| v0_35(void) = ConditionalBranch : r91_96 +#-----| False -> Block 8 +#-----| True -> Block 7 + +# 91| Block 7 +# 91| m91_100(unknown) = Phi : from 6:~m91_98, from 8:~m91_130 +# 91| r91_101(suspend_always *) = CopyValue : r91_91 +# 91| r91_102(glval) = CopyValue : r91_101 +#-----| r0_36(glval) = Convert : r91_102 +# 91| r91_103(glval) = FunctionAddress[await_resume] : +# 91| v91_104(void) = Call[await_resume] : func:r91_103, this:r0_36 +# 91| m91_105(unknown) = ^CallSideEffect : ~m91_100 +# 91| m91_106(unknown) = Chi : total:m91_100, partial:m91_105 +#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m91_106 +# 91| r91_107(glval) = VariableAddress[#return] : +# 91| v91_108(void) = ReturnValue : &:r91_107, ~m91_106 +# 91| v91_109(void) = AliasedUse : ~m91_106 +# 91| v91_110(void) = ExitFunction : + +# 91| Block 8 +# 91| r91_111(suspend_always *) = CopyValue : r91_91 +# 91| r91_112(glval) = CopyValue : r91_111 +#-----| r0_38(glval) = Convert : r91_112 +# 91| r91_113(glval) = FunctionAddress[await_suspend] : +# 91| r91_114(glval>) = VariableAddress[#temp91:21] : +# 91| m91_115(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_114 +# 91| m91_116(unknown) = Chi : total:m91_98, partial:m91_115 +# 91| r91_117(glval) = FunctionAddress[coroutine_handle] : +# 91| r91_118(glval>) = VariableAddress[(unnamed local variable)] : +# 91| r91_119(glval>) = Convert : r91_118 +# 91| r91_120(coroutine_handle &) = CopyValue : r91_119 +# 91| v91_121(void) = Call[coroutine_handle] : func:r91_117, this:r91_114, 0:r91_120 +# 91| m91_122(unknown) = ^CallSideEffect : ~m91_116 +# 91| m91_123(unknown) = Chi : total:m91_116, partial:m91_122 +# 91| v91_124(void) = ^BufferReadSideEffect[0] : &:r91_120, ~m91_123 +# 91| m91_125(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_114 +# 91| m91_126(unknown) = Chi : total:m91_123, partial:m91_125 +# 91| r91_127(coroutine_handle) = Load[#temp91:21] : &:r91_114, ~m91_126 +# 91| v91_128(void) = Call[await_suspend] : func:r91_113, this:r0_38, 0:r91_127 +# 91| m91_129(unknown) = ^CallSideEffect : ~m91_126 +# 91| m91_130(unknown) = Chi : total:m91_126, partial:m91_129 +#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m91_130 +#-----| Goto -> Block 7 + +# 91| Block 9 +# 91| v91_131(void) = Unreached : # 95| co_returnable_void co_yield_value_void(int) # 95| Block 0 @@ -1220,61 +1276,36 @@ coroutines.cpp: #-----| True -> Block 1 #-----| Block 1 -#-----| m0_8(unknown) = Phi : from 0:~m95_36, from 2:~m95_63 -#-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : -#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 -# 95| r95_38(suspend_always *) = CopyValue : r95_29 -# 95| r95_39(glval) = CopyValue : r95_38 -#-----| r0_12(glval) = Convert : r95_39 -# 95| r95_40(glval) = FunctionAddress[await_resume] : -# 95| v95_41(void) = Call[await_resume] : func:r95_40, this:r0_12 -# 95| m95_42(unknown) = ^CallSideEffect : ~m0_8 -# 95| m95_43(unknown) = Chi : total:m0_8, partial:m95_42 -#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m95_43 -#-----| v0_14(void) = CopyValue : v95_41 -# 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : -# 96| r96_2(glval) = FunctionAddress[yield_value] : -# 96| r96_3(glval) = VariableAddress[i] : -# 96| r96_4(int) = Load[i] : &:r96_3, m0_4 -# 96| r96_5(suspend_always) = Call[yield_value] : func:r96_2, this:r96_1, 0:r96_4 -# 96| m96_6(unknown) = ^CallSideEffect : ~m95_43 -# 96| m96_7(unknown) = Chi : total:m95_43, partial:m96_6 -# 96| v96_8(void) = ^IndirectReadSideEffect[-1] : &:r96_1, ~m96_7 -# 96| m96_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 -# 96| m96_10(unknown) = Chi : total:m96_7, partial:m96_9 -#-----| r0_15(glval) = VariableAddress[#temp0:0] : -# 96| r96_11(glval) = VariableAddress[#temp96:13] : -# 96| r96_12(glval) = VariableAddress[(unnamed local variable)] : -# 96| r96_13(glval) = FunctionAddress[yield_value] : -# 96| r96_14(glval) = VariableAddress[i] : -# 96| r96_15(int) = Load[i] : &:r96_14, m0_4 -# 96| r96_16(suspend_always) = Call[yield_value] : func:r96_13, this:r96_12, 0:r96_15 -# 96| m96_17(unknown) = ^CallSideEffect : ~m96_10 -# 96| m96_18(unknown) = Chi : total:m96_10, partial:m96_17 -# 96| v96_19(void) = ^IndirectReadSideEffect[-1] : &:r96_12, ~m96_18 -# 96| m96_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_12 -# 96| m96_21(unknown) = Chi : total:m96_18, partial:m96_20 -# 96| m96_22(suspend_always) = Store[#temp96:13] : &:r96_11, r96_16 -# 96| m96_23(unknown) = Chi : total:m96_21, partial:m96_22 -# 96| r96_24(suspend_always *) = CopyValue : r96_11 -# 96| m96_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r96_24 -#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m96_25 -# 96| r96_26(glval) = CopyValue : r0_16 -# 96| r96_27(glval) = Convert : r96_26 -# 96| r96_28(glval) = FunctionAddress[await_ready] : -# 96| r96_29(bool) = Call[await_ready] : func:r96_28, this:r96_27 -# 96| m96_30(unknown) = ^CallSideEffect : ~m96_23 -# 96| m96_31(unknown) = Chi : total:m96_23, partial:m96_30 -# 96| v96_32(void) = ^IndirectReadSideEffect[-1] : &:r96_27, ~m96_31 -# 96| v96_33(void) = ConditionalBranch : r96_29 -#-----| False -> Block 4 -#-----| True -> Block 3 +#-----| m0_8(unknown) = Phi : from 0:~m95_36, from 2:~m95_63 +#-----| r0_9(bool) = Constant[1] : +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 +# 95| r95_38(suspend_always *) = CopyValue : r95_29 +# 95| r95_39(glval) = CopyValue : r95_38 +#-----| r0_12(glval) = Convert : r95_39 +# 95| r95_40(glval) = FunctionAddress[await_resume] : +# 95| v95_41(void) = Call[await_resume] : func:r95_40, this:r0_12 +# 95| m95_42(unknown) = ^CallSideEffect : ~m0_8 +# 95| m95_43(unknown) = Chi : total:m0_8, partial:m95_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m95_43 +#-----| v0_14(void) = CopyValue : v95_41 +# 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : +# 96| r96_2(glval) = FunctionAddress[yield_value] : +# 96| r96_3(glval) = VariableAddress[i] : +# 96| r96_4(int) = Load[i] : &:r96_3, m0_4 +# 96| r96_5(suspend_always) = Call[yield_value] : func:r96_2, this:r96_1, 0:r96_4 +# 96| m96_6(unknown) = ^CallSideEffect : ~m95_43 +# 96| m96_7(unknown) = Chi : total:m95_43, partial:m96_6 +# 96| v96_8(void) = ^IndirectReadSideEffect[-1] : &:r96_1, ~m96_7 +# 96| m96_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 +# 96| m96_10(unknown) = Chi : total:m96_7, partial:m96_9 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 3 # 95| Block 2 # 95| r95_44(suspend_always *) = CopyValue : r95_29 # 95| r95_45(glval) = CopyValue : r95_44 -#-----| r0_17(glval) = Convert : r95_45 +#-----| r0_15(glval) = Convert : r95_45 # 95| r95_46(glval) = FunctionAddress[await_suspend] : # 95| r95_47(glval>) = VariableAddress[#temp95:20] : # 95| m95_48(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_47 @@ -1290,14 +1321,47 @@ coroutines.cpp: # 95| m95_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_47 # 95| m95_59(unknown) = Chi : total:m95_56, partial:m95_58 # 95| r95_60(coroutine_handle) = Load[#temp95:20] : &:r95_47, ~m95_59 -# 95| v95_61(void) = Call[await_suspend] : func:r95_46, this:r0_17, 0:r95_60 +# 95| v95_61(void) = Call[await_suspend] : func:r95_46, this:r0_15, 0:r95_60 # 95| m95_62(unknown) = ^CallSideEffect : ~m95_59 # 95| m95_63(unknown) = Chi : total:m95_59, partial:m95_62 -#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m95_63 +#-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m95_63 #-----| Goto -> Block 1 -# 96| Block 3 -# 96| m96_34(unknown) = Phi : from 1:~m96_31, from 4:~m96_60 +#-----| Block 3 +#-----| r0_17(glval) = VariableAddress[#temp0:0] : +# 96| r96_11(glval) = VariableAddress[#temp96:13] : +# 96| r96_12(glval) = VariableAddress[(unnamed local variable)] : +# 96| r96_13(glval) = FunctionAddress[yield_value] : +# 96| r96_14(glval) = VariableAddress[i] : +# 96| r96_15(int) = Load[i] : &:r96_14, m0_4 +# 96| r96_16(suspend_always) = Call[yield_value] : func:r96_13, this:r96_12, 0:r96_15 +# 96| m96_17(unknown) = ^CallSideEffect : ~m96_10 +# 96| m96_18(unknown) = Chi : total:m96_10, partial:m96_17 +# 96| v96_19(void) = ^IndirectReadSideEffect[-1] : &:r96_12, ~m96_18 +# 96| m96_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_12 +# 96| m96_21(unknown) = Chi : total:m96_18, partial:m96_20 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 4 + +# 96| Block 4 +# 96| m96_22(suspend_always) = Store[#temp96:13] : &:r96_11, r96_16 +# 96| m96_23(unknown) = Chi : total:m96_21, partial:m96_22 +# 96| r96_24(suspend_always *) = CopyValue : r96_11 +# 96| m96_25(suspend_always *) = Store[#temp0:0] : &:r0_17, r96_24 +#-----| r0_18(suspend_always *) = Load[#temp0:0] : &:r0_17, m96_25 +# 96| r96_26(glval) = CopyValue : r0_18 +# 96| r96_27(glval) = Convert : r96_26 +# 96| r96_28(glval) = FunctionAddress[await_ready] : +# 96| r96_29(bool) = Call[await_ready] : func:r96_28, this:r96_27 +# 96| m96_30(unknown) = ^CallSideEffect : ~m96_23 +# 96| m96_31(unknown) = Chi : total:m96_23, partial:m96_30 +# 96| v96_32(void) = ^IndirectReadSideEffect[-1] : &:r96_27, ~m96_31 +# 96| v96_33(void) = ConditionalBranch : r96_29 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 96| Block 5 +# 96| m96_34(unknown) = Phi : from 4:~m96_31, from 6:~m96_60 # 96| r96_35(suspend_always *) = CopyValue : r96_24 # 96| r96_36(glval) = CopyValue : r96_35 #-----| r0_19(glval) = Convert : r96_36 @@ -1314,14 +1378,13 @@ coroutines.cpp: #-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m0_25 #-----| m0_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_21 #-----| m0_28(unknown) = Chi : total:m0_25, partial:m0_27 -# 97| v97_1(void) = NoOp : -#-----| v0_29(void) = NoOp : -#-----| Goto (back edge) -> Block 5 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 7 -# 96| Block 4 +# 96| Block 6 # 96| r96_41(suspend_always *) = CopyValue : r96_24 # 96| r96_42(glval) = CopyValue : r96_41 -#-----| r0_30(glval) = Convert : r96_42 +#-----| r0_29(glval) = Convert : r96_42 # 96| r96_43(glval) = FunctionAddress[await_suspend] : # 96| r96_44(glval>) = VariableAddress[#temp96:3] : # 96| m96_45(coroutine_handle) = Uninitialized[#temp96:3] : &:r96_44 @@ -1337,87 +1400,117 @@ coroutines.cpp: # 96| m96_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r96_44 # 96| m96_56(unknown) = Chi : total:m96_53, partial:m96_55 # 96| r96_57(coroutine_handle) = Load[#temp96:3] : &:r96_44, ~m96_56 -# 96| v96_58(void) = Call[await_suspend] : func:r96_43, this:r0_30, 0:r96_57 +# 96| v96_58(void) = Call[await_suspend] : func:r96_43, this:r0_29, 0:r96_57 # 96| m96_59(unknown) = ^CallSideEffect : ~m96_56 # 96| m96_60(unknown) = Chi : total:m96_56, partial:m96_59 -#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m96_60 -#-----| Goto -> Block 3 +#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_29, ~m96_60 +#-----| Goto -> Block 5 -#-----| Block 5 -#-----| v0_32(void) = NoOp : -# 95| r95_64(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_65(glval) = FunctionAddress[final_suspend] : -# 95| r95_66(suspend_always) = Call[final_suspend] : func:r95_65, this:r95_64 -# 95| m95_67(unknown) = ^CallSideEffect : ~m0_28 -# 95| m95_68(unknown) = Chi : total:m0_28, partial:m95_67 -# 95| v95_69(void) = ^IndirectReadSideEffect[-1] : &:r95_64, ~m95_68 -# 95| m95_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_64 -# 95| m95_71(unknown) = Chi : total:m95_68, partial:m95_70 -#-----| r0_33(glval) = VariableAddress[#temp0:0] : -# 95| r95_72(glval) = VariableAddress[#temp95:20] : -# 95| r95_73(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_74(glval) = FunctionAddress[final_suspend] : -# 95| r95_75(suspend_always) = Call[final_suspend] : func:r95_74, this:r95_73 -# 95| m95_76(unknown) = ^CallSideEffect : ~m95_71 -# 95| m95_77(unknown) = Chi : total:m95_71, partial:m95_76 -# 95| v95_78(void) = ^IndirectReadSideEffect[-1] : &:r95_73, ~m95_77 -# 95| m95_79(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_73 -# 95| m95_80(unknown) = Chi : total:m95_77, partial:m95_79 -# 95| m95_81(suspend_always) = Store[#temp95:20] : &:r95_72, r95_75 -# 95| m95_82(unknown) = Chi : total:m95_80, partial:m95_81 -# 95| r95_83(suspend_always *) = CopyValue : r95_72 -# 95| m95_84(suspend_always *) = Store[#temp0:0] : &:r0_33, r95_83 -#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m95_84 -# 95| r95_85(glval) = CopyValue : r0_34 -# 95| r95_86(glval) = Convert : r95_85 -# 95| r95_87(glval) = FunctionAddress[await_ready] : -# 95| r95_88(bool) = Call[await_ready] : func:r95_87, this:r95_86 -# 95| m95_89(unknown) = ^CallSideEffect : ~m95_82 -# 95| m95_90(unknown) = Chi : total:m95_82, partial:m95_89 -# 95| v95_91(void) = ^IndirectReadSideEffect[-1] : &:r95_86, ~m95_90 -#-----| v0_35(void) = ConditionalBranch : r95_88 -#-----| False -> Block 7 -#-----| True -> Block 6 +# 97| Block 7 +# 97| v97_1(void) = NoOp : +#-----| v0_31(void) = NoOp : +#-----| Goto (back edge) -> Block 10 -# 95| Block 6 -# 95| m95_92(unknown) = Phi : from 5:~m95_90, from 7:~m95_122 -# 95| r95_93(suspend_always *) = CopyValue : r95_83 -# 95| r95_94(glval) = CopyValue : r95_93 -#-----| r0_36(glval) = Convert : r95_94 -# 95| r95_95(glval) = FunctionAddress[await_resume] : -# 95| v95_96(void) = Call[await_resume] : func:r95_95, this:r0_36 -# 95| m95_97(unknown) = ^CallSideEffect : ~m95_92 -# 95| m95_98(unknown) = Chi : total:m95_92, partial:m95_97 -#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m95_98 -# 95| r95_99(glval) = VariableAddress[#return] : -# 95| v95_100(void) = ReturnValue : &:r95_99, ~m95_98 -# 95| v95_101(void) = AliasedUse : ~m95_98 -# 95| v95_102(void) = ExitFunction : +#-----| Block 8 +#-----| m0_32(unknown) = Phi : from 1:~m96_10, from 3:~m96_21, from 5:~m0_28 +#-----| v0_33(void) = CatchAny : +#-----| r0_34(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_35(bool) = Load[(unnamed local variable)] : &:r0_34, m0_11 +#-----| r0_36(bool) = LogicalNot : r0_35 +#-----| v0_37(void) = ConditionalBranch : r0_36 +#-----| False -> Block 9 +#-----| True -> Block 13 -# 95| Block 7 -# 95| r95_103(suspend_always *) = CopyValue : r95_83 -# 95| r95_104(glval) = CopyValue : r95_103 -#-----| r0_38(glval) = Convert : r95_104 -# 95| r95_105(glval) = FunctionAddress[await_suspend] : -# 95| r95_106(glval>) = VariableAddress[#temp95:20] : -# 95| m95_107(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_106 -# 95| m95_108(unknown) = Chi : total:m95_90, partial:m95_107 -# 95| r95_109(glval) = FunctionAddress[coroutine_handle] : -# 95| r95_110(glval>) = VariableAddress[(unnamed local variable)] : -# 95| r95_111(glval>) = Convert : r95_110 -# 95| r95_112(coroutine_handle &) = CopyValue : r95_111 -# 95| v95_113(void) = Call[coroutine_handle] : func:r95_109, this:r95_106, 0:r95_112 -# 95| m95_114(unknown) = ^CallSideEffect : ~m95_108 -# 95| m95_115(unknown) = Chi : total:m95_108, partial:m95_114 -# 95| v95_116(void) = ^BufferReadSideEffect[0] : &:r95_112, ~m95_115 -# 95| m95_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_106 -# 95| m95_118(unknown) = Chi : total:m95_115, partial:m95_117 -# 95| r95_119(coroutine_handle) = Load[#temp95:20] : &:r95_106, ~m95_118 -# 95| v95_120(void) = Call[await_suspend] : func:r95_105, this:r0_38, 0:r95_119 -# 95| m95_121(unknown) = ^CallSideEffect : ~m95_118 -# 95| m95_122(unknown) = Chi : total:m95_118, partial:m95_121 -#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m95_122 -#-----| Goto -> Block 6 +# 95| Block 9 +# 95| r95_64(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_65(glval) = FunctionAddress[unhandled_exception] : +# 95| v95_66(void) = Call[unhandled_exception] : func:r95_65, this:r95_64 +# 95| m95_67(unknown) = ^CallSideEffect : ~m0_32 +# 95| m95_68(unknown) = Chi : total:m0_32, partial:m95_67 +# 95| v95_69(void) = ^IndirectReadSideEffect[-1] : &:r95_64, ~m95_68 +# 95| m95_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_64 +# 95| m95_71(unknown) = Chi : total:m95_68, partial:m95_70 +#-----| Goto -> Block 10 + +#-----| Block 10 +#-----| m0_38(unknown) = Phi : from 7:~m0_28, from 9:~m95_71 +#-----| v0_39(void) = NoOp : +# 95| r95_72(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_73(glval) = FunctionAddress[final_suspend] : +# 95| r95_74(suspend_always) = Call[final_suspend] : func:r95_73, this:r95_72 +# 95| m95_75(unknown) = ^CallSideEffect : ~m0_38 +# 95| m95_76(unknown) = Chi : total:m0_38, partial:m95_75 +# 95| v95_77(void) = ^IndirectReadSideEffect[-1] : &:r95_72, ~m95_76 +# 95| m95_78(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_72 +# 95| m95_79(unknown) = Chi : total:m95_76, partial:m95_78 +#-----| r0_40(glval) = VariableAddress[#temp0:0] : +# 95| r95_80(glval) = VariableAddress[#temp95:20] : +# 95| r95_81(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_82(glval) = FunctionAddress[final_suspend] : +# 95| r95_83(suspend_always) = Call[final_suspend] : func:r95_82, this:r95_81 +# 95| m95_84(unknown) = ^CallSideEffect : ~m95_79 +# 95| m95_85(unknown) = Chi : total:m95_79, partial:m95_84 +# 95| v95_86(void) = ^IndirectReadSideEffect[-1] : &:r95_81, ~m95_85 +# 95| m95_87(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_81 +# 95| m95_88(unknown) = Chi : total:m95_85, partial:m95_87 +# 95| m95_89(suspend_always) = Store[#temp95:20] : &:r95_80, r95_83 +# 95| m95_90(unknown) = Chi : total:m95_88, partial:m95_89 +# 95| r95_91(suspend_always *) = CopyValue : r95_80 +# 95| m95_92(suspend_always *) = Store[#temp0:0] : &:r0_40, r95_91 +#-----| r0_41(suspend_always *) = Load[#temp0:0] : &:r0_40, m95_92 +# 95| r95_93(glval) = CopyValue : r0_41 +# 95| r95_94(glval) = Convert : r95_93 +# 95| r95_95(glval) = FunctionAddress[await_ready] : +# 95| r95_96(bool) = Call[await_ready] : func:r95_95, this:r95_94 +# 95| m95_97(unknown) = ^CallSideEffect : ~m95_90 +# 95| m95_98(unknown) = Chi : total:m95_90, partial:m95_97 +# 95| v95_99(void) = ^IndirectReadSideEffect[-1] : &:r95_94, ~m95_98 +#-----| v0_42(void) = ConditionalBranch : r95_96 +#-----| False -> Block 12 +#-----| True -> Block 11 + +# 95| Block 11 +# 95| m95_100(unknown) = Phi : from 10:~m95_98, from 12:~m95_130 +# 95| r95_101(suspend_always *) = CopyValue : r95_91 +# 95| r95_102(glval) = CopyValue : r95_101 +#-----| r0_43(glval) = Convert : r95_102 +# 95| r95_103(glval) = FunctionAddress[await_resume] : +# 95| v95_104(void) = Call[await_resume] : func:r95_103, this:r0_43 +# 95| m95_105(unknown) = ^CallSideEffect : ~m95_100 +# 95| m95_106(unknown) = Chi : total:m95_100, partial:m95_105 +#-----| v0_44(void) = ^IndirectReadSideEffect[-1] : &:r0_43, ~m95_106 +# 95| r95_107(glval) = VariableAddress[#return] : +# 95| v95_108(void) = ReturnValue : &:r95_107, ~m95_106 +# 95| v95_109(void) = AliasedUse : ~m95_106 +# 95| v95_110(void) = ExitFunction : + +# 95| Block 12 +# 95| r95_111(suspend_always *) = CopyValue : r95_91 +# 95| r95_112(glval) = CopyValue : r95_111 +#-----| r0_45(glval) = Convert : r95_112 +# 95| r95_113(glval) = FunctionAddress[await_suspend] : +# 95| r95_114(glval>) = VariableAddress[#temp95:20] : +# 95| m95_115(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_114 +# 95| m95_116(unknown) = Chi : total:m95_98, partial:m95_115 +# 95| r95_117(glval) = FunctionAddress[coroutine_handle] : +# 95| r95_118(glval>) = VariableAddress[(unnamed local variable)] : +# 95| r95_119(glval>) = Convert : r95_118 +# 95| r95_120(coroutine_handle &) = CopyValue : r95_119 +# 95| v95_121(void) = Call[coroutine_handle] : func:r95_117, this:r95_114, 0:r95_120 +# 95| m95_122(unknown) = ^CallSideEffect : ~m95_116 +# 95| m95_123(unknown) = Chi : total:m95_116, partial:m95_122 +# 95| v95_124(void) = ^BufferReadSideEffect[0] : &:r95_120, ~m95_123 +# 95| m95_125(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_114 +# 95| m95_126(unknown) = Chi : total:m95_123, partial:m95_125 +# 95| r95_127(coroutine_handle) = Load[#temp95:20] : &:r95_114, ~m95_126 +# 95| v95_128(void) = Call[await_suspend] : func:r95_113, this:r0_45, 0:r95_127 +# 95| m95_129(unknown) = ^CallSideEffect : ~m95_126 +# 95| m95_130(unknown) = Chi : total:m95_126, partial:m95_129 +#-----| v0_46(void) = ^IndirectReadSideEffect[-1] : &:r0_45, ~m95_130 +#-----| Goto -> Block 11 + +# 95| Block 13 +# 95| v95_131(void) = Unreached : # 99| co_returnable_value co_yield_value_value(int) # 99| Block 0 @@ -1469,61 +1562,36 @@ coroutines.cpp: #-----| True -> Block 1 #-----| Block 1 -#-----| m0_8(unknown) = Phi : from 0:~m99_36, from 2:~m99_63 -#-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : -#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 -# 99| r99_38(suspend_always *) = CopyValue : r99_29 -# 99| r99_39(glval) = CopyValue : r99_38 -#-----| r0_12(glval) = Convert : r99_39 -# 99| r99_40(glval) = FunctionAddress[await_resume] : -# 99| v99_41(void) = Call[await_resume] : func:r99_40, this:r0_12 -# 99| m99_42(unknown) = ^CallSideEffect : ~m0_8 -# 99| m99_43(unknown) = Chi : total:m0_8, partial:m99_42 -#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m99_43 -#-----| v0_14(void) = CopyValue : v99_41 -# 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : -# 100| r100_2(glval) = FunctionAddress[yield_value] : -# 100| r100_3(glval) = VariableAddress[i] : -# 100| r100_4(int) = Load[i] : &:r100_3, m0_4 -# 100| r100_5(suspend_always) = Call[yield_value] : func:r100_2, this:r100_1, 0:r100_4 -# 100| m100_6(unknown) = ^CallSideEffect : ~m99_43 -# 100| m100_7(unknown) = Chi : total:m99_43, partial:m100_6 -# 100| v100_8(void) = ^IndirectReadSideEffect[-1] : &:r100_1, ~m100_7 -# 100| m100_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 -# 100| m100_10(unknown) = Chi : total:m100_7, partial:m100_9 -#-----| r0_15(glval) = VariableAddress[#temp0:0] : -# 100| r100_11(glval) = VariableAddress[#temp100:13] : -# 100| r100_12(glval) = VariableAddress[(unnamed local variable)] : -# 100| r100_13(glval) = FunctionAddress[yield_value] : -# 100| r100_14(glval) = VariableAddress[i] : -# 100| r100_15(int) = Load[i] : &:r100_14, m0_4 -# 100| r100_16(suspend_always) = Call[yield_value] : func:r100_13, this:r100_12, 0:r100_15 -# 100| m100_17(unknown) = ^CallSideEffect : ~m100_10 -# 100| m100_18(unknown) = Chi : total:m100_10, partial:m100_17 -# 100| v100_19(void) = ^IndirectReadSideEffect[-1] : &:r100_12, ~m100_18 -# 100| m100_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_12 -# 100| m100_21(unknown) = Chi : total:m100_18, partial:m100_20 -# 100| m100_22(suspend_always) = Store[#temp100:13] : &:r100_11, r100_16 -# 100| m100_23(unknown) = Chi : total:m100_21, partial:m100_22 -# 100| r100_24(suspend_always *) = CopyValue : r100_11 -# 100| m100_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r100_24 -#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m100_25 -# 100| r100_26(glval) = CopyValue : r0_16 -# 100| r100_27(glval) = Convert : r100_26 -# 100| r100_28(glval) = FunctionAddress[await_ready] : -# 100| r100_29(bool) = Call[await_ready] : func:r100_28, this:r100_27 -# 100| m100_30(unknown) = ^CallSideEffect : ~m100_23 -# 100| m100_31(unknown) = Chi : total:m100_23, partial:m100_30 -# 100| v100_32(void) = ^IndirectReadSideEffect[-1] : &:r100_27, ~m100_31 -# 100| v100_33(void) = ConditionalBranch : r100_29 -#-----| False -> Block 4 -#-----| True -> Block 3 +#-----| m0_8(unknown) = Phi : from 0:~m99_36, from 2:~m99_63 +#-----| r0_9(bool) = Constant[1] : +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 +# 99| r99_38(suspend_always *) = CopyValue : r99_29 +# 99| r99_39(glval) = CopyValue : r99_38 +#-----| r0_12(glval) = Convert : r99_39 +# 99| r99_40(glval) = FunctionAddress[await_resume] : +# 99| v99_41(void) = Call[await_resume] : func:r99_40, this:r0_12 +# 99| m99_42(unknown) = ^CallSideEffect : ~m0_8 +# 99| m99_43(unknown) = Chi : total:m0_8, partial:m99_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m99_43 +#-----| v0_14(void) = CopyValue : v99_41 +# 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : +# 100| r100_2(glval) = FunctionAddress[yield_value] : +# 100| r100_3(glval) = VariableAddress[i] : +# 100| r100_4(int) = Load[i] : &:r100_3, m0_4 +# 100| r100_5(suspend_always) = Call[yield_value] : func:r100_2, this:r100_1, 0:r100_4 +# 100| m100_6(unknown) = ^CallSideEffect : ~m99_43 +# 100| m100_7(unknown) = Chi : total:m99_43, partial:m100_6 +# 100| v100_8(void) = ^IndirectReadSideEffect[-1] : &:r100_1, ~m100_7 +# 100| m100_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 +# 100| m100_10(unknown) = Chi : total:m100_7, partial:m100_9 +#-----| C++ Exception -> Block 7 +#-----| Goto -> Block 3 # 99| Block 2 # 99| r99_44(suspend_always *) = CopyValue : r99_29 # 99| r99_45(glval) = CopyValue : r99_44 -#-----| r0_17(glval) = Convert : r99_45 +#-----| r0_15(glval) = Convert : r99_45 # 99| r99_46(glval) = FunctionAddress[await_suspend] : # 99| r99_47(glval>) = VariableAddress[#temp99:21] : # 99| m99_48(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_47 @@ -1539,61 +1607,61 @@ coroutines.cpp: # 99| m99_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_47 # 99| m99_59(unknown) = Chi : total:m99_56, partial:m99_58 # 99| r99_60(coroutine_handle) = Load[#temp99:21] : &:r99_47, ~m99_59 -# 99| v99_61(void) = Call[await_suspend] : func:r99_46, this:r0_17, 0:r99_60 +# 99| v99_61(void) = Call[await_suspend] : func:r99_46, this:r0_15, 0:r99_60 # 99| m99_62(unknown) = ^CallSideEffect : ~m99_59 # 99| m99_63(unknown) = Chi : total:m99_59, partial:m99_62 -#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m99_63 +#-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m99_63 #-----| Goto -> Block 1 -# 100| Block 3 -# 100| m100_34(unknown) = Phi : from 1:~m100_31, from 4:~m100_60 -# 100| r100_35(suspend_always *) = CopyValue : r100_24 -# 100| r100_36(glval) = CopyValue : r100_35 -#-----| r0_19(glval) = Convert : r100_36 -# 100| r100_37(glval) = FunctionAddress[await_resume] : -# 100| v100_38(void) = Call[await_resume] : func:r100_37, this:r0_19 -# 100| m100_39(unknown) = ^CallSideEffect : ~m100_34 -# 100| m100_40(unknown) = Chi : total:m100_34, partial:m100_39 -#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m100_40 -#-----| v0_21(void) = NoOp : -# 99| r99_64(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_65(glval) = FunctionAddress[final_suspend] : -# 99| r99_66(suspend_always) = Call[final_suspend] : func:r99_65, this:r99_64 -# 99| m99_67(unknown) = ^CallSideEffect : ~m100_40 -# 99| m99_68(unknown) = Chi : total:m100_40, partial:m99_67 -# 99| v99_69(void) = ^IndirectReadSideEffect[-1] : &:r99_64, ~m99_68 -# 99| m99_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_64 -# 99| m99_71(unknown) = Chi : total:m99_68, partial:m99_70 -#-----| r0_22(glval) = VariableAddress[#temp0:0] : -# 99| r99_72(glval) = VariableAddress[#temp99:21] : -# 99| r99_73(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_74(glval) = FunctionAddress[final_suspend] : -# 99| r99_75(suspend_always) = Call[final_suspend] : func:r99_74, this:r99_73 -# 99| m99_76(unknown) = ^CallSideEffect : ~m99_71 -# 99| m99_77(unknown) = Chi : total:m99_71, partial:m99_76 -# 99| v99_78(void) = ^IndirectReadSideEffect[-1] : &:r99_73, ~m99_77 -# 99| m99_79(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_73 -# 99| m99_80(unknown) = Chi : total:m99_77, partial:m99_79 -# 99| m99_81(suspend_always) = Store[#temp99:21] : &:r99_72, r99_75 -# 99| m99_82(unknown) = Chi : total:m99_80, partial:m99_81 -# 99| r99_83(suspend_always *) = CopyValue : r99_72 -# 99| m99_84(suspend_always *) = Store[#temp0:0] : &:r0_22, r99_83 -#-----| r0_23(suspend_always *) = Load[#temp0:0] : &:r0_22, m99_84 -# 99| r99_85(glval) = CopyValue : r0_23 -# 99| r99_86(glval) = Convert : r99_85 -# 99| r99_87(glval) = FunctionAddress[await_ready] : -# 99| r99_88(bool) = Call[await_ready] : func:r99_87, this:r99_86 -# 99| m99_89(unknown) = ^CallSideEffect : ~m99_82 -# 99| m99_90(unknown) = Chi : total:m99_82, partial:m99_89 -# 99| v99_91(void) = ^IndirectReadSideEffect[-1] : &:r99_86, ~m99_90 -#-----| v0_24(void) = ConditionalBranch : r99_88 +#-----| Block 3 +#-----| r0_17(glval) = VariableAddress[#temp0:0] : +# 100| r100_11(glval) = VariableAddress[#temp100:13] : +# 100| r100_12(glval) = VariableAddress[(unnamed local variable)] : +# 100| r100_13(glval) = FunctionAddress[yield_value] : +# 100| r100_14(glval) = VariableAddress[i] : +# 100| r100_15(int) = Load[i] : &:r100_14, m0_4 +# 100| r100_16(suspend_always) = Call[yield_value] : func:r100_13, this:r100_12, 0:r100_15 +# 100| m100_17(unknown) = ^CallSideEffect : ~m100_10 +# 100| m100_18(unknown) = Chi : total:m100_10, partial:m100_17 +# 100| v100_19(void) = ^IndirectReadSideEffect[-1] : &:r100_12, ~m100_18 +# 100| m100_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_12 +# 100| m100_21(unknown) = Chi : total:m100_18, partial:m100_20 +#-----| C++ Exception -> Block 7 +#-----| Goto -> Block 4 + +# 100| Block 4 +# 100| m100_22(suspend_always) = Store[#temp100:13] : &:r100_11, r100_16 +# 100| m100_23(unknown) = Chi : total:m100_21, partial:m100_22 +# 100| r100_24(suspend_always *) = CopyValue : r100_11 +# 100| m100_25(suspend_always *) = Store[#temp0:0] : &:r0_17, r100_24 +#-----| r0_18(suspend_always *) = Load[#temp0:0] : &:r0_17, m100_25 +# 100| r100_26(glval) = CopyValue : r0_18 +# 100| r100_27(glval) = Convert : r100_26 +# 100| r100_28(glval) = FunctionAddress[await_ready] : +# 100| r100_29(bool) = Call[await_ready] : func:r100_28, this:r100_27 +# 100| m100_30(unknown) = ^CallSideEffect : ~m100_23 +# 100| m100_31(unknown) = Chi : total:m100_23, partial:m100_30 +# 100| v100_32(void) = ^IndirectReadSideEffect[-1] : &:r100_27, ~m100_31 +# 100| v100_33(void) = ConditionalBranch : r100_29 #-----| False -> Block 6 #-----| True -> Block 5 -# 100| Block 4 +# 100| Block 5 +# 100| m100_34(unknown) = Phi : from 4:~m100_31, from 6:~m100_60 +# 100| r100_35(suspend_always *) = CopyValue : r100_24 +# 100| r100_36(glval) = CopyValue : r100_35 +#-----| r0_19(glval) = Convert : r100_36 +# 100| r100_37(glval) = FunctionAddress[await_resume] : +# 100| v100_38(void) = Call[await_resume] : func:r100_37, this:r0_19 +# 100| m100_39(unknown) = ^CallSideEffect : ~m100_34 +# 100| m100_40(unknown) = Chi : total:m100_34, partial:m100_39 +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m100_40 +#-----| Goto -> Block 9 + +# 100| Block 6 # 100| r100_41(suspend_always *) = CopyValue : r100_24 # 100| r100_42(glval) = CopyValue : r100_41 -#-----| r0_25(glval) = Convert : r100_42 +#-----| r0_21(glval) = Convert : r100_42 # 100| r100_43(glval) = FunctionAddress[await_suspend] : # 100| r100_44(glval>) = VariableAddress[#temp100:3] : # 100| m100_45(coroutine_handle) = Uninitialized[#temp100:3] : &:r100_44 @@ -1609,52 +1677,113 @@ coroutines.cpp: # 100| m100_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r100_44 # 100| m100_56(unknown) = Chi : total:m100_53, partial:m100_55 # 100| r100_57(coroutine_handle) = Load[#temp100:3] : &:r100_44, ~m100_56 -# 100| v100_58(void) = Call[await_suspend] : func:r100_43, this:r0_25, 0:r100_57 +# 100| v100_58(void) = Call[await_suspend] : func:r100_43, this:r0_21, 0:r100_57 # 100| m100_59(unknown) = ^CallSideEffect : ~m100_56 # 100| m100_60(unknown) = Chi : total:m100_56, partial:m100_59 -#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_25, ~m100_60 -#-----| Goto -> Block 3 - -# 99| Block 5 -# 99| m99_92(unknown) = Phi : from 3:~m99_90, from 6:~m99_122 -# 99| r99_93(suspend_always *) = CopyValue : r99_83 -# 99| r99_94(glval) = CopyValue : r99_93 -#-----| r0_27(glval) = Convert : r99_94 -# 99| r99_95(glval) = FunctionAddress[await_resume] : -# 99| v99_96(void) = Call[await_resume] : func:r99_95, this:r0_27 -# 99| m99_97(unknown) = ^CallSideEffect : ~m99_92 -# 99| m99_98(unknown) = Chi : total:m99_92, partial:m99_97 -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m99_98 -# 99| r99_99(glval) = VariableAddress[#return] : -# 99| v99_100(void) = ReturnValue : &:r99_99, ~m99_98 -# 99| v99_101(void) = AliasedUse : ~m99_98 -# 99| v99_102(void) = ExitFunction : - -# 99| Block 6 -# 99| r99_103(suspend_always *) = CopyValue : r99_83 -# 99| r99_104(glval) = CopyValue : r99_103 -#-----| r0_29(glval) = Convert : r99_104 -# 99| r99_105(glval) = FunctionAddress[await_suspend] : -# 99| r99_106(glval>) = VariableAddress[#temp99:21] : -# 99| m99_107(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_106 -# 99| m99_108(unknown) = Chi : total:m99_90, partial:m99_107 -# 99| r99_109(glval) = FunctionAddress[coroutine_handle] : -# 99| r99_110(glval>) = VariableAddress[(unnamed local variable)] : -# 99| r99_111(glval>) = Convert : r99_110 -# 99| r99_112(coroutine_handle &) = CopyValue : r99_111 -# 99| v99_113(void) = Call[coroutine_handle] : func:r99_109, this:r99_106, 0:r99_112 -# 99| m99_114(unknown) = ^CallSideEffect : ~m99_108 -# 99| m99_115(unknown) = Chi : total:m99_108, partial:m99_114 -# 99| v99_116(void) = ^BufferReadSideEffect[0] : &:r99_112, ~m99_115 -# 99| m99_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_106 -# 99| m99_118(unknown) = Chi : total:m99_115, partial:m99_117 -# 99| r99_119(coroutine_handle) = Load[#temp99:21] : &:r99_106, ~m99_118 -# 99| v99_120(void) = Call[await_suspend] : func:r99_105, this:r0_29, 0:r99_119 -# 99| m99_121(unknown) = ^CallSideEffect : ~m99_118 -# 99| m99_122(unknown) = Chi : total:m99_118, partial:m99_121 -#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_29, ~m99_122 +#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m100_60 #-----| Goto -> Block 5 +#-----| Block 7 +#-----| m0_23(unknown) = Phi : from 1:~m100_10, from 3:~m100_21 +#-----| v0_24(void) = CatchAny : +#-----| r0_25(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_26(bool) = Load[(unnamed local variable)] : &:r0_25, m0_11 +#-----| r0_27(bool) = LogicalNot : r0_26 +#-----| v0_28(void) = ConditionalBranch : r0_27 +#-----| False -> Block 8 +#-----| True -> Block 12 + +# 99| Block 8 +# 99| r99_64(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_65(glval) = FunctionAddress[unhandled_exception] : +# 99| v99_66(void) = Call[unhandled_exception] : func:r99_65, this:r99_64 +# 99| m99_67(unknown) = ^CallSideEffect : ~m0_23 +# 99| m99_68(unknown) = Chi : total:m0_23, partial:m99_67 +# 99| v99_69(void) = ^IndirectReadSideEffect[-1] : &:r99_64, ~m99_68 +# 99| m99_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_64 +# 99| m99_71(unknown) = Chi : total:m99_68, partial:m99_70 +#-----| Goto -> Block 9 + +#-----| Block 9 +#-----| m0_29(unknown) = Phi : from 5:~m100_40, from 8:~m99_71 +#-----| v0_30(void) = NoOp : +# 99| r99_72(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_73(glval) = FunctionAddress[final_suspend] : +# 99| r99_74(suspend_always) = Call[final_suspend] : func:r99_73, this:r99_72 +# 99| m99_75(unknown) = ^CallSideEffect : ~m0_29 +# 99| m99_76(unknown) = Chi : total:m0_29, partial:m99_75 +# 99| v99_77(void) = ^IndirectReadSideEffect[-1] : &:r99_72, ~m99_76 +# 99| m99_78(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_72 +# 99| m99_79(unknown) = Chi : total:m99_76, partial:m99_78 +#-----| r0_31(glval) = VariableAddress[#temp0:0] : +# 99| r99_80(glval) = VariableAddress[#temp99:21] : +# 99| r99_81(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_82(glval) = FunctionAddress[final_suspend] : +# 99| r99_83(suspend_always) = Call[final_suspend] : func:r99_82, this:r99_81 +# 99| m99_84(unknown) = ^CallSideEffect : ~m99_79 +# 99| m99_85(unknown) = Chi : total:m99_79, partial:m99_84 +# 99| v99_86(void) = ^IndirectReadSideEffect[-1] : &:r99_81, ~m99_85 +# 99| m99_87(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_81 +# 99| m99_88(unknown) = Chi : total:m99_85, partial:m99_87 +# 99| m99_89(suspend_always) = Store[#temp99:21] : &:r99_80, r99_83 +# 99| m99_90(unknown) = Chi : total:m99_88, partial:m99_89 +# 99| r99_91(suspend_always *) = CopyValue : r99_80 +# 99| m99_92(suspend_always *) = Store[#temp0:0] : &:r0_31, r99_91 +#-----| r0_32(suspend_always *) = Load[#temp0:0] : &:r0_31, m99_92 +# 99| r99_93(glval) = CopyValue : r0_32 +# 99| r99_94(glval) = Convert : r99_93 +# 99| r99_95(glval) = FunctionAddress[await_ready] : +# 99| r99_96(bool) = Call[await_ready] : func:r99_95, this:r99_94 +# 99| m99_97(unknown) = ^CallSideEffect : ~m99_90 +# 99| m99_98(unknown) = Chi : total:m99_90, partial:m99_97 +# 99| v99_99(void) = ^IndirectReadSideEffect[-1] : &:r99_94, ~m99_98 +#-----| v0_33(void) = ConditionalBranch : r99_96 +#-----| False -> Block 11 +#-----| True -> Block 10 + +# 99| Block 10 +# 99| m99_100(unknown) = Phi : from 9:~m99_98, from 11:~m99_130 +# 99| r99_101(suspend_always *) = CopyValue : r99_91 +# 99| r99_102(glval) = CopyValue : r99_101 +#-----| r0_34(glval) = Convert : r99_102 +# 99| r99_103(glval) = FunctionAddress[await_resume] : +# 99| v99_104(void) = Call[await_resume] : func:r99_103, this:r0_34 +# 99| m99_105(unknown) = ^CallSideEffect : ~m99_100 +# 99| m99_106(unknown) = Chi : total:m99_100, partial:m99_105 +#-----| v0_35(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~m99_106 +# 99| r99_107(glval) = VariableAddress[#return] : +# 99| v99_108(void) = ReturnValue : &:r99_107, ~m99_106 +# 99| v99_109(void) = AliasedUse : ~m99_106 +# 99| v99_110(void) = ExitFunction : + +# 99| Block 11 +# 99| r99_111(suspend_always *) = CopyValue : r99_91 +# 99| r99_112(glval) = CopyValue : r99_111 +#-----| r0_36(glval) = Convert : r99_112 +# 99| r99_113(glval) = FunctionAddress[await_suspend] : +# 99| r99_114(glval>) = VariableAddress[#temp99:21] : +# 99| m99_115(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_114 +# 99| m99_116(unknown) = Chi : total:m99_98, partial:m99_115 +# 99| r99_117(glval) = FunctionAddress[coroutine_handle] : +# 99| r99_118(glval>) = VariableAddress[(unnamed local variable)] : +# 99| r99_119(glval>) = Convert : r99_118 +# 99| r99_120(coroutine_handle &) = CopyValue : r99_119 +# 99| v99_121(void) = Call[coroutine_handle] : func:r99_117, this:r99_114, 0:r99_120 +# 99| m99_122(unknown) = ^CallSideEffect : ~m99_116 +# 99| m99_123(unknown) = Chi : total:m99_116, partial:m99_122 +# 99| v99_124(void) = ^BufferReadSideEffect[0] : &:r99_120, ~m99_123 +# 99| m99_125(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_114 +# 99| m99_126(unknown) = Chi : total:m99_123, partial:m99_125 +# 99| r99_127(coroutine_handle) = Load[#temp99:21] : &:r99_114, ~m99_126 +# 99| v99_128(void) = Call[await_suspend] : func:r99_113, this:r0_36, 0:r99_127 +# 99| m99_129(unknown) = ^CallSideEffect : ~m99_126 +# 99| m99_130(unknown) = Chi : total:m99_126, partial:m99_129 +#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m99_130 +#-----| Goto -> Block 10 + +# 99| Block 12 +# 99| v99_131(void) = Unreached : + # 103| co_returnable_void co_yield_and_return_void(int) # 103| Block 0 # 103| v103_1(void) = EnterFunction : @@ -1728,38 +1857,13 @@ coroutines.cpp: # 104| v104_8(void) = ^IndirectReadSideEffect[-1] : &:r104_1, ~m104_7 # 104| m104_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_1 # 104| m104_10(unknown) = Chi : total:m104_7, partial:m104_9 -#-----| r0_15(glval) = VariableAddress[#temp0:0] : -# 104| r104_11(glval) = VariableAddress[#temp104:13] : -# 104| r104_12(glval) = VariableAddress[(unnamed local variable)] : -# 104| r104_13(glval) = FunctionAddress[yield_value] : -# 104| r104_14(glval) = VariableAddress[i] : -# 104| r104_15(int) = Load[i] : &:r104_14, m0_4 -# 104| r104_16(suspend_always) = Call[yield_value] : func:r104_13, this:r104_12, 0:r104_15 -# 104| m104_17(unknown) = ^CallSideEffect : ~m104_10 -# 104| m104_18(unknown) = Chi : total:m104_10, partial:m104_17 -# 104| v104_19(void) = ^IndirectReadSideEffect[-1] : &:r104_12, ~m104_18 -# 104| m104_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_12 -# 104| m104_21(unknown) = Chi : total:m104_18, partial:m104_20 -# 104| m104_22(suspend_always) = Store[#temp104:13] : &:r104_11, r104_16 -# 104| m104_23(unknown) = Chi : total:m104_21, partial:m104_22 -# 104| r104_24(suspend_always *) = CopyValue : r104_11 -# 104| m104_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r104_24 -#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m104_25 -# 104| r104_26(glval) = CopyValue : r0_16 -# 104| r104_27(glval) = Convert : r104_26 -# 104| r104_28(glval) = FunctionAddress[await_ready] : -# 104| r104_29(bool) = Call[await_ready] : func:r104_28, this:r104_27 -# 104| m104_30(unknown) = ^CallSideEffect : ~m104_23 -# 104| m104_31(unknown) = Chi : total:m104_23, partial:m104_30 -# 104| v104_32(void) = ^IndirectReadSideEffect[-1] : &:r104_27, ~m104_31 -# 104| v104_33(void) = ConditionalBranch : r104_29 -#-----| False -> Block 4 -#-----| True -> Block 3 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 3 # 103| Block 2 # 103| r103_44(suspend_always *) = CopyValue : r103_29 # 103| r103_45(glval) = CopyValue : r103_44 -#-----| r0_17(glval) = Convert : r103_45 +#-----| r0_15(glval) = Convert : r103_45 # 103| r103_46(glval) = FunctionAddress[await_suspend] : # 103| r103_47(glval>) = VariableAddress[#temp103:20] : # 103| m103_48(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_47 @@ -1775,14 +1879,47 @@ coroutines.cpp: # 103| m103_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_47 # 103| m103_59(unknown) = Chi : total:m103_56, partial:m103_58 # 103| r103_60(coroutine_handle) = Load[#temp103:20] : &:r103_47, ~m103_59 -# 103| v103_61(void) = Call[await_suspend] : func:r103_46, this:r0_17, 0:r103_60 +# 103| v103_61(void) = Call[await_suspend] : func:r103_46, this:r0_15, 0:r103_60 # 103| m103_62(unknown) = ^CallSideEffect : ~m103_59 # 103| m103_63(unknown) = Chi : total:m103_59, partial:m103_62 -#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m103_63 +#-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m103_63 #-----| Goto -> Block 1 -# 104| Block 3 -# 104| m104_34(unknown) = Phi : from 1:~m104_31, from 4:~m104_60 +#-----| Block 3 +#-----| r0_17(glval) = VariableAddress[#temp0:0] : +# 104| r104_11(glval) = VariableAddress[#temp104:13] : +# 104| r104_12(glval) = VariableAddress[(unnamed local variable)] : +# 104| r104_13(glval) = FunctionAddress[yield_value] : +# 104| r104_14(glval) = VariableAddress[i] : +# 104| r104_15(int) = Load[i] : &:r104_14, m0_4 +# 104| r104_16(suspend_always) = Call[yield_value] : func:r104_13, this:r104_12, 0:r104_15 +# 104| m104_17(unknown) = ^CallSideEffect : ~m104_10 +# 104| m104_18(unknown) = Chi : total:m104_10, partial:m104_17 +# 104| v104_19(void) = ^IndirectReadSideEffect[-1] : &:r104_12, ~m104_18 +# 104| m104_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_12 +# 104| m104_21(unknown) = Chi : total:m104_18, partial:m104_20 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 4 + +# 104| Block 4 +# 104| m104_22(suspend_always) = Store[#temp104:13] : &:r104_11, r104_16 +# 104| m104_23(unknown) = Chi : total:m104_21, partial:m104_22 +# 104| r104_24(suspend_always *) = CopyValue : r104_11 +# 104| m104_25(suspend_always *) = Store[#temp0:0] : &:r0_17, r104_24 +#-----| r0_18(suspend_always *) = Load[#temp0:0] : &:r0_17, m104_25 +# 104| r104_26(glval) = CopyValue : r0_18 +# 104| r104_27(glval) = Convert : r104_26 +# 104| r104_28(glval) = FunctionAddress[await_ready] : +# 104| r104_29(bool) = Call[await_ready] : func:r104_28, this:r104_27 +# 104| m104_30(unknown) = ^CallSideEffect : ~m104_23 +# 104| m104_31(unknown) = Chi : total:m104_23, partial:m104_30 +# 104| v104_32(void) = ^IndirectReadSideEffect[-1] : &:r104_27, ~m104_31 +# 104| v104_33(void) = ConditionalBranch : r104_29 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 104| Block 5 +# 104| m104_34(unknown) = Phi : from 4:~m104_31, from 6:~m104_60 # 104| r104_35(suspend_always *) = CopyValue : r104_24 # 104| r104_36(glval) = CopyValue : r104_35 #-----| r0_19(glval) = Convert : r104_36 @@ -1799,14 +1936,13 @@ coroutines.cpp: #-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m0_25 #-----| m0_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_21 #-----| m0_28(unknown) = Chi : total:m0_25, partial:m0_27 -# 105| v105_1(void) = NoOp : -#-----| v0_29(void) = NoOp : -#-----| Goto (back edge) -> Block 5 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 7 -# 104| Block 4 +# 104| Block 6 # 104| r104_41(suspend_always *) = CopyValue : r104_24 # 104| r104_42(glval) = CopyValue : r104_41 -#-----| r0_30(glval) = Convert : r104_42 +#-----| r0_29(glval) = Convert : r104_42 # 104| r104_43(glval) = FunctionAddress[await_suspend] : # 104| r104_44(glval>) = VariableAddress[#temp104:3] : # 104| m104_45(coroutine_handle) = Uninitialized[#temp104:3] : &:r104_44 @@ -1822,87 +1958,117 @@ coroutines.cpp: # 104| m104_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r104_44 # 104| m104_56(unknown) = Chi : total:m104_53, partial:m104_55 # 104| r104_57(coroutine_handle) = Load[#temp104:3] : &:r104_44, ~m104_56 -# 104| v104_58(void) = Call[await_suspend] : func:r104_43, this:r0_30, 0:r104_57 +# 104| v104_58(void) = Call[await_suspend] : func:r104_43, this:r0_29, 0:r104_57 # 104| m104_59(unknown) = ^CallSideEffect : ~m104_56 # 104| m104_60(unknown) = Chi : total:m104_56, partial:m104_59 -#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m104_60 -#-----| Goto -> Block 3 +#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_29, ~m104_60 +#-----| Goto -> Block 5 -#-----| Block 5 -#-----| v0_32(void) = NoOp : -# 103| r103_64(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_65(glval) = FunctionAddress[final_suspend] : -# 103| r103_66(suspend_always) = Call[final_suspend] : func:r103_65, this:r103_64 -# 103| m103_67(unknown) = ^CallSideEffect : ~m0_28 -# 103| m103_68(unknown) = Chi : total:m0_28, partial:m103_67 -# 103| v103_69(void) = ^IndirectReadSideEffect[-1] : &:r103_64, ~m103_68 -# 103| m103_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_64 -# 103| m103_71(unknown) = Chi : total:m103_68, partial:m103_70 -#-----| r0_33(glval) = VariableAddress[#temp0:0] : -# 103| r103_72(glval) = VariableAddress[#temp103:20] : -# 103| r103_73(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_74(glval) = FunctionAddress[final_suspend] : -# 103| r103_75(suspend_always) = Call[final_suspend] : func:r103_74, this:r103_73 -# 103| m103_76(unknown) = ^CallSideEffect : ~m103_71 -# 103| m103_77(unknown) = Chi : total:m103_71, partial:m103_76 -# 103| v103_78(void) = ^IndirectReadSideEffect[-1] : &:r103_73, ~m103_77 -# 103| m103_79(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_73 -# 103| m103_80(unknown) = Chi : total:m103_77, partial:m103_79 -# 103| m103_81(suspend_always) = Store[#temp103:20] : &:r103_72, r103_75 -# 103| m103_82(unknown) = Chi : total:m103_80, partial:m103_81 -# 103| r103_83(suspend_always *) = CopyValue : r103_72 -# 103| m103_84(suspend_always *) = Store[#temp0:0] : &:r0_33, r103_83 -#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m103_84 -# 103| r103_85(glval) = CopyValue : r0_34 -# 103| r103_86(glval) = Convert : r103_85 -# 103| r103_87(glval) = FunctionAddress[await_ready] : -# 103| r103_88(bool) = Call[await_ready] : func:r103_87, this:r103_86 -# 103| m103_89(unknown) = ^CallSideEffect : ~m103_82 -# 103| m103_90(unknown) = Chi : total:m103_82, partial:m103_89 -# 103| v103_91(void) = ^IndirectReadSideEffect[-1] : &:r103_86, ~m103_90 -#-----| v0_35(void) = ConditionalBranch : r103_88 -#-----| False -> Block 7 -#-----| True -> Block 6 +# 105| Block 7 +# 105| v105_1(void) = NoOp : +#-----| v0_31(void) = NoOp : +#-----| Goto (back edge) -> Block 10 -# 103| Block 6 -# 103| m103_92(unknown) = Phi : from 5:~m103_90, from 7:~m103_122 -# 103| r103_93(suspend_always *) = CopyValue : r103_83 -# 103| r103_94(glval) = CopyValue : r103_93 -#-----| r0_36(glval) = Convert : r103_94 -# 103| r103_95(glval) = FunctionAddress[await_resume] : -# 103| v103_96(void) = Call[await_resume] : func:r103_95, this:r0_36 -# 103| m103_97(unknown) = ^CallSideEffect : ~m103_92 -# 103| m103_98(unknown) = Chi : total:m103_92, partial:m103_97 -#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m103_98 -# 103| r103_99(glval) = VariableAddress[#return] : -# 103| v103_100(void) = ReturnValue : &:r103_99, ~m103_98 -# 103| v103_101(void) = AliasedUse : ~m103_98 -# 103| v103_102(void) = ExitFunction : +#-----| Block 8 +#-----| m0_32(unknown) = Phi : from 1:~m104_10, from 3:~m104_21, from 5:~m0_28 +#-----| v0_33(void) = CatchAny : +#-----| r0_34(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_35(bool) = Load[(unnamed local variable)] : &:r0_34, m0_11 +#-----| r0_36(bool) = LogicalNot : r0_35 +#-----| v0_37(void) = ConditionalBranch : r0_36 +#-----| False -> Block 9 +#-----| True -> Block 13 -# 103| Block 7 -# 103| r103_103(suspend_always *) = CopyValue : r103_83 -# 103| r103_104(glval) = CopyValue : r103_103 -#-----| r0_38(glval) = Convert : r103_104 -# 103| r103_105(glval) = FunctionAddress[await_suspend] : -# 103| r103_106(glval>) = VariableAddress[#temp103:20] : -# 103| m103_107(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_106 -# 103| m103_108(unknown) = Chi : total:m103_90, partial:m103_107 -# 103| r103_109(glval) = FunctionAddress[coroutine_handle] : -# 103| r103_110(glval>) = VariableAddress[(unnamed local variable)] : -# 103| r103_111(glval>) = Convert : r103_110 -# 103| r103_112(coroutine_handle &) = CopyValue : r103_111 -# 103| v103_113(void) = Call[coroutine_handle] : func:r103_109, this:r103_106, 0:r103_112 -# 103| m103_114(unknown) = ^CallSideEffect : ~m103_108 -# 103| m103_115(unknown) = Chi : total:m103_108, partial:m103_114 -# 103| v103_116(void) = ^BufferReadSideEffect[0] : &:r103_112, ~m103_115 -# 103| m103_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_106 -# 103| m103_118(unknown) = Chi : total:m103_115, partial:m103_117 -# 103| r103_119(coroutine_handle) = Load[#temp103:20] : &:r103_106, ~m103_118 -# 103| v103_120(void) = Call[await_suspend] : func:r103_105, this:r0_38, 0:r103_119 -# 103| m103_121(unknown) = ^CallSideEffect : ~m103_118 -# 103| m103_122(unknown) = Chi : total:m103_118, partial:m103_121 -#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m103_122 -#-----| Goto -> Block 6 +# 103| Block 9 +# 103| r103_64(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_65(glval) = FunctionAddress[unhandled_exception] : +# 103| v103_66(void) = Call[unhandled_exception] : func:r103_65, this:r103_64 +# 103| m103_67(unknown) = ^CallSideEffect : ~m0_32 +# 103| m103_68(unknown) = Chi : total:m0_32, partial:m103_67 +# 103| v103_69(void) = ^IndirectReadSideEffect[-1] : &:r103_64, ~m103_68 +# 103| m103_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_64 +# 103| m103_71(unknown) = Chi : total:m103_68, partial:m103_70 +#-----| Goto -> Block 10 + +#-----| Block 10 +#-----| m0_38(unknown) = Phi : from 7:~m0_28, from 9:~m103_71 +#-----| v0_39(void) = NoOp : +# 103| r103_72(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_73(glval) = FunctionAddress[final_suspend] : +# 103| r103_74(suspend_always) = Call[final_suspend] : func:r103_73, this:r103_72 +# 103| m103_75(unknown) = ^CallSideEffect : ~m0_38 +# 103| m103_76(unknown) = Chi : total:m0_38, partial:m103_75 +# 103| v103_77(void) = ^IndirectReadSideEffect[-1] : &:r103_72, ~m103_76 +# 103| m103_78(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_72 +# 103| m103_79(unknown) = Chi : total:m103_76, partial:m103_78 +#-----| r0_40(glval) = VariableAddress[#temp0:0] : +# 103| r103_80(glval) = VariableAddress[#temp103:20] : +# 103| r103_81(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_82(glval) = FunctionAddress[final_suspend] : +# 103| r103_83(suspend_always) = Call[final_suspend] : func:r103_82, this:r103_81 +# 103| m103_84(unknown) = ^CallSideEffect : ~m103_79 +# 103| m103_85(unknown) = Chi : total:m103_79, partial:m103_84 +# 103| v103_86(void) = ^IndirectReadSideEffect[-1] : &:r103_81, ~m103_85 +# 103| m103_87(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_81 +# 103| m103_88(unknown) = Chi : total:m103_85, partial:m103_87 +# 103| m103_89(suspend_always) = Store[#temp103:20] : &:r103_80, r103_83 +# 103| m103_90(unknown) = Chi : total:m103_88, partial:m103_89 +# 103| r103_91(suspend_always *) = CopyValue : r103_80 +# 103| m103_92(suspend_always *) = Store[#temp0:0] : &:r0_40, r103_91 +#-----| r0_41(suspend_always *) = Load[#temp0:0] : &:r0_40, m103_92 +# 103| r103_93(glval) = CopyValue : r0_41 +# 103| r103_94(glval) = Convert : r103_93 +# 103| r103_95(glval) = FunctionAddress[await_ready] : +# 103| r103_96(bool) = Call[await_ready] : func:r103_95, this:r103_94 +# 103| m103_97(unknown) = ^CallSideEffect : ~m103_90 +# 103| m103_98(unknown) = Chi : total:m103_90, partial:m103_97 +# 103| v103_99(void) = ^IndirectReadSideEffect[-1] : &:r103_94, ~m103_98 +#-----| v0_42(void) = ConditionalBranch : r103_96 +#-----| False -> Block 12 +#-----| True -> Block 11 + +# 103| Block 11 +# 103| m103_100(unknown) = Phi : from 10:~m103_98, from 12:~m103_130 +# 103| r103_101(suspend_always *) = CopyValue : r103_91 +# 103| r103_102(glval) = CopyValue : r103_101 +#-----| r0_43(glval) = Convert : r103_102 +# 103| r103_103(glval) = FunctionAddress[await_resume] : +# 103| v103_104(void) = Call[await_resume] : func:r103_103, this:r0_43 +# 103| m103_105(unknown) = ^CallSideEffect : ~m103_100 +# 103| m103_106(unknown) = Chi : total:m103_100, partial:m103_105 +#-----| v0_44(void) = ^IndirectReadSideEffect[-1] : &:r0_43, ~m103_106 +# 103| r103_107(glval) = VariableAddress[#return] : +# 103| v103_108(void) = ReturnValue : &:r103_107, ~m103_106 +# 103| v103_109(void) = AliasedUse : ~m103_106 +# 103| v103_110(void) = ExitFunction : + +# 103| Block 12 +# 103| r103_111(suspend_always *) = CopyValue : r103_91 +# 103| r103_112(glval) = CopyValue : r103_111 +#-----| r0_45(glval) = Convert : r103_112 +# 103| r103_113(glval) = FunctionAddress[await_suspend] : +# 103| r103_114(glval>) = VariableAddress[#temp103:20] : +# 103| m103_115(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_114 +# 103| m103_116(unknown) = Chi : total:m103_98, partial:m103_115 +# 103| r103_117(glval) = FunctionAddress[coroutine_handle] : +# 103| r103_118(glval>) = VariableAddress[(unnamed local variable)] : +# 103| r103_119(glval>) = Convert : r103_118 +# 103| r103_120(coroutine_handle &) = CopyValue : r103_119 +# 103| v103_121(void) = Call[coroutine_handle] : func:r103_117, this:r103_114, 0:r103_120 +# 103| m103_122(unknown) = ^CallSideEffect : ~m103_116 +# 103| m103_123(unknown) = Chi : total:m103_116, partial:m103_122 +# 103| v103_124(void) = ^BufferReadSideEffect[0] : &:r103_120, ~m103_123 +# 103| m103_125(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_114 +# 103| m103_126(unknown) = Chi : total:m103_123, partial:m103_125 +# 103| r103_127(coroutine_handle) = Load[#temp103:20] : &:r103_114, ~m103_126 +# 103| v103_128(void) = Call[await_suspend] : func:r103_113, this:r0_45, 0:r103_127 +# 103| m103_129(unknown) = ^CallSideEffect : ~m103_126 +# 103| m103_130(unknown) = Chi : total:m103_126, partial:m103_129 +#-----| v0_46(void) = ^IndirectReadSideEffect[-1] : &:r0_45, ~m103_130 +#-----| Goto -> Block 11 + +# 103| Block 13 +# 103| v103_131(void) = Unreached : # 108| co_returnable_value co_yield_and_return_value(int) # 108| Block 0 @@ -1977,38 +2143,13 @@ coroutines.cpp: # 109| v109_8(void) = ^IndirectReadSideEffect[-1] : &:r109_1, ~m109_7 # 109| m109_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_1 # 109| m109_10(unknown) = Chi : total:m109_7, partial:m109_9 -#-----| r0_15(glval) = VariableAddress[#temp0:0] : -# 109| r109_11(glval) = VariableAddress[#temp109:13] : -# 109| r109_12(glval) = VariableAddress[(unnamed local variable)] : -# 109| r109_13(glval) = FunctionAddress[yield_value] : -# 109| r109_14(glval) = VariableAddress[i] : -# 109| r109_15(int) = Load[i] : &:r109_14, m0_4 -# 109| r109_16(suspend_always) = Call[yield_value] : func:r109_13, this:r109_12, 0:r109_15 -# 109| m109_17(unknown) = ^CallSideEffect : ~m109_10 -# 109| m109_18(unknown) = Chi : total:m109_10, partial:m109_17 -# 109| v109_19(void) = ^IndirectReadSideEffect[-1] : &:r109_12, ~m109_18 -# 109| m109_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_12 -# 109| m109_21(unknown) = Chi : total:m109_18, partial:m109_20 -# 109| m109_22(suspend_always) = Store[#temp109:13] : &:r109_11, r109_16 -# 109| m109_23(unknown) = Chi : total:m109_21, partial:m109_22 -# 109| r109_24(suspend_always *) = CopyValue : r109_11 -# 109| m109_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r109_24 -#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m109_25 -# 109| r109_26(glval) = CopyValue : r0_16 -# 109| r109_27(glval) = Convert : r109_26 -# 109| r109_28(glval) = FunctionAddress[await_ready] : -# 109| r109_29(bool) = Call[await_ready] : func:r109_28, this:r109_27 -# 109| m109_30(unknown) = ^CallSideEffect : ~m109_23 -# 109| m109_31(unknown) = Chi : total:m109_23, partial:m109_30 -# 109| v109_32(void) = ^IndirectReadSideEffect[-1] : &:r109_27, ~m109_31 -# 109| v109_33(void) = ConditionalBranch : r109_29 -#-----| False -> Block 4 -#-----| True -> Block 3 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 3 # 108| Block 2 # 108| r108_44(suspend_always *) = CopyValue : r108_29 # 108| r108_45(glval) = CopyValue : r108_44 -#-----| r0_17(glval) = Convert : r108_45 +#-----| r0_15(glval) = Convert : r108_45 # 108| r108_46(glval) = FunctionAddress[await_suspend] : # 108| r108_47(glval>) = VariableAddress[#temp108:21] : # 108| m108_48(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_47 @@ -2024,14 +2165,47 @@ coroutines.cpp: # 108| m108_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_47 # 108| m108_59(unknown) = Chi : total:m108_56, partial:m108_58 # 108| r108_60(coroutine_handle) = Load[#temp108:21] : &:r108_47, ~m108_59 -# 108| v108_61(void) = Call[await_suspend] : func:r108_46, this:r0_17, 0:r108_60 +# 108| v108_61(void) = Call[await_suspend] : func:r108_46, this:r0_15, 0:r108_60 # 108| m108_62(unknown) = ^CallSideEffect : ~m108_59 # 108| m108_63(unknown) = Chi : total:m108_59, partial:m108_62 -#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m108_63 +#-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m108_63 #-----| Goto -> Block 1 -# 109| Block 3 -# 109| m109_34(unknown) = Phi : from 1:~m109_31, from 4:~m109_60 +#-----| Block 3 +#-----| r0_17(glval) = VariableAddress[#temp0:0] : +# 109| r109_11(glval) = VariableAddress[#temp109:13] : +# 109| r109_12(glval) = VariableAddress[(unnamed local variable)] : +# 109| r109_13(glval) = FunctionAddress[yield_value] : +# 109| r109_14(glval) = VariableAddress[i] : +# 109| r109_15(int) = Load[i] : &:r109_14, m0_4 +# 109| r109_16(suspend_always) = Call[yield_value] : func:r109_13, this:r109_12, 0:r109_15 +# 109| m109_17(unknown) = ^CallSideEffect : ~m109_10 +# 109| m109_18(unknown) = Chi : total:m109_10, partial:m109_17 +# 109| v109_19(void) = ^IndirectReadSideEffect[-1] : &:r109_12, ~m109_18 +# 109| m109_20(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_12 +# 109| m109_21(unknown) = Chi : total:m109_18, partial:m109_20 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 4 + +# 109| Block 4 +# 109| m109_22(suspend_always) = Store[#temp109:13] : &:r109_11, r109_16 +# 109| m109_23(unknown) = Chi : total:m109_21, partial:m109_22 +# 109| r109_24(suspend_always *) = CopyValue : r109_11 +# 109| m109_25(suspend_always *) = Store[#temp0:0] : &:r0_17, r109_24 +#-----| r0_18(suspend_always *) = Load[#temp0:0] : &:r0_17, m109_25 +# 109| r109_26(glval) = CopyValue : r0_18 +# 109| r109_27(glval) = Convert : r109_26 +# 109| r109_28(glval) = FunctionAddress[await_ready] : +# 109| r109_29(bool) = Call[await_ready] : func:r109_28, this:r109_27 +# 109| m109_30(unknown) = ^CallSideEffect : ~m109_23 +# 109| m109_31(unknown) = Chi : total:m109_23, partial:m109_30 +# 109| v109_32(void) = ^IndirectReadSideEffect[-1] : &:r109_27, ~m109_31 +# 109| v109_33(void) = ConditionalBranch : r109_29 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 109| Block 5 +# 109| m109_34(unknown) = Phi : from 4:~m109_31, from 6:~m109_60 # 109| r109_35(suspend_always *) = CopyValue : r109_24 # 109| r109_36(glval) = CopyValue : r109_35 #-----| r0_19(glval) = Convert : r109_36 @@ -2052,14 +2226,13 @@ coroutines.cpp: #-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m0_25 #-----| m0_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_21 #-----| m0_28(unknown) = Chi : total:m0_25, partial:m0_27 -# 110| v110_5(void) = NoOp : -#-----| v0_29(void) = NoOp : -#-----| Goto (back edge) -> Block 5 +#-----| C++ Exception -> Block 8 +#-----| Goto -> Block 7 -# 109| Block 4 +# 109| Block 6 # 109| r109_41(suspend_always *) = CopyValue : r109_24 # 109| r109_42(glval) = CopyValue : r109_41 -#-----| r0_30(glval) = Convert : r109_42 +#-----| r0_29(glval) = Convert : r109_42 # 109| r109_43(glval) = FunctionAddress[await_suspend] : # 109| r109_44(glval>) = VariableAddress[#temp109:3] : # 109| m109_45(coroutine_handle) = Uninitialized[#temp109:3] : &:r109_44 @@ -2075,87 +2248,117 @@ coroutines.cpp: # 109| m109_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r109_44 # 109| m109_56(unknown) = Chi : total:m109_53, partial:m109_55 # 109| r109_57(coroutine_handle) = Load[#temp109:3] : &:r109_44, ~m109_56 -# 109| v109_58(void) = Call[await_suspend] : func:r109_43, this:r0_30, 0:r109_57 +# 109| v109_58(void) = Call[await_suspend] : func:r109_43, this:r0_29, 0:r109_57 # 109| m109_59(unknown) = ^CallSideEffect : ~m109_56 # 109| m109_60(unknown) = Chi : total:m109_56, partial:m109_59 -#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m109_60 -#-----| Goto -> Block 3 +#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_29, ~m109_60 +#-----| Goto -> Block 5 -#-----| Block 5 -#-----| v0_32(void) = NoOp : -# 108| r108_64(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_65(glval) = FunctionAddress[final_suspend] : -# 108| r108_66(suspend_always) = Call[final_suspend] : func:r108_65, this:r108_64 -# 108| m108_67(unknown) = ^CallSideEffect : ~m0_28 -# 108| m108_68(unknown) = Chi : total:m0_28, partial:m108_67 -# 108| v108_69(void) = ^IndirectReadSideEffect[-1] : &:r108_64, ~m108_68 -# 108| m108_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_64 -# 108| m108_71(unknown) = Chi : total:m108_68, partial:m108_70 -#-----| r0_33(glval) = VariableAddress[#temp0:0] : -# 108| r108_72(glval) = VariableAddress[#temp108:21] : -# 108| r108_73(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_74(glval) = FunctionAddress[final_suspend] : -# 108| r108_75(suspend_always) = Call[final_suspend] : func:r108_74, this:r108_73 -# 108| m108_76(unknown) = ^CallSideEffect : ~m108_71 -# 108| m108_77(unknown) = Chi : total:m108_71, partial:m108_76 -# 108| v108_78(void) = ^IndirectReadSideEffect[-1] : &:r108_73, ~m108_77 -# 108| m108_79(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_73 -# 108| m108_80(unknown) = Chi : total:m108_77, partial:m108_79 -# 108| m108_81(suspend_always) = Store[#temp108:21] : &:r108_72, r108_75 -# 108| m108_82(unknown) = Chi : total:m108_80, partial:m108_81 -# 108| r108_83(suspend_always *) = CopyValue : r108_72 -# 108| m108_84(suspend_always *) = Store[#temp0:0] : &:r0_33, r108_83 -#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m108_84 -# 108| r108_85(glval) = CopyValue : r0_34 -# 108| r108_86(glval) = Convert : r108_85 -# 108| r108_87(glval) = FunctionAddress[await_ready] : -# 108| r108_88(bool) = Call[await_ready] : func:r108_87, this:r108_86 -# 108| m108_89(unknown) = ^CallSideEffect : ~m108_82 -# 108| m108_90(unknown) = Chi : total:m108_82, partial:m108_89 -# 108| v108_91(void) = ^IndirectReadSideEffect[-1] : &:r108_86, ~m108_90 -#-----| v0_35(void) = ConditionalBranch : r108_88 -#-----| False -> Block 7 -#-----| True -> Block 6 +# 110| Block 7 +# 110| v110_5(void) = NoOp : +#-----| v0_31(void) = NoOp : +#-----| Goto (back edge) -> Block 10 -# 108| Block 6 -# 108| m108_92(unknown) = Phi : from 5:~m108_90, from 7:~m108_122 -# 108| r108_93(suspend_always *) = CopyValue : r108_83 -# 108| r108_94(glval) = CopyValue : r108_93 -#-----| r0_36(glval) = Convert : r108_94 -# 108| r108_95(glval) = FunctionAddress[await_resume] : -# 108| v108_96(void) = Call[await_resume] : func:r108_95, this:r0_36 -# 108| m108_97(unknown) = ^CallSideEffect : ~m108_92 -# 108| m108_98(unknown) = Chi : total:m108_92, partial:m108_97 -#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m108_98 -# 108| r108_99(glval) = VariableAddress[#return] : -# 108| v108_100(void) = ReturnValue : &:r108_99, ~m108_98 -# 108| v108_101(void) = AliasedUse : ~m108_98 -# 108| v108_102(void) = ExitFunction : +#-----| Block 8 +#-----| m0_32(unknown) = Phi : from 1:~m109_10, from 3:~m109_21, from 5:~m0_28 +#-----| v0_33(void) = CatchAny : +#-----| r0_34(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_35(bool) = Load[(unnamed local variable)] : &:r0_34, m0_11 +#-----| r0_36(bool) = LogicalNot : r0_35 +#-----| v0_37(void) = ConditionalBranch : r0_36 +#-----| False -> Block 9 +#-----| True -> Block 13 -# 108| Block 7 -# 108| r108_103(suspend_always *) = CopyValue : r108_83 -# 108| r108_104(glval) = CopyValue : r108_103 -#-----| r0_38(glval) = Convert : r108_104 -# 108| r108_105(glval) = FunctionAddress[await_suspend] : -# 108| r108_106(glval>) = VariableAddress[#temp108:21] : -# 108| m108_107(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_106 -# 108| m108_108(unknown) = Chi : total:m108_90, partial:m108_107 -# 108| r108_109(glval) = FunctionAddress[coroutine_handle] : -# 108| r108_110(glval>) = VariableAddress[(unnamed local variable)] : -# 108| r108_111(glval>) = Convert : r108_110 -# 108| r108_112(coroutine_handle &) = CopyValue : r108_111 -# 108| v108_113(void) = Call[coroutine_handle] : func:r108_109, this:r108_106, 0:r108_112 -# 108| m108_114(unknown) = ^CallSideEffect : ~m108_108 -# 108| m108_115(unknown) = Chi : total:m108_108, partial:m108_114 -# 108| v108_116(void) = ^BufferReadSideEffect[0] : &:r108_112, ~m108_115 -# 108| m108_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_106 -# 108| m108_118(unknown) = Chi : total:m108_115, partial:m108_117 -# 108| r108_119(coroutine_handle) = Load[#temp108:21] : &:r108_106, ~m108_118 -# 108| v108_120(void) = Call[await_suspend] : func:r108_105, this:r0_38, 0:r108_119 -# 108| m108_121(unknown) = ^CallSideEffect : ~m108_118 -# 108| m108_122(unknown) = Chi : total:m108_118, partial:m108_121 -#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m108_122 -#-----| Goto -> Block 6 +# 108| Block 9 +# 108| r108_64(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_65(glval) = FunctionAddress[unhandled_exception] : +# 108| v108_66(void) = Call[unhandled_exception] : func:r108_65, this:r108_64 +# 108| m108_67(unknown) = ^CallSideEffect : ~m0_32 +# 108| m108_68(unknown) = Chi : total:m0_32, partial:m108_67 +# 108| v108_69(void) = ^IndirectReadSideEffect[-1] : &:r108_64, ~m108_68 +# 108| m108_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_64 +# 108| m108_71(unknown) = Chi : total:m108_68, partial:m108_70 +#-----| Goto -> Block 10 + +#-----| Block 10 +#-----| m0_38(unknown) = Phi : from 7:~m0_28, from 9:~m108_71 +#-----| v0_39(void) = NoOp : +# 108| r108_72(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_73(glval) = FunctionAddress[final_suspend] : +# 108| r108_74(suspend_always) = Call[final_suspend] : func:r108_73, this:r108_72 +# 108| m108_75(unknown) = ^CallSideEffect : ~m0_38 +# 108| m108_76(unknown) = Chi : total:m0_38, partial:m108_75 +# 108| v108_77(void) = ^IndirectReadSideEffect[-1] : &:r108_72, ~m108_76 +# 108| m108_78(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_72 +# 108| m108_79(unknown) = Chi : total:m108_76, partial:m108_78 +#-----| r0_40(glval) = VariableAddress[#temp0:0] : +# 108| r108_80(glval) = VariableAddress[#temp108:21] : +# 108| r108_81(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_82(glval) = FunctionAddress[final_suspend] : +# 108| r108_83(suspend_always) = Call[final_suspend] : func:r108_82, this:r108_81 +# 108| m108_84(unknown) = ^CallSideEffect : ~m108_79 +# 108| m108_85(unknown) = Chi : total:m108_79, partial:m108_84 +# 108| v108_86(void) = ^IndirectReadSideEffect[-1] : &:r108_81, ~m108_85 +# 108| m108_87(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_81 +# 108| m108_88(unknown) = Chi : total:m108_85, partial:m108_87 +# 108| m108_89(suspend_always) = Store[#temp108:21] : &:r108_80, r108_83 +# 108| m108_90(unknown) = Chi : total:m108_88, partial:m108_89 +# 108| r108_91(suspend_always *) = CopyValue : r108_80 +# 108| m108_92(suspend_always *) = Store[#temp0:0] : &:r0_40, r108_91 +#-----| r0_41(suspend_always *) = Load[#temp0:0] : &:r0_40, m108_92 +# 108| r108_93(glval) = CopyValue : r0_41 +# 108| r108_94(glval) = Convert : r108_93 +# 108| r108_95(glval) = FunctionAddress[await_ready] : +# 108| r108_96(bool) = Call[await_ready] : func:r108_95, this:r108_94 +# 108| m108_97(unknown) = ^CallSideEffect : ~m108_90 +# 108| m108_98(unknown) = Chi : total:m108_90, partial:m108_97 +# 108| v108_99(void) = ^IndirectReadSideEffect[-1] : &:r108_94, ~m108_98 +#-----| v0_42(void) = ConditionalBranch : r108_96 +#-----| False -> Block 12 +#-----| True -> Block 11 + +# 108| Block 11 +# 108| m108_100(unknown) = Phi : from 10:~m108_98, from 12:~m108_130 +# 108| r108_101(suspend_always *) = CopyValue : r108_91 +# 108| r108_102(glval) = CopyValue : r108_101 +#-----| r0_43(glval) = Convert : r108_102 +# 108| r108_103(glval) = FunctionAddress[await_resume] : +# 108| v108_104(void) = Call[await_resume] : func:r108_103, this:r0_43 +# 108| m108_105(unknown) = ^CallSideEffect : ~m108_100 +# 108| m108_106(unknown) = Chi : total:m108_100, partial:m108_105 +#-----| v0_44(void) = ^IndirectReadSideEffect[-1] : &:r0_43, ~m108_106 +# 108| r108_107(glval) = VariableAddress[#return] : +# 108| v108_108(void) = ReturnValue : &:r108_107, ~m108_106 +# 108| v108_109(void) = AliasedUse : ~m108_106 +# 108| v108_110(void) = ExitFunction : + +# 108| Block 12 +# 108| r108_111(suspend_always *) = CopyValue : r108_91 +# 108| r108_112(glval) = CopyValue : r108_111 +#-----| r0_45(glval) = Convert : r108_112 +# 108| r108_113(glval) = FunctionAddress[await_suspend] : +# 108| r108_114(glval>) = VariableAddress[#temp108:21] : +# 108| m108_115(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_114 +# 108| m108_116(unknown) = Chi : total:m108_98, partial:m108_115 +# 108| r108_117(glval) = FunctionAddress[coroutine_handle] : +# 108| r108_118(glval>) = VariableAddress[(unnamed local variable)] : +# 108| r108_119(glval>) = Convert : r108_118 +# 108| r108_120(coroutine_handle &) = CopyValue : r108_119 +# 108| v108_121(void) = Call[coroutine_handle] : func:r108_117, this:r108_114, 0:r108_120 +# 108| m108_122(unknown) = ^CallSideEffect : ~m108_116 +# 108| m108_123(unknown) = Chi : total:m108_116, partial:m108_122 +# 108| v108_124(void) = ^BufferReadSideEffect[0] : &:r108_120, ~m108_123 +# 108| m108_125(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_114 +# 108| m108_126(unknown) = Chi : total:m108_123, partial:m108_125 +# 108| r108_127(coroutine_handle) = Load[#temp108:21] : &:r108_114, ~m108_126 +# 108| v108_128(void) = Call[await_suspend] : func:r108_113, this:r0_45, 0:r108_127 +# 108| m108_129(unknown) = ^CallSideEffect : ~m108_126 +# 108| m108_130(unknown) = Chi : total:m108_126, partial:m108_129 +#-----| v0_46(void) = ^IndirectReadSideEffect[-1] : &:r0_45, ~m108_130 +#-----| Goto -> Block 11 + +# 108| Block 13 +# 108| v108_131(void) = Unreached : destructors_for_temps.cpp: # 9| void ClassWithConstructor::ClassWithConstructor(ClassWithConstructor&&) @@ -17056,23 +17259,27 @@ ir.cpp: # 2276| m2276_7(unknown) = Chi : total:m2276_3, partial:m2276_6 # 2276| m2276_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2276_1 # 2276| m2276_9(unknown) = Chi : total:m2276_7, partial:m2276_8 -# 2277| r2277_1(glval) = VariableAddress[b] : -# 2277| r2277_2(bool) = Load[b] : &:r2277_1, m2274_6 -# 2277| v2277_3(void) = ConditionalBranch : r2277_2 -#-----| False -> Block 4 -#-----| True -> Block 3 +#-----| C++ Exception -> Block 7 +#-----| Goto -> Block 3 # 2274| Block 1 -# 2274| m2274_7(unknown) = Phi : from 2:~m2274_10, from 10:~m2290_1 +# 2274| m2274_7(unknown) = Phi : from 2:~m2274_10, from 12:~m2290_1 # 2274| v2274_8(void) = AliasedUse : ~m2274_7 # 2274| v2274_9(void) = ExitFunction : # 2274| Block 2 -# 2274| m2274_10(unknown) = Phi : from 6:~m2283_12, from 9:~m2281_8 +# 2274| m2274_10(unknown) = Phi : from 8:~m2283_12, from 11:~m2282_1 # 2274| v2274_11(void) = Unwind : #-----| Goto -> Block 1 -# 2278| Block 3 +# 2277| Block 3 +# 2277| r2277_1(glval) = VariableAddress[b] : +# 2277| r2277_2(bool) = Load[b] : &:r2277_1, m2274_6 +# 2277| v2277_3(void) = ConditionalBranch : r2277_2 +#-----| False -> Block 5 +#-----| True -> Block 4 + +# 2278| Block 4 # 2278| r2278_1(glval) = VariableAddress[#throw2278:7] : # 2278| r2278_2(glval) = StringConstant["string literal"] : # 2278| r2278_3(char *) = Convert : r2278_2 @@ -17086,18 +17293,22 @@ ir.cpp: # 2281| v2281_6(void) = ^IndirectReadSideEffect[-1] : &:r2281_1, ~m2281_5 # 2281| m2281_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_1 # 2281| m2281_8(unknown) = Chi : total:m2281_5, partial:m2281_7 -#-----| C++ Exception -> Block 5 +#-----| C++ Exception -> Block 7 -# 2280| Block 4 -# 2280| r2280_1(glval) = VariableAddress[s2] : -# 2280| m2280_2(String) = Uninitialized[s2] : &:r2280_1 -# 2280| m2280_3(unknown) = Chi : total:m2276_9, partial:m2280_2 -# 2280| r2280_4(glval) = FunctionAddress[String] : -# 2280| v2280_5(void) = Call[String] : func:r2280_4, this:r2280_1 -# 2280| m2280_6(unknown) = ^CallSideEffect : ~m2280_3 -# 2280| m2280_7(unknown) = Chi : total:m2280_3, partial:m2280_6 -# 2280| m2280_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 -# 2280| m2280_9(unknown) = Chi : total:m2280_7, partial:m2280_8 +# 2280| Block 5 +# 2280| r2280_1(glval) = VariableAddress[s2] : +# 2280| m2280_2(String) = Uninitialized[s2] : &:r2280_1 +# 2280| m2280_3(unknown) = Chi : total:m2276_9, partial:m2280_2 +# 2280| r2280_4(glval) = FunctionAddress[String] : +# 2280| v2280_5(void) = Call[String] : func:r2280_4, this:r2280_1 +# 2280| m2280_6(unknown) = ^CallSideEffect : ~m2280_3 +# 2280| m2280_7(unknown) = Chi : total:m2280_3, partial:m2280_6 +# 2280| m2280_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +# 2280| m2280_9(unknown) = Chi : total:m2280_7, partial:m2280_8 +#-----| C++ Exception -> Block 7 +#-----| Goto -> Block 6 + +# 2281| Block 6 # 2281| r2281_9(glval) = VariableAddress[s2] : # 2281| r2281_10(glval) = FunctionAddress[~String] : # 2281| v2281_11(void) = Call[~String] : func:r2281_10, this:r2281_9 @@ -17114,25 +17325,26 @@ ir.cpp: # 2281| v2281_22(void) = ^IndirectReadSideEffect[-1] : &:r2281_17, ~m2281_21 # 2281| m2281_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_17 # 2281| m2281_24(unknown) = Chi : total:m2281_21, partial:m2281_23 -#-----| Goto -> Block 10 +#-----| Goto -> Block 12 -# 2282| Block 5 -# 2282| v2282_1(void) = CatchByType[const char *] : -#-----| C++ Exception -> Block 7 -#-----| Goto -> Block 6 +# 2282| Block 7 +# 2282| m2282_1(unknown) = Phi : from 0:~m2276_9, from 4:~m2281_8, from 5:~m2280_9 +# 2282| v2282_2(void) = CatchByType[const char *] : +#-----| C++ Exception -> Block 9 +#-----| Goto -> Block 8 -# 2282| Block 6 -# 2282| r2282_2(glval) = VariableAddress[s] : -# 2282| m2282_3(char *) = InitializeParameter[s] : &:r2282_2 -# 2282| r2282_4(char *) = Load[s] : &:r2282_2, m2282_3 -# 2282| m2282_5(unknown) = InitializeIndirection[s] : &:r2282_4 -# 2282| m2282_6(unknown) = Chi : total:m2281_8, partial:m2282_5 +# 2282| Block 8 +# 2282| r2282_3(glval) = VariableAddress[s] : +# 2282| m2282_4(char *) = InitializeParameter[s] : &:r2282_3 +# 2282| r2282_5(char *) = Load[s] : &:r2282_3, m2282_4 +# 2282| m2282_6(unknown) = InitializeIndirection[s] : &:r2282_5 +# 2282| m2282_7(unknown) = Chi : total:m2282_1, partial:m2282_6 # 2283| r2283_1(glval) = VariableAddress[#throw2283:5] : # 2283| m2283_2(String) = Uninitialized[#throw2283:5] : &:r2283_1 -# 2283| m2283_3(unknown) = Chi : total:m2282_6, partial:m2283_2 +# 2283| m2283_3(unknown) = Chi : total:m2282_7, partial:m2283_2 # 2283| r2283_4(glval) = FunctionAddress[String] : # 2283| r2283_5(glval) = VariableAddress[s] : -# 2283| r2283_6(char *) = Load[s] : &:r2283_5, m2282_3 +# 2283| r2283_6(char *) = Load[s] : &:r2283_5, m2282_4 # 2283| v2283_7(void) = Call[String] : func:r2283_4, this:r2283_1, 0:r2283_6 # 2283| m2283_8(unknown) = ^CallSideEffect : ~m2283_3 # 2283| m2283_9(unknown) = Chi : total:m2283_3, partial:m2283_8 @@ -17142,26 +17354,26 @@ ir.cpp: # 2283| v2283_13(void) = ThrowValue : &:r2283_1, ~m2283_12 #-----| C++ Exception -> Block 2 -# 2285| Block 7 +# 2285| Block 9 # 2285| v2285_1(void) = CatchByType[const String &] : -#-----| C++ Exception -> Block 9 -#-----| Goto -> Block 8 +#-----| C++ Exception -> Block 11 +#-----| Goto -> Block 10 -# 2285| Block 8 +# 2285| Block 10 # 2285| r2285_2(glval) = VariableAddress[e] : # 2285| m2285_3(String &) = InitializeParameter[e] : &:r2285_2 # 2285| r2285_4(String &) = Load[e] : &:r2285_2, m2285_3 # 2285| m2285_5(unknown) = InitializeIndirection[e] : &:r2285_4 # 2285| v2285_6(void) = NoOp : -#-----| Goto -> Block 10 +#-----| Goto -> Block 12 -# 2287| Block 9 +# 2287| Block 11 # 2287| v2287_1(void) = CatchAny : # 2288| v2288_1(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 2290| Block 10 -# 2290| m2290_1(unknown) = Phi : from 4:~m2281_24, from 8:~m2281_8 +# 2290| Block 12 +# 2290| m2290_1(unknown) = Phi : from 6:~m2281_24, from 10:~m2282_1 # 2290| v2290_2(void) = NoOp : # 2274| v2274_12(void) = ReturnVoid : #-----| Goto -> Block 1 diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 030db017203..f594062a0a5 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -863,14 +863,13 @@ coroutines.cpp: #-----| mu0_13(unknown) = ^CallSideEffect : ~m? #-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_10, ~m? #-----| mu0_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_10 -# 88| v88_1(void) = NoOp : -#-----| v0_16(void) = NoOp : -#-----| Goto (back edge) -> Block 8 +#-----| C++ Exception -> Block 6 +#-----| Goto -> Block 5 # 87| Block 4 # 87| r87_36(suspend_always *) = CopyValue : r87_20 # 87| r87_37(glval) = CopyValue : r87_36 -#-----| r0_17(glval) = Convert : r87_37 +#-----| r0_16(glval) = Convert : r87_37 # 87| r87_38(glval) = FunctionAddress[await_suspend] : # 87| r87_39(glval>) = VariableAddress[#temp87:20] : # 87| mu87_40(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_39 @@ -883,34 +882,39 @@ coroutines.cpp: # 87| v87_47(void) = ^BufferReadSideEffect[0] : &:r87_44, ~m? # 87| mu87_48(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_39 # 87| r87_49(coroutine_handle) = Load[#temp87:20] : &:r87_39, ~m? -# 87| v87_50(void) = Call[await_suspend] : func:r87_38, this:r0_17, 0:r87_49 +# 87| v87_50(void) = Call[await_suspend] : func:r87_38, this:r0_16, 0:r87_49 # 87| mu87_51(unknown) = ^CallSideEffect : ~m? -#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m? +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? #-----| Goto -> Block 3 -#-----| Block 5 +# 88| Block 5 +# 88| v88_1(void) = NoOp : +#-----| v0_18(void) = NoOp : +#-----| Goto (back edge) -> Block 9 + +#-----| Block 6 #-----| v0_19(void) = CatchAny : #-----| r0_20(glval) = VariableAddress[(unnamed local variable)] : #-----| r0_21(bool) = Load[(unnamed local variable)] : &:r0_20, ~m? #-----| r0_22(bool) = LogicalNot : r0_21 #-----| v0_23(void) = ConditionalBranch : r0_22 -#-----| False -> Block 7 -#-----| True -> Block 6 +#-----| False -> Block 8 +#-----| True -> Block 7 -#-----| Block 6 +#-----| Block 7 #-----| v0_24(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 87| Block 7 +# 87| Block 8 # 87| r87_52(glval) = VariableAddress[(unnamed local variable)] : # 87| r87_53(glval) = FunctionAddress[unhandled_exception] : # 87| v87_54(void) = Call[unhandled_exception] : func:r87_53, this:r87_52 # 87| mu87_55(unknown) = ^CallSideEffect : ~m? # 87| v87_56(void) = ^IndirectReadSideEffect[-1] : &:r87_52, ~m? # 87| mu87_57(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_52 -#-----| Goto -> Block 8 +#-----| Goto -> Block 9 -#-----| Block 8 +#-----| Block 9 #-----| v0_25(void) = NoOp : # 87| r87_58(glval) = VariableAddress[(unnamed local variable)] : # 87| r87_59(glval) = FunctionAddress[final_suspend] : @@ -937,10 +941,10 @@ coroutines.cpp: # 87| mu87_78(unknown) = ^CallSideEffect : ~m? # 87| v87_79(void) = ^IndirectReadSideEffect[-1] : &:r87_75, ~m? #-----| v0_28(void) = ConditionalBranch : r87_77 -#-----| False -> Block 10 -#-----| True -> Block 9 +#-----| False -> Block 11 +#-----| True -> Block 10 -# 87| Block 9 +# 87| Block 10 # 87| r87_80(suspend_always *) = CopyValue : r87_72 # 87| r87_81(glval) = CopyValue : r87_80 #-----| r0_29(glval) = Convert : r87_81 @@ -952,7 +956,7 @@ coroutines.cpp: # 87| v87_86(void) = ReturnValue : &:r87_85, ~m? #-----| Goto -> Block 1 -# 87| Block 10 +# 87| Block 11 # 87| r87_87(suspend_always *) = CopyValue : r87_72 # 87| r87_88(glval) = CopyValue : r87_87 #-----| r0_31(glval) = Convert : r87_88 @@ -971,7 +975,7 @@ coroutines.cpp: # 87| v87_101(void) = Call[await_suspend] : func:r87_89, this:r0_31, 0:r87_100 # 87| mu87_102(unknown) = ^CallSideEffect : ~m? #-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m? -#-----| Goto -> Block 9 +#-----| Goto -> Block 10 # 91| co_returnable_value co_return_int(int) # 91| Block 0 @@ -1042,14 +1046,13 @@ coroutines.cpp: #-----| mu0_17(unknown) = ^CallSideEffect : ~m? #-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_14, ~m? #-----| mu0_19(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_14 -# 92| v92_3(void) = NoOp : -#-----| v0_20(void) = NoOp : -#-----| Goto (back edge) -> Block 8 +#-----| C++ Exception -> Block 6 +#-----| Goto -> Block 5 # 91| Block 4 # 91| r91_38(suspend_always *) = CopyValue : r91_22 # 91| r91_39(glval) = CopyValue : r91_38 -#-----| r0_21(glval) = Convert : r91_39 +#-----| r0_20(glval) = Convert : r91_39 # 91| r91_40(glval) = FunctionAddress[await_suspend] : # 91| r91_41(glval>) = VariableAddress[#temp91:21] : # 91| mu91_42(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_41 @@ -1062,34 +1065,39 @@ coroutines.cpp: # 91| v91_49(void) = ^BufferReadSideEffect[0] : &:r91_46, ~m? # 91| mu91_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_41 # 91| r91_51(coroutine_handle) = Load[#temp91:21] : &:r91_41, ~m? -# 91| v91_52(void) = Call[await_suspend] : func:r91_40, this:r0_21, 0:r91_51 +# 91| v91_52(void) = Call[await_suspend] : func:r91_40, this:r0_20, 0:r91_51 # 91| mu91_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m? +#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? #-----| Goto -> Block 3 -#-----| Block 5 +# 92| Block 5 +# 92| v92_3(void) = NoOp : +#-----| v0_22(void) = NoOp : +#-----| Goto (back edge) -> Block 9 + +#-----| Block 6 #-----| v0_23(void) = CatchAny : #-----| r0_24(glval) = VariableAddress[(unnamed local variable)] : #-----| r0_25(bool) = Load[(unnamed local variable)] : &:r0_24, ~m? #-----| r0_26(bool) = LogicalNot : r0_25 #-----| v0_27(void) = ConditionalBranch : r0_26 -#-----| False -> Block 7 -#-----| True -> Block 6 +#-----| False -> Block 8 +#-----| True -> Block 7 -#-----| Block 6 +#-----| Block 7 #-----| v0_28(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 91| Block 7 +# 91| Block 8 # 91| r91_54(glval) = VariableAddress[(unnamed local variable)] : # 91| r91_55(glval) = FunctionAddress[unhandled_exception] : # 91| v91_56(void) = Call[unhandled_exception] : func:r91_55, this:r91_54 # 91| mu91_57(unknown) = ^CallSideEffect : ~m? # 91| v91_58(void) = ^IndirectReadSideEffect[-1] : &:r91_54, ~m? # 91| mu91_59(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_54 -#-----| Goto -> Block 8 +#-----| Goto -> Block 9 -#-----| Block 8 +#-----| Block 9 #-----| v0_29(void) = NoOp : # 91| r91_60(glval) = VariableAddress[(unnamed local variable)] : # 91| r91_61(glval) = FunctionAddress[final_suspend] : @@ -1116,10 +1124,10 @@ coroutines.cpp: # 91| mu91_80(unknown) = ^CallSideEffect : ~m? # 91| v91_81(void) = ^IndirectReadSideEffect[-1] : &:r91_77, ~m? #-----| v0_32(void) = ConditionalBranch : r91_79 -#-----| False -> Block 10 -#-----| True -> Block 9 +#-----| False -> Block 11 +#-----| True -> Block 10 -# 91| Block 9 +# 91| Block 10 # 91| r91_82(suspend_always *) = CopyValue : r91_74 # 91| r91_83(glval) = CopyValue : r91_82 #-----| r0_33(glval) = Convert : r91_83 @@ -1131,7 +1139,7 @@ coroutines.cpp: # 91| v91_88(void) = ReturnValue : &:r91_87, ~m? #-----| Goto -> Block 1 -# 91| Block 10 +# 91| Block 11 # 91| r91_89(suspend_always *) = CopyValue : r91_74 # 91| r91_90(glval) = CopyValue : r91_89 #-----| r0_35(glval) = Convert : r91_90 @@ -1150,7 +1158,7 @@ coroutines.cpp: # 91| v91_103(void) = Call[await_suspend] : func:r91_91, this:r0_35, 0:r91_102 # 91| mu91_104(unknown) = ^CallSideEffect : ~m? #-----| v0_36(void) = ^IndirectReadSideEffect[-1] : &:r0_35, ~m? -#-----| Goto -> Block 9 +#-----| Goto -> Block 10 # 95| co_returnable_void co_yield_value_void(int) # 95| Block 0 @@ -1202,53 +1210,32 @@ coroutines.cpp: #-----| Goto -> Block 1 #-----| Block 3 -#-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : -#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 -# 95| r95_33(suspend_always *) = CopyValue : r95_22 -# 95| r95_34(glval) = CopyValue : r95_33 -#-----| r0_11(glval) = Convert : r95_34 -# 95| r95_35(glval) = FunctionAddress[await_resume] : -# 95| v95_36(void) = Call[await_resume] : func:r95_35, this:r0_11 -# 95| mu95_37(unknown) = ^CallSideEffect : ~m? -#-----| v0_12(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~m? -#-----| v0_13(void) = CopyValue : v95_36 -# 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : -# 96| r96_2(glval) = FunctionAddress[yield_value] : -# 96| r96_3(glval) = VariableAddress[i] : -# 96| r96_4(int) = Load[i] : &:r96_3, ~m? -# 96| r96_5(suspend_always) = Call[yield_value] : func:r96_2, this:r96_1, 0:r96_4 -# 96| mu96_6(unknown) = ^CallSideEffect : ~m? -# 96| v96_7(void) = ^IndirectReadSideEffect[-1] : &:r96_1, ~m? -# 96| mu96_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 96| r96_9(glval) = VariableAddress[#temp96:13] : -# 96| r96_10(glval) = VariableAddress[(unnamed local variable)] : -# 96| r96_11(glval) = FunctionAddress[yield_value] : -# 96| r96_12(glval) = VariableAddress[i] : -# 96| r96_13(int) = Load[i] : &:r96_12, ~m? -# 96| r96_14(suspend_always) = Call[yield_value] : func:r96_11, this:r96_10, 0:r96_13 -# 96| mu96_15(unknown) = ^CallSideEffect : ~m? -# 96| v96_16(void) = ^IndirectReadSideEffect[-1] : &:r96_10, ~m? -# 96| mu96_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_10 -# 96| mu96_18(suspend_always) = Store[#temp96:13] : &:r96_9, r96_14 -# 96| r96_19(suspend_always *) = CopyValue : r96_9 -# 96| mu96_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r96_19 -#-----| r0_15(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 96| r96_21(glval) = CopyValue : r0_15 -# 96| r96_22(glval) = Convert : r96_21 -# 96| r96_23(glval) = FunctionAddress[await_ready] : -# 96| r96_24(bool) = Call[await_ready] : func:r96_23, this:r96_22 -# 96| mu96_25(unknown) = ^CallSideEffect : ~m? -# 96| v96_26(void) = ^IndirectReadSideEffect[-1] : &:r96_22, ~m? -# 96| v96_27(void) = ConditionalBranch : r96_24 -#-----| False -> Block 6 -#-----| True -> Block 5 +#-----| r0_8(bool) = Constant[1] : +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 +# 95| r95_33(suspend_always *) = CopyValue : r95_22 +# 95| r95_34(glval) = CopyValue : r95_33 +#-----| r0_11(glval) = Convert : r95_34 +# 95| r95_35(glval) = FunctionAddress[await_resume] : +# 95| v95_36(void) = Call[await_resume] : func:r95_35, this:r0_11 +# 95| mu95_37(unknown) = ^CallSideEffect : ~m? +#-----| v0_12(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~m? +#-----| v0_13(void) = CopyValue : v95_36 +# 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : +# 96| r96_2(glval) = FunctionAddress[yield_value] : +# 96| r96_3(glval) = VariableAddress[i] : +# 96| r96_4(int) = Load[i] : &:r96_3, ~m? +# 96| r96_5(suspend_always) = Call[yield_value] : func:r96_2, this:r96_1, 0:r96_4 +# 96| mu96_6(unknown) = ^CallSideEffect : ~m? +# 96| v96_7(void) = ^IndirectReadSideEffect[-1] : &:r96_1, ~m? +# 96| mu96_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 5 # 95| Block 4 # 95| r95_38(suspend_always *) = CopyValue : r95_22 # 95| r95_39(glval) = CopyValue : r95_38 -#-----| r0_16(glval) = Convert : r95_39 +#-----| r0_14(glval) = Convert : r95_39 # 95| r95_40(glval) = FunctionAddress[await_suspend] : # 95| r95_41(glval>) = VariableAddress[#temp95:20] : # 95| mu95_42(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_41 @@ -1261,12 +1248,41 @@ coroutines.cpp: # 95| v95_49(void) = ^BufferReadSideEffect[0] : &:r95_46, ~m? # 95| mu95_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_41 # 95| r95_51(coroutine_handle) = Load[#temp95:20] : &:r95_41, ~m? -# 95| v95_52(void) = Call[await_suspend] : func:r95_40, this:r0_16, 0:r95_51 +# 95| v95_52(void) = Call[await_suspend] : func:r95_40, this:r0_14, 0:r95_51 # 95| mu95_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_14, ~m? #-----| Goto -> Block 3 -# 96| Block 5 +#-----| Block 5 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 96| r96_9(glval) = VariableAddress[#temp96:13] : +# 96| r96_10(glval) = VariableAddress[(unnamed local variable)] : +# 96| r96_11(glval) = FunctionAddress[yield_value] : +# 96| r96_12(glval) = VariableAddress[i] : +# 96| r96_13(int) = Load[i] : &:r96_12, ~m? +# 96| r96_14(suspend_always) = Call[yield_value] : func:r96_11, this:r96_10, 0:r96_13 +# 96| mu96_15(unknown) = ^CallSideEffect : ~m? +# 96| v96_16(void) = ^IndirectReadSideEffect[-1] : &:r96_10, ~m? +# 96| mu96_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_10 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 6 + +# 96| Block 6 +# 96| mu96_18(suspend_always) = Store[#temp96:13] : &:r96_9, r96_14 +# 96| r96_19(suspend_always *) = CopyValue : r96_9 +# 96| mu96_20(suspend_always *) = Store[#temp0:0] : &:r0_16, r96_19 +#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 96| r96_21(glval) = CopyValue : r0_17 +# 96| r96_22(glval) = Convert : r96_21 +# 96| r96_23(glval) = FunctionAddress[await_ready] : +# 96| r96_24(bool) = Call[await_ready] : func:r96_23, this:r96_22 +# 96| mu96_25(unknown) = ^CallSideEffect : ~m? +# 96| v96_26(void) = ^IndirectReadSideEffect[-1] : &:r96_22, ~m? +# 96| v96_27(void) = ConditionalBranch : r96_24 +#-----| False -> Block 8 +#-----| True -> Block 7 + +# 96| Block 7 # 96| r96_28(suspend_always *) = CopyValue : r96_19 # 96| r96_29(glval) = CopyValue : r96_28 #-----| r0_18(glval) = Convert : r96_29 @@ -1280,14 +1296,13 @@ coroutines.cpp: #-----| mu0_23(unknown) = ^CallSideEffect : ~m? #-----| v0_24(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? #-----| mu0_25(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_20 -# 97| v97_1(void) = NoOp : -#-----| v0_26(void) = NoOp : -#-----| Goto (back edge) -> Block 10 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 9 -# 96| Block 6 +# 96| Block 8 # 96| r96_33(suspend_always *) = CopyValue : r96_19 # 96| r96_34(glval) = CopyValue : r96_33 -#-----| r0_27(glval) = Convert : r96_34 +#-----| r0_26(glval) = Convert : r96_34 # 96| r96_35(glval) = FunctionAddress[await_suspend] : # 96| r96_36(glval>) = VariableAddress[#temp96:3] : # 96| mu96_37(coroutine_handle) = Uninitialized[#temp96:3] : &:r96_36 @@ -1300,34 +1315,39 @@ coroutines.cpp: # 96| v96_44(void) = ^BufferReadSideEffect[0] : &:r96_41, ~m? # 96| mu96_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r96_36 # 96| r96_46(coroutine_handle) = Load[#temp96:3] : &:r96_36, ~m? -# 96| v96_47(void) = Call[await_suspend] : func:r96_35, this:r0_27, 0:r96_46 +# 96| v96_47(void) = Call[await_suspend] : func:r96_35, this:r0_26, 0:r96_46 # 96| mu96_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? -#-----| Goto -> Block 5 +#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~m? +#-----| Goto -> Block 7 -#-----| Block 7 +# 97| Block 9 +# 97| v97_1(void) = NoOp : +#-----| v0_28(void) = NoOp : +#-----| Goto (back edge) -> Block 13 + +#-----| Block 10 #-----| v0_29(void) = CatchAny : #-----| r0_30(glval) = VariableAddress[(unnamed local variable)] : #-----| r0_31(bool) = Load[(unnamed local variable)] : &:r0_30, ~m? #-----| r0_32(bool) = LogicalNot : r0_31 #-----| v0_33(void) = ConditionalBranch : r0_32 -#-----| False -> Block 9 -#-----| True -> Block 8 +#-----| False -> Block 12 +#-----| True -> Block 11 -#-----| Block 8 +#-----| Block 11 #-----| v0_34(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 95| Block 9 +# 95| Block 12 # 95| r95_54(glval) = VariableAddress[(unnamed local variable)] : # 95| r95_55(glval) = FunctionAddress[unhandled_exception] : # 95| v95_56(void) = Call[unhandled_exception] : func:r95_55, this:r95_54 # 95| mu95_57(unknown) = ^CallSideEffect : ~m? # 95| v95_58(void) = ^IndirectReadSideEffect[-1] : &:r95_54, ~m? # 95| mu95_59(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_54 -#-----| Goto -> Block 10 +#-----| Goto -> Block 13 -#-----| Block 10 +#-----| Block 13 #-----| v0_35(void) = NoOp : # 95| r95_60(glval) = VariableAddress[(unnamed local variable)] : # 95| r95_61(glval) = FunctionAddress[final_suspend] : @@ -1354,10 +1374,10 @@ coroutines.cpp: # 95| mu95_80(unknown) = ^CallSideEffect : ~m? # 95| v95_81(void) = ^IndirectReadSideEffect[-1] : &:r95_77, ~m? #-----| v0_38(void) = ConditionalBranch : r95_79 -#-----| False -> Block 12 -#-----| True -> Block 11 +#-----| False -> Block 15 +#-----| True -> Block 14 -# 95| Block 11 +# 95| Block 14 # 95| r95_82(suspend_always *) = CopyValue : r95_74 # 95| r95_83(glval) = CopyValue : r95_82 #-----| r0_39(glval) = Convert : r95_83 @@ -1369,7 +1389,7 @@ coroutines.cpp: # 95| v95_88(void) = ReturnValue : &:r95_87, ~m? #-----| Goto -> Block 1 -# 95| Block 12 +# 95| Block 15 # 95| r95_89(suspend_always *) = CopyValue : r95_74 # 95| r95_90(glval) = CopyValue : r95_89 #-----| r0_41(glval) = Convert : r95_90 @@ -1388,7 +1408,7 @@ coroutines.cpp: # 95| v95_103(void) = Call[await_suspend] : func:r95_91, this:r0_41, 0:r95_102 # 95| mu95_104(unknown) = ^CallSideEffect : ~m? #-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? -#-----| Goto -> Block 11 +#-----| Goto -> Block 14 # 99| co_returnable_value co_yield_value_value(int) # 99| Block 0 @@ -1440,53 +1460,32 @@ coroutines.cpp: #-----| Goto -> Block 1 #-----| Block 3 -#-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : -#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 -# 99| r99_33(suspend_always *) = CopyValue : r99_22 -# 99| r99_34(glval) = CopyValue : r99_33 -#-----| r0_11(glval) = Convert : r99_34 -# 99| r99_35(glval) = FunctionAddress[await_resume] : -# 99| v99_36(void) = Call[await_resume] : func:r99_35, this:r0_11 -# 99| mu99_37(unknown) = ^CallSideEffect : ~m? -#-----| v0_12(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~m? -#-----| v0_13(void) = CopyValue : v99_36 -# 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : -# 100| r100_2(glval) = FunctionAddress[yield_value] : -# 100| r100_3(glval) = VariableAddress[i] : -# 100| r100_4(int) = Load[i] : &:r100_3, ~m? -# 100| r100_5(suspend_always) = Call[yield_value] : func:r100_2, this:r100_1, 0:r100_4 -# 100| mu100_6(unknown) = ^CallSideEffect : ~m? -# 100| v100_7(void) = ^IndirectReadSideEffect[-1] : &:r100_1, ~m? -# 100| mu100_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 100| r100_9(glval) = VariableAddress[#temp100:13] : -# 100| r100_10(glval) = VariableAddress[(unnamed local variable)] : -# 100| r100_11(glval) = FunctionAddress[yield_value] : -# 100| r100_12(glval) = VariableAddress[i] : -# 100| r100_13(int) = Load[i] : &:r100_12, ~m? -# 100| r100_14(suspend_always) = Call[yield_value] : func:r100_11, this:r100_10, 0:r100_13 -# 100| mu100_15(unknown) = ^CallSideEffect : ~m? -# 100| v100_16(void) = ^IndirectReadSideEffect[-1] : &:r100_10, ~m? -# 100| mu100_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_10 -# 100| mu100_18(suspend_always) = Store[#temp100:13] : &:r100_9, r100_14 -# 100| r100_19(suspend_always *) = CopyValue : r100_9 -# 100| mu100_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r100_19 -#-----| r0_15(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 100| r100_21(glval) = CopyValue : r0_15 -# 100| r100_22(glval) = Convert : r100_21 -# 100| r100_23(glval) = FunctionAddress[await_ready] : -# 100| r100_24(bool) = Call[await_ready] : func:r100_23, this:r100_22 -# 100| mu100_25(unknown) = ^CallSideEffect : ~m? -# 100| v100_26(void) = ^IndirectReadSideEffect[-1] : &:r100_22, ~m? -# 100| v100_27(void) = ConditionalBranch : r100_24 -#-----| False -> Block 6 -#-----| True -> Block 5 +#-----| r0_8(bool) = Constant[1] : +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 +# 99| r99_33(suspend_always *) = CopyValue : r99_22 +# 99| r99_34(glval) = CopyValue : r99_33 +#-----| r0_11(glval) = Convert : r99_34 +# 99| r99_35(glval) = FunctionAddress[await_resume] : +# 99| v99_36(void) = Call[await_resume] : func:r99_35, this:r0_11 +# 99| mu99_37(unknown) = ^CallSideEffect : ~m? +#-----| v0_12(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~m? +#-----| v0_13(void) = CopyValue : v99_36 +# 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : +# 100| r100_2(glval) = FunctionAddress[yield_value] : +# 100| r100_3(glval) = VariableAddress[i] : +# 100| r100_4(int) = Load[i] : &:r100_3, ~m? +# 100| r100_5(suspend_always) = Call[yield_value] : func:r100_2, this:r100_1, 0:r100_4 +# 100| mu100_6(unknown) = ^CallSideEffect : ~m? +# 100| v100_7(void) = ^IndirectReadSideEffect[-1] : &:r100_1, ~m? +# 100| mu100_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 +#-----| C++ Exception -> Block 9 +#-----| Goto -> Block 5 # 99| Block 4 # 99| r99_38(suspend_always *) = CopyValue : r99_22 # 99| r99_39(glval) = CopyValue : r99_38 -#-----| r0_16(glval) = Convert : r99_39 +#-----| r0_14(glval) = Convert : r99_39 # 99| r99_40(glval) = FunctionAddress[await_suspend] : # 99| r99_41(glval>) = VariableAddress[#temp99:21] : # 99| mu99_42(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_41 @@ -1499,12 +1498,41 @@ coroutines.cpp: # 99| v99_49(void) = ^BufferReadSideEffect[0] : &:r99_46, ~m? # 99| mu99_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_41 # 99| r99_51(coroutine_handle) = Load[#temp99:21] : &:r99_41, ~m? -# 99| v99_52(void) = Call[await_suspend] : func:r99_40, this:r0_16, 0:r99_51 +# 99| v99_52(void) = Call[await_suspend] : func:r99_40, this:r0_14, 0:r99_51 # 99| mu99_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_14, ~m? #-----| Goto -> Block 3 -# 100| Block 5 +#-----| Block 5 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 100| r100_9(glval) = VariableAddress[#temp100:13] : +# 100| r100_10(glval) = VariableAddress[(unnamed local variable)] : +# 100| r100_11(glval) = FunctionAddress[yield_value] : +# 100| r100_12(glval) = VariableAddress[i] : +# 100| r100_13(int) = Load[i] : &:r100_12, ~m? +# 100| r100_14(suspend_always) = Call[yield_value] : func:r100_11, this:r100_10, 0:r100_13 +# 100| mu100_15(unknown) = ^CallSideEffect : ~m? +# 100| v100_16(void) = ^IndirectReadSideEffect[-1] : &:r100_10, ~m? +# 100| mu100_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_10 +#-----| C++ Exception -> Block 9 +#-----| Goto -> Block 6 + +# 100| Block 6 +# 100| mu100_18(suspend_always) = Store[#temp100:13] : &:r100_9, r100_14 +# 100| r100_19(suspend_always *) = CopyValue : r100_9 +# 100| mu100_20(suspend_always *) = Store[#temp0:0] : &:r0_16, r100_19 +#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 100| r100_21(glval) = CopyValue : r0_17 +# 100| r100_22(glval) = Convert : r100_21 +# 100| r100_23(glval) = FunctionAddress[await_ready] : +# 100| r100_24(bool) = Call[await_ready] : func:r100_23, this:r100_22 +# 100| mu100_25(unknown) = ^CallSideEffect : ~m? +# 100| v100_26(void) = ^IndirectReadSideEffect[-1] : &:r100_22, ~m? +# 100| v100_27(void) = ConditionalBranch : r100_24 +#-----| False -> Block 8 +#-----| True -> Block 7 + +# 100| Block 7 # 100| r100_28(suspend_always *) = CopyValue : r100_19 # 100| r100_29(glval) = CopyValue : r100_28 #-----| r0_18(glval) = Convert : r100_29 @@ -1512,9 +1540,9 @@ coroutines.cpp: # 100| v100_31(void) = Call[await_resume] : func:r100_30, this:r0_18 # 100| mu100_32(unknown) = ^CallSideEffect : ~m? #-----| v0_19(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m? -#-----| Goto -> Block 10 +#-----| Goto -> Block 12 -# 100| Block 6 +# 100| Block 8 # 100| r100_33(suspend_always *) = CopyValue : r100_19 # 100| r100_34(glval) = CopyValue : r100_33 #-----| r0_20(glval) = Convert : r100_34 @@ -1533,31 +1561,31 @@ coroutines.cpp: # 100| v100_47(void) = Call[await_suspend] : func:r100_35, this:r0_20, 0:r100_46 # 100| mu100_48(unknown) = ^CallSideEffect : ~m? #-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? -#-----| Goto -> Block 5 +#-----| Goto -> Block 7 -#-----| Block 7 +#-----| Block 9 #-----| v0_22(void) = CatchAny : #-----| r0_23(glval) = VariableAddress[(unnamed local variable)] : #-----| r0_24(bool) = Load[(unnamed local variable)] : &:r0_23, ~m? #-----| r0_25(bool) = LogicalNot : r0_24 #-----| v0_26(void) = ConditionalBranch : r0_25 -#-----| False -> Block 9 -#-----| True -> Block 8 +#-----| False -> Block 11 +#-----| True -> Block 10 -#-----| Block 8 +#-----| Block 10 #-----| v0_27(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 99| Block 9 +# 99| Block 11 # 99| r99_54(glval) = VariableAddress[(unnamed local variable)] : # 99| r99_55(glval) = FunctionAddress[unhandled_exception] : # 99| v99_56(void) = Call[unhandled_exception] : func:r99_55, this:r99_54 # 99| mu99_57(unknown) = ^CallSideEffect : ~m? # 99| v99_58(void) = ^IndirectReadSideEffect[-1] : &:r99_54, ~m? # 99| mu99_59(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_54 -#-----| Goto -> Block 10 +#-----| Goto -> Block 12 -#-----| Block 10 +#-----| Block 12 #-----| v0_28(void) = NoOp : # 99| r99_60(glval) = VariableAddress[(unnamed local variable)] : # 99| r99_61(glval) = FunctionAddress[final_suspend] : @@ -1584,10 +1612,10 @@ coroutines.cpp: # 99| mu99_80(unknown) = ^CallSideEffect : ~m? # 99| v99_81(void) = ^IndirectReadSideEffect[-1] : &:r99_77, ~m? #-----| v0_31(void) = ConditionalBranch : r99_79 -#-----| False -> Block 12 -#-----| True -> Block 11 +#-----| False -> Block 14 +#-----| True -> Block 13 -# 99| Block 11 +# 99| Block 13 # 99| r99_82(suspend_always *) = CopyValue : r99_74 # 99| r99_83(glval) = CopyValue : r99_82 #-----| r0_32(glval) = Convert : r99_83 @@ -1599,7 +1627,7 @@ coroutines.cpp: # 99| v99_88(void) = ReturnValue : &:r99_87, ~m? #-----| Goto -> Block 1 -# 99| Block 12 +# 99| Block 14 # 99| r99_89(suspend_always *) = CopyValue : r99_74 # 99| r99_90(glval) = CopyValue : r99_89 #-----| r0_34(glval) = Convert : r99_90 @@ -1618,7 +1646,7 @@ coroutines.cpp: # 99| v99_103(void) = Call[await_suspend] : func:r99_91, this:r0_34, 0:r99_102 # 99| mu99_104(unknown) = ^CallSideEffect : ~m? #-----| v0_35(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~m? -#-----| Goto -> Block 11 +#-----| Goto -> Block 13 # 103| co_returnable_void co_yield_and_return_void(int) # 103| Block 0 @@ -1689,34 +1717,13 @@ coroutines.cpp: # 104| mu104_6(unknown) = ^CallSideEffect : ~m? # 104| v104_7(void) = ^IndirectReadSideEffect[-1] : &:r104_1, ~m? # 104| mu104_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_1 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 104| r104_9(glval) = VariableAddress[#temp104:13] : -# 104| r104_10(glval) = VariableAddress[(unnamed local variable)] : -# 104| r104_11(glval) = FunctionAddress[yield_value] : -# 104| r104_12(glval) = VariableAddress[i] : -# 104| r104_13(int) = Load[i] : &:r104_12, ~m? -# 104| r104_14(suspend_always) = Call[yield_value] : func:r104_11, this:r104_10, 0:r104_13 -# 104| mu104_15(unknown) = ^CallSideEffect : ~m? -# 104| v104_16(void) = ^IndirectReadSideEffect[-1] : &:r104_10, ~m? -# 104| mu104_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_10 -# 104| mu104_18(suspend_always) = Store[#temp104:13] : &:r104_9, r104_14 -# 104| r104_19(suspend_always *) = CopyValue : r104_9 -# 104| mu104_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r104_19 -#-----| r0_15(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 104| r104_21(glval) = CopyValue : r0_15 -# 104| r104_22(glval) = Convert : r104_21 -# 104| r104_23(glval) = FunctionAddress[await_ready] : -# 104| r104_24(bool) = Call[await_ready] : func:r104_23, this:r104_22 -# 104| mu104_25(unknown) = ^CallSideEffect : ~m? -# 104| v104_26(void) = ^IndirectReadSideEffect[-1] : &:r104_22, ~m? -# 104| v104_27(void) = ConditionalBranch : r104_24 -#-----| False -> Block 6 -#-----| True -> Block 5 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 5 # 103| Block 4 # 103| r103_38(suspend_always *) = CopyValue : r103_22 # 103| r103_39(glval) = CopyValue : r103_38 -#-----| r0_16(glval) = Convert : r103_39 +#-----| r0_14(glval) = Convert : r103_39 # 103| r103_40(glval) = FunctionAddress[await_suspend] : # 103| r103_41(glval>) = VariableAddress[#temp103:20] : # 103| mu103_42(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_41 @@ -1729,12 +1736,41 @@ coroutines.cpp: # 103| v103_49(void) = ^BufferReadSideEffect[0] : &:r103_46, ~m? # 103| mu103_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_41 # 103| r103_51(coroutine_handle) = Load[#temp103:20] : &:r103_41, ~m? -# 103| v103_52(void) = Call[await_suspend] : func:r103_40, this:r0_16, 0:r103_51 +# 103| v103_52(void) = Call[await_suspend] : func:r103_40, this:r0_14, 0:r103_51 # 103| mu103_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_14, ~m? #-----| Goto -> Block 3 -# 104| Block 5 +#-----| Block 5 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 104| r104_9(glval) = VariableAddress[#temp104:13] : +# 104| r104_10(glval) = VariableAddress[(unnamed local variable)] : +# 104| r104_11(glval) = FunctionAddress[yield_value] : +# 104| r104_12(glval) = VariableAddress[i] : +# 104| r104_13(int) = Load[i] : &:r104_12, ~m? +# 104| r104_14(suspend_always) = Call[yield_value] : func:r104_11, this:r104_10, 0:r104_13 +# 104| mu104_15(unknown) = ^CallSideEffect : ~m? +# 104| v104_16(void) = ^IndirectReadSideEffect[-1] : &:r104_10, ~m? +# 104| mu104_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_10 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 6 + +# 104| Block 6 +# 104| mu104_18(suspend_always) = Store[#temp104:13] : &:r104_9, r104_14 +# 104| r104_19(suspend_always *) = CopyValue : r104_9 +# 104| mu104_20(suspend_always *) = Store[#temp0:0] : &:r0_16, r104_19 +#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 104| r104_21(glval) = CopyValue : r0_17 +# 104| r104_22(glval) = Convert : r104_21 +# 104| r104_23(glval) = FunctionAddress[await_ready] : +# 104| r104_24(bool) = Call[await_ready] : func:r104_23, this:r104_22 +# 104| mu104_25(unknown) = ^CallSideEffect : ~m? +# 104| v104_26(void) = ^IndirectReadSideEffect[-1] : &:r104_22, ~m? +# 104| v104_27(void) = ConditionalBranch : r104_24 +#-----| False -> Block 8 +#-----| True -> Block 7 + +# 104| Block 7 # 104| r104_28(suspend_always *) = CopyValue : r104_19 # 104| r104_29(glval) = CopyValue : r104_28 #-----| r0_18(glval) = Convert : r104_29 @@ -1748,14 +1784,13 @@ coroutines.cpp: #-----| mu0_23(unknown) = ^CallSideEffect : ~m? #-----| v0_24(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? #-----| mu0_25(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_20 -# 105| v105_1(void) = NoOp : -#-----| v0_26(void) = NoOp : -#-----| Goto (back edge) -> Block 10 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 9 -# 104| Block 6 +# 104| Block 8 # 104| r104_33(suspend_always *) = CopyValue : r104_19 # 104| r104_34(glval) = CopyValue : r104_33 -#-----| r0_27(glval) = Convert : r104_34 +#-----| r0_26(glval) = Convert : r104_34 # 104| r104_35(glval) = FunctionAddress[await_suspend] : # 104| r104_36(glval>) = VariableAddress[#temp104:3] : # 104| mu104_37(coroutine_handle) = Uninitialized[#temp104:3] : &:r104_36 @@ -1768,34 +1803,39 @@ coroutines.cpp: # 104| v104_44(void) = ^BufferReadSideEffect[0] : &:r104_41, ~m? # 104| mu104_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r104_36 # 104| r104_46(coroutine_handle) = Load[#temp104:3] : &:r104_36, ~m? -# 104| v104_47(void) = Call[await_suspend] : func:r104_35, this:r0_27, 0:r104_46 +# 104| v104_47(void) = Call[await_suspend] : func:r104_35, this:r0_26, 0:r104_46 # 104| mu104_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? -#-----| Goto -> Block 5 +#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~m? +#-----| Goto -> Block 7 -#-----| Block 7 +# 105| Block 9 +# 105| v105_1(void) = NoOp : +#-----| v0_28(void) = NoOp : +#-----| Goto (back edge) -> Block 13 + +#-----| Block 10 #-----| v0_29(void) = CatchAny : #-----| r0_30(glval) = VariableAddress[(unnamed local variable)] : #-----| r0_31(bool) = Load[(unnamed local variable)] : &:r0_30, ~m? #-----| r0_32(bool) = LogicalNot : r0_31 #-----| v0_33(void) = ConditionalBranch : r0_32 -#-----| False -> Block 9 -#-----| True -> Block 8 +#-----| False -> Block 12 +#-----| True -> Block 11 -#-----| Block 8 +#-----| Block 11 #-----| v0_34(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 103| Block 9 +# 103| Block 12 # 103| r103_54(glval) = VariableAddress[(unnamed local variable)] : # 103| r103_55(glval) = FunctionAddress[unhandled_exception] : # 103| v103_56(void) = Call[unhandled_exception] : func:r103_55, this:r103_54 # 103| mu103_57(unknown) = ^CallSideEffect : ~m? # 103| v103_58(void) = ^IndirectReadSideEffect[-1] : &:r103_54, ~m? # 103| mu103_59(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_54 -#-----| Goto -> Block 10 +#-----| Goto -> Block 13 -#-----| Block 10 +#-----| Block 13 #-----| v0_35(void) = NoOp : # 103| r103_60(glval) = VariableAddress[(unnamed local variable)] : # 103| r103_61(glval) = FunctionAddress[final_suspend] : @@ -1822,10 +1862,10 @@ coroutines.cpp: # 103| mu103_80(unknown) = ^CallSideEffect : ~m? # 103| v103_81(void) = ^IndirectReadSideEffect[-1] : &:r103_77, ~m? #-----| v0_38(void) = ConditionalBranch : r103_79 -#-----| False -> Block 12 -#-----| True -> Block 11 +#-----| False -> Block 15 +#-----| True -> Block 14 -# 103| Block 11 +# 103| Block 14 # 103| r103_82(suspend_always *) = CopyValue : r103_74 # 103| r103_83(glval) = CopyValue : r103_82 #-----| r0_39(glval) = Convert : r103_83 @@ -1837,7 +1877,7 @@ coroutines.cpp: # 103| v103_88(void) = ReturnValue : &:r103_87, ~m? #-----| Goto -> Block 1 -# 103| Block 12 +# 103| Block 15 # 103| r103_89(suspend_always *) = CopyValue : r103_74 # 103| r103_90(glval) = CopyValue : r103_89 #-----| r0_41(glval) = Convert : r103_90 @@ -1856,7 +1896,7 @@ coroutines.cpp: # 103| v103_103(void) = Call[await_suspend] : func:r103_91, this:r0_41, 0:r103_102 # 103| mu103_104(unknown) = ^CallSideEffect : ~m? #-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? -#-----| Goto -> Block 11 +#-----| Goto -> Block 14 # 108| co_returnable_value co_yield_and_return_value(int) # 108| Block 0 @@ -1927,34 +1967,13 @@ coroutines.cpp: # 109| mu109_6(unknown) = ^CallSideEffect : ~m? # 109| v109_7(void) = ^IndirectReadSideEffect[-1] : &:r109_1, ~m? # 109| mu109_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_1 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 109| r109_9(glval) = VariableAddress[#temp109:13] : -# 109| r109_10(glval) = VariableAddress[(unnamed local variable)] : -# 109| r109_11(glval) = FunctionAddress[yield_value] : -# 109| r109_12(glval) = VariableAddress[i] : -# 109| r109_13(int) = Load[i] : &:r109_12, ~m? -# 109| r109_14(suspend_always) = Call[yield_value] : func:r109_11, this:r109_10, 0:r109_13 -# 109| mu109_15(unknown) = ^CallSideEffect : ~m? -# 109| v109_16(void) = ^IndirectReadSideEffect[-1] : &:r109_10, ~m? -# 109| mu109_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_10 -# 109| mu109_18(suspend_always) = Store[#temp109:13] : &:r109_9, r109_14 -# 109| r109_19(suspend_always *) = CopyValue : r109_9 -# 109| mu109_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r109_19 -#-----| r0_15(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 109| r109_21(glval) = CopyValue : r0_15 -# 109| r109_22(glval) = Convert : r109_21 -# 109| r109_23(glval) = FunctionAddress[await_ready] : -# 109| r109_24(bool) = Call[await_ready] : func:r109_23, this:r109_22 -# 109| mu109_25(unknown) = ^CallSideEffect : ~m? -# 109| v109_26(void) = ^IndirectReadSideEffect[-1] : &:r109_22, ~m? -# 109| v109_27(void) = ConditionalBranch : r109_24 -#-----| False -> Block 6 -#-----| True -> Block 5 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 5 # 108| Block 4 # 108| r108_38(suspend_always *) = CopyValue : r108_22 # 108| r108_39(glval) = CopyValue : r108_38 -#-----| r0_16(glval) = Convert : r108_39 +#-----| r0_14(glval) = Convert : r108_39 # 108| r108_40(glval) = FunctionAddress[await_suspend] : # 108| r108_41(glval>) = VariableAddress[#temp108:21] : # 108| mu108_42(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_41 @@ -1967,12 +1986,41 @@ coroutines.cpp: # 108| v108_49(void) = ^BufferReadSideEffect[0] : &:r108_46, ~m? # 108| mu108_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_41 # 108| r108_51(coroutine_handle) = Load[#temp108:21] : &:r108_41, ~m? -# 108| v108_52(void) = Call[await_suspend] : func:r108_40, this:r0_16, 0:r108_51 +# 108| v108_52(void) = Call[await_suspend] : func:r108_40, this:r0_14, 0:r108_51 # 108| mu108_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_14, ~m? #-----| Goto -> Block 3 -# 109| Block 5 +#-----| Block 5 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 109| r109_9(glval) = VariableAddress[#temp109:13] : +# 109| r109_10(glval) = VariableAddress[(unnamed local variable)] : +# 109| r109_11(glval) = FunctionAddress[yield_value] : +# 109| r109_12(glval) = VariableAddress[i] : +# 109| r109_13(int) = Load[i] : &:r109_12, ~m? +# 109| r109_14(suspend_always) = Call[yield_value] : func:r109_11, this:r109_10, 0:r109_13 +# 109| mu109_15(unknown) = ^CallSideEffect : ~m? +# 109| v109_16(void) = ^IndirectReadSideEffect[-1] : &:r109_10, ~m? +# 109| mu109_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_10 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 6 + +# 109| Block 6 +# 109| mu109_18(suspend_always) = Store[#temp109:13] : &:r109_9, r109_14 +# 109| r109_19(suspend_always *) = CopyValue : r109_9 +# 109| mu109_20(suspend_always *) = Store[#temp0:0] : &:r0_16, r109_19 +#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 109| r109_21(glval) = CopyValue : r0_17 +# 109| r109_22(glval) = Convert : r109_21 +# 109| r109_23(glval) = FunctionAddress[await_ready] : +# 109| r109_24(bool) = Call[await_ready] : func:r109_23, this:r109_22 +# 109| mu109_25(unknown) = ^CallSideEffect : ~m? +# 109| v109_26(void) = ^IndirectReadSideEffect[-1] : &:r109_22, ~m? +# 109| v109_27(void) = ConditionalBranch : r109_24 +#-----| False -> Block 8 +#-----| True -> Block 7 + +# 109| Block 7 # 109| r109_28(suspend_always *) = CopyValue : r109_19 # 109| r109_29(glval) = CopyValue : r109_28 #-----| r0_18(glval) = Convert : r109_29 @@ -1990,14 +2038,13 @@ coroutines.cpp: #-----| mu0_23(unknown) = ^CallSideEffect : ~m? #-----| v0_24(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? #-----| mu0_25(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_20 -# 110| v110_5(void) = NoOp : -#-----| v0_26(void) = NoOp : -#-----| Goto (back edge) -> Block 10 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 9 -# 109| Block 6 +# 109| Block 8 # 109| r109_33(suspend_always *) = CopyValue : r109_19 # 109| r109_34(glval) = CopyValue : r109_33 -#-----| r0_27(glval) = Convert : r109_34 +#-----| r0_26(glval) = Convert : r109_34 # 109| r109_35(glval) = FunctionAddress[await_suspend] : # 109| r109_36(glval>) = VariableAddress[#temp109:3] : # 109| mu109_37(coroutine_handle) = Uninitialized[#temp109:3] : &:r109_36 @@ -2010,34 +2057,39 @@ coroutines.cpp: # 109| v109_44(void) = ^BufferReadSideEffect[0] : &:r109_41, ~m? # 109| mu109_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r109_36 # 109| r109_46(coroutine_handle) = Load[#temp109:3] : &:r109_36, ~m? -# 109| v109_47(void) = Call[await_suspend] : func:r109_35, this:r0_27, 0:r109_46 +# 109| v109_47(void) = Call[await_suspend] : func:r109_35, this:r0_26, 0:r109_46 # 109| mu109_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? -#-----| Goto -> Block 5 +#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~m? +#-----| Goto -> Block 7 -#-----| Block 7 +# 110| Block 9 +# 110| v110_5(void) = NoOp : +#-----| v0_28(void) = NoOp : +#-----| Goto (back edge) -> Block 13 + +#-----| Block 10 #-----| v0_29(void) = CatchAny : #-----| r0_30(glval) = VariableAddress[(unnamed local variable)] : #-----| r0_31(bool) = Load[(unnamed local variable)] : &:r0_30, ~m? #-----| r0_32(bool) = LogicalNot : r0_31 #-----| v0_33(void) = ConditionalBranch : r0_32 -#-----| False -> Block 9 -#-----| True -> Block 8 +#-----| False -> Block 12 +#-----| True -> Block 11 -#-----| Block 8 +#-----| Block 11 #-----| v0_34(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 108| Block 9 +# 108| Block 12 # 108| r108_54(glval) = VariableAddress[(unnamed local variable)] : # 108| r108_55(glval) = FunctionAddress[unhandled_exception] : # 108| v108_56(void) = Call[unhandled_exception] : func:r108_55, this:r108_54 # 108| mu108_57(unknown) = ^CallSideEffect : ~m? # 108| v108_58(void) = ^IndirectReadSideEffect[-1] : &:r108_54, ~m? # 108| mu108_59(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_54 -#-----| Goto -> Block 10 +#-----| Goto -> Block 13 -#-----| Block 10 +#-----| Block 13 #-----| v0_35(void) = NoOp : # 108| r108_60(glval) = VariableAddress[(unnamed local variable)] : # 108| r108_61(glval) = FunctionAddress[final_suspend] : @@ -2064,10 +2116,10 @@ coroutines.cpp: # 108| mu108_80(unknown) = ^CallSideEffect : ~m? # 108| v108_81(void) = ^IndirectReadSideEffect[-1] : &:r108_77, ~m? #-----| v0_38(void) = ConditionalBranch : r108_79 -#-----| False -> Block 12 -#-----| True -> Block 11 +#-----| False -> Block 15 +#-----| True -> Block 14 -# 108| Block 11 +# 108| Block 14 # 108| r108_82(suspend_always *) = CopyValue : r108_74 # 108| r108_83(glval) = CopyValue : r108_82 #-----| r0_39(glval) = Convert : r108_83 @@ -2079,7 +2131,7 @@ coroutines.cpp: # 108| v108_88(void) = ReturnValue : &:r108_87, ~m? #-----| Goto -> Block 1 -# 108| Block 12 +# 108| Block 15 # 108| r108_89(suspend_always *) = CopyValue : r108_74 # 108| r108_90(glval) = CopyValue : r108_89 #-----| r0_41(glval) = Convert : r108_90 @@ -2098,7 +2150,7 @@ coroutines.cpp: # 108| v108_103(void) = Call[await_suspend] : func:r108_91, this:r0_41, 0:r108_102 # 108| mu108_104(unknown) = ^CallSideEffect : ~m? #-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? -#-----| Goto -> Block 11 +#-----| Goto -> Block 14 destructors_for_temps.cpp: # 9| void ClassWithConstructor::ClassWithConstructor(ClassWithConstructor&&) @@ -6769,7 +6821,7 @@ ir.cpp: # 728| r728_3(char *) = Convert : r728_2 # 728| mu728_4(char *) = Store[#throw728:7] : &:r728_1, r728_3 # 728| v728_5(void) = ThrowValue : &:r728_1, ~m? -#-----| C++ Exception -> Block 9 +#-----| C++ Exception -> Block 10 # 730| Block 4 # 730| r730_1(glval) = VariableAddress[x] : @@ -6777,7 +6829,7 @@ ir.cpp: # 730| r730_3(int) = Constant[2] : # 730| r730_4(bool) = CompareLT : r730_2, r730_3 # 730| v730_5(void) = ConditionalBranch : r730_4 -#-----| False -> Block 8 +#-----| False -> Block 9 #-----| True -> Block 5 # 731| Block 5 @@ -6795,7 +6847,7 @@ ir.cpp: # 731| r731_8(int) = Load[#temp731:11] : &:r731_7, ~m? # 731| r731_9(glval) = VariableAddress[x] : # 731| mu731_10(int) = Store[x] : &:r731_9, r731_8 -#-----| Goto -> Block 8 +#-----| Goto -> Block 9 # 731| Block 7 # 731| r731_11(glval) = VariableAddress[#throw731:19] : @@ -6807,21 +6859,25 @@ ir.cpp: # 731| mu731_17(unknown) = ^CallSideEffect : ~m? # 731| v731_18(void) = ^BufferReadSideEffect[0] : &:r731_15, ~m? # 731| mu731_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r731_11 -# 731| v731_20(void) = ThrowValue : &:r731_11, ~m? -#-----| C++ Exception -> Block 9 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 8 -# 733| Block 8 +# 731| Block 8 +# 731| v731_20(void) = ThrowValue : &:r731_11, ~m? +#-----| C++ Exception -> Block 10 + +# 733| Block 9 # 733| r733_1(int) = Constant[7] : # 733| r733_2(glval) = VariableAddress[x] : # 733| mu733_3(int) = Store[x] : &:r733_2, r733_1 -#-----| Goto -> Block 14 - -# 735| Block 9 -# 735| v735_1(void) = CatchByType[const char *] : -#-----| C++ Exception -> Block 11 -#-----| Goto -> Block 10 +#-----| Goto -> Block 15 # 735| Block 10 +# 735| v735_1(void) = CatchByType[const char *] : +#-----| C++ Exception -> Block 12 +#-----| Goto -> Block 11 + +# 735| Block 11 # 735| r735_2(glval) = VariableAddress[s] : # 735| mu735_3(char *) = InitializeParameter[s] : &:r735_2 # 735| r735_4(char *) = Load[s] : &:r735_2, ~m? @@ -6838,25 +6894,25 @@ ir.cpp: # 736| v736_10(void) = ThrowValue : &:r736_1, ~m? #-----| C++ Exception -> Block 2 -# 738| Block 11 -# 738| v738_1(void) = CatchByType[const String &] : -#-----| C++ Exception -> Block 13 -#-----| Goto -> Block 12 - # 738| Block 12 +# 738| v738_1(void) = CatchByType[const String &] : +#-----| C++ Exception -> Block 14 +#-----| Goto -> Block 13 + +# 738| Block 13 # 738| r738_2(glval) = VariableAddress[e] : # 738| mu738_3(String &) = InitializeParameter[e] : &:r738_2 # 738| r738_4(String &) = Load[e] : &:r738_2, ~m? # 738| mu738_5(unknown) = InitializeIndirection[e] : &:r738_4 # 738| v738_6(void) = NoOp : -#-----| Goto -> Block 14 +#-----| Goto -> Block 15 -# 740| Block 13 +# 740| Block 14 # 740| v740_1(void) = CatchAny : # 741| v741_1(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 743| Block 14 +# 743| Block 15 # 743| v743_1(void) = NoOp : # 724| v724_9(void) = ReturnVoid : #-----| Goto -> Block 1 @@ -9439,7 +9495,7 @@ ir.cpp: # 1195| r1195_3(char *) = Convert : r1195_2 # 1195| mu1195_4(char *) = Store[#throw1195:7] : &:r1195_1, r1195_3 # 1195| v1195_5(void) = ThrowValue : &:r1195_1, ~m? -#-----| C++ Exception -> Block 9 +#-----| C++ Exception -> Block 10 # 1197| Block 4 # 1197| r1197_1(glval) = VariableAddress[x] : @@ -9447,7 +9503,7 @@ ir.cpp: # 1197| r1197_3(int) = Constant[2] : # 1197| r1197_4(bool) = CompareLT : r1197_2, r1197_3 # 1197| v1197_5(void) = ConditionalBranch : r1197_4 -#-----| False -> Block 8 +#-----| False -> Block 9 #-----| True -> Block 5 # 1198| Block 5 @@ -9465,7 +9521,7 @@ ir.cpp: # 1198| r1198_8(int) = Load[#temp1198:11] : &:r1198_7, ~m? # 1198| r1198_9(glval) = VariableAddress[x] : # 1198| mu1198_10(int) = Store[x] : &:r1198_9, r1198_8 -#-----| Goto -> Block 8 +#-----| Goto -> Block 9 # 1198| Block 7 # 1198| r1198_11(glval) = VariableAddress[#throw1198:19] : @@ -9477,21 +9533,25 @@ ir.cpp: # 1198| mu1198_17(unknown) = ^CallSideEffect : ~m? # 1198| v1198_18(void) = ^BufferReadSideEffect[0] : &:r1198_15, ~m? # 1198| mu1198_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r1198_11 -# 1198| v1198_20(void) = ThrowValue : &:r1198_11, ~m? -#-----| C++ Exception -> Block 9 +#-----| C++ Exception -> Block 10 +#-----| Goto -> Block 8 -# 1200| Block 8 +# 1198| Block 8 +# 1198| v1198_20(void) = ThrowValue : &:r1198_11, ~m? +#-----| C++ Exception -> Block 10 + +# 1200| Block 9 # 1200| r1200_1(int) = Constant[7] : # 1200| r1200_2(glval) = VariableAddress[x] : # 1200| mu1200_3(int) = Store[x] : &:r1200_2, r1200_1 -#-----| Goto -> Block 13 - -# 1202| Block 9 -# 1202| v1202_1(void) = CatchByType[const char *] : -#-----| C++ Exception -> Block 11 -#-----| Goto -> Block 10 +#-----| Goto -> Block 14 # 1202| Block 10 +# 1202| v1202_1(void) = CatchByType[const char *] : +#-----| C++ Exception -> Block 12 +#-----| Goto -> Block 11 + +# 1202| Block 11 # 1202| r1202_2(glval) = VariableAddress[s] : # 1202| mu1202_3(char *) = InitializeParameter[s] : &:r1202_2 # 1202| r1202_4(char *) = Load[s] : &:r1202_2, ~m? @@ -9508,20 +9568,20 @@ ir.cpp: # 1203| v1203_10(void) = ThrowValue : &:r1203_1, ~m? #-----| C++ Exception -> Block 2 -# 1205| Block 11 +# 1205| Block 12 # 1205| v1205_1(void) = CatchByType[const String &] : #-----| C++ Exception -> Block 2 -#-----| Goto -> Block 12 +#-----| Goto -> Block 13 -# 1205| Block 12 +# 1205| Block 13 # 1205| r1205_2(glval) = VariableAddress[e] : # 1205| mu1205_3(String &) = InitializeParameter[e] : &:r1205_2 # 1205| r1205_4(String &) = Load[e] : &:r1205_2, ~m? # 1205| mu1205_5(unknown) = InitializeIndirection[e] : &:r1205_4 # 1205| v1205_6(void) = NoOp : -#-----| Goto -> Block 13 +#-----| Goto -> Block 14 -# 1207| Block 13 +# 1207| Block 14 # 1207| v1207_1(void) = NoOp : # 1191| v1191_9(void) = ReturnVoid : #-----| Goto -> Block 1 @@ -15699,11 +15759,8 @@ ir.cpp: # 2276| v2276_4(void) = Call[String] : func:r2276_3, this:r2276_1 # 2276| mu2276_5(unknown) = ^CallSideEffect : ~m? # 2276| mu2276_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2276_1 -# 2277| r2277_1(glval) = VariableAddress[b] : -# 2277| r2277_2(bool) = Load[b] : &:r2277_1, ~m? -# 2277| v2277_3(void) = ConditionalBranch : r2277_2 -#-----| False -> Block 4 -#-----| True -> Block 3 +#-----| C++ Exception -> Block 7 +#-----| Goto -> Block 3 # 2274| Block 1 # 2274| v2274_6(void) = AliasedUse : ~m? @@ -15713,7 +15770,14 @@ ir.cpp: # 2274| v2274_8(void) = Unwind : #-----| Goto -> Block 1 -# 2278| Block 3 +# 2277| Block 3 +# 2277| r2277_1(glval) = VariableAddress[b] : +# 2277| r2277_2(bool) = Load[b] : &:r2277_1, ~m? +# 2277| v2277_3(void) = ConditionalBranch : r2277_2 +#-----| False -> Block 5 +#-----| True -> Block 4 + +# 2278| Block 4 # 2278| r2278_1(glval) = VariableAddress[#throw2278:7] : # 2278| r2278_2(glval) = StringConstant["string literal"] : # 2278| r2278_3(char *) = Convert : r2278_2 @@ -15725,15 +15789,19 @@ ir.cpp: # 2281| mu2281_4(unknown) = ^CallSideEffect : ~m? # 2281| v2281_5(void) = ^IndirectReadSideEffect[-1] : &:r2281_1, ~m? # 2281| mu2281_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_1 -#-----| C++ Exception -> Block 5 +#-----| C++ Exception -> Block 7 -# 2280| Block 4 -# 2280| r2280_1(glval) = VariableAddress[s2] : -# 2280| mu2280_2(String) = Uninitialized[s2] : &:r2280_1 -# 2280| r2280_3(glval) = FunctionAddress[String] : -# 2280| v2280_4(void) = Call[String] : func:r2280_3, this:r2280_1 -# 2280| mu2280_5(unknown) = ^CallSideEffect : ~m? -# 2280| mu2280_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +# 2280| Block 5 +# 2280| r2280_1(glval) = VariableAddress[s2] : +# 2280| mu2280_2(String) = Uninitialized[s2] : &:r2280_1 +# 2280| r2280_3(glval) = FunctionAddress[String] : +# 2280| v2280_4(void) = Call[String] : func:r2280_3, this:r2280_1 +# 2280| mu2280_5(unknown) = ^CallSideEffect : ~m? +# 2280| mu2280_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +#-----| C++ Exception -> Block 7 +#-----| Goto -> Block 6 + +# 2281| Block 6 # 2281| r2281_7(glval) = VariableAddress[s2] : # 2281| r2281_8(glval) = FunctionAddress[~String] : # 2281| v2281_9(void) = Call[~String] : func:r2281_8, this:r2281_7 @@ -15746,14 +15814,14 @@ ir.cpp: # 2281| mu2281_16(unknown) = ^CallSideEffect : ~m? # 2281| v2281_17(void) = ^IndirectReadSideEffect[-1] : &:r2281_13, ~m? # 2281| mu2281_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_13 -#-----| Goto -> Block 10 +#-----| Goto -> Block 12 -# 2282| Block 5 +# 2282| Block 7 # 2282| v2282_1(void) = CatchByType[const char *] : -#-----| C++ Exception -> Block 7 -#-----| Goto -> Block 6 +#-----| C++ Exception -> Block 9 +#-----| Goto -> Block 8 -# 2282| Block 6 +# 2282| Block 8 # 2282| r2282_2(glval) = VariableAddress[s] : # 2282| mu2282_3(char *) = InitializeParameter[s] : &:r2282_2 # 2282| r2282_4(char *) = Load[s] : &:r2282_2, ~m? @@ -15770,25 +15838,25 @@ ir.cpp: # 2283| v2283_10(void) = ThrowValue : &:r2283_1, ~m? #-----| C++ Exception -> Block 2 -# 2285| Block 7 +# 2285| Block 9 # 2285| v2285_1(void) = CatchByType[const String &] : -#-----| C++ Exception -> Block 9 -#-----| Goto -> Block 8 +#-----| C++ Exception -> Block 11 +#-----| Goto -> Block 10 -# 2285| Block 8 +# 2285| Block 10 # 2285| r2285_2(glval) = VariableAddress[e] : # 2285| mu2285_3(String &) = InitializeParameter[e] : &:r2285_2 # 2285| r2285_4(String &) = Load[e] : &:r2285_2, ~m? # 2285| mu2285_5(unknown) = InitializeIndirection[e] : &:r2285_4 # 2285| v2285_6(void) = NoOp : -#-----| Goto -> Block 10 +#-----| Goto -> Block 12 -# 2287| Block 9 +# 2287| Block 11 # 2287| v2287_1(void) = CatchAny : # 2288| v2288_1(void) = ReThrow : #-----| C++ Exception -> Block 2 -# 2290| Block 10 +# 2290| Block 12 # 2290| v2290_1(void) = NoOp : # 2274| v2274_9(void) = ReturnVoid : #-----| Goto -> Block 1 From 96b7250b61233b35ce3f636c79c59a5c14ba9313 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 16 Jun 2025 13:01:18 +0200 Subject: [PATCH 14/35] C#: Mass enable quality queries and update tags. --- csharp/ql/src/API Abuse/CallToGCCollect.ql | 6 +++--- csharp/ql/src/API Abuse/CallToObsoleteMethod.ql | 3 ++- csharp/ql/src/API Abuse/ClassImplementsICloneable.ql | 2 +- csharp/ql/src/API Abuse/FormatInvalid.ql | 6 +++--- csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql | 7 ++++--- csharp/ql/src/API Abuse/NullArgumentToEquals.ql | 3 ++- csharp/ql/src/ASP/BlockCodeResponseWrite.ql | 4 +++- .../Refactoring Opportunities/InappropriateIntimacy.ql | 4 +++- csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql | 5 +++-- .../ql/src/Bad Practices/CatchOfNullReferenceException.ql | 4 +++- .../ql/src/Bad Practices/Control-Flow/ConstantCondition.ql | 4 ++-- .../Declarations/LocalScopeVariableShadowsMember.ql | 3 ++- .../src/Bad Practices/Declarations/TooManyRefParameters.ql | 4 +++- csharp/ql/src/Bad Practices/EmptyCatchBlock.ql | 5 +++-- .../Implementation Hiding/ExposeRepresentation.ql | 4 +++- .../Naming Conventions/FieldMasksSuperField.ql | 3 ++- .../Bad Practices/Naming Conventions/SameNameAsSuper.ql | 3 ++- csharp/ql/src/Bad Practices/PathCombine.ql | 4 +++- csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql | 5 +++-- csharp/ql/src/CSI/CompareIdenticalValues.ql | 4 +++- csharp/ql/src/CSI/NullAlways.ql | 4 ++-- csharp/ql/src/CSI/NullMaybe.ql | 4 ++-- csharp/ql/src/Complexity/BlockWithTooManyStatements.ql | 5 +++-- csharp/ql/src/Complexity/ComplexCondition.ql | 4 +++- csharp/ql/src/Concurrency/FutileSyncOnField.ql | 5 +++-- csharp/ql/src/Concurrency/LockOrder.ql | 5 +++-- csharp/ql/src/Concurrency/LockThis.ql | 5 +++-- csharp/ql/src/Concurrency/LockedWait.ql | 5 +++-- csharp/ql/src/Dead Code/DeadStoreOfLocal.ql | 5 +++-- csharp/ql/src/Documentation/XmldocMissingSummary.ql | 4 +++- csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql | 5 +++-- csharp/ql/src/Language Abuse/CatchOfGenericException.ql | 5 +++-- csharp/ql/src/Language Abuse/ChainedIs.ql | 6 ++++-- csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql | 6 ++++-- csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql | 6 ++++-- csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql | 5 +++-- csharp/ql/src/Language Abuse/MissedTernaryOpportunity.ql | 4 +++- csharp/ql/src/Language Abuse/MissedUsingOpportunity.ql | 4 +++- csharp/ql/src/Language Abuse/NestedIf.ql | 4 +++- csharp/ql/src/Language Abuse/RethrowException.ql | 5 +++-- csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql | 3 ++- csharp/ql/src/Language Abuse/UnusedPropertyValue.ql | 5 +++-- .../Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql | 7 +++---- .../ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql | 5 ++--- csharp/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql | 6 +++--- .../ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql | 3 ++- csharp/ql/src/Likely Bugs/ConstantComparison.ql | 4 +++- csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql | 5 ++--- csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql | 4 ++-- csharp/ql/src/Likely Bugs/EqualsArray.ql | 3 ++- csharp/ql/src/Likely Bugs/HashedButNoHash.ql | 6 +++--- csharp/ql/src/Likely Bugs/ImpossibleArrayCast.ql | 4 ++-- csharp/ql/src/Likely Bugs/IncomparableEquals.ql | 3 ++- csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql | 4 ++-- csharp/ql/src/Likely Bugs/PossibleLossOfPrecision.ql | 3 ++- csharp/ql/src/Likely Bugs/RecursiveEquals.ql | 5 +++-- csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql | 4 ++-- csharp/ql/src/Likely Bugs/SelfAssignment.ql | 5 ++--- csharp/ql/src/Likely Bugs/Statements/EmptyBlock.ql | 5 +++-- csharp/ql/src/Likely Bugs/Statements/EmptyLockStatement.ql | 5 +++-- csharp/ql/src/Likely Bugs/StaticFieldWrittenByInstance.ql | 2 +- csharp/ql/src/Likely Bugs/StringBuilderCharInit.ql | 4 +++- csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql | 6 +++--- csharp/ql/src/Linq/MissedAllOpportunity.ql | 4 +++- csharp/ql/src/Linq/MissedCastOpportunity.ql | 4 +++- csharp/ql/src/Linq/MissedOfTypeOpportunity.ql | 4 +++- csharp/ql/src/Linq/MissedSelectOpportunity.ql | 4 +++- csharp/ql/src/Linq/MissedWhereOpportunity.ql | 4 +++- csharp/ql/src/Linq/RedundantSelect.ql | 4 +++- csharp/ql/src/Performance/StringBuilderInLoop.ql | 4 +++- csharp/ql/src/Performance/StringConcatenationInLoop.ql | 6 +++--- csharp/ql/src/Performance/UseTryGetValue.ql | 6 +++--- csharp/ql/src/Useless code/DefaultToString.ql | 6 +++--- csharp/ql/src/Useless code/FutileConditional.ql | 4 +++- csharp/ql/src/Useless code/IntGetHashCode.ql | 5 +++-- csharp/ql/src/Useless code/RedundantToStringCall.ql | 3 ++- csharp/ql/src/Useless code/UnusedLabel.ql | 3 ++- 77 files changed, 209 insertions(+), 132 deletions(-) diff --git a/csharp/ql/src/API Abuse/CallToGCCollect.ql b/csharp/ql/src/API Abuse/CallToGCCollect.ql index 1757336d32a..b6b892e085e 100644 --- a/csharp/ql/src/API Abuse/CallToGCCollect.ql +++ b/csharp/ql/src/API Abuse/CallToGCCollect.ql @@ -5,9 +5,9 @@ * @problem.severity warning * @precision very-high * @id cs/call-to-gc - * @tags efficiency - * maintainability - * quality + * @tags quality + * reliability + * performance */ import csharp diff --git a/csharp/ql/src/API Abuse/CallToObsoleteMethod.ql b/csharp/ql/src/API Abuse/CallToObsoleteMethod.ql index 8ec7119107e..4b70b779567 100644 --- a/csharp/ql/src/API Abuse/CallToObsoleteMethod.ql +++ b/csharp/ql/src/API Abuse/CallToObsoleteMethod.ql @@ -6,8 +6,9 @@ * @problem.severity warning * @precision very-high * @id cs/call-to-obsolete-method - * @tags changeability + * @tags quality * maintainability + * changeability * external/cwe/cwe-477 */ diff --git a/csharp/ql/src/API Abuse/ClassImplementsICloneable.ql b/csharp/ql/src/API Abuse/ClassImplementsICloneable.ql index 71f19b639dc..43caeecbcd2 100644 --- a/csharp/ql/src/API Abuse/ClassImplementsICloneable.ql +++ b/csharp/ql/src/API Abuse/ClassImplementsICloneable.ql @@ -6,7 +6,7 @@ * @problem.severity recommendation * @precision very-high * @id cs/class-implements-icloneable - * @tags reliability + * @tags quality * maintainability */ diff --git a/csharp/ql/src/API Abuse/FormatInvalid.ql b/csharp/ql/src/API Abuse/FormatInvalid.ql index 2bcd15612ee..d213cce805f 100644 --- a/csharp/ql/src/API Abuse/FormatInvalid.ql +++ b/csharp/ql/src/API Abuse/FormatInvalid.ql @@ -6,9 +6,9 @@ * @problem.severity error * @precision high * @id cs/invalid-string-formatting - * @tags reliability - * maintainability - * quality + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql b/csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql index f02b0d49b54..3fc8e07f6af 100644 --- a/csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql +++ b/csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql @@ -6,9 +6,10 @@ * @problem.severity warning * @precision high * @id cs/local-not-disposed - * @tags efficiency - * maintainability - * quality + * @tags quality + * reliability + * correctness + * efficiency * external/cwe/cwe-404 * external/cwe/cwe-459 * external/cwe/cwe-460 diff --git a/csharp/ql/src/API Abuse/NullArgumentToEquals.ql b/csharp/ql/src/API Abuse/NullArgumentToEquals.ql index ec644f3f56c..14347965eb7 100644 --- a/csharp/ql/src/API Abuse/NullArgumentToEquals.ql +++ b/csharp/ql/src/API Abuse/NullArgumentToEquals.ql @@ -6,7 +6,8 @@ * @problem.severity warning * @precision high * @id cs/null-argument-to-equals - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/csharp/ql/src/ASP/BlockCodeResponseWrite.ql b/csharp/ql/src/ASP/BlockCodeResponseWrite.ql index 369a4a5bb4e..93f43342f0e 100644 --- a/csharp/ql/src/ASP/BlockCodeResponseWrite.ql +++ b/csharp/ql/src/ASP/BlockCodeResponseWrite.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/asp/response-write - * @tags maintainability + * @tags quality + * maintainability + * readability * frameworks/asp.net */ diff --git a/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql b/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql index 3e9ae20c97c..c8014edb3af 100644 --- a/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql +++ b/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql @@ -6,7 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/coupled-types - * @tags maintainability + * @tags quality + * maintainability + * complexity * modularity */ diff --git a/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql b/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql index 035e22c7d3e..4ff3dfffcf0 100644 --- a/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql +++ b/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql @@ -5,8 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/call-to-unmanaged-code - * @tags reliability - * maintainability + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql b/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql index a78d6b99c1c..39dba529b17 100644 --- a/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql +++ b/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql @@ -5,8 +5,10 @@ * @problem.severity warning * @precision very-high * @id cs/catch-nullreferenceexception - * @tags reliability + * @tags quality + * reliability * correctness + * error-handling * external/cwe/cwe-395 */ diff --git a/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql b/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql index 7bfdea1e906..5ec702f77e0 100644 --- a/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql +++ b/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql @@ -7,9 +7,9 @@ * @problem.severity warning * @precision very-high * @id cs/constant-condition - * @tags maintainability + * @tags quality + * maintainability * readability - * quality * external/cwe/cwe-835 */ diff --git a/csharp/ql/src/Bad Practices/Declarations/LocalScopeVariableShadowsMember.ql b/csharp/ql/src/Bad Practices/Declarations/LocalScopeVariableShadowsMember.ql index 766fb6d890a..cd1401a2c78 100644 --- a/csharp/ql/src/Bad Practices/Declarations/LocalScopeVariableShadowsMember.ql +++ b/csharp/ql/src/Bad Practices/Declarations/LocalScopeVariableShadowsMember.ql @@ -6,7 +6,8 @@ * @problem.severity recommendation * @precision high * @id cs/local-shadows-member - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql b/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql index 048aad57978..937be695d3f 100644 --- a/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql +++ b/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql @@ -6,8 +6,10 @@ * @problem.severity recommendation * @precision very-high * @id cs/too-many-ref-parameters - * @tags testability + * @tags quality + * maintainability * readability + * testability */ import csharp diff --git a/csharp/ql/src/Bad Practices/EmptyCatchBlock.ql b/csharp/ql/src/Bad Practices/EmptyCatchBlock.ql index 144d53dc61f..7f2996566e3 100644 --- a/csharp/ql/src/Bad Practices/EmptyCatchBlock.ql +++ b/csharp/ql/src/Bad Practices/EmptyCatchBlock.ql @@ -5,8 +5,9 @@ * @problem.severity recommendation * @precision very-high * @id cs/empty-catch-block - * @tags reliability - * readability + * @tags quality + * reliability + * error-handling * exceptions * external/cwe/cwe-390 * external/cwe/cwe-391 diff --git a/csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql b/csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql index 3aec796daf7..8c86e2a4187 100644 --- a/csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql +++ b/csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql @@ -6,7 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/expose-implementation - * @tags reliability + * @tags quality + * reliability + * correctness * external/cwe/cwe-485 */ diff --git a/csharp/ql/src/Bad Practices/Naming Conventions/FieldMasksSuperField.ql b/csharp/ql/src/Bad Practices/Naming Conventions/FieldMasksSuperField.ql index 3515e710d82..2fe61148ed2 100644 --- a/csharp/ql/src/Bad Practices/Naming Conventions/FieldMasksSuperField.ql +++ b/csharp/ql/src/Bad Practices/Naming Conventions/FieldMasksSuperField.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision high * @id cs/field-masks-base-field - * @tags reliability + * @tags quality + * maintainability * readability * naming */ diff --git a/csharp/ql/src/Bad Practices/Naming Conventions/SameNameAsSuper.ql b/csharp/ql/src/Bad Practices/Naming Conventions/SameNameAsSuper.ql index 83c795a3985..d292fd93422 100644 --- a/csharp/ql/src/Bad Practices/Naming Conventions/SameNameAsSuper.ql +++ b/csharp/ql/src/Bad Practices/Naming Conventions/SameNameAsSuper.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision high * @id cs/class-name-matches-base-class - * @tags maintainability + * @tags quality + * maintainability * readability * naming */ diff --git a/csharp/ql/src/Bad Practices/PathCombine.ql b/csharp/ql/src/Bad Practices/PathCombine.ql index aa841486bdf..24d358e83aa 100644 --- a/csharp/ql/src/Bad Practices/PathCombine.ql +++ b/csharp/ql/src/Bad Practices/PathCombine.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision very-high * @id cs/path-combine - * @tags reliability + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql b/csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql index 6a59fa1d1fa..4103e29b014 100644 --- a/csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql +++ b/csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql @@ -5,8 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/unmanaged-code - * @tags reliability - * maintainability + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/CSI/CompareIdenticalValues.ql b/csharp/ql/src/CSI/CompareIdenticalValues.ql index 55f48d5f9a9..503067a8a3e 100644 --- a/csharp/ql/src/CSI/CompareIdenticalValues.ql +++ b/csharp/ql/src/CSI/CompareIdenticalValues.ql @@ -7,7 +7,9 @@ * @problem.severity warning * @precision high * @id cs/comparison-of-identical-expressions - * @tags reliability + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/CSI/NullAlways.ql b/csharp/ql/src/CSI/NullAlways.ql index 1696f857fde..f8b7791ab89 100644 --- a/csharp/ql/src/CSI/NullAlways.ql +++ b/csharp/ql/src/CSI/NullAlways.ql @@ -5,11 +5,11 @@ * @problem.severity error * @precision very-high * @id cs/dereferenced-value-is-always-null - * @tags reliability + * @tags quality + * reliability * correctness * exceptions * external/cwe/cwe-476 - * quality */ import csharp diff --git a/csharp/ql/src/CSI/NullMaybe.ql b/csharp/ql/src/CSI/NullMaybe.ql index c69df839958..67873ebb291 100644 --- a/csharp/ql/src/CSI/NullMaybe.ql +++ b/csharp/ql/src/CSI/NullMaybe.ql @@ -6,11 +6,11 @@ * @problem.severity warning * @precision high * @id cs/dereferenced-value-may-be-null - * @tags reliability + * @tags quality + * reliability * correctness * exceptions * external/cwe/cwe-476 - * quality */ import csharp diff --git a/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql b/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql index e725b6e1a94..32c0c35fcb6 100644 --- a/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql +++ b/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql @@ -7,9 +7,10 @@ * @problem.severity recommendation * @precision high * @id cs/complex-block - * @tags maintainability - * testability + * @tags quality + * maintainability * complexity + * testability */ import csharp diff --git a/csharp/ql/src/Complexity/ComplexCondition.ql b/csharp/ql/src/Complexity/ComplexCondition.ql index 2813db1cda5..25721b886a2 100644 --- a/csharp/ql/src/Complexity/ComplexCondition.ql +++ b/csharp/ql/src/Complexity/ComplexCondition.ql @@ -5,8 +5,10 @@ * @problem.severity recommendation * @precision high * @id cs/complex-condition - * @tags testability + * @tags quality + * maintainability * readability + * testability */ import csharp diff --git a/csharp/ql/src/Concurrency/FutileSyncOnField.ql b/csharp/ql/src/Concurrency/FutileSyncOnField.ql index 01beb9c9040..c2b59cc5e22 100644 --- a/csharp/ql/src/Concurrency/FutileSyncOnField.ql +++ b/csharp/ql/src/Concurrency/FutileSyncOnField.ql @@ -6,9 +6,10 @@ * @problem.severity error * @precision high * @id cs/unsafe-sync-on-field - * @tags reliability - * correctness + * @tags quality + * reliability * concurrency + * correctness * external/cwe/cwe-662 * external/cwe/cwe-366 */ diff --git a/csharp/ql/src/Concurrency/LockOrder.ql b/csharp/ql/src/Concurrency/LockOrder.ql index 923f4bba2ce..2803a15afd8 100644 --- a/csharp/ql/src/Concurrency/LockOrder.ql +++ b/csharp/ql/src/Concurrency/LockOrder.ql @@ -5,9 +5,10 @@ * @problem.severity error * @precision high * @id cs/inconsistent-lock-sequence - * @tags reliability - * correctness + * @tags quality + * reliability * concurrency + * correctness * external/cwe/cwe-662 */ diff --git a/csharp/ql/src/Concurrency/LockThis.ql b/csharp/ql/src/Concurrency/LockThis.ql index 59d08337d30..81fd2045d36 100644 --- a/csharp/ql/src/Concurrency/LockThis.ql +++ b/csharp/ql/src/Concurrency/LockThis.ql @@ -6,8 +6,9 @@ * @problem.severity warning * @precision high * @id cs/lock-this - * @tags reliability - * maintainability + * @tags quality + * reliability + * concurrency * modularity * external/cwe/cwe-662 */ diff --git a/csharp/ql/src/Concurrency/LockedWait.ql b/csharp/ql/src/Concurrency/LockedWait.ql index b59736fc72b..dbba723ab09 100644 --- a/csharp/ql/src/Concurrency/LockedWait.ql +++ b/csharp/ql/src/Concurrency/LockedWait.ql @@ -5,9 +5,10 @@ * @problem.severity warning * @precision high * @id cs/locked-wait - * @tags reliability - * correctness + * @tags quality + * reliability * concurrency + * correctness * external/cwe/cwe-662 * external/cwe/cwe-833 */ diff --git a/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql b/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql index 5be820ee74c..0f6e6d11fb2 100644 --- a/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql +++ b/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql @@ -5,8 +5,9 @@ * @kind problem * @problem.severity warning * @id cs/useless-assignment-to-local - * @tags maintainability - * quality + * @tags quality + * maintainability + * useless-code * external/cwe/cwe-563 * @precision very-high */ diff --git a/csharp/ql/src/Documentation/XmldocMissingSummary.ql b/csharp/ql/src/Documentation/XmldocMissingSummary.ql index 312848b6bdf..43b76d38017 100644 --- a/csharp/ql/src/Documentation/XmldocMissingSummary.ql +++ b/csharp/ql/src/Documentation/XmldocMissingSummary.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/xmldoc/missing-summary - * @tags maintainability + * @tags quality + * maintainability + * readability */ import Documentation diff --git a/csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql b/csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql index 0842845ed27..d394e1c08a4 100644 --- a/csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql +++ b/csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql @@ -5,8 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/cast-of-this-to-type-parameter - * @tags reliability - * maintainability + * @tags quality + * reliability + * correctness * language-features */ diff --git a/csharp/ql/src/Language Abuse/CatchOfGenericException.ql b/csharp/ql/src/Language Abuse/CatchOfGenericException.ql index c0a4b019641..e31a6337295 100644 --- a/csharp/ql/src/Language Abuse/CatchOfGenericException.ql +++ b/csharp/ql/src/Language Abuse/CatchOfGenericException.ql @@ -6,8 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/catch-of-all-exceptions - * @tags reliability - * maintainability + * @tags quality + * reliability + * error-handling * external/cwe/cwe-396 */ diff --git a/csharp/ql/src/Language Abuse/ChainedIs.ql b/csharp/ql/src/Language Abuse/ChainedIs.ql index c10e5dc6732..47118d29d37 100644 --- a/csharp/ql/src/Language Abuse/ChainedIs.ql +++ b/csharp/ql/src/Language Abuse/ChainedIs.ql @@ -6,8 +6,10 @@ * @problem.severity recommendation * @precision high * @id cs/chained-type-tests - * @tags changeability - * maintainability + * @tags quality + * reliability + * performance + * changeability * language-features */ diff --git a/csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql b/csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql index 4082a2b3ce8..9439956f4c1 100644 --- a/csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql +++ b/csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql @@ -5,8 +5,10 @@ * @problem.severity warning * @precision high * @id cs/downcast-of-this - * @tags testability - * maintainability + * @tags quality + * reliability + * correctness + * testability * language-features */ diff --git a/csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql b/csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql index fe5cd65266a..da61754f46e 100644 --- a/csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql +++ b/csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql @@ -5,8 +5,10 @@ * @problem.severity warning * @precision high * @id cs/type-test-of-this - * @tags testability - * maintainability + * @tags quality + * reliability + * correctness + * testability * language-features */ diff --git a/csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql b/csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql index 78cce5126df..20016a17f2e 100644 --- a/csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql +++ b/csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql @@ -6,9 +6,10 @@ * @problem.severity recommendation * @precision high * @id cs/missed-readonly-modifier - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features - * quality */ import csharp diff --git a/csharp/ql/src/Language Abuse/MissedTernaryOpportunity.ql b/csharp/ql/src/Language Abuse/MissedTernaryOpportunity.ql index b8da7e43cc5..bd7492b8583 100644 --- a/csharp/ql/src/Language Abuse/MissedTernaryOpportunity.ql +++ b/csharp/ql/src/Language Abuse/MissedTernaryOpportunity.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/missed-ternary-operator - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Language Abuse/MissedUsingOpportunity.ql b/csharp/ql/src/Language Abuse/MissedUsingOpportunity.ql index 1e3534dee69..f3d5414060b 100644 --- a/csharp/ql/src/Language Abuse/MissedUsingOpportunity.ql +++ b/csharp/ql/src/Language Abuse/MissedUsingOpportunity.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/missed-using-statement - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Language Abuse/NestedIf.ql b/csharp/ql/src/Language Abuse/NestedIf.ql index 4532fbbebee..2541d4b7d73 100644 --- a/csharp/ql/src/Language Abuse/NestedIf.ql +++ b/csharp/ql/src/Language Abuse/NestedIf.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/nested-if-statements - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Language Abuse/RethrowException.ql b/csharp/ql/src/Language Abuse/RethrowException.ql index bd3e2902907..ff5f40d3bd0 100644 --- a/csharp/ql/src/Language Abuse/RethrowException.ql +++ b/csharp/ql/src/Language Abuse/RethrowException.ql @@ -6,9 +6,10 @@ * @problem.severity warning * @precision very-high * @id cs/rethrown-exception-variable - * @tags maintainability + * @tags quality + * reliability + * error-handling * language-features - * exceptions */ import csharp diff --git a/csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql b/csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql index a8ce9c42065..8fea284ae31 100644 --- a/csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql +++ b/csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql @@ -5,8 +5,9 @@ * @kind problem * @problem.severity recommendation * @precision high - * @tags readability + * @tags quality * maintainability + * readability */ import csharp diff --git a/csharp/ql/src/Language Abuse/UnusedPropertyValue.ql b/csharp/ql/src/Language Abuse/UnusedPropertyValue.ql index d1c2e9566fd..4ae23430597 100644 --- a/csharp/ql/src/Language Abuse/UnusedPropertyValue.ql +++ b/csharp/ql/src/Language Abuse/UnusedPropertyValue.ql @@ -6,8 +6,9 @@ * @problem.severity warning * @precision high * @id cs/unused-property-value - * @tags reliability - * maintainability + * @tags quality + * reliability + * correctness * language-features */ diff --git a/csharp/ql/src/Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql b/csharp/ql/src/Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql index 754ed8ad773..230abf77a3f 100644 --- a/csharp/ql/src/Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql +++ b/csharp/ql/src/Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql @@ -6,11 +6,10 @@ * @problem.severity error * @precision high * @id cs/index-out-of-bounds - * @tags reliability + * @tags quality + * reliability * correctness - * logic - * quality - * external/cwe/cwe-193 + * external/cwe/cwe-193 */ import csharp diff --git a/csharp/ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql b/csharp/ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql index 90f5b981e24..44ead3cfd97 100644 --- a/csharp/ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql +++ b/csharp/ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql @@ -5,10 +5,9 @@ * @problem.severity warning * @precision very-high * @id cs/test-for-negative-container-size - * @tags reliability + * @tags quality + * reliability * correctness - * logic - * quality */ import csharp diff --git a/csharp/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql b/csharp/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql index 15dbf92bc9f..f429a52982b 100644 --- a/csharp/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql +++ b/csharp/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql @@ -5,9 +5,9 @@ * @problem.severity error * @precision high * @id cs/empty-collection - * @tags reliability - * maintainability - * useless-code + * @tags quality + * reliability + * correctness * external/cwe/cwe-561 */ diff --git a/csharp/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql b/csharp/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql index 1a36fc733e5..5a24a1f5f51 100644 --- a/csharp/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql +++ b/csharp/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql @@ -5,7 +5,8 @@ * @problem.severity error * @precision high * @id cs/unused-collection - * @tags maintainability + * @tags quality + * maintainability * useless-code * external/cwe/cwe-561 */ diff --git a/csharp/ql/src/Likely Bugs/ConstantComparison.ql b/csharp/ql/src/Likely Bugs/ConstantComparison.ql index 790cb53e80b..98352348214 100644 --- a/csharp/ql/src/Likely Bugs/ConstantComparison.ql +++ b/csharp/ql/src/Likely Bugs/ConstantComparison.ql @@ -5,7 +5,9 @@ * @problem.severity warning * @precision high * @id cs/constant-comparison - * @tags correctness + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql b/csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql index f3defa47a43..d40a28450fc 100644 --- a/csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql +++ b/csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql @@ -6,10 +6,9 @@ * @problem.severity error * @precision high * @id cs/non-short-circuit - * @tags reliability + * @tags quality + * reliability * correctness - * logic - * quality * external/cwe/cwe-480 * external/cwe/cwe-691 */ diff --git a/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql b/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql index 108e6f45f94..ba7710a8793 100644 --- a/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql +++ b/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql @@ -7,9 +7,9 @@ * @problem.severity warning * @precision high * @id cs/equality-on-floats - * @tags reliability + * @tags quality + * reliability * correctness - * quality */ import csharp diff --git a/csharp/ql/src/Likely Bugs/EqualsArray.ql b/csharp/ql/src/Likely Bugs/EqualsArray.ql index 78d86d61364..36978278e04 100644 --- a/csharp/ql/src/Likely Bugs/EqualsArray.ql +++ b/csharp/ql/src/Likely Bugs/EqualsArray.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision high * @id cs/equals-on-arrays - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/csharp/ql/src/Likely Bugs/HashedButNoHash.ql b/csharp/ql/src/Likely Bugs/HashedButNoHash.ql index ae457dc2b78..575605a5c54 100644 --- a/csharp/ql/src/Likely Bugs/HashedButNoHash.ql +++ b/csharp/ql/src/Likely Bugs/HashedButNoHash.ql @@ -5,9 +5,9 @@ * @problem.severity warning * @precision high * @id cs/gethashcode-is-not-defined - * @tags reliability - * maintainability - * quality + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Likely Bugs/ImpossibleArrayCast.ql b/csharp/ql/src/Likely Bugs/ImpossibleArrayCast.ql index a3a9f66f3f7..60719f7587b 100644 --- a/csharp/ql/src/Likely Bugs/ImpossibleArrayCast.ql +++ b/csharp/ql/src/Likely Bugs/ImpossibleArrayCast.ql @@ -5,9 +5,9 @@ * @problem.severity error * @precision high * @id cs/impossible-array-cast - * @tags reliability + * @tags quality + * reliability * correctness - * logic */ import csharp diff --git a/csharp/ql/src/Likely Bugs/IncomparableEquals.ql b/csharp/ql/src/Likely Bugs/IncomparableEquals.ql index 9c1aac0cef9..f5bb977f740 100644 --- a/csharp/ql/src/Likely Bugs/IncomparableEquals.ql +++ b/csharp/ql/src/Likely Bugs/IncomparableEquals.ql @@ -5,7 +5,8 @@ * @problem.severity error * @precision high * @id cs/equals-on-unrelated-types - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql b/csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql index 848246a0b46..0831eb56199 100644 --- a/csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql +++ b/csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql @@ -6,9 +6,9 @@ * @problem.severity warning * @precision high * @id cs/nested-loops-with-same-variable - * @tags maintainability + * @tags quality + * reliability * correctness - * logic */ import csharp diff --git a/csharp/ql/src/Likely Bugs/PossibleLossOfPrecision.ql b/csharp/ql/src/Likely Bugs/PossibleLossOfPrecision.ql index 1f97debc4ef..c66bbbeedbd 100644 --- a/csharp/ql/src/Likely Bugs/PossibleLossOfPrecision.ql +++ b/csharp/ql/src/Likely Bugs/PossibleLossOfPrecision.ql @@ -6,7 +6,8 @@ * @problem.severity error * @precision high * @id cs/loss-of-precision - * @tags reliability + * @tags quality + * reliability * correctness * external/cwe/cwe-190 * external/cwe/cwe-192 diff --git a/csharp/ql/src/Likely Bugs/RecursiveEquals.ql b/csharp/ql/src/Likely Bugs/RecursiveEquals.ql index c82c36aa50e..b1ce4a73354 100644 --- a/csharp/ql/src/Likely Bugs/RecursiveEquals.ql +++ b/csharp/ql/src/Likely Bugs/RecursiveEquals.ql @@ -6,8 +6,9 @@ * @problem.severity error * @precision high * @id cs/recursive-equals-call - * @tags reliability - * maintainability + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql b/csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql index de29f6109ad..a73aaf443d8 100644 --- a/csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql +++ b/csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql @@ -5,9 +5,9 @@ * @problem.severity error * @precision high * @id cs/reference-equality-on-valuetypes - * @tags reliability + * @tags quality + * reliability * correctness - * quality * external/cwe/cwe-595 */ diff --git a/csharp/ql/src/Likely Bugs/SelfAssignment.ql b/csharp/ql/src/Likely Bugs/SelfAssignment.ql index e010d18292c..f01a1378242 100644 --- a/csharp/ql/src/Likely Bugs/SelfAssignment.ql +++ b/csharp/ql/src/Likely Bugs/SelfAssignment.ql @@ -5,10 +5,9 @@ * @problem.severity error * @precision high * @id cs/self-assignment - * @tags reliability + * @tags quality + * reliability * correctness - * logic - * quality */ import csharp diff --git a/csharp/ql/src/Likely Bugs/Statements/EmptyBlock.ql b/csharp/ql/src/Likely Bugs/Statements/EmptyBlock.ql index 5929e7e8f91..92664ce8792 100644 --- a/csharp/ql/src/Likely Bugs/Statements/EmptyBlock.ql +++ b/csharp/ql/src/Likely Bugs/Statements/EmptyBlock.ql @@ -6,8 +6,9 @@ * @problem.severity warning * @precision high * @id cs/empty-block - * @tags reliability - * readability + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Likely Bugs/Statements/EmptyLockStatement.ql b/csharp/ql/src/Likely Bugs/Statements/EmptyLockStatement.ql index 4f2b3751876..ddcc7ef0195 100644 --- a/csharp/ql/src/Likely Bugs/Statements/EmptyLockStatement.ql +++ b/csharp/ql/src/Likely Bugs/Statements/EmptyLockStatement.ql @@ -6,9 +6,10 @@ * @problem.severity warning * @precision high * @id cs/empty-lock-statement - * @tags changeability - * readability + * @tags quality + * reliability * concurrency + * changeability * language-features * external/cwe/cwe-585 */ diff --git a/csharp/ql/src/Likely Bugs/StaticFieldWrittenByInstance.ql b/csharp/ql/src/Likely Bugs/StaticFieldWrittenByInstance.ql index 4acea4a35b3..4dd78a81aab 100644 --- a/csharp/ql/src/Likely Bugs/StaticFieldWrittenByInstance.ql +++ b/csharp/ql/src/Likely Bugs/StaticFieldWrittenByInstance.ql @@ -7,7 +7,7 @@ * @problem.severity recommendation * @precision high * @id cs/static-field-written-by-instance - * @tags reliability + * @tags quality * maintainability * modularity */ diff --git a/csharp/ql/src/Likely Bugs/StringBuilderCharInit.ql b/csharp/ql/src/Likely Bugs/StringBuilderCharInit.ql index f2d0a61efe2..2e96cdb4b36 100644 --- a/csharp/ql/src/Likely Bugs/StringBuilderCharInit.ql +++ b/csharp/ql/src/Likely Bugs/StringBuilderCharInit.ql @@ -6,7 +6,9 @@ * @problem.severity error * @precision high * @id cs/stringbuilder-initialized-with-character - * @tags maintainability + * @tags quality + * reliability + * correctness */ import semmle.code.csharp.frameworks.system.Text diff --git a/csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql b/csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql index d1e2dbdf056..5c11a77f30d 100644 --- a/csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql +++ b/csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql @@ -5,9 +5,9 @@ * @problem.severity warning * @precision high * @id cs/unchecked-cast-in-equals - * @tags reliability - * maintainability - * quality + * @tags quality + * reliability + * correctness */ import csharp diff --git a/csharp/ql/src/Linq/MissedAllOpportunity.ql b/csharp/ql/src/Linq/MissedAllOpportunity.ql index 54fe40faeec..1c03372d23b 100644 --- a/csharp/ql/src/Linq/MissedAllOpportunity.ql +++ b/csharp/ql/src/Linq/MissedAllOpportunity.ql @@ -6,7 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/linq/missed-all - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Linq/MissedCastOpportunity.ql b/csharp/ql/src/Linq/MissedCastOpportunity.ql index 8d3de1f31b4..d40009e24c8 100644 --- a/csharp/ql/src/Linq/MissedCastOpportunity.ql +++ b/csharp/ql/src/Linq/MissedCastOpportunity.ql @@ -6,7 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/linq/missed-cast - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Linq/MissedOfTypeOpportunity.ql b/csharp/ql/src/Linq/MissedOfTypeOpportunity.ql index 3d61acfa523..a4c8dff4b53 100644 --- a/csharp/ql/src/Linq/MissedOfTypeOpportunity.ql +++ b/csharp/ql/src/Linq/MissedOfTypeOpportunity.ql @@ -6,7 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/linq/missed-oftype - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Linq/MissedSelectOpportunity.ql b/csharp/ql/src/Linq/MissedSelectOpportunity.ql index 9f36c3de82b..8ea2a1c11d7 100644 --- a/csharp/ql/src/Linq/MissedSelectOpportunity.ql +++ b/csharp/ql/src/Linq/MissedSelectOpportunity.ql @@ -6,7 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/linq/missed-select - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Linq/MissedWhereOpportunity.ql b/csharp/ql/src/Linq/MissedWhereOpportunity.ql index 401248d6176..62b34b93305 100644 --- a/csharp/ql/src/Linq/MissedWhereOpportunity.ql +++ b/csharp/ql/src/Linq/MissedWhereOpportunity.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision high * @id cs/linq/missed-where - * @tags maintainability + * @tags quality + * maintainability + * readability * language-features */ diff --git a/csharp/ql/src/Linq/RedundantSelect.ql b/csharp/ql/src/Linq/RedundantSelect.ql index 5dea1ababfd..73b1c92d247 100644 --- a/csharp/ql/src/Linq/RedundantSelect.ql +++ b/csharp/ql/src/Linq/RedundantSelect.ql @@ -5,7 +5,9 @@ * @problem.severity warning * @precision very-high * @id cs/linq/useless-select - * @tags maintainability + * @tags quality + * maintainability + * useless-code * language-features * external/cwe/cwe-561 */ diff --git a/csharp/ql/src/Performance/StringBuilderInLoop.ql b/csharp/ql/src/Performance/StringBuilderInLoop.ql index 8becb0c7eb2..f1f23ebf5e0 100644 --- a/csharp/ql/src/Performance/StringBuilderInLoop.ql +++ b/csharp/ql/src/Performance/StringBuilderInLoop.ql @@ -5,7 +5,9 @@ * @problem.severity recommendation * @precision very-high * @id cs/stringbuilder-creation-in-loop - * @tags efficiency + * @tags quality + * reliability + * performance */ import csharp diff --git a/csharp/ql/src/Performance/StringConcatenationInLoop.ql b/csharp/ql/src/Performance/StringConcatenationInLoop.ql index b1b420434e9..a015771610d 100644 --- a/csharp/ql/src/Performance/StringConcatenationInLoop.ql +++ b/csharp/ql/src/Performance/StringConcatenationInLoop.ql @@ -5,9 +5,9 @@ * @problem.severity recommendation * @precision very-high * @id cs/string-concatenation-in-loop - * @tags efficiency - * maintainability - * quality + * @tags quality + * reliability + * performance */ import csharp diff --git a/csharp/ql/src/Performance/UseTryGetValue.ql b/csharp/ql/src/Performance/UseTryGetValue.ql index c33c0d1e8d7..3eb97931f30 100644 --- a/csharp/ql/src/Performance/UseTryGetValue.ql +++ b/csharp/ql/src/Performance/UseTryGetValue.ql @@ -6,9 +6,9 @@ * @problem.severity recommendation * @precision high * @id cs/inefficient-containskey - * @tags maintainability - * efficiency - * quality + * @tags quality + * reliability + * performance */ import csharp diff --git a/csharp/ql/src/Useless code/DefaultToString.ql b/csharp/ql/src/Useless code/DefaultToString.ql index ea33fe7874b..c0039fc9052 100644 --- a/csharp/ql/src/Useless code/DefaultToString.ql +++ b/csharp/ql/src/Useless code/DefaultToString.ql @@ -6,9 +6,9 @@ * @problem.severity warning * @precision very-high * @id cs/call-to-object-tostring - * @tags reliability - * maintainability - * quality + * @tags quality + * reliability + * correctness */ import DefaultToStringQuery diff --git a/csharp/ql/src/Useless code/FutileConditional.ql b/csharp/ql/src/Useless code/FutileConditional.ql index d77fd55a434..c1ef924bfdd 100644 --- a/csharp/ql/src/Useless code/FutileConditional.ql +++ b/csharp/ql/src/Useless code/FutileConditional.ql @@ -5,8 +5,10 @@ * @problem.severity warning * @precision very-high * @id cs/useless-if-statement - * @tags reliability + * @tags quality + * maintainability * readability + * useless-code */ import csharp diff --git a/csharp/ql/src/Useless code/IntGetHashCode.ql b/csharp/ql/src/Useless code/IntGetHashCode.ql index 847443d018e..94849639f3d 100644 --- a/csharp/ql/src/Useless code/IntGetHashCode.ql +++ b/csharp/ql/src/Useless code/IntGetHashCode.ql @@ -6,9 +6,10 @@ * @problem.severity recommendation * @precision high * @id cs/useless-gethashcode-call - * @tags readability + * @tags quality + * maintainability + * readability * useless-code - * quality */ import csharp diff --git a/csharp/ql/src/Useless code/RedundantToStringCall.ql b/csharp/ql/src/Useless code/RedundantToStringCall.ql index f0507f9d8a4..55e7056e9a0 100644 --- a/csharp/ql/src/Useless code/RedundantToStringCall.ql +++ b/csharp/ql/src/Useless code/RedundantToStringCall.ql @@ -6,7 +6,8 @@ * @problem.severity recommendation * @precision high * @id cs/useless-tostring-call - * @tags maintainability + * @tags quality + * maintainability * useless-code */ diff --git a/csharp/ql/src/Useless code/UnusedLabel.ql b/csharp/ql/src/Useless code/UnusedLabel.ql index 53ba4180f14..cc625cbc521 100644 --- a/csharp/ql/src/Useless code/UnusedLabel.ql +++ b/csharp/ql/src/Useless code/UnusedLabel.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cs/unused-label - * @tags maintainability + * @tags quality + * maintainability * useless-code */ From 3301924777281d515f65adb6d86370a69dcf95a4 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 16 Jun 2025 15:19:10 +0200 Subject: [PATCH 15/35] C#: Update integration test expected output. --- .../csharp-code-quality.qls.expected | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected b/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected index 1ce0a7be504..30b7165cd42 100644 --- a/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected +++ b/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected @@ -1,20 +1,77 @@ ql/csharp/ql/src/API Abuse/CallToGCCollect.ql +ql/csharp/ql/src/API Abuse/CallToObsoleteMethod.ql +ql/csharp/ql/src/API Abuse/ClassImplementsICloneable.ql ql/csharp/ql/src/API Abuse/FormatInvalid.ql ql/csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql +ql/csharp/ql/src/API Abuse/NullArgumentToEquals.ql +ql/csharp/ql/src/ASP/BlockCodeResponseWrite.ql +ql/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql +ql/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql +ql/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql ql/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql +ql/csharp/ql/src/Bad Practices/Declarations/LocalScopeVariableShadowsMember.ql +ql/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql +ql/csharp/ql/src/Bad Practices/EmptyCatchBlock.ql +ql/csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql +ql/csharp/ql/src/Bad Practices/Naming Conventions/FieldMasksSuperField.ql +ql/csharp/ql/src/Bad Practices/Naming Conventions/SameNameAsSuper.ql +ql/csharp/ql/src/Bad Practices/PathCombine.ql +ql/csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql +ql/csharp/ql/src/CSI/CompareIdenticalValues.ql ql/csharp/ql/src/CSI/NullAlways.ql ql/csharp/ql/src/CSI/NullMaybe.ql +ql/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql +ql/csharp/ql/src/Complexity/ComplexCondition.ql +ql/csharp/ql/src/Concurrency/FutileSyncOnField.ql +ql/csharp/ql/src/Concurrency/LockOrder.ql +ql/csharp/ql/src/Concurrency/LockThis.ql +ql/csharp/ql/src/Concurrency/LockedWait.ql ql/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql +ql/csharp/ql/src/Documentation/XmldocMissingSummary.ql +ql/csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql +ql/csharp/ql/src/Language Abuse/CatchOfGenericException.ql +ql/csharp/ql/src/Language Abuse/ChainedIs.ql +ql/csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql +ql/csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql ql/csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql +ql/csharp/ql/src/Language Abuse/MissedTernaryOpportunity.ql +ql/csharp/ql/src/Language Abuse/MissedUsingOpportunity.ql +ql/csharp/ql/src/Language Abuse/NestedIf.ql +ql/csharp/ql/src/Language Abuse/RethrowException.ql +ql/csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql +ql/csharp/ql/src/Language Abuse/UnusedPropertyValue.ql ql/csharp/ql/src/Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql ql/csharp/ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql +ql/csharp/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql +ql/csharp/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql +ql/csharp/ql/src/Likely Bugs/ConstantComparison.ql ql/csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql ql/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql +ql/csharp/ql/src/Likely Bugs/EqualsArray.ql ql/csharp/ql/src/Likely Bugs/HashedButNoHash.ql +ql/csharp/ql/src/Likely Bugs/ImpossibleArrayCast.ql +ql/csharp/ql/src/Likely Bugs/IncomparableEquals.ql +ql/csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql +ql/csharp/ql/src/Likely Bugs/PossibleLossOfPrecision.ql +ql/csharp/ql/src/Likely Bugs/RecursiveEquals.ql ql/csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql ql/csharp/ql/src/Likely Bugs/SelfAssignment.ql +ql/csharp/ql/src/Likely Bugs/Statements/EmptyBlock.ql +ql/csharp/ql/src/Likely Bugs/Statements/EmptyLockStatement.ql +ql/csharp/ql/src/Likely Bugs/StaticFieldWrittenByInstance.ql +ql/csharp/ql/src/Likely Bugs/StringBuilderCharInit.ql ql/csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql +ql/csharp/ql/src/Linq/MissedAllOpportunity.ql +ql/csharp/ql/src/Linq/MissedCastOpportunity.ql +ql/csharp/ql/src/Linq/MissedOfTypeOpportunity.ql +ql/csharp/ql/src/Linq/MissedSelectOpportunity.ql +ql/csharp/ql/src/Linq/MissedWhereOpportunity.ql +ql/csharp/ql/src/Linq/RedundantSelect.ql +ql/csharp/ql/src/Performance/StringBuilderInLoop.ql ql/csharp/ql/src/Performance/StringConcatenationInLoop.ql ql/csharp/ql/src/Performance/UseTryGetValue.ql ql/csharp/ql/src/Useless code/DefaultToString.ql +ql/csharp/ql/src/Useless code/FutileConditional.ql ql/csharp/ql/src/Useless code/IntGetHashCode.ql +ql/csharp/ql/src/Useless code/RedundantToStringCall.ql +ql/csharp/ql/src/Useless code/UnusedLabel.ql From 758a6b5487e45fd8cdcbfeebc32c2cc8dd8304a8 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 16 Jun 2025 16:05:43 +0200 Subject: [PATCH 16/35] C#: Add change note. --- csharp/ql/src/change-notes/2025-06-16-tagging.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 csharp/ql/src/change-notes/2025-06-16-tagging.md diff --git a/csharp/ql/src/change-notes/2025-06-16-tagging.md b/csharp/ql/src/change-notes/2025-06-16-tagging.md new file mode 100644 index 00000000000..d0b8d2c41ee --- /dev/null +++ b/csharp/ql/src/change-notes/2025-06-16-tagging.md @@ -0,0 +1,4 @@ +--- +category: queryMetadata +--- +* Query metadata tags have been systematically updated for many C# queries. Primary categorization as either `reliability` or `maintainability`, and relevant sub-category tags such as `readability`, `useless-code`, `complexity`, `performance`, `correctness`, `error-handling`, and `concurrency`. Aligns with the established [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). From 819ee332393aff0da1040aa7827db90cde7a42f9 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 16 Jun 2025 16:20:30 +0200 Subject: [PATCH 17/35] C#: Do not add complexity queries that should be configurable to the Code Quality suite. --- .../ql/src/Bad Practices/Declarations/TooManyRefParameters.ql | 3 +-- csharp/ql/src/Complexity/BlockWithTooManyStatements.ql | 3 +-- csharp/ql/src/Complexity/ComplexCondition.ql | 3 +-- csharp/ql/src/Language Abuse/ChainedIs.ql | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql b/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql index 937be695d3f..05ebd97484c 100644 --- a/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql +++ b/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql @@ -6,8 +6,7 @@ * @problem.severity recommendation * @precision very-high * @id cs/too-many-ref-parameters - * @tags quality - * maintainability + * @tags maintainability * readability * testability */ diff --git a/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql b/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql index 32c0c35fcb6..783ab64a375 100644 --- a/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql +++ b/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql @@ -7,8 +7,7 @@ * @problem.severity recommendation * @precision high * @id cs/complex-block - * @tags quality - * maintainability + * @tags maintainability * complexity * testability */ diff --git a/csharp/ql/src/Complexity/ComplexCondition.ql b/csharp/ql/src/Complexity/ComplexCondition.ql index 25721b886a2..0afb27e2a94 100644 --- a/csharp/ql/src/Complexity/ComplexCondition.ql +++ b/csharp/ql/src/Complexity/ComplexCondition.ql @@ -5,8 +5,7 @@ * @problem.severity recommendation * @precision high * @id cs/complex-condition - * @tags quality - * maintainability + * @tags maintainability * readability * testability */ diff --git a/csharp/ql/src/Language Abuse/ChainedIs.ql b/csharp/ql/src/Language Abuse/ChainedIs.ql index 47118d29d37..ec66e150bae 100644 --- a/csharp/ql/src/Language Abuse/ChainedIs.ql +++ b/csharp/ql/src/Language Abuse/ChainedIs.ql @@ -6,8 +6,7 @@ * @problem.severity recommendation * @precision high * @id cs/chained-type-tests - * @tags quality - * reliability + * @tags reliability * performance * changeability * language-features From d296ee7d504d549085d792c2f7d768b80875eac6 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 16 Jun 2025 16:22:03 +0200 Subject: [PATCH 18/35] C#: Update integration test expected output. --- .../posix/query-suite/csharp-code-quality.qls.expected | 4 ---- 1 file changed, 4 deletions(-) diff --git a/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected b/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected index 30b7165cd42..f1117b4c719 100644 --- a/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected +++ b/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected @@ -10,7 +10,6 @@ ql/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql ql/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql ql/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql ql/csharp/ql/src/Bad Practices/Declarations/LocalScopeVariableShadowsMember.ql -ql/csharp/ql/src/Bad Practices/Declarations/TooManyRefParameters.ql ql/csharp/ql/src/Bad Practices/EmptyCatchBlock.ql ql/csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql ql/csharp/ql/src/Bad Practices/Naming Conventions/FieldMasksSuperField.ql @@ -20,8 +19,6 @@ ql/csharp/ql/src/Bad Practices/UnmanagedCodeCheck.ql ql/csharp/ql/src/CSI/CompareIdenticalValues.ql ql/csharp/ql/src/CSI/NullAlways.ql ql/csharp/ql/src/CSI/NullMaybe.ql -ql/csharp/ql/src/Complexity/BlockWithTooManyStatements.ql -ql/csharp/ql/src/Complexity/ComplexCondition.ql ql/csharp/ql/src/Concurrency/FutileSyncOnField.ql ql/csharp/ql/src/Concurrency/LockOrder.ql ql/csharp/ql/src/Concurrency/LockThis.ql @@ -30,7 +27,6 @@ ql/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql ql/csharp/ql/src/Documentation/XmldocMissingSummary.ql ql/csharp/ql/src/Language Abuse/CastThisToTypeParameter.ql ql/csharp/ql/src/Language Abuse/CatchOfGenericException.ql -ql/csharp/ql/src/Language Abuse/ChainedIs.ql ql/csharp/ql/src/Language Abuse/DubiousDowncastOfThis.ql ql/csharp/ql/src/Language Abuse/DubiousTypeTestOfThis.ql ql/csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql From 9fb47cc125fddf1b2bbf9f6b750099b1749f0668 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Tue, 17 Jun 2025 10:36:21 +0200 Subject: [PATCH 19/35] C++: add tests for attribute extraction on namespace --- .../attributes/namespace/namespace.expected | 11 +++++++++++ .../library-tests/attributes/namespace/namespace.ql | 4 ++++ .../test/library-tests/attributes/namespace/test.cpp | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 cpp/ql/test/library-tests/attributes/namespace/namespace.expected create mode 100644 cpp/ql/test/library-tests/attributes/namespace/namespace.ql create mode 100644 cpp/ql/test/library-tests/attributes/namespace/test.cpp diff --git a/cpp/ql/test/library-tests/attributes/namespace/namespace.expected b/cpp/ql/test/library-tests/attributes/namespace/namespace.expected new file mode 100644 index 00000000000..a6def774033 --- /dev/null +++ b/cpp/ql/test/library-tests/attributes/namespace/namespace.expected @@ -0,0 +1,11 @@ +| file://:0:0:0:0 | MultiSquared | test.cpp:10:13:10:22 | deprecated | +| file://:0:0:0:0 | MultiSquared | test.cpp:10:25:10:36 | maybe_unused | +| file://:0:0:0:0 | MultiSquared | test.cpp:11:13:11:22 | deprecated | +| file://:0:0:0:0 | MultiSquared | test.cpp:11:25:11:36 | maybe_unused | +| file://:0:0:0:0 | NamespaceTest | test.cpp:1:26:1:35 | deprecated | +| file://:0:0:0:0 | NamespaceTest | test.cpp:2:26:2:35 | deprecated | +| file://:0:0:0:0 | NamespaceTest | test.cpp:3:26:3:37 | maybe_unused | +| test.cpp:4:53:4:61 | MultiAttr | test.cpp:4:26:4:35 | deprecated | +| test.cpp:4:53:4:61 | MultiAttr | test.cpp:4:38:4:49 | maybe_unused | +| test.cpp:6:43:6:56 | OuterNamespace::InnerNamespace | test.cpp:6:30:6:39 | deprecated | +| test.cpp:9:46:9:61 | NamespaceSquared | test.cpp:9:13:9:22 | deprecated | diff --git a/cpp/ql/test/library-tests/attributes/namespace/namespace.ql b/cpp/ql/test/library-tests/attributes/namespace/namespace.ql new file mode 100644 index 00000000000..b1de550728a --- /dev/null +++ b/cpp/ql/test/library-tests/attributes/namespace/namespace.ql @@ -0,0 +1,4 @@ +import cpp + +from Namespace ns +select ns, ns.getAnAttribute() diff --git a/cpp/ql/test/library-tests/attributes/namespace/test.cpp b/cpp/ql/test/library-tests/attributes/namespace/test.cpp new file mode 100644 index 00000000000..564947e36b9 --- /dev/null +++ b/cpp/ql/test/library-tests/attributes/namespace/test.cpp @@ -0,0 +1,11 @@ +namespace __attribute__((deprecated)) NamespaceTest {} +namespace __attribute__((deprecated)) NamespaceTest {} +namespace __attribute__((maybe_unused)) NamespaceTest {} +namespace __attribute__((deprecated, maybe_unused)) MultiAttr {} +namespace OuterNamespace { + namespace __attribute__((deprecated)) InnerNamespace {} +} + +namespace [[deprecated("NamespaceSquared")]] NamespaceSquared {} +namespace [[deprecated, maybe_unused]] MultiSquared {} +namespace [[deprecated, maybe_unused]] MultiSquared {} \ No newline at end of file From ddc429cfebac22b2bbe3d2532b027a0af2ea01bf Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 17 Jun 2025 13:16:20 +0200 Subject: [PATCH 20/35] Ruby: Update quality related tags. --- ruby/ql/src/queries/performance/DatabaseQueryInLoop.ql | 5 +++-- ruby/ql/src/queries/variables/DeadStoreOfLocal.ql | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ruby/ql/src/queries/performance/DatabaseQueryInLoop.ql b/ruby/ql/src/queries/performance/DatabaseQueryInLoop.ql index 835fe620984..b34ee080fcd 100644 --- a/ruby/ql/src/queries/performance/DatabaseQueryInLoop.ql +++ b/ruby/ql/src/queries/performance/DatabaseQueryInLoop.ql @@ -5,8 +5,9 @@ * @problem.severity info * @precision high * @id rb/database-query-in-loop - * @tags performance - * quality + * @tags quality + * reliability + * performance */ import ruby diff --git a/ruby/ql/src/queries/variables/DeadStoreOfLocal.ql b/ruby/ql/src/queries/variables/DeadStoreOfLocal.ql index 808ce42dd85..849fb8ecd5a 100644 --- a/ruby/ql/src/queries/variables/DeadStoreOfLocal.ql +++ b/ruby/ql/src/queries/variables/DeadStoreOfLocal.ql @@ -5,8 +5,9 @@ * @kind problem * @problem.severity warning * @id rb/useless-assignment-to-local - * @tags maintainability - * quality + * @tags quality + * maintainability + * useless-code * external/cwe/cwe-563 * @precision high */ From 08d28a5b85aa29466a8eaff3f34a97d77fd49de1 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 17 Jun 2025 13:17:27 +0200 Subject: [PATCH 21/35] Ruby: Add change-note. --- ruby/ql/src/change-notes/2025-06-17-tagging.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ruby/ql/src/change-notes/2025-06-17-tagging.md diff --git a/ruby/ql/src/change-notes/2025-06-17-tagging.md b/ruby/ql/src/change-notes/2025-06-17-tagging.md new file mode 100644 index 00000000000..757e1c55577 --- /dev/null +++ b/ruby/ql/src/change-notes/2025-06-17-tagging.md @@ -0,0 +1,5 @@ +--- +category: queryMetadata +--- +* Update query metadata tags for `rb/database-query-in-loop` and `rb/useless-assignment-to-local` to align with the established +[Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). From 433756debbd1c2cf68c22ae3af00f8c83bde0743 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 4 Jun 2025 11:48:45 +0200 Subject: [PATCH 22/35] Rust: Make `SummarizedCallable` extend `Function` instead of `string` --- .../lib/codeql/rust/dataflow/FlowSummary.qll | 27 +- .../rust/dataflow/internal/DataFlowImpl.qll | 25 +- .../dataflow/internal/FlowSummaryImpl.qll | 4 +- .../rust/dataflow/internal/ModelsAsData.qll | 8 +- .../codeql/rust/dataflow/internal/Node.qll | 8 +- .../codeql/rust/frameworks/stdlib/Clone.qll | 10 +- .../codeql/rust/internal/PathResolution.qll | 4 +- .../codeql/rust/internal/TypeInference.qll | 5 +- .../dataflow/global/viableCallable.expected | 4 +- .../dataflow/local/DataFlowStep.expected | 85 +++--- .../dataflow/local/inline-flow.expected | 32 +-- .../test/library-tests/dataflow/local/main.rs | 22 +- .../library-tests/dataflow/models/models.ql | 2 +- .../PathResolutionConsistency.expected | 30 +- .../dataflow/sources/TaintSources.expected | 20 +- .../library-tests/dataflow/sources/test.rs | 66 ++--- .../dataflow/sources/test_futures_io.rs | 57 ++-- .../dataflow/sources/web_frameworks.rs | 89 ++++-- .../PathResolutionConsistency.expected | 12 +- .../strings/inline-taint-flow.expected | 61 ++-- .../library-tests/dataflow/strings/main.rs | 12 +- .../test/library-tests/sensitivedata/test.rs | 2 +- .../security/CWE-022/TaintedPath.expected | 44 +-- .../query-tests/security/CWE-022/src/main.rs | 8 +- .../query-tests/security/CWE-089/Cargo.lock | 8 +- .../security/CWE-089/SqlInjection.expected | 65 +---- .../test/query-tests/security/CWE-089/sqlx.rs | 8 +- .../CWE-312/CleartextLogging.expected | 261 ++++++------------ .../security/CWE-312/test_logging.rs | 10 +- .../UncontrolledAllocationSize.expected | 148 +++++----- .../test/query-tests/security/CWE-770/main.rs | 4 +- .../test/utils-tests/modelgenerator/option.rs | 6 +- 32 files changed, 477 insertions(+), 670 deletions(-) diff --git a/rust/ql/lib/codeql/rust/dataflow/FlowSummary.qll b/rust/ql/lib/codeql/rust/dataflow/FlowSummary.qll index 60e76ceff94..0c41bb6d7a8 100644 --- a/rust/ql/lib/codeql/rust/dataflow/FlowSummary.qll +++ b/rust/ql/lib/codeql/rust/dataflow/FlowSummary.qll @@ -2,7 +2,6 @@ private import rust private import internal.FlowSummaryImpl as Impl -private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl // import all instances below private module Summaries { @@ -10,34 +9,10 @@ private module Summaries { private import codeql.rust.dataflow.internal.ModelsAsData } -/** Provides the `Range` class used to define the extent of `LibraryCallable`. */ -module LibraryCallable { - /** A callable defined in library code, identified by a unique string. */ - abstract class Range extends string { - bindingset[this] - Range() { any() } - - /** Gets a call to this library callable. */ - CallExprBase getACall() { - exists(Resolvable r, string crate | - r = CallExprBaseImpl::getCallResolvable(result) and - this = crate + r.getResolvedPath() - | - crate = r.getResolvedCrateOrigin() + "::_::" - or - not r.hasResolvedCrateOrigin() and - crate = "" - ) - } - } -} - -final class LibraryCallable = LibraryCallable::Range; - /** Provides the `Range` class used to define the extent of `SummarizedCallable`. */ module SummarizedCallable { /** A callable with a flow summary, identified by a unique string. */ - abstract class Range extends LibraryCallable::Range, Impl::Public::SummarizedCallable { + abstract class Range extends Impl::Public::SummarizedCallable { bindingset[this] Range() { any() } diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll index 2cf9cc21668..4d714542306 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll @@ -45,10 +45,12 @@ final class DataFlowCallable extends TDataFlowCallable { /** * Gets the underlying library callable, if any. */ - LibraryCallable asLibraryCallable() { this = TLibraryCallable(result) } + SummarizedCallable asSummarizedCallable() { this = TSummarizedCallable(result) } /** Gets a textual representation of this callable. */ - string toString() { result = [this.asCfgScope().toString(), this.asLibraryCallable().toString()] } + string toString() { + result = [this.asCfgScope().toString(), this.asSummarizedCallable().toString()] + } /** Gets the location of this callable. */ Location getLocation() { result = this.asCfgScope().getLocation() } @@ -65,12 +67,9 @@ final class DataFlowCall extends TDataFlowCall { } DataFlowCallable getEnclosingCallable() { - result = TCfgScope(this.asCallCfgNode().getExpr().getEnclosingCfgScope()) + result.asCfgScope() = this.asCallCfgNode().getExpr().getEnclosingCfgScope() or - exists(FlowSummaryImpl::Public::SummarizedCallable c | - this.isSummaryCall(c, _) and - result = TLibraryCallable(c) - ) + this.isSummaryCall(result.asSummarizedCallable(), _) } string toString() { @@ -401,9 +400,11 @@ module RustDataFlow implements InputSig { /** Gets a viable implementation of the target of the given `Call`. */ DataFlowCallable viableCallable(DataFlowCall call) { - result.asCfgScope() = call.asCallCfgNode().getCall().getStaticTarget() - or - result.asLibraryCallable().getACall() = call.asCallCfgNode().getCall() + exists(Callable target | target = call.asCallCfgNode().getCall().getStaticTarget() | + target = result.asCfgScope() + or + target = result.asSummarizedCallable() + ) } /** @@ -757,7 +758,7 @@ module RustDataFlow implements InputSig { predicate allowParameterReturnInSelf(ParameterNode p) { exists(DataFlowCallable c, ParameterPosition pos | p.isParameterOf(c, pos) and - FlowSummaryImpl::Private::summaryAllowParameterReturnInSelf(c.asLibraryCallable(), pos) + FlowSummaryImpl::Private::summaryAllowParameterReturnInSelf(c.asSummarizedCallable(), pos) ) or VariableCapture::Flow::heuristicAllowInstanceParameterReturnInSelf(p.(ClosureParameterNode) @@ -968,7 +969,7 @@ private module Cached { cached newtype TDataFlowCallable = TCfgScope(CfgScope scope) or - TLibraryCallable(LibraryCallable c) + TSummarizedCallable(SummarizedCallable c) /** This is the local flow predicate that is exposed. */ cached diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll index e46abc4dd37..d10c342c6c5 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll @@ -13,7 +13,7 @@ module Input implements InputSig { private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl private import codeql.rust.frameworks.stdlib.Stdlib - class SummarizedCallableBase = string; + class SummarizedCallableBase = Function; abstract private class SourceSinkBase extends AstNode { /** Gets the associated call. */ @@ -138,7 +138,7 @@ private import Make as Impl private module StepsInput implements Impl::Private::StepsInputSig { DataFlowCall getACall(Public::SummarizedCallable sc) { - result.asCallCfgNode().getCall() = sc.(LibraryCallable).getACall() + result.asCallCfgNode().getCall().getStaticTarget() = sc } RustDataFlow::Node getSourceNode(Input::SourceBase source, Impl::Private::SummaryComponent sc) { diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll b/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll index a879157af5e..00ac7058cc9 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll @@ -47,6 +47,7 @@ private import rust private import codeql.rust.dataflow.FlowSummary private import codeql.rust.dataflow.FlowSource private import codeql.rust.dataflow.FlowSink +private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl /** * Holds if in a call to the function with canonical path `path`, defined in the @@ -120,7 +121,12 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range { SummarizedCallableFromModel() { summaryModel(crate, path, _, _, _, _, _) and - this = crate + "::_::" + path + exists(CallExprBase call, Resolvable r | + call.getStaticTarget() = this and + r = CallExprBaseImpl::getCallResolvable(call) and + r.getResolvedPath() = path and + r.getResolvedCrateOrigin() = crate + ) } override predicate propagatesFlow( diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll b/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll index 939cb45a0ca..51343c1eb40 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll @@ -44,7 +44,7 @@ abstract class NodePublic extends TNode { abstract class Node extends NodePublic { /** Gets the enclosing callable. */ - DataFlowCallable getEnclosingCallable() { result = TCfgScope(this.getCfgScope()) } + DataFlowCallable getEnclosingCallable() { result.asCfgScope() = this.getCfgScope() } /** Do not call: use `getEnclosingCallable()` instead. */ abstract CfgScope getCfgScope(); @@ -102,9 +102,9 @@ class FlowSummaryNode extends Node, TFlowSummaryNode { } override DataFlowCallable getEnclosingCallable() { - result.asLibraryCallable() = this.getSummarizedCallable() - or result.asCfgScope() = this.getCfgScope() + or + result.asSummarizedCallable() = this.getSummarizedCallable() } override Location getLocation() { @@ -195,7 +195,7 @@ final class SummaryParameterNode extends ParameterNode, FlowSummaryNode { } override predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { - this.getSummarizedCallable() = c.asLibraryCallable() and pos = pos_ + this.getSummarizedCallable() = c.asSummarizedCallable() and pos = pos_ } } diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/Clone.qll b/rust/ql/lib/codeql/rust/frameworks/stdlib/Clone.qll index 8d3c41c4708..954792ec61e 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/Clone.qll +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/Clone.qll @@ -6,13 +6,9 @@ private import codeql.rust.dataflow.FlowSummary /** A `clone` method. */ final class CloneCallable extends SummarizedCallable::Range { CloneCallable() { - // NOTE: The function target may not exist in the database, so we base this - // on method calls. - exists(MethodCallExpr c | - c.getIdentifier().getText() = "clone" and - c.getArgList().getNumberOfArgs() = 0 and - this = c.getResolvedCrateOrigin() + "::_::" + c.getResolvedPath() - ) + this.getParamList().hasSelfParam() and + this.getParamList().getNumberOfParams() = 0 and + this.getName().getText() = "clone" } final override predicate propagatesFlow( diff --git a/rust/ql/lib/codeql/rust/internal/PathResolution.qll b/rust/ql/lib/codeql/rust/internal/PathResolution.qll index dcbda16fcbf..c10cdc0140e 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolution.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolution.qll @@ -1522,8 +1522,8 @@ private module Debug { private Locatable getRelevantLocatable() { exists(string filepath, int startline, int startcolumn, int endline, int endcolumn | result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and - filepath.matches("%/test.rs") and - startline = 74 + filepath.matches("%/main.rs") and + startline = 52 ) } diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll index 3248812b2bf..b618c3fb8cb 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll @@ -1170,6 +1170,7 @@ final class MethodCall extends Call { * Holds if a method for `type` with the name `name` and the arity `arity` * exists in `impl`. */ +pragma[nomagic] private predicate methodCandidate(Type type, string name, int arity, Impl impl) { type = impl.getSelfTy().(TypeMention).resolveType() and exists(Function f | @@ -1579,8 +1580,8 @@ private module Debug { private Locatable getRelevantLocatable() { exists(string filepath, int startline, int startcolumn, int endline, int endcolumn | result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and - filepath.matches("%/main.rs") and - startline = 1718 + filepath.matches("%/sqlx.rs") and + startline = [56 .. 60] ) } diff --git a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected index 822ce4e0a32..be147a36ed3 100644 --- a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected +++ b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected @@ -75,10 +75,10 @@ | main.rs:279:17:279:25 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:280:9:280:15 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:283:5:283:17 | sink(...) | main.rs:5:1:7:1 | fn sink | -| main.rs:287:13:287:55 | ...::block_on(...) | file://:0:0:0:0 | repo:https://github.com/rust-lang/futures-rs:futures-executor::_::crate::local_pool::block_on | +| main.rs:287:13:287:55 | ...::block_on(...) | file://:0:0:0:0 | fn block_on | | main.rs:287:41:287:54 | async_source(...) | main.rs:268:1:272:1 | fn async_source | | main.rs:288:5:288:11 | sink(...) | main.rs:5:1:7:1 | fn sink | -| main.rs:290:5:290:62 | ...::block_on(...) | file://:0:0:0:0 | repo:https://github.com/rust-lang/futures-rs:futures-executor::_::crate::local_pool::block_on | +| main.rs:290:5:290:62 | ...::block_on(...) | file://:0:0:0:0 | fn block_on | | main.rs:290:33:290:61 | test_async_await_async_part(...) | main.rs:274:1:284:1 | fn test_async_await_async_part | | main.rs:294:5:294:22 | data_out_of_call(...) | main.rs:16:1:19:1 | fn data_out_of_call | | main.rs:295:5:295:35 | data_out_of_call_side_effect1(...) | main.rs:35:1:40:1 | fn data_out_of_call_side_effect1 | diff --git a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected index f588371ed43..dd9bb4ae810 100644 --- a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -1,5 +1,4 @@ localStep -| file://:0:0:0:0 | [summary param] self in lang:std::_::::canonicalize | file://:0:0:0:0 | [summary] read: Argument[self].OptionalBarrier[normalize-path] in lang:std::_::::canonicalize | | main.rs:3:11:3:11 | [SSA] i | main.rs:4:12:4:12 | i | | main.rs:3:11:3:11 | i | main.rs:3:11:3:11 | [SSA] i | | main.rs:3:11:3:11 | i | main.rs:3:11:3:11 | i | @@ -323,46 +322,46 @@ localStep | main.rs:263:9:263:10 | i1 | main.rs:263:9:263:10 | i1 | | main.rs:263:14:263:16 | TryExpr | main.rs:263:9:263:10 | i1 | | main.rs:266:5:266:11 | Some(...) | main.rs:260:41:267:1 | { ... } | -| main.rs:270:9:270:10 | [SSA] r1 | main.rs:271:29:271:30 | r1 | +| main.rs:270:9:270:10 | [SSA] r1 | main.rs:271:28:271:29 | r1 | | main.rs:270:9:270:10 | r1 | main.rs:270:9:270:10 | [SSA] r1 | | main.rs:270:9:270:10 | r1 | main.rs:270:9:270:10 | r1 | -| main.rs:270:33:270:46 | Ok(...) | main.rs:270:9:270:10 | r1 | +| main.rs:270:32:270:45 | Ok(...) | main.rs:270:9:270:10 | r1 | | main.rs:271:9:271:11 | [SSA] o1a | main.rs:273:10:273:12 | o1a | | main.rs:271:9:271:11 | o1a | main.rs:271:9:271:11 | [SSA] o1a | | main.rs:271:9:271:11 | o1a | main.rs:271:9:271:11 | o1a | -| main.rs:271:29:271:30 | [post] r1 | main.rs:272:29:272:30 | r1 | -| main.rs:271:29:271:30 | [post] receiver for r1 | main.rs:271:29:271:30 | [post] r1 | -| main.rs:271:29:271:30 | r1 | main.rs:271:29:271:30 | receiver for r1 | -| main.rs:271:29:271:30 | r1 | main.rs:272:29:272:30 | r1 | -| main.rs:271:29:271:35 | r1.ok() | main.rs:271:9:271:11 | o1a | +| main.rs:271:28:271:29 | [post] r1 | main.rs:272:28:272:29 | r1 | +| main.rs:271:28:271:29 | [post] receiver for r1 | main.rs:271:28:271:29 | [post] r1 | +| main.rs:271:28:271:29 | r1 | main.rs:271:28:271:29 | receiver for r1 | +| main.rs:271:28:271:29 | r1 | main.rs:272:28:272:29 | r1 | +| main.rs:271:28:271:34 | r1.ok() | main.rs:271:9:271:11 | o1a | | main.rs:272:9:272:11 | [SSA] o1b | main.rs:274:10:274:12 | o1b | | main.rs:272:9:272:11 | o1b | main.rs:272:9:272:11 | [SSA] o1b | | main.rs:272:9:272:11 | o1b | main.rs:272:9:272:11 | o1b | -| main.rs:272:29:272:30 | [post] receiver for r1 | main.rs:272:29:272:30 | [post] r1 | -| main.rs:272:29:272:30 | r1 | main.rs:272:29:272:30 | receiver for r1 | -| main.rs:272:29:272:36 | r1.err() | main.rs:272:9:272:11 | o1b | +| main.rs:272:28:272:29 | [post] receiver for r1 | main.rs:272:28:272:29 | [post] r1 | +| main.rs:272:28:272:29 | r1 | main.rs:272:28:272:29 | receiver for r1 | +| main.rs:272:28:272:35 | r1.err() | main.rs:272:9:272:11 | o1b | | main.rs:273:10:273:12 | [post] receiver for o1a | main.rs:273:10:273:12 | [post] o1a | | main.rs:273:10:273:12 | o1a | main.rs:273:10:273:12 | receiver for o1a | | main.rs:274:10:274:12 | [post] receiver for o1b | main.rs:274:10:274:12 | [post] o1b | | main.rs:274:10:274:12 | o1b | main.rs:274:10:274:12 | receiver for o1b | -| main.rs:276:9:276:10 | [SSA] r2 | main.rs:277:29:277:30 | r2 | +| main.rs:276:9:276:10 | [SSA] r2 | main.rs:277:28:277:29 | r2 | | main.rs:276:9:276:10 | r2 | main.rs:276:9:276:10 | [SSA] r2 | | main.rs:276:9:276:10 | r2 | main.rs:276:9:276:10 | r2 | -| main.rs:276:33:276:47 | Err(...) | main.rs:276:9:276:10 | r2 | +| main.rs:276:32:276:46 | Err(...) | main.rs:276:9:276:10 | r2 | | main.rs:277:9:277:11 | [SSA] o2a | main.rs:279:10:279:12 | o2a | | main.rs:277:9:277:11 | o2a | main.rs:277:9:277:11 | [SSA] o2a | | main.rs:277:9:277:11 | o2a | main.rs:277:9:277:11 | o2a | -| main.rs:277:29:277:30 | [post] r2 | main.rs:278:29:278:30 | r2 | -| main.rs:277:29:277:30 | [post] receiver for r2 | main.rs:277:29:277:30 | [post] r2 | -| main.rs:277:29:277:30 | r2 | main.rs:277:29:277:30 | receiver for r2 | -| main.rs:277:29:277:30 | r2 | main.rs:278:29:278:30 | r2 | -| main.rs:277:29:277:35 | r2.ok() | main.rs:277:9:277:11 | o2a | +| main.rs:277:28:277:29 | [post] r2 | main.rs:278:28:278:29 | r2 | +| main.rs:277:28:277:29 | [post] receiver for r2 | main.rs:277:28:277:29 | [post] r2 | +| main.rs:277:28:277:29 | r2 | main.rs:277:28:277:29 | receiver for r2 | +| main.rs:277:28:277:29 | r2 | main.rs:278:28:278:29 | r2 | +| main.rs:277:28:277:34 | r2.ok() | main.rs:277:9:277:11 | o2a | | main.rs:278:9:278:11 | [SSA] o2b | main.rs:280:10:280:12 | o2b | | main.rs:278:9:278:11 | o2b | main.rs:278:9:278:11 | [SSA] o2b | | main.rs:278:9:278:11 | o2b | main.rs:278:9:278:11 | o2b | -| main.rs:278:29:278:30 | [post] receiver for r2 | main.rs:278:29:278:30 | [post] r2 | -| main.rs:278:29:278:30 | r2 | main.rs:278:29:278:30 | receiver for r2 | -| main.rs:278:29:278:36 | r2.err() | main.rs:278:9:278:11 | o2b | +| main.rs:278:28:278:29 | [post] receiver for r2 | main.rs:278:28:278:29 | [post] r2 | +| main.rs:278:28:278:29 | r2 | main.rs:278:28:278:29 | receiver for r2 | +| main.rs:278:28:278:35 | r2.err() | main.rs:278:9:278:11 | o2b | | main.rs:279:10:279:12 | [post] receiver for o2a | main.rs:279:10:279:12 | [post] o2a | | main.rs:279:10:279:12 | o2a | main.rs:279:10:279:12 | receiver for o2a | | main.rs:280:10:280:12 | [post] receiver for o2b | main.rs:280:10:280:12 | [post] o2b | @@ -702,23 +701,23 @@ localStep | main.rs:469:9:469:9 | [SSA] c | main.rs:474:10:474:10 | c | | main.rs:469:9:469:9 | c | main.rs:469:9:469:9 | [SSA] c | | main.rs:469:9:469:9 | c | main.rs:469:9:469:9 | c | -| main.rs:469:13:469:13 | [post] b | main.rs:470:19:470:19 | b | +| main.rs:469:13:469:13 | [post] b | main.rs:470:18:470:18 | b | | main.rs:469:13:469:13 | [post] receiver for b | main.rs:469:13:469:13 | [post] b | | main.rs:469:13:469:13 | b | main.rs:469:13:469:13 | receiver for b | -| main.rs:469:13:469:13 | b | main.rs:470:19:470:19 | b | +| main.rs:469:13:469:13 | b | main.rs:470:18:470:18 | b | | main.rs:469:13:469:28 | [post] receiver for b.parse() | main.rs:469:13:469:28 | [post] b.parse() | | main.rs:469:13:469:28 | b.parse() | main.rs:469:13:469:28 | receiver for b.parse() | | main.rs:469:13:469:37 | ... .unwrap() | main.rs:469:9:469:9 | c | | main.rs:470:9:470:9 | [SSA] d | main.rs:475:10:475:10 | d | | main.rs:470:9:470:9 | d | main.rs:470:9:470:9 | [SSA] d | | main.rs:470:9:470:9 | d | main.rs:470:9:470:9 | d | -| main.rs:470:19:470:19 | [post] b | main.rs:473:17:473:17 | b | -| main.rs:470:19:470:19 | [post] receiver for b | main.rs:470:19:470:19 | [post] b | -| main.rs:470:19:470:19 | b | main.rs:470:19:470:19 | receiver for b | -| main.rs:470:19:470:19 | b | main.rs:473:17:473:17 | b | -| main.rs:470:19:470:27 | [post] receiver for b.parse() | main.rs:470:19:470:27 | [post] b.parse() | -| main.rs:470:19:470:27 | b.parse() | main.rs:470:19:470:27 | receiver for b.parse() | -| main.rs:470:19:470:36 | ... .unwrap() | main.rs:470:9:470:9 | d | +| main.rs:470:18:470:18 | [post] b | main.rs:473:17:473:17 | b | +| main.rs:470:18:470:18 | [post] receiver for b | main.rs:470:18:470:18 | [post] b | +| main.rs:470:18:470:18 | b | main.rs:470:18:470:18 | receiver for b | +| main.rs:470:18:470:18 | b | main.rs:473:17:473:17 | b | +| main.rs:470:18:470:26 | [post] receiver for b.parse() | main.rs:470:18:470:26 | [post] b.parse() | +| main.rs:470:18:470:26 | b.parse() | main.rs:470:18:470:26 | receiver for b.parse() | +| main.rs:470:18:470:35 | ... .unwrap() | main.rs:470:9:470:9 | d | | main.rs:479:9:479:10 | [SSA] vs | main.rs:481:10:481:11 | vs | | main.rs:479:9:479:10 | vs | main.rs:479:9:479:10 | [SSA] vs | | main.rs:479:9:479:10 | vs | main.rs:479:9:479:10 | vs | @@ -749,19 +748,19 @@ localStep | main.rs:488:10:488:10 | v | main.rs:488:10:488:10 | [SSA] v | | main.rs:488:10:488:10 | v | main.rs:488:10:488:10 | v | | main.rs:488:15:488:16 | [post] receiver for vs | main.rs:488:15:488:16 | [post] vs | -| main.rs:488:15:488:16 | [post] vs | main.rs:492:27:492:28 | vs | +| main.rs:488:15:488:16 | [post] vs | main.rs:492:26:492:27 | vs | | main.rs:488:15:488:16 | vs | main.rs:488:15:488:16 | receiver for vs | -| main.rs:488:15:488:16 | vs | main.rs:492:27:492:28 | vs | +| main.rs:488:15:488:16 | vs | main.rs:492:26:492:27 | vs | | main.rs:492:9:492:11 | [SSA] vs2 | main.rs:493:15:493:17 | vs2 | | main.rs:492:9:492:11 | vs2 | main.rs:492:9:492:11 | [SSA] vs2 | | main.rs:492:9:492:11 | vs2 | main.rs:492:9:492:11 | vs2 | -| main.rs:492:27:492:28 | [post] receiver for vs | main.rs:492:27:492:28 | [post] vs | -| main.rs:492:27:492:28 | [post] vs | main.rs:497:5:497:6 | vs | -| main.rs:492:27:492:28 | vs | main.rs:492:27:492:28 | receiver for vs | -| main.rs:492:27:492:28 | vs | main.rs:497:5:497:6 | vs | -| main.rs:492:27:492:35 | [post] receiver for vs.iter() | main.rs:492:27:492:35 | [post] vs.iter() | -| main.rs:492:27:492:35 | vs.iter() | main.rs:492:27:492:35 | receiver for vs.iter() | -| main.rs:492:27:492:45 | ... .collect() | main.rs:492:9:492:11 | vs2 | +| main.rs:492:26:492:27 | [post] receiver for vs | main.rs:492:26:492:27 | [post] vs | +| main.rs:492:26:492:27 | [post] vs | main.rs:497:5:497:6 | vs | +| main.rs:492:26:492:27 | vs | main.rs:492:26:492:27 | receiver for vs | +| main.rs:492:26:492:27 | vs | main.rs:497:5:497:6 | vs | +| main.rs:492:26:492:34 | [post] receiver for vs.iter() | main.rs:492:26:492:34 | [post] vs.iter() | +| main.rs:492:26:492:34 | vs.iter() | main.rs:492:26:492:34 | receiver for vs.iter() | +| main.rs:492:26:492:44 | ... .collect() | main.rs:492:9:492:11 | vs2 | | main.rs:493:10:493:10 | [SSA] v | main.rs:494:14:494:14 | v | | main.rs:493:10:493:10 | v | main.rs:493:10:493:10 | [SSA] v | | main.rs:493:10:493:10 | v | main.rs:493:10:493:10 | v | @@ -963,7 +962,7 @@ readStep | main.rs:444:41:444:67 | [post] \|...\| ... | main.rs:441:9:441:20 | captured default_name | main.rs:444:41:444:67 | [post] default_name | | main.rs:444:44:444:55 | this | main.rs:441:9:441:20 | captured default_name | main.rs:444:44:444:55 | default_name | | main.rs:469:13:469:13 | [post] receiver for b | file://:0:0:0:0 | &ref | main.rs:469:13:469:13 | [post] b | -| main.rs:470:19:470:19 | [post] receiver for b | file://:0:0:0:0 | &ref | main.rs:470:19:470:19 | [post] b | +| main.rs:470:18:470:18 | [post] receiver for b | file://:0:0:0:0 | &ref | main.rs:470:18:470:18 | [post] b | | main.rs:481:10:481:11 | vs | file://:0:0:0:0 | element | main.rs:481:10:481:14 | vs[0] | | main.rs:482:11:482:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:482:10:482:35 | * ... | | main.rs:483:11:483:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:483:10:483:35 | * ... | @@ -1023,8 +1022,8 @@ storeStep | main.rs:261:19:261:28 | source(...) | {EXTERNAL LOCATION} | Some | main.rs:261:14:261:29 | Some(...) | | main.rs:262:19:262:19 | 2 | {EXTERNAL LOCATION} | Some | main.rs:262:14:262:20 | Some(...) | | main.rs:266:10:266:10 | 0 | {EXTERNAL LOCATION} | Some | main.rs:266:5:266:11 | Some(...) | -| main.rs:270:36:270:45 | source(...) | {EXTERNAL LOCATION} | Ok | main.rs:270:33:270:46 | Ok(...) | -| main.rs:276:37:276:46 | source(...) | {EXTERNAL LOCATION} | Err | main.rs:276:33:276:47 | Err(...) | +| main.rs:270:35:270:44 | source(...) | {EXTERNAL LOCATION} | Ok | main.rs:270:32:270:45 | Ok(...) | +| main.rs:276:36:276:45 | source(...) | {EXTERNAL LOCATION} | Err | main.rs:276:32:276:46 | Err(...) | | main.rs:284:35:284:44 | source(...) | {EXTERNAL LOCATION} | Ok | main.rs:284:32:284:45 | Ok(...) | | main.rs:285:35:285:35 | 2 | {EXTERNAL LOCATION} | Ok | main.rs:285:32:285:36 | Ok(...) | | main.rs:286:36:286:45 | source(...) | {EXTERNAL LOCATION} | Err | main.rs:286:32:286:46 | Err(...) | @@ -1061,7 +1060,7 @@ storeStep | main.rs:432:18:432:27 | source(...) | file://:0:0:0:0 | element | main.rs:432:5:432:11 | [post] mut_arr | | main.rs:444:41:444:67 | default_name | main.rs:441:9:441:20 | captured default_name | main.rs:444:41:444:67 | \|...\| ... | | main.rs:469:13:469:13 | b | file://:0:0:0:0 | &ref | main.rs:469:13:469:13 | receiver for b | -| main.rs:470:19:470:19 | b | file://:0:0:0:0 | &ref | main.rs:470:19:470:19 | receiver for b | +| main.rs:470:18:470:18 | b | file://:0:0:0:0 | &ref | main.rs:470:18:470:18 | receiver for b | | main.rs:479:15:479:24 | source(...) | file://:0:0:0:0 | element | main.rs:479:14:479:34 | [...] | | main.rs:479:27:479:27 | 2 | file://:0:0:0:0 | element | main.rs:479:14:479:34 | [...] | | main.rs:479:30:479:30 | 3 | file://:0:0:0:0 | element | main.rs:479:14:479:34 | [...] | diff --git a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected index 77e462c2dce..5d9fabca983 100644 --- a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected @@ -117,16 +117,16 @@ edges | main.rs:263:9:263:10 | i1 | main.rs:264:10:264:11 | i1 | provenance | | | main.rs:263:14:263:15 | s1 [Some] | main.rs:263:14:263:16 | TryExpr | provenance | | | main.rs:263:14:263:16 | TryExpr | main.rs:263:9:263:10 | i1 | provenance | | -| main.rs:270:9:270:10 | r1 [Ok] | main.rs:271:29:271:35 | r1.ok() [Some] | provenance | MaD:11 | -| main.rs:270:33:270:46 | Ok(...) [Ok] | main.rs:270:9:270:10 | r1 [Ok] | provenance | | -| main.rs:270:36:270:45 | source(...) | main.rs:270:33:270:46 | Ok(...) [Ok] | provenance | | +| main.rs:270:9:270:10 | r1 [Ok] | main.rs:271:28:271:34 | r1.ok() [Some] | provenance | MaD:11 | +| main.rs:270:32:270:45 | Ok(...) [Ok] | main.rs:270:9:270:10 | r1 [Ok] | provenance | | +| main.rs:270:35:270:44 | source(...) | main.rs:270:32:270:45 | Ok(...) [Ok] | provenance | | | main.rs:271:9:271:11 | o1a [Some] | main.rs:273:10:273:21 | o1a.unwrap() | provenance | MaD:3 | -| main.rs:271:29:271:35 | r1.ok() [Some] | main.rs:271:9:271:11 | o1a [Some] | provenance | | -| main.rs:276:9:276:10 | r2 [Err] | main.rs:278:29:278:36 | r2.err() [Some] | provenance | MaD:8 | -| main.rs:276:33:276:47 | Err(...) [Err] | main.rs:276:9:276:10 | r2 [Err] | provenance | | -| main.rs:276:37:276:46 | source(...) | main.rs:276:33:276:47 | Err(...) [Err] | provenance | | +| main.rs:271:28:271:34 | r1.ok() [Some] | main.rs:271:9:271:11 | o1a [Some] | provenance | | +| main.rs:276:9:276:10 | r2 [Err] | main.rs:278:28:278:35 | r2.err() [Some] | provenance | MaD:8 | +| main.rs:276:32:276:46 | Err(...) [Err] | main.rs:276:9:276:10 | r2 [Err] | provenance | | +| main.rs:276:36:276:45 | source(...) | main.rs:276:32:276:46 | Err(...) [Err] | provenance | | | main.rs:278:9:278:11 | o2b [Some] | main.rs:280:10:280:21 | o2b.unwrap() | provenance | MaD:3 | -| main.rs:278:29:278:36 | r2.err() [Some] | main.rs:278:9:278:11 | o2b [Some] | provenance | | +| main.rs:278:28:278:35 | r2.err() [Some] | main.rs:278:9:278:11 | o2b [Some] | provenance | | | main.rs:284:9:284:10 | s1 [Ok] | main.rs:287:14:287:15 | s1 [Ok] | provenance | | | main.rs:284:32:284:45 | Ok(...) [Ok] | main.rs:284:9:284:10 | s1 [Ok] | provenance | | | main.rs:284:35:284:44 | source(...) | main.rs:284:32:284:45 | Ok(...) [Ok] | provenance | | @@ -373,16 +373,16 @@ nodes | main.rs:263:14:263:16 | TryExpr | semmle.label | TryExpr | | main.rs:264:10:264:11 | i1 | semmle.label | i1 | | main.rs:270:9:270:10 | r1 [Ok] | semmle.label | r1 [Ok] | -| main.rs:270:33:270:46 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | -| main.rs:270:36:270:45 | source(...) | semmle.label | source(...) | +| main.rs:270:32:270:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | +| main.rs:270:35:270:44 | source(...) | semmle.label | source(...) | | main.rs:271:9:271:11 | o1a [Some] | semmle.label | o1a [Some] | -| main.rs:271:29:271:35 | r1.ok() [Some] | semmle.label | r1.ok() [Some] | +| main.rs:271:28:271:34 | r1.ok() [Some] | semmle.label | r1.ok() [Some] | | main.rs:273:10:273:21 | o1a.unwrap() | semmle.label | o1a.unwrap() | | main.rs:276:9:276:10 | r2 [Err] | semmle.label | r2 [Err] | -| main.rs:276:33:276:47 | Err(...) [Err] | semmle.label | Err(...) [Err] | -| main.rs:276:37:276:46 | source(...) | semmle.label | source(...) | +| main.rs:276:32:276:46 | Err(...) [Err] | semmle.label | Err(...) [Err] | +| main.rs:276:36:276:45 | source(...) | semmle.label | source(...) | | main.rs:278:9:278:11 | o2b [Some] | semmle.label | o2b [Some] | -| main.rs:278:29:278:36 | r2.err() [Some] | semmle.label | r2.err() [Some] | +| main.rs:278:28:278:35 | r2.err() [Some] | semmle.label | r2.err() [Some] | | main.rs:280:10:280:21 | o2b.unwrap() | semmle.label | o2b.unwrap() | | main.rs:284:9:284:10 | s1 [Ok] | semmle.label | s1 [Ok] | | main.rs:284:32:284:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | @@ -545,8 +545,8 @@ testFailures | main.rs:254:10:254:32 | s1.unwrap_or_else(...) | main.rs:253:19:253:28 | source(...) | main.rs:254:10:254:32 | s1.unwrap_or_else(...) | $@ | main.rs:253:19:253:28 | source(...) | source(...) | | main.rs:257:10:257:41 | s2.unwrap_or_else(...) | main.rs:257:31:257:40 | source(...) | main.rs:257:10:257:41 | s2.unwrap_or_else(...) | $@ | main.rs:257:31:257:40 | source(...) | source(...) | | main.rs:264:10:264:11 | i1 | main.rs:261:19:261:28 | source(...) | main.rs:264:10:264:11 | i1 | $@ | main.rs:261:19:261:28 | source(...) | source(...) | -| main.rs:273:10:273:21 | o1a.unwrap() | main.rs:270:36:270:45 | source(...) | main.rs:273:10:273:21 | o1a.unwrap() | $@ | main.rs:270:36:270:45 | source(...) | source(...) | -| main.rs:280:10:280:21 | o2b.unwrap() | main.rs:276:37:276:46 | source(...) | main.rs:280:10:280:21 | o2b.unwrap() | $@ | main.rs:276:37:276:46 | source(...) | source(...) | +| main.rs:273:10:273:21 | o1a.unwrap() | main.rs:270:35:270:44 | source(...) | main.rs:273:10:273:21 | o1a.unwrap() | $@ | main.rs:270:35:270:44 | source(...) | source(...) | +| main.rs:280:10:280:21 | o2b.unwrap() | main.rs:276:36:276:45 | source(...) | main.rs:280:10:280:21 | o2b.unwrap() | $@ | main.rs:276:36:276:45 | source(...) | source(...) | | main.rs:289:10:289:11 | i1 | main.rs:284:35:284:44 | source(...) | main.rs:289:10:289:11 | i1 | $@ | main.rs:284:35:284:44 | source(...) | source(...) | | main.rs:298:10:298:22 | s1.expect(...) | main.rs:297:35:297:44 | source(...) | main.rs:298:10:298:22 | s1.expect(...) | $@ | main.rs:297:35:297:44 | source(...) | source(...) | | main.rs:303:10:303:26 | s2.expect_err(...) | main.rs:301:36:301:45 | source(...) | main.rs:303:10:303:26 | s2.expect_err(...) | $@ | main.rs:301:36:301:45 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/local/main.rs b/rust/ql/test/library-tests/dataflow/local/main.rs index 4323f58c880..f8df7cff372 100644 --- a/rust/ql/test/library-tests/dataflow/local/main.rs +++ b/rust/ql/test/library-tests/dataflow/local/main.rs @@ -267,15 +267,15 @@ fn option_questionmark() -> Option { } fn option_ok() { - let r1 : Result = Ok(source(21)); - let o1a : Option = r1.ok(); - let o1b : Option = r1.err(); + let r1: Result = Ok(source(21)); + let o1a: Option = r1.ok(); + let o1b: Option = r1.err(); sink(o1a.unwrap()); // $ hasValueFlow=21 sink(o1b.unwrap()); - let r2 : Result = Err(source(22)); - let o2a : Option = r2.ok(); - let o2b : Option = r2.err(); + let r2: Result = Err(source(22)); + let o2a: Option = r2.ok(); + let o2b: Option = r2.err(); sink(o2a.unwrap()); sink(o2b.unwrap()); // $ hasValueFlow=22 } @@ -467,12 +467,12 @@ fn parse() { let a = source(90); let b = a.to_string(); let c = b.parse::().unwrap(); - let d : i64 = b.parse().unwrap(); + let d: i64 = b.parse().unwrap(); sink(a); // $ hasValueFlow=90 - sink_string(b); // $ hasTaintFlow=90 - sink(c); // $ hasTaintFlow=90 - sink(d); // $ hasTaintFlow=90 + sink_string(b); // $ MISSING: we are not currently able to resolve the `to_string` call above, which comes from `impl ToString for T` + sink(c); // $ MISSING: hasTaintFlow=90 - we are not currently able to resolve the `parse` call above + sink(d); // $ MISSING: hasTaintFlow=90 - we are not currently able to resolve the `parse` call above } fn iterators() { @@ -489,7 +489,7 @@ fn iterators() { sink(v); // $ MISSING: hasValueFlow=91 } - let vs2 : Vec<&i64> = vs.iter().collect(); + let vs2: Vec<&i64> = vs.iter().collect(); for &v in vs2 { sink(v); // $ MISSING: hasValueFlow=91 } diff --git a/rust/ql/test/library-tests/dataflow/models/models.ql b/rust/ql/test/library-tests/dataflow/models/models.ql index b17b45bba82..e621834bdec 100644 --- a/rust/ql/test/library-tests/dataflow/models/models.ql +++ b/rust/ql/test/library-tests/dataflow/models/models.ql @@ -20,7 +20,7 @@ query predicate invalidSpecComponent(SummarizedCallable sc, string s, string c) // not defined in `models.ext.yml`, in order to test that we can also define // models directly in QL private class SummarizedCallableIdentity extends SummarizedCallable::Range { - SummarizedCallableIdentity() { this = "repo::test::_::crate::identity" } + SummarizedCallableIdentity() { this.getName().getText() = "identity" } override predicate propagatesFlow( string input, string output, boolean preservesValue, string provenance diff --git a/rust/ql/test/library-tests/dataflow/sources/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/CONSISTENCY/PathResolutionConsistency.expected index ff85ec81529..5667ceb627d 100644 --- a/rust/ql/test/library-tests/dataflow/sources/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/sources/CONSISTENCY/PathResolutionConsistency.expected @@ -4,19 +4,19 @@ multipleMethodCallTargets | test_futures_io.rs:35:26:35:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | | test_futures_io.rs:35:26:35:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | | test_futures_io.rs:35:26:35:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | -| test_futures_io.rs:61:22:61:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | -| test_futures_io.rs:61:22:61:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | -| test_futures_io.rs:68:23:68:67 | ... .poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | -| test_futures_io.rs:68:23:68:67 | ... .poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | -| test_futures_io.rs:92:26:92:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | -| test_futures_io.rs:92:26:92:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | -| test_futures_io.rs:92:26:92:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | -| test_futures_io.rs:115:22:115:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | -| test_futures_io.rs:115:22:115:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | -| web_frameworks.rs:88:14:88:23 | a.as_str() | file://:0:0:0:0 | fn as_str | -| web_frameworks.rs:88:14:88:23 | a.as_str() | file://:0:0:0:0 | fn as_str | -| web_frameworks.rs:89:14:89:25 | a.as_bytes() | file://:0:0:0:0 | fn as_bytes | -| web_frameworks.rs:89:14:89:25 | a.as_bytes() | file://:0:0:0:0 | fn as_bytes | +| test_futures_io.rs:62:22:62:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | +| test_futures_io.rs:62:22:62:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | +| test_futures_io.rs:69:23:69:67 | ... .poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | +| test_futures_io.rs:69:23:69:67 | ... .poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | +| test_futures_io.rs:93:26:93:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | +| test_futures_io.rs:93:26:93:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | +| test_futures_io.rs:93:26:93:63 | pinned.poll_read(...) | file://:0:0:0:0 | fn poll_read | +| test_futures_io.rs:116:22:116:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | +| test_futures_io.rs:116:22:116:50 | pinned.poll_fill_buf(...) | file://:0:0:0:0 | fn poll_fill_buf | +| web_frameworks.rs:101:14:101:23 | a.as_str() | file://:0:0:0:0 | fn as_str | +| web_frameworks.rs:101:14:101:23 | a.as_str() | file://:0:0:0:0 | fn as_str | +| web_frameworks.rs:102:14:102:25 | a.as_bytes() | file://:0:0:0:0 | fn as_bytes | +| web_frameworks.rs:102:14:102:25 | a.as_bytes() | file://:0:0:0:0 | fn as_bytes | multiplePathResolutions | test.rs:112:62:112:73 | ...::from | file://:0:0:0:0 | fn from | | test.rs:112:62:112:73 | ...::from | file://:0:0:0:0 | fn from | @@ -84,8 +84,8 @@ multiplePathResolutions | test_futures_io.rs:25:23:25:61 | ...::try_from | file://:0:0:0:0 | fn try_from | | test_futures_io.rs:25:23:25:61 | ...::try_from | file://:0:0:0:0 | fn try_from | | test_futures_io.rs:25:23:25:61 | ...::try_from | file://:0:0:0:0 | fn try_from | -| test_futures_io.rs:144:26:144:43 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity | -| test_futures_io.rs:144:26:144:43 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity | +| test_futures_io.rs:145:26:145:43 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity | +| test_futures_io.rs:145:26:145:43 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity | multipleCanonicalPaths | file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | ::to_ordering | | file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | ::to_ordering | diff --git a/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected b/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected index 1958d6a87bf..b5028f38f76 100644 --- a/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected +++ b/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected @@ -82,13 +82,13 @@ | test.rs:806:16:806:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). | | test.rs:806:16:806:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). | | test_futures_io.rs:19:15:19:32 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:12:31:12:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:12:31:12:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:21:31:21:35 | TuplePat | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:21:31:21:36 | TuplePat | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:43:31:43:44 | MyStruct {...} | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:43:31:43:45 | MyStruct {...} | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:51:31:51:32 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:51:31:51:32 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:60:15:60:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | -| web_frameworks.rs:60:15:60:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:11:31:11:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:11:31:11:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:22:14:22:18 | TuplePat | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:22:14:22:19 | TuplePat | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:48:14:48:28 | MyStruct {...} | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:48:14:48:30 | MyStruct {...} | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:58:14:58:15 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:58:14:58:15 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:68:15:68:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | +| web_frameworks.rs:68:15:68:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | diff --git a/rust/ql/test/library-tests/dataflow/sources/test.rs b/rust/ql/test/library-tests/dataflow/sources/test.rs index 342efbba69e..845050c2fc9 100644 --- a/rust/ql/test/library-tests/dataflow/sources/test.rs +++ b/rust/ql/test/library-tests/dataflow/sources/test.rs @@ -308,28 +308,28 @@ async fn test_tokio_stdin() -> Result<(), Box> { let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] let mut buffer = [0u8; 100]; let _bytes = stdin.read(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] let mut buffer = Vec::::new(); let _bytes = stdin.read_to_end(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_to_end` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] let mut buffer = String::new(); let _bytes = stdin.read_to_string(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_to_string` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] let mut buffer = [0; 100]; stdin.read_exact(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_exact` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { @@ -338,17 +338,17 @@ async fn test_tokio_stdin() -> Result<(), Box> { let v2 = stdin.read_i16().await?; let v3 = stdin.read_f32().await?; let v4 = stdin.read_i64_le().await?; - sink(v1); // $ hasTaintFlow - sink(v2); // $ hasTaintFlow - sink(v3); // $ hasTaintFlow - sink(v4); // $ hasTaintFlow + sink(v1); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_u8` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(v2); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_i16` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(v3); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_f32` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(v4); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_i64_le` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] let mut buffer = bytes::BytesMut::new(); stdin.read_buf(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_buf` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } // --- async reading from stdin (BufReader) --- @@ -356,7 +356,7 @@ async fn test_tokio_stdin() -> Result<(), Box> { { let mut reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] let data = reader.fill_buf().await?; - sink(&data); // $ hasTaintFlow + sink(&data); // $ MISSING: hasTaintFlow -- we cannot resolve the `fill_buf` call above, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` } { @@ -369,20 +369,20 @@ async fn test_tokio_stdin() -> Result<(), Box> { let mut buffer = String::new(); let mut reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] reader.read_line(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_line` call above, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` } { let mut buffer = Vec::::new(); let mut reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] reader.read_until(b',', &mut buffer).await?; - sink(&buffer); // $ hasTaintFlow - sink(buffer[0]); // $ hasTaintFlow + sink(&buffer); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_until` call above, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` + sink(buffer[0]); // $ MISSING: hasTaintFlow -- we cannot resolve the `read_until` call above, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` } { let mut reader_split = tokio::io::BufReader::new(tokio::io::stdin()).split(b','); // $ Alert[rust/summary/taint-sources] - sink(reader_split.next_segment().await?.unwrap()); // $ hasTaintFlow + sink(reader_split.next_segment().await?.unwrap()); // $ MISSING: hasTaintFlow -- we cannot resolve the `split` call above, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` while let Some(chunk) = reader_split.next_segment().await? { sink(chunk); // $ MISSING: hasTaintFlow } @@ -391,7 +391,7 @@ async fn test_tokio_stdin() -> Result<(), Box> { { let reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] let mut lines = reader.lines(); - sink(lines.next_line().await?.unwrap()); // $ hasTaintFlow + sink(lines.next_line().await?.unwrap()); // $ MISSING: hasTaintFlow -- we cannot resolve the `lines` call above, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` while let Some(line) = lines.next_line().await? { sink(line); // $ MISSING: hasTaintFlow } @@ -529,25 +529,25 @@ async fn test_tokio_file() -> std::io::Result<()> { { let mut buffer = [0u8; 100]; let _bytes = file.read(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut buffer = Vec::::new(); let _bytes = file.read_to_end(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_to_end` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut buffer = String::new(); let _bytes = file.read_to_string(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_to_string` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut buffer = [0; 100]; file.read_exact(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_exact` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { @@ -555,16 +555,16 @@ async fn test_tokio_file() -> std::io::Result<()> { let v2 = file.read_i16().await?; let v3 = file.read_f32().await?; let v4 = file.read_i64_le().await?; - sink(v1); // $ hasTaintFlow="file.txt" - sink(v2); // $ hasTaintFlow="file.txt" - sink(v3); // $ hasTaintFlow="file.txt" - sink(v4); // $ hasTaintFlow="file.txt" + sink(v1); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_u8` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(v2); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_i16` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(v3); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_f32` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(v4); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_i64_le` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { let mut buffer = bytes::BytesMut::new(); file.read_buf(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `read_buf` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } // --- misc operations --- @@ -575,7 +575,7 @@ async fn test_tokio_file() -> std::io::Result<()> { let file2 = tokio::fs::File::open("another_file.txt").await?; // $ Alert[rust/summary/taint-sources] let mut reader = file1.chain(file2); reader.read_to_string(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" hasTaintFlow="another_file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" hasTaintFlow="another_file.txt" -- we cannot resolve the `chain` and `read_to_string` calls above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } { @@ -583,7 +583,7 @@ async fn test_tokio_file() -> std::io::Result<()> { let file1 = tokio::fs::File::open("file.txt").await?; // $ Alert[rust/summary/taint-sources] let mut reader = file1.take(100); reader.read_to_string(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow="file.txt" + sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `take` and `read_to_string` calls above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` } Ok(()) @@ -687,8 +687,8 @@ async fn test_tokio_tcpstream(case: i64) -> std::io::Result<()> { sink(buffer1[0]); // $ hasTaintFlow=address println!("buffer2 = {:?}", buffer2); - sink(&buffer2); // $ hasTaintFlow=address - sink(buffer2[0]); // $ hasTaintFlow=address + sink(&buffer2); // $ MISSING: hasTaintFlow=address -- we cannot resolve the `read` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(buffer2[0]); // $ MISSING: hasTaintFlow=address -- we cannot resolve the `read` call above, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` let buffer_string = String::from_utf8_lossy(&buffer2[..n2]); println!("string = {}", buffer_string); @@ -777,25 +777,25 @@ fn test_rustls() -> std::io::Result<()> { let server_name = rustls::pki_types::ServerName::try_from("www.example.com").unwrap(); let config_arc = std::sync::Arc::new(config); let mut client = rustls::ClientConnection::new(config_arc, server_name).unwrap(); // $ Alert[rust/summary/taint-sources] - let mut reader = client.reader(); - sink(&reader); // $ hasTaintFlow=config_arc + let mut reader = client.reader(); // We cannot resolve the `reader` call because it comes from `Deref`: https://docs.rs/rustls/latest/rustls/client/struct.ClientConnection.html#deref-methods-ConnectionCommon%3CClientConnectionData%3E + sink(&reader); // $ MISSING: hasTaintFlow=config_arc { let mut buffer = [0u8; 100]; let _bytes = reader.read(&mut buffer)?; - sink(&buffer); // $ hasTaintFlow=config_arc + sink(&buffer); // $ MISSING: hasTaintFlow=config_arc } { let mut buffer = Vec::::new(); let _bytes = reader.read_to_end(&mut buffer)?; - sink(&buffer); // $ hasTaintFlow=config_arc + sink(&buffer); // $ MISSING: hasTaintFlow=config_arc } { let mut buffer = String::new(); let _bytes = reader.read_to_string(&mut buffer)?; - sink(&buffer); // $ hasTaintFlow=config_arc + sink(&buffer); // $ MISSING: hasTaintFlow=config_arc } Ok(()) diff --git a/rust/ql/test/library-tests/dataflow/sources/test_futures_io.rs b/rust/ql/test/library-tests/dataflow/sources/test_futures_io.rs index ad03d33c840..67dce4b21cc 100644 --- a/rust/ql/test/library-tests/dataflow/sources/test_futures_io.rs +++ b/rust/ql/test/library-tests/dataflow/sources/test_futures_io.rs @@ -1,18 +1,18 @@ -fn sink(_: T) { } +fn sink(_: T) {} // --- tests --- -use std::pin::Pin; -use std::task::{Context, Poll}; -use std::io; -use futures::io::AsyncRead; -use futures::io::AsyncReadExt; +use async_std::net::TcpStream; +use async_std::sync::Arc; use futures::io::AsyncBufRead; use futures::io::AsyncBufReadExt; +use futures::io::AsyncRead; +use futures::io::AsyncReadExt; use futures::StreamExt; -use futures_rustls::{TlsConnector}; -use async_std::sync::Arc; -use async_std::net::TcpStream; +use futures_rustls::TlsConnector; +use std::io; +use std::pin::Pin; +use std::task::{Context, Poll}; async fn test_futures_rustls_futures_io() -> io::Result<()> { let url = "www.example.com:443"; @@ -32,10 +32,10 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { let mut pinned = Pin::new(&mut reader); sink(&pinned); // $ hasTaintFlow=url let mut cx = Context::from_waker(futures::task::noop_waker_ref()); - let bytes_read = pinned.poll_read(&mut cx, &mut buffer); + let bytes_read = pinned.poll_read(&mut cx, &mut buffer); // we cannot correctly resolve this call, since it relies on `Deref` if let Poll::Ready(Ok(n)) = bytes_read { - sink(&buffer); // $ hasTaintFlow=url - sink(&buffer[..n]); // $ hasTaintFlow=url + sink(&buffer); // $ MISSING: hasTaintFlow=url + sink(&buffer[..n]); // $ MISSING: hasTaintFlow=url } } @@ -46,8 +46,9 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { sink(&buffer1[..bytes_read1]); // $ hasTaintFlow=url let mut buffer2 = [0u8; 64]; - let bytes_read2 = reader.read(&mut buffer2).await?; - sink(&buffer2[..bytes_read2]); // $ hasTaintFlow=url + let bytes_read2 = reader.read(&mut buffer2).await?; // we cannot resolve the `read` call, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + + sink(&buffer2[..bytes_read2]); // $ MISSING: hasTaintFlow=url } let mut reader2 = futures::io::BufReader::new(reader); @@ -79,8 +80,8 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { { // using the `AsyncBufReadExt::fill_buf` extension method (higher-level) - let buffer = reader2.fill_buf().await?; - sink(buffer); // $ hasTaintFlow=url + let buffer = reader2.fill_buf().await?; // we cannot resolve the `fill_buf` call, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` + sink(buffer); // $ MISSING: hasTaintFlow=url } { @@ -103,8 +104,8 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { sink(&buffer1[..bytes_read1]); // $ hasTaintFlow=url let mut buffer2 = [0u8; 64]; - let bytes_read2 = reader2.read(&mut buffer2).await?; - sink(&buffer2[..bytes_read2]); // $ hasTaintFlow=url + let bytes_read2 = reader2.read(&mut buffer2).await?; // we cannot resolve the `read` call, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(&buffer2[..bytes_read2]); // $ MISSING: hasTaintFlow=url } { @@ -121,35 +122,35 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { { // using the `AsyncBufReadExt::fill_buf` extension method (higher-level) - let buffer = reader2.fill_buf().await?; - sink(buffer); // $ hasTaintFlow=url + let buffer = reader2.fill_buf().await?; // we cannot resolve the `fill_buf` call, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` + sink(buffer); // $ MISSING: hasTaintFlow=url } { // using the `AsyncBufReadExt::read_until` extension method let mut line = Vec::new(); - let _bytes_read = reader2.read_until(b'\n', &mut line).await?; - sink(&line); // $ hasTaintFlow=url + let _bytes_read = reader2.read_until(b'\n', &mut line).await?; // we cannot resolve the `read_until` call, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` + sink(&line); // $ MISSING: hasTaintFlow=url } { // using the `AsyncBufReadExt::read_line` extension method let mut line = String::new(); - let _bytes_read = reader2.read_line(&mut line).await?; - sink(&line); // $ hasTaintFlow=url + let _bytes_read = reader2.read_line(&mut line).await?; // we cannot resolve the `read_line` call, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` + sink(&line); // $ MISSING: hasTaintFlow=url } { // using the `AsyncBufReadExt::read_to_end` extension method let mut buffer = Vec::with_capacity(1024); - let _bytes_read = reader2.read_to_end(&mut buffer).await?; - sink(&buffer); // $ hasTaintFlow=url + let _bytes_read = reader2.read_to_end(&mut buffer).await?; // we cannot resolve the `read` call, which comes from `impl AsyncReadExt for R {}` in `async_read_ext.rs` + sink(&buffer); // $ MISSING: hasTaintFlow=url } { // using the `AsyncBufReadExt::lines` extension method - let mut lines_stream = reader2.lines(); - sink(lines_stream.next().await.unwrap()); // $ hasTaintFlow=url + let mut lines_stream = reader2.lines(); // we cannot resolve the `lines` call, which comes from `impl AsyncBufReadExt for R {}` in `async_buf_read_ext.rs` + sink(lines_stream.next().await.unwrap()); // $ MISSING: hasTaintFlow=url while let Some(line) = lines_stream.next().await { sink(line.unwrap()); // $ MISSING: hasTaintFlow } diff --git a/rust/ql/test/library-tests/dataflow/sources/web_frameworks.rs b/rust/ql/test/library-tests/dataflow/sources/web_frameworks.rs index f1bf3ab6b0b..4168d1e3f6a 100644 --- a/rust/ql/test/library-tests/dataflow/sources/web_frameworks.rs +++ b/rust/ql/test/library-tests/dataflow/sources/web_frameworks.rs @@ -1,24 +1,26 @@ - -fn sink(_: T) { } +fn sink(_: T) {} // --- tests --- mod poem_test { - use poem::{get, handler, web::Path, web::Query, Route, Server, listener::TcpListener}; - use serde::Deserialize; use super::sink; + use poem::{get, handler, listener::TcpListener, web::Path, web::Query, Route, Server}; + use serde::Deserialize; #[handler] - fn my_poem_handler_1(Path(a): Path) -> String { // $ Alert[rust/summary/taint-sources] - sink(a.as_str()); // $ hasTaintFlow - sink(a.as_bytes()); // $ hasTaintFlow + fn my_poem_handler_1(Path(a): Path, // $ Alert[rust/summary/taint-sources] + ) -> String { + sink(a.as_str()); // $ MISSING: hasTaintFlow -- no type inference for patterns + sink(a.as_bytes()); // $ MISSING: hasTaintFlow -- no type inference for patterns sink(a); // $ hasTaintFlow "".to_string() } #[handler] - fn my_poem_handler_2(Path((a, b)): Path<(String, String)>) -> String { // $ Alert[rust/summary/taint-sources] + fn my_poem_handler_2( + Path((a, b)): Path<(String, String)>, // $ Alert[rust/summary/taint-sources] + ) -> String { sink(a); // $ MISSING: hasTaintFlow sink(b); // $ MISSING: hasTaintFlow @@ -26,7 +28,9 @@ mod poem_test { } #[handler] - fn my_poem_handler_3(path: Path<(String, String)>) -> String { // $ MISSING: Alert[rust/summary/taint-sources] + fn my_poem_handler_3( + path: Path<(String, String)>, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> String { sink(&path.0); // $ MISSING: hasTaintFlow sink(&path.1); // $ MISSING: hasTaintFlow @@ -40,7 +44,9 @@ mod poem_test { } #[handler] - fn my_poem_handler_4(Path(MyStruct {a, b}): Path) -> String { // $ Alert[rust/summary/taint-sources] + fn my_poem_handler_4( + Path(MyStruct { a, b }): Path, // $ Alert[rust/summary/taint-sources] + ) -> String { sink(a); // $ MISSING: hasTaintFlow sink(b); // $ MISSING: hasTaintFlow @@ -48,7 +54,9 @@ mod poem_test { } #[handler] - fn my_poem_handler_5(Path(ms): Path) -> String { // $ Alert[rust/summary/taint-sources] + fn my_poem_handler_5( + Path(ms): Path, // $ Alert[rust/summary/taint-sources] + ) -> String { sink(ms.a); // $ MISSING: hasTaintFlow sink(ms.b); // $ MISSING: hasTaintFlow @@ -73,17 +81,22 @@ mod poem_test { .at("/5/:a/:b", get(my_poem_handler_5)) .at("/6/:a/", get(my_poem_handler_6)); - Server::new(TcpListener::bind("0.0.0.0:3000")).run(app).await.unwrap(); + Server::new(TcpListener::bind("0.0.0.0:3000")) + .run(app) + .await + .unwrap(); // ... } } mod actix_test { - use actix_web::{get, web, App}; use super::sink; + use actix_web::{get, web, App}; - async fn my_actix_handler_1(path: web::Path) -> String { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_actix_handler_1( + path: web::Path, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> String { let a = path.into_inner(); sink(a.as_str()); // $ MISSING: hasTaintFlow sink(a.as_bytes()); // $ MISSING: hasTaintFlow @@ -92,7 +105,9 @@ mod actix_test { "".to_string() } - async fn my_actix_handler_2(path: web::Path<(String, String)>) -> String { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_actix_handler_2( + path: web::Path<(String, String)>, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> String { let (a, b) = path.into_inner(); sink(a); // $ MISSING: hasTaintFlow @@ -101,14 +116,18 @@ mod actix_test { "".to_string() } - async fn my_actix_handler_3(web::Query(a): web::Query) -> String { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_actix_handler_3( + web::Query(a): web::Query, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> String { sink(a); // $ MISSING: hasTaintFlow "".to_string() } #[get("/4/{a}")] - async fn my_actix_handler_4(path: web::Path) -> String { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_actix_handler_4( + path: web::Path, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> String { let a = path.into_inner(); sink(a); // $ MISSING: hasTaintFlow @@ -127,13 +146,15 @@ mod actix_test { } mod axum_test { - use axum::Router; - use axum::routing::get; - use axum::extract::{Path, Query, Request, Json}; - use std::collections::HashMap; use super::sink; + use axum::extract::{Json, Path, Query, Request}; + use axum::routing::get; + use axum::Router; + use std::collections::HashMap; - async fn my_axum_handler_1(Path(a): Path) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_1( + Path(a): Path, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { sink(a.as_str()); // $ MISSING: hasTaintFlow sink(a.as_bytes()); // $ MISSING: hasTaintFlow sink(a); // $ MISSING: hasTaintFlow @@ -141,14 +162,18 @@ mod axum_test { "" } - async fn my_axum_handler_2(Path((a, b)): Path<(String, String)>) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_2( + Path((a, b)): Path<(String, String)>, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { sink(a); // $ MISSING: hasTaintFlow sink(b); // $ MISSING: hasTaintFlow "" } - async fn my_axum_handler_3(Query(params): Query>) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_3( + Query(params): Query>, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { for (key, value) in params { sink(key); // $ MISSING: hasTaintFlow sink(value); // $ MISSING: hasTaintFlow @@ -157,7 +182,9 @@ mod axum_test { "" } - async fn my_axum_handler_4(request: Request) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_4( + request: Request, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { sink(request.body()); // $ MISSING: hasTaintFlow request.headers().get("header").unwrap(); // $ MISSING: hasTaintFlow sink(request.into_body()); // $ MISSING: hasTaintFlow @@ -165,20 +192,26 @@ mod axum_test { "" } - async fn my_axum_handler_5(Json(payload): Json) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_5( + Json(payload): Json, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { sink(payload.as_str()); // $ MISSING: hasTaintFlow sink(payload); // $ MISSING: hasTaintFlow "" } - async fn my_axum_handler_6(body: String) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_6( + body: String, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { sink(body); // $ MISSING: hasTaintFlow "" } - async fn my_axum_handler_7(body: String) -> &'static str { // $ MISSING: Alert[rust/summary/taint-sources] + async fn my_axum_handler_7( + body: String, // $ MISSING: Alert[rust/summary/taint-sources] + ) -> &'static str { sink(body); // $ MISSING: hasTaintFlow "" diff --git a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected index 66f86daf985..f08f15c3aef 100644 --- a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected @@ -2,9 +2,9 @@ multipleMethodCallTargets | main.rs:64:16:64:25 | s.as_str() | file://:0:0:0:0 | fn as_str | | main.rs:64:16:64:25 | s.as_str() | file://:0:0:0:0 | fn as_str | multiplePathResolutions -| main.rs:52:11:52:22 | ...::from | file://:0:0:0:0 | fn from | -| main.rs:52:11:52:22 | ...::from | file://:0:0:0:0 | fn from | -| main.rs:52:11:52:22 | ...::from | file://:0:0:0:0 | fn from | -| main.rs:52:11:52:22 | ...::from | file://:0:0:0:0 | fn from | -| main.rs:52:11:52:22 | ...::from | file://:0:0:0:0 | fn from | -| main.rs:52:11:52:22 | ...::from | file://:0:0:0:0 | fn from | +| main.rs:52:14:52:25 | ...::from | file://:0:0:0:0 | fn from | +| main.rs:52:14:52:25 | ...::from | file://:0:0:0:0 | fn from | +| main.rs:52:14:52:25 | ...::from | file://:0:0:0:0 | fn from | +| main.rs:52:14:52:25 | ...::from | file://:0:0:0:0 | fn from | +| main.rs:52:14:52:25 | ...::from | file://:0:0:0:0 | fn from | +| main.rs:52:14:52:25 | ...::from | file://:0:0:0:0 | fn from | diff --git a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected index 5c56cf594e7..24306107de2 100644 --- a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected +++ b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected @@ -1,9 +1,8 @@ models -| 1 | Summary: lang:alloc; <_ as crate::string::ToString>::to_string; Argument[self]; ReturnValue; taint | -| 2 | Summary: lang:alloc; ::from; Argument[0]; ReturnValue; value | -| 3 | Summary: lang:alloc; ::as_str; Argument[self]; ReturnValue; value | -| 4 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint | -| 5 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value | +| 1 | Summary: lang:alloc; ::from; Argument[0]; ReturnValue; value | +| 2 | Summary: lang:alloc; ::as_str; Argument[self]; ReturnValue; value | +| 3 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint | +| 4 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value | edges | main.rs:26:9:26:9 | s | main.rs:27:19:27:25 | s[...] | provenance | | | main.rs:26:13:26:22 | source(...) | main.rs:26:9:26:9 | s | provenance | | @@ -13,46 +12,42 @@ edges | main.rs:32:9:32:10 | s1 | main.rs:35:9:35:10 | s4 | provenance | | | main.rs:32:14:32:23 | source(...) | main.rs:32:9:32:10 | s1 | provenance | | | main.rs:35:9:35:10 | s4 | main.rs:38:10:38:11 | s4 | provenance | | -| main.rs:51:6:51:7 | s1 | main.rs:52:24:52:25 | s1 | provenance | | -| main.rs:51:11:51:26 | source_slice(...) | main.rs:51:6:51:7 | s1 | provenance | | -| main.rs:52:6:52:7 | s2 | main.rs:53:7:53:8 | s2 | provenance | | -| main.rs:52:11:52:26 | ...::from(...) | main.rs:52:6:52:7 | s2 | provenance | | -| main.rs:52:24:52:25 | s1 | main.rs:52:11:52:26 | ...::from(...) | provenance | MaD:2 | -| main.rs:57:6:57:7 | s1 | main.rs:58:11:58:24 | s1.to_string() | provenance | MaD:1 | -| main.rs:57:11:57:26 | source_slice(...) | main.rs:57:6:57:7 | s1 | provenance | | -| main.rs:58:6:58:7 | s2 | main.rs:59:7:59:8 | s2 | provenance | | -| main.rs:58:11:58:24 | s1.to_string() | main.rs:58:6:58:7 | s2 | provenance | | +| main.rs:51:9:51:10 | s1 | main.rs:52:27:52:28 | s1 | provenance | | +| main.rs:51:14:51:29 | source_slice(...) | main.rs:51:9:51:10 | s1 | provenance | | +| main.rs:52:9:52:10 | s2 | main.rs:53:10:53:11 | s2 | provenance | | +| main.rs:52:14:52:29 | ...::from(...) | main.rs:52:9:52:10 | s2 | provenance | | +| main.rs:52:27:52:28 | s1 | main.rs:52:14:52:29 | ...::from(...) | provenance | MaD:1 | | main.rs:63:9:63:9 | s | main.rs:64:16:64:16 | s | provenance | | -| main.rs:63:9:63:9 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:3 | +| main.rs:63:9:63:9 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:2 | | main.rs:63:13:63:22 | source(...) | main.rs:63:9:63:9 | s | provenance | | -| main.rs:64:16:64:16 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:3 | +| main.rs:64:16:64:16 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:2 | | main.rs:68:9:68:9 | s | main.rs:70:34:70:61 | MacroExpr | provenance | | | main.rs:68:9:68:9 | s | main.rs:73:34:73:59 | MacroExpr | provenance | | | main.rs:68:13:68:22 | source(...) | main.rs:68:9:68:9 | s | provenance | | | main.rs:70:9:70:18 | formatted1 | main.rs:71:10:71:19 | formatted1 | provenance | | | main.rs:70:22:70:62 | ...::format(...) | main.rs:70:9:70:18 | formatted1 | provenance | | -| main.rs:70:34:70:61 | MacroExpr | main.rs:70:22:70:62 | ...::format(...) | provenance | MaD:4 | +| main.rs:70:34:70:61 | MacroExpr | main.rs:70:22:70:62 | ...::format(...) | provenance | MaD:3 | | main.rs:73:9:73:18 | formatted2 | main.rs:74:10:74:19 | formatted2 | provenance | | | main.rs:73:22:73:60 | ...::format(...) | main.rs:73:9:73:18 | formatted2 | provenance | | -| main.rs:73:34:73:59 | MacroExpr | main.rs:73:22:73:60 | ...::format(...) | provenance | MaD:4 | +| main.rs:73:34:73:59 | MacroExpr | main.rs:73:22:73:60 | ...::format(...) | provenance | MaD:3 | | main.rs:76:9:76:13 | width | main.rs:77:34:77:74 | MacroExpr | provenance | | | main.rs:76:17:76:32 | source_usize(...) | main.rs:76:9:76:13 | width | provenance | | | main.rs:77:9:77:18 | formatted3 | main.rs:78:10:78:19 | formatted3 | provenance | | | main.rs:77:22:77:75 | ...::format(...) | main.rs:77:9:77:18 | formatted3 | provenance | | -| main.rs:77:34:77:74 | MacroExpr | main.rs:77:22:77:75 | ...::format(...) | provenance | MaD:4 | +| main.rs:77:34:77:74 | MacroExpr | main.rs:77:22:77:75 | ...::format(...) | provenance | MaD:3 | | main.rs:82:9:82:10 | s1 | main.rs:86:18:86:25 | MacroExpr | provenance | | | main.rs:82:9:82:10 | s1 | main.rs:87:18:87:32 | MacroExpr | provenance | | | main.rs:82:14:82:23 | source(...) | main.rs:82:9:82:10 | s1 | provenance | | | main.rs:86:10:86:26 | res | main.rs:86:18:86:25 | { ... } | provenance | | | main.rs:86:18:86:25 | ...::format(...) | main.rs:86:10:86:26 | res | provenance | | | main.rs:86:18:86:25 | ...::must_use(...) | main.rs:86:10:86:26 | MacroExpr | provenance | | -| main.rs:86:18:86:25 | MacroExpr | main.rs:86:18:86:25 | ...::format(...) | provenance | MaD:4 | -| main.rs:86:18:86:25 | { ... } | main.rs:86:18:86:25 | ...::must_use(...) | provenance | MaD:5 | +| main.rs:86:18:86:25 | MacroExpr | main.rs:86:18:86:25 | ...::format(...) | provenance | MaD:3 | +| main.rs:86:18:86:25 | { ... } | main.rs:86:18:86:25 | ...::must_use(...) | provenance | MaD:4 | | main.rs:87:10:87:33 | res | main.rs:87:18:87:32 | { ... } | provenance | | | main.rs:87:18:87:32 | ...::format(...) | main.rs:87:10:87:33 | res | provenance | | | main.rs:87:18:87:32 | ...::must_use(...) | main.rs:87:10:87:33 | MacroExpr | provenance | | -| main.rs:87:18:87:32 | MacroExpr | main.rs:87:18:87:32 | ...::format(...) | provenance | MaD:4 | -| main.rs:87:18:87:32 | { ... } | main.rs:87:18:87:32 | ...::must_use(...) | provenance | MaD:5 | +| main.rs:87:18:87:32 | MacroExpr | main.rs:87:18:87:32 | ...::format(...) | provenance | MaD:3 | +| main.rs:87:18:87:32 | { ... } | main.rs:87:18:87:32 | ...::must_use(...) | provenance | MaD:4 | nodes | main.rs:26:9:26:9 | s | semmle.label | s | | main.rs:26:13:26:22 | source(...) | semmle.label | source(...) | @@ -64,17 +59,12 @@ nodes | main.rs:32:14:32:23 | source(...) | semmle.label | source(...) | | main.rs:35:9:35:10 | s4 | semmle.label | s4 | | main.rs:38:10:38:11 | s4 | semmle.label | s4 | -| main.rs:51:6:51:7 | s1 | semmle.label | s1 | -| main.rs:51:11:51:26 | source_slice(...) | semmle.label | source_slice(...) | -| main.rs:52:6:52:7 | s2 | semmle.label | s2 | -| main.rs:52:11:52:26 | ...::from(...) | semmle.label | ...::from(...) | -| main.rs:52:24:52:25 | s1 | semmle.label | s1 | -| main.rs:53:7:53:8 | s2 | semmle.label | s2 | -| main.rs:57:6:57:7 | s1 | semmle.label | s1 | -| main.rs:57:11:57:26 | source_slice(...) | semmle.label | source_slice(...) | -| main.rs:58:6:58:7 | s2 | semmle.label | s2 | -| main.rs:58:11:58:24 | s1.to_string() | semmle.label | s1.to_string() | -| main.rs:59:7:59:8 | s2 | semmle.label | s2 | +| main.rs:51:9:51:10 | s1 | semmle.label | s1 | +| main.rs:51:14:51:29 | source_slice(...) | semmle.label | source_slice(...) | +| main.rs:52:9:52:10 | s2 | semmle.label | s2 | +| main.rs:52:14:52:29 | ...::from(...) | semmle.label | ...::from(...) | +| main.rs:52:27:52:28 | s1 | semmle.label | s1 | +| main.rs:53:10:53:11 | s2 | semmle.label | s2 | | main.rs:63:9:63:9 | s | semmle.label | s | | main.rs:63:13:63:22 | source(...) | semmle.label | source(...) | | main.rs:64:16:64:16 | s | semmle.label | s | @@ -114,8 +104,7 @@ testFailures #select | main.rs:28:16:28:21 | sliced | main.rs:26:13:26:22 | source(...) | main.rs:28:16:28:21 | sliced | $@ | main.rs:26:13:26:22 | source(...) | source(...) | | main.rs:38:10:38:11 | s4 | main.rs:32:14:32:23 | source(...) | main.rs:38:10:38:11 | s4 | $@ | main.rs:32:14:32:23 | source(...) | source(...) | -| main.rs:53:7:53:8 | s2 | main.rs:51:11:51:26 | source_slice(...) | main.rs:53:7:53:8 | s2 | $@ | main.rs:51:11:51:26 | source_slice(...) | source_slice(...) | -| main.rs:59:7:59:8 | s2 | main.rs:57:11:57:26 | source_slice(...) | main.rs:59:7:59:8 | s2 | $@ | main.rs:57:11:57:26 | source_slice(...) | source_slice(...) | +| main.rs:53:10:53:11 | s2 | main.rs:51:14:51:29 | source_slice(...) | main.rs:53:10:53:11 | s2 | $@ | main.rs:51:14:51:29 | source_slice(...) | source_slice(...) | | main.rs:64:16:64:25 | s.as_str() | main.rs:63:13:63:22 | source(...) | main.rs:64:16:64:25 | s.as_str() | $@ | main.rs:63:13:63:22 | source(...) | source(...) | | main.rs:71:10:71:19 | formatted1 | main.rs:68:13:68:22 | source(...) | main.rs:71:10:71:19 | formatted1 | $@ | main.rs:68:13:68:22 | source(...) | source(...) | | main.rs:74:10:74:19 | formatted2 | main.rs:68:13:68:22 | source(...) | main.rs:74:10:74:19 | formatted2 | $@ | main.rs:68:13:68:22 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/strings/main.rs b/rust/ql/test/library-tests/dataflow/strings/main.rs index c04934de051..c2e1e02778e 100644 --- a/rust/ql/test/library-tests/dataflow/strings/main.rs +++ b/rust/ql/test/library-tests/dataflow/strings/main.rs @@ -48,15 +48,15 @@ fn string_add_reference() { } fn string_from() { - let s1 = source_slice(36); - let s2 = String::from(s1); - sink(s2); // $ hasValueFlow=36 + let s1 = source_slice(36); + let s2 = String::from(s1); + sink(s2); // $ hasValueFlow=36 } fn string_to_string() { - let s1 = source_slice(22); - let s2 = s1.to_string(); - sink(s2); // $ hasTaintFlow=22 + let s1 = source_slice(22); + let s2 = s1.to_string(); + sink(s2); // $ MISSING: hasTaintFlow=22 - we are not currently able to resolve the `to_string` call above, which comes from `impl ToString for T` } fn as_str() { diff --git a/rust/ql/test/library-tests/sensitivedata/test.rs b/rust/ql/test/library-tests/sensitivedata/test.rs index f74de9f5bf8..a34fbb1dda9 100644 --- a/rust/ql/test/library-tests/sensitivedata/test.rs +++ b/rust/ql/test/library-tests/sensitivedata/test.rs @@ -279,7 +279,7 @@ fn test_private_info( sink(&info.medical_notes); // $ sensitive=private sink(info.medical_notes[0].as_str()); // $ sensitive=private for n in info.medical_notes.iter() { - sink(n.as_str()); // $ sensitive=private + sink(n.as_str()); // $ MISSING: sensitive=private } sink(info.confidentialMessage.as_str()); // $ MISSING: sensitive=private sink(info.confidentialMessage.to_lowercase()); // $ MISSING: sensitive=private diff --git a/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected b/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected index 7d8bb23d4c5..9821637a3a0 100644 --- a/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected +++ b/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected @@ -1,36 +1,15 @@ #select | src/main.rs:10:5:10:22 | ...::read_to_string | src/main.rs:6:11:6:19 | file_name | src/main.rs:10:5:10:22 | ...::read_to_string | This path depends on a $@. | src/main.rs:6:11:6:19 | file_name | user-provided value | -| src/main.rs:45:5:45:22 | ...::read_to_string | src/main.rs:37:11:37:19 | file_path | src/main.rs:45:5:45:22 | ...::read_to_string | This path depends on a $@. | src/main.rs:37:11:37:19 | file_path | user-provided value | -| src/main.rs:59:5:59:22 | ...::read_to_string | src/main.rs:50:11:50:19 | file_path | src/main.rs:59:5:59:22 | ...::read_to_string | This path depends on a $@. | src/main.rs:50:11:50:19 | file_path | user-provided value | edges | src/main.rs:6:11:6:19 | file_name | src/main.rs:8:35:8:43 | file_name | provenance | | | src/main.rs:8:9:8:17 | file_path | src/main.rs:10:24:10:32 | file_path | provenance | | | src/main.rs:8:21:8:44 | ...::from(...) | src/main.rs:8:9:8:17 | file_path | provenance | | -| src/main.rs:8:35:8:43 | file_name | src/main.rs:8:21:8:44 | ...::from(...) | provenance | MaD:4 | -| src/main.rs:8:35:8:43 | file_name | src/main.rs:8:21:8:44 | ...::from(...) | provenance | MaD:4 | +| src/main.rs:8:35:8:43 | file_name | src/main.rs:8:21:8:44 | ...::from(...) | provenance | MaD:2 | +| src/main.rs:8:35:8:43 | file_name | src/main.rs:8:21:8:44 | ...::from(...) | provenance | MaD:2 | | src/main.rs:10:24:10:32 | file_path | src/main.rs:10:5:10:22 | ...::read_to_string | provenance | MaD:1 Sink:MaD:1 | -| src/main.rs:37:11:37:19 | file_path | src/main.rs:40:52:40:60 | file_path | provenance | | -| src/main.rs:40:9:40:17 | file_path | src/main.rs:45:24:45:32 | file_path | provenance | | -| src/main.rs:40:21:40:62 | public_path.join(...) | src/main.rs:40:9:40:17 | file_path | provenance | | -| src/main.rs:40:38:40:61 | ...::from(...) | src/main.rs:40:21:40:62 | public_path.join(...) | provenance | MaD:3 | -| src/main.rs:40:52:40:60 | file_path | src/main.rs:40:38:40:61 | ...::from(...) | provenance | MaD:4 | -| src/main.rs:40:52:40:60 | file_path | src/main.rs:40:38:40:61 | ...::from(...) | provenance | MaD:4 | -| src/main.rs:45:24:45:32 | file_path | src/main.rs:45:5:45:22 | ...::read_to_string | provenance | MaD:1 Sink:MaD:1 | -| src/main.rs:50:11:50:19 | file_path | src/main.rs:53:52:53:60 | file_path | provenance | | -| src/main.rs:53:9:53:17 | file_path | src/main.rs:54:21:54:44 | file_path.canonicalize() [Ok] | provenance | Config | -| src/main.rs:53:21:53:62 | public_path.join(...) | src/main.rs:53:9:53:17 | file_path | provenance | | -| src/main.rs:53:38:53:61 | ...::from(...) | src/main.rs:53:21:53:62 | public_path.join(...) | provenance | MaD:3 | -| src/main.rs:53:52:53:60 | file_path | src/main.rs:53:38:53:61 | ...::from(...) | provenance | MaD:4 | -| src/main.rs:53:52:53:60 | file_path | src/main.rs:53:38:53:61 | ...::from(...) | provenance | MaD:4 | -| src/main.rs:54:9:54:17 | file_path | src/main.rs:59:24:59:32 | file_path | provenance | | -| src/main.rs:54:21:54:44 | file_path.canonicalize() [Ok] | src/main.rs:54:21:54:53 | ... .unwrap() | provenance | MaD:2 | -| src/main.rs:54:21:54:53 | ... .unwrap() | src/main.rs:54:9:54:17 | file_path | provenance | | -| src/main.rs:59:24:59:32 | file_path | src/main.rs:59:5:59:22 | ...::read_to_string | provenance | MaD:1 Sink:MaD:1 | models | 1 | Sink: lang:std; crate::fs::read_to_string; path-injection; Argument[0] | -| 2 | Summary: lang:core; ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 3 | Summary: lang:std; ::join; Argument[0]; ReturnValue; taint | -| 4 | Summary: lang:std; ::from; Argument[0]; ReturnValue; taint | +| 2 | Summary: lang:std; ::from; Argument[0]; ReturnValue; taint | nodes | src/main.rs:6:11:6:19 | file_name | semmle.label | file_name | | src/main.rs:8:9:8:17 | file_path | semmle.label | file_path | @@ -38,21 +17,4 @@ nodes | src/main.rs:8:35:8:43 | file_name | semmle.label | file_name | | src/main.rs:10:5:10:22 | ...::read_to_string | semmle.label | ...::read_to_string | | src/main.rs:10:24:10:32 | file_path | semmle.label | file_path | -| src/main.rs:37:11:37:19 | file_path | semmle.label | file_path | -| src/main.rs:40:9:40:17 | file_path | semmle.label | file_path | -| src/main.rs:40:21:40:62 | public_path.join(...) | semmle.label | public_path.join(...) | -| src/main.rs:40:38:40:61 | ...::from(...) | semmle.label | ...::from(...) | -| src/main.rs:40:52:40:60 | file_path | semmle.label | file_path | -| src/main.rs:45:5:45:22 | ...::read_to_string | semmle.label | ...::read_to_string | -| src/main.rs:45:24:45:32 | file_path | semmle.label | file_path | -| src/main.rs:50:11:50:19 | file_path | semmle.label | file_path | -| src/main.rs:53:9:53:17 | file_path | semmle.label | file_path | -| src/main.rs:53:21:53:62 | public_path.join(...) | semmle.label | public_path.join(...) | -| src/main.rs:53:38:53:61 | ...::from(...) | semmle.label | ...::from(...) | -| src/main.rs:53:52:53:60 | file_path | semmle.label | file_path | -| src/main.rs:54:9:54:17 | file_path | semmle.label | file_path | -| src/main.rs:54:21:54:44 | file_path.canonicalize() [Ok] | semmle.label | file_path.canonicalize() [Ok] | -| src/main.rs:54:21:54:53 | ... .unwrap() | semmle.label | ... .unwrap() | -| src/main.rs:59:5:59:22 | ...::read_to_string | semmle.label | ...::read_to_string | -| src/main.rs:59:24:59:32 | file_path | semmle.label | file_path | subpaths diff --git a/rust/ql/test/query-tests/security/CWE-022/src/main.rs b/rust/ql/test/query-tests/security/CWE-022/src/main.rs index 7c13da08db5..972ac8e7b6a 100644 --- a/rust/ql/test/query-tests/security/CWE-022/src/main.rs +++ b/rust/ql/test/query-tests/security/CWE-022/src/main.rs @@ -34,7 +34,7 @@ fn tainted_path_handler_folder_good(Query(file_path): Query) -> Result, // $ Source=remote4 + Query(file_path): Query, // $ MISSING: Source=remote4 ) -> Result { let public_path = PathBuf::from("/var/www/public_html"); let file_path = public_path.join(PathBuf::from(file_path)); @@ -42,12 +42,12 @@ fn tainted_path_handler_folder_almost_good1( if !file_path.starts_with(public_path) { return Err(Error::from_status(StatusCode::BAD_REQUEST)); } - fs::read_to_string(file_path).map_err(InternalServerError) // $ path-injection-sink Alert[rust/path-injection]=remote4 + fs::read_to_string(file_path).map_err(InternalServerError) // $ path-injection-sink MISSING: Alert[rust/path-injection]=remote4 -- we cannot resolve the `join` call above, because it needs a `PathBuf -> Path` `Deref` } //#[handler] fn tainted_path_handler_folder_almost_good2( - Query(file_path): Query, // $ Source=remote5 + Query(file_path): Query, // $ MISSING: Source=remote5 ) -> Result { let public_path = PathBuf::from("/var/www/public_html"); let file_path = public_path.join(PathBuf::from(file_path)); @@ -56,7 +56,7 @@ fn tainted_path_handler_folder_almost_good2( if file_path.starts_with(public_path) { return Err(Error::from_status(StatusCode::BAD_REQUEST)); } - fs::read_to_string(file_path).map_err(InternalServerError) // $ path-injection-sink Alert[rust/path-injection]=remote5 + fs::read_to_string(file_path).map_err(InternalServerError) // $ path-injection-sink MISSING: Alert[rust/path-injection]=remote5 -- we cannot resolve the `join` call above, because it needs a `PathBuf -> Path` `Deref` } fn sinks(path1: &Path, path2: &Path) { diff --git a/rust/ql/test/query-tests/security/CWE-089/Cargo.lock b/rust/ql/test/query-tests/security/CWE-089/Cargo.lock index 174703eacd2..2df49df403f 100644 --- a/rust/ql/test/query-tests/security/CWE-089/Cargo.lock +++ b/rust/ql/test/query-tests/security/CWE-089/Cargo.lock @@ -1500,9 +1500,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" @@ -1654,9 +1654,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ "once_cell", "rustls-pki-types", diff --git a/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected b/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected index ab8e995be76..1e0e215e544 100644 --- a/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected +++ b/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected @@ -1,36 +1,20 @@ #select -| sqlx.rs:66:26:66:46 | safe_query_3.as_str() | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:66:26:66:46 | safe_query_3.as_str() | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value | | sqlx.rs:67:26:67:48 | unsafe_query_1.as_str() | sqlx.rs:47:22:47:35 | ...::args | sqlx.rs:67:26:67:48 | unsafe_query_1.as_str() | This query depends on a $@. | sqlx.rs:47:22:47:35 | ...::args | user-provided value | | sqlx.rs:69:30:69:52 | unsafe_query_2.as_str() | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:69:30:69:52 | unsafe_query_2.as_str() | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value | -| sqlx.rs:71:30:71:52 | unsafe_query_4.as_str() | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:71:30:71:52 | unsafe_query_4.as_str() | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value | -| sqlx.rs:77:25:77:45 | safe_query_3.as_str() | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:77:25:77:45 | safe_query_3.as_str() | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value | | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() | sqlx.rs:47:22:47:35 | ...::args | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() | This query depends on a $@. | sqlx.rs:47:22:47:35 | ...::args | user-provided value | | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value | -| sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value | edges | sqlx.rs:47:9:47:18 | arg_string | sqlx.rs:53:27:53:36 | arg_string | provenance | | | sqlx.rs:47:22:47:35 | ...::args | sqlx.rs:47:22:47:37 | ...::args(...) [element] | provenance | Src:MaD:1 | -| sqlx.rs:47:22:47:37 | ...::args(...) [element] | sqlx.rs:47:22:47:44 | ... .nth(...) [Some] | provenance | MaD:10 | -| sqlx.rs:47:22:47:44 | ... .nth(...) [Some] | sqlx.rs:47:22:47:77 | ... .unwrap_or(...) | provenance | MaD:5 | +| sqlx.rs:47:22:47:37 | ...::args(...) [element] | sqlx.rs:47:22:47:44 | ... .nth(...) [Some] | provenance | MaD:7 | +| sqlx.rs:47:22:47:44 | ... .nth(...) [Some] | sqlx.rs:47:22:47:77 | ... .unwrap_or(...) | provenance | MaD:4 | | sqlx.rs:47:22:47:77 | ... .unwrap_or(...) | sqlx.rs:47:9:47:18 | arg_string | provenance | | -| sqlx.rs:48:9:48:21 | remote_string | sqlx.rs:49:25:49:52 | remote_string.parse() [Ok] | provenance | MaD:8 | | sqlx.rs:48:9:48:21 | remote_string | sqlx.rs:54:27:54:39 | remote_string | provenance | | -| sqlx.rs:48:9:48:21 | remote_string | sqlx.rs:59:17:59:72 | MacroExpr | provenance | | | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:48:25:48:69 | ...::get(...) [Ok] | provenance | Src:MaD:2 | -| sqlx.rs:48:25:48:69 | ...::get(...) [Ok] | sqlx.rs:48:25:48:78 | ... .unwrap() | provenance | MaD:6 | -| sqlx.rs:48:25:48:78 | ... .unwrap() | sqlx.rs:48:25:48:85 | ... .text() [Ok] | provenance | MaD:11 | -| sqlx.rs:48:25:48:85 | ... .text() [Ok] | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | provenance | MaD:7 | +| sqlx.rs:48:25:48:69 | ...::get(...) [Ok] | sqlx.rs:48:25:48:78 | ... .unwrap() | provenance | MaD:5 | +| sqlx.rs:48:25:48:78 | ... .unwrap() | sqlx.rs:48:25:48:85 | ... .text() [Ok] | provenance | MaD:8 | +| sqlx.rs:48:25:48:85 | ... .text() [Ok] | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | provenance | MaD:6 | | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | sqlx.rs:48:9:48:21 | remote_string | provenance | | -| sqlx.rs:49:9:49:21 | remote_number | sqlx.rs:52:32:52:87 | MacroExpr | provenance | | -| sqlx.rs:49:25:49:52 | remote_string.parse() [Ok] | sqlx.rs:49:25:49:65 | ... .unwrap_or(...) | provenance | MaD:7 | -| sqlx.rs:49:25:49:65 | ... .unwrap_or(...) | sqlx.rs:49:9:49:21 | remote_number | provenance | | -| sqlx.rs:52:9:52:20 | safe_query_3 | sqlx.rs:66:26:66:46 | safe_query_3.as_str() | provenance | MaD:3 | -| sqlx.rs:52:9:52:20 | safe_query_3 | sqlx.rs:77:25:77:45 | safe_query_3.as_str() | provenance | MaD:3 | -| sqlx.rs:52:24:52:88 | res | sqlx.rs:52:32:52:87 | { ... } | provenance | | -| sqlx.rs:52:32:52:87 | ...::format(...) | sqlx.rs:52:24:52:88 | res | provenance | | -| sqlx.rs:52:32:52:87 | ...::must_use(...) | sqlx.rs:52:9:52:20 | safe_query_3 | provenance | | -| sqlx.rs:52:32:52:87 | MacroExpr | sqlx.rs:52:32:52:87 | ...::format(...) | provenance | MaD:4 | -| sqlx.rs:52:32:52:87 | { ... } | sqlx.rs:52:32:52:87 | ...::must_use(...) | provenance | MaD:9 | | sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | sqlx.rs:67:26:67:48 | unsafe_query_1.as_str() | provenance | MaD:3 | | sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() | provenance | MaD:3 | | sqlx.rs:53:26:53:36 | &arg_string [&ref] | sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | provenance | | @@ -39,25 +23,15 @@ edges | sqlx.rs:54:9:54:22 | unsafe_query_2 [&ref] | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() | provenance | MaD:3 | | sqlx.rs:54:26:54:39 | &remote_string [&ref] | sqlx.rs:54:9:54:22 | unsafe_query_2 [&ref] | provenance | | | sqlx.rs:54:27:54:39 | remote_string | sqlx.rs:54:26:54:39 | &remote_string [&ref] | provenance | | -| sqlx.rs:56:9:56:22 | unsafe_query_4 | sqlx.rs:71:30:71:52 | unsafe_query_4.as_str() | provenance | MaD:3 | -| sqlx.rs:56:9:56:22 | unsafe_query_4 | sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | provenance | MaD:3 | -| sqlx.rs:59:9:59:73 | res | sqlx.rs:59:17:59:72 | { ... } | provenance | | -| sqlx.rs:59:17:59:72 | ...::format(...) | sqlx.rs:59:9:59:73 | res | provenance | | -| sqlx.rs:59:17:59:72 | ...::must_use(...) | sqlx.rs:56:9:56:22 | unsafe_query_4 | provenance | | -| sqlx.rs:59:17:59:72 | MacroExpr | sqlx.rs:59:17:59:72 | ...::format(...) | provenance | MaD:4 | -| sqlx.rs:59:17:59:72 | { ... } | sqlx.rs:59:17:59:72 | ...::must_use(...) | provenance | MaD:9 | models | 1 | Source: lang:std; crate::env::args; commandargs; ReturnValue.Element | | 2 | Source: repo:https://github.com/seanmonstar/reqwest:reqwest; crate::blocking::get; remote; ReturnValue.Field[core::result::Result::Ok(0)] | | 3 | Summary: lang:alloc; ::as_str; Argument[self]; ReturnValue; value | -| 4 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint | -| 5 | Summary: lang:core; ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 6 | Summary: lang:core; ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 7 | Summary: lang:core; ::unwrap_or; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 8 | Summary: lang:core; ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 9 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value | -| 10 | Summary: lang:core; crate::iter::traits::iterator::Iterator::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | -| 11 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; ::text; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 4 | Summary: lang:core; ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 5 | Summary: lang:core; ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 6 | Summary: lang:core; ::unwrap_or; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 7 | Summary: lang:core; crate::iter::traits::iterator::Iterator::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 8 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; ::text; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | nodes | sqlx.rs:47:9:47:18 | arg_string | semmle.label | arg_string | | sqlx.rs:47:22:47:35 | ...::args | semmle.label | ...::args | @@ -70,33 +44,14 @@ nodes | sqlx.rs:48:25:48:78 | ... .unwrap() | semmle.label | ... .unwrap() | | sqlx.rs:48:25:48:85 | ... .text() [Ok] | semmle.label | ... .text() [Ok] | | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | semmle.label | ... .unwrap_or(...) | -| sqlx.rs:49:9:49:21 | remote_number | semmle.label | remote_number | -| sqlx.rs:49:25:49:52 | remote_string.parse() [Ok] | semmle.label | remote_string.parse() [Ok] | -| sqlx.rs:49:25:49:65 | ... .unwrap_or(...) | semmle.label | ... .unwrap_or(...) | -| sqlx.rs:52:9:52:20 | safe_query_3 | semmle.label | safe_query_3 | -| sqlx.rs:52:24:52:88 | res | semmle.label | res | -| sqlx.rs:52:32:52:87 | ...::format(...) | semmle.label | ...::format(...) | -| sqlx.rs:52:32:52:87 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| sqlx.rs:52:32:52:87 | MacroExpr | semmle.label | MacroExpr | -| sqlx.rs:52:32:52:87 | { ... } | semmle.label | { ... } | | sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | semmle.label | unsafe_query_1 [&ref] | | sqlx.rs:53:26:53:36 | &arg_string [&ref] | semmle.label | &arg_string [&ref] | | sqlx.rs:53:27:53:36 | arg_string | semmle.label | arg_string | | sqlx.rs:54:9:54:22 | unsafe_query_2 [&ref] | semmle.label | unsafe_query_2 [&ref] | | sqlx.rs:54:26:54:39 | &remote_string [&ref] | semmle.label | &remote_string [&ref] | | sqlx.rs:54:27:54:39 | remote_string | semmle.label | remote_string | -| sqlx.rs:56:9:56:22 | unsafe_query_4 | semmle.label | unsafe_query_4 | -| sqlx.rs:59:9:59:73 | res | semmle.label | res | -| sqlx.rs:59:17:59:72 | ...::format(...) | semmle.label | ...::format(...) | -| sqlx.rs:59:17:59:72 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| sqlx.rs:59:17:59:72 | MacroExpr | semmle.label | MacroExpr | -| sqlx.rs:59:17:59:72 | { ... } | semmle.label | { ... } | -| sqlx.rs:66:26:66:46 | safe_query_3.as_str() | semmle.label | safe_query_3.as_str() | | sqlx.rs:67:26:67:48 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:69:30:69:52 | unsafe_query_2.as_str() | semmle.label | unsafe_query_2.as_str() | -| sqlx.rs:71:30:71:52 | unsafe_query_4.as_str() | semmle.label | unsafe_query_4.as_str() | -| sqlx.rs:77:25:77:45 | safe_query_3.as_str() | semmle.label | safe_query_3.as_str() | | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() | semmle.label | unsafe_query_2.as_str() | -| sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | semmle.label | unsafe_query_4.as_str() | subpaths diff --git a/rust/ql/test/query-tests/security/CWE-089/sqlx.rs b/rust/ql/test/query-tests/security/CWE-089/sqlx.rs index 3de58350f20..4d121e86fee 100644 --- a/rust/ql/test/query-tests/security/CWE-089/sqlx.rs +++ b/rust/ql/test/query-tests/security/CWE-089/sqlx.rs @@ -63,23 +63,23 @@ async fn test_sqlx_mysql(url: &str, enable_remote: bool) -> Result<(), sqlx::Err // direct execution let _ = conn.execute(safe_query_1.as_str()).await?; // $ sql-sink let _ = conn.execute(safe_query_2.as_str()).await?; // $ sql-sink - let _ = conn.execute(safe_query_3.as_str()).await?; // $ sql-sink SPURIOUS: Alert[rust/sql-injection]=remote1 + let _ = conn.execute(safe_query_3.as_str()).await?; // $ sql-sink let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink Alert[rust/sql-injection]=args1 if enable_remote { let _ = conn.execute(unsafe_query_2.as_str()).await?; // $ sql-sink Alert[rust/sql-injection]=remote1 let _ = conn.execute(unsafe_query_3.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1 - let _ = conn.execute(unsafe_query_4.as_str()).await?; // $ sql-sink Alert[rust/sql-injection]=remote1 + let _ = conn.execute(unsafe_query_4.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1 } // prepared queries let _ = sqlx::query(safe_query_1.as_str()).execute(&pool).await?; // $ sql-sink let _ = sqlx::query(safe_query_2.as_str()).execute(&pool).await?; // $ sql-sink - let _ = sqlx::query(safe_query_3.as_str()).execute(&pool).await?; // $ sql-sink SPURIOUS: Alert[rust/sql-injection]=remote1 + let _ = sqlx::query(safe_query_3.as_str()).execute(&pool).await?; // $ sql-sink let _ = sqlx::query(unsafe_query_1.as_str()).execute(&pool).await?; // $ sql-sink Alert[rust/sql-injection]=args1 if enable_remote { let _ = sqlx::query(unsafe_query_2.as_str()).execute(&pool).await?; // $ sql-sink Alert[rust/sql-injection]=remote1 let _ = sqlx::query(unsafe_query_3.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1 - let _ = sqlx::query(unsafe_query_4.as_str()).execute(&pool).await?; // $ sql-sink Alert[rust/sql-injection]=remote1 + let _ = sqlx::query(unsafe_query_4.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1 } let _ = sqlx::query(prepared_query_1.as_str()).bind(const_string).execute(&pool).await?; // $ sql-sink let _ = sqlx::query(prepared_query_1.as_str()).bind(arg_string).execute(&pool).await?; // $ sql-sink diff --git a/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected b/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected index 2c6b8207b70..b0dbd91436a 100644 --- a/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected +++ b/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected @@ -48,242 +48,194 @@ | test_logging.rs:220:13:220:58 | ...::panic_fmt | test_logging.rs:220:50:220:57 | password | test_logging.rs:220:13:220:58 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:220:50:220:57 | password | password | | test_logging.rs:223:13:223:60 | ...::assert_failed | test_logging.rs:223:52:223:59 | password | test_logging.rs:223:13:223:60 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:223:52:223:59 | password | password | | test_logging.rs:226:13:226:60 | ...::assert_failed | test_logging.rs:226:52:226:59 | password | test_logging.rs:226:13:226:60 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:226:52:226:59 | password | password | -| test_logging.rs:229:23:229:28 | expect | test_logging.rs:229:54:229:61 | password | test_logging.rs:229:23:229:28 | expect | This operation writes $@ to a log file. | test_logging.rs:229:54:229:61 | password | password | -| test_logging.rs:229:23:229:28 | expect | test_logging.rs:229:54:229:61 | password | test_logging.rs:229:23:229:28 | expect | This operation writes $@ to a log file. | test_logging.rs:229:54:229:61 | password | password | -| test_logging.rs:242:10:242:14 | write | test_logging.rs:242:42:242:49 | password | test_logging.rs:242:10:242:14 | write | This operation writes $@ to a log file. | test_logging.rs:242:42:242:49 | password | password | -| test_logging.rs:245:10:245:18 | write_all | test_logging.rs:245:46:245:53 | password | test_logging.rs:245:10:245:18 | write_all | This operation writes $@ to a log file. | test_logging.rs:245:46:245:53 | password | password | -| test_logging.rs:248:9:248:13 | write | test_logging.rs:248:41:248:48 | password | test_logging.rs:248:9:248:13 | write | This operation writes $@ to a log file. | test_logging.rs:248:41:248:48 | password | password | -| test_logging.rs:251:9:251:13 | write | test_logging.rs:251:41:251:48 | password | test_logging.rs:251:9:251:13 | write | This operation writes $@ to a log file. | test_logging.rs:251:41:251:48 | password | password | edges -| test_logging.rs:42:12:42:35 | MacroExpr | test_logging.rs:42:5:42:36 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:42:12:42:35 | MacroExpr | test_logging.rs:42:5:42:36 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:42:28:42:35 | password | test_logging.rs:42:12:42:35 | MacroExpr | provenance | | -| test_logging.rs:43:12:43:35 | MacroExpr | test_logging.rs:43:5:43:36 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:43:12:43:35 | MacroExpr | test_logging.rs:43:5:43:36 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:43:28:43:35 | password | test_logging.rs:43:12:43:35 | MacroExpr | provenance | | -| test_logging.rs:44:11:44:34 | MacroExpr | test_logging.rs:44:5:44:35 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:44:11:44:34 | MacroExpr | test_logging.rs:44:5:44:35 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:44:27:44:34 | password | test_logging.rs:44:11:44:34 | MacroExpr | provenance | | -| test_logging.rs:45:12:45:35 | MacroExpr | test_logging.rs:45:5:45:36 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:45:12:45:35 | MacroExpr | test_logging.rs:45:5:45:36 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:45:28:45:35 | password | test_logging.rs:45:12:45:35 | MacroExpr | provenance | | -| test_logging.rs:46:11:46:34 | MacroExpr | test_logging.rs:46:5:46:35 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:46:11:46:34 | MacroExpr | test_logging.rs:46:5:46:35 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:46:27:46:34 | password | test_logging.rs:46:11:46:34 | MacroExpr | provenance | | -| test_logging.rs:47:24:47:47 | MacroExpr | test_logging.rs:47:5:47:48 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:47:24:47:47 | MacroExpr | test_logging.rs:47:5:47:48 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:47:40:47:47 | password | test_logging.rs:47:24:47:47 | MacroExpr | provenance | | -| test_logging.rs:52:12:52:35 | MacroExpr | test_logging.rs:52:5:52:36 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:52:12:52:35 | MacroExpr | test_logging.rs:52:5:52:36 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:52:28:52:35 | password | test_logging.rs:52:12:52:35 | MacroExpr | provenance | | -| test_logging.rs:54:12:54:48 | MacroExpr | test_logging.rs:54:5:54:49 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:54:12:54:48 | MacroExpr | test_logging.rs:54:5:54:49 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:54:41:54:48 | password | test_logging.rs:54:12:54:48 | MacroExpr | provenance | | -| test_logging.rs:56:12:56:46 | MacroExpr | test_logging.rs:56:5:56:47 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:56:12:56:46 | MacroExpr | test_logging.rs:56:5:56:47 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:56:39:56:46 | password | test_logging.rs:56:12:56:46 | MacroExpr | provenance | | -| test_logging.rs:57:12:57:33 | MacroExpr | test_logging.rs:57:5:57:34 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:57:12:57:33 | MacroExpr | test_logging.rs:57:5:57:34 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:57:24:57:31 | password | test_logging.rs:57:12:57:33 | MacroExpr | provenance | | -| test_logging.rs:58:12:58:35 | MacroExpr | test_logging.rs:58:5:58:36 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:58:12:58:35 | MacroExpr | test_logging.rs:58:5:58:36 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:58:24:58:31 | password | test_logging.rs:58:12:58:35 | MacroExpr | provenance | | -| test_logging.rs:60:30:60:53 | MacroExpr | test_logging.rs:60:5:60:54 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:60:30:60:53 | MacroExpr | test_logging.rs:60:5:60:54 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:60:46:60:53 | password | test_logging.rs:60:30:60:53 | MacroExpr | provenance | | -| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | +| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | | test_logging.rs:61:20:61:28 | &password | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | provenance | | | test_logging.rs:61:20:61:28 | &password [&ref] | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | provenance | | | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | provenance | | | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | provenance | | | test_logging.rs:61:21:61:28 | password | test_logging.rs:61:20:61:28 | &password | provenance | Config | | test_logging.rs:61:21:61:28 | password | test_logging.rs:61:20:61:28 | &password [&ref] | provenance | | -| test_logging.rs:65:24:65:47 | MacroExpr | test_logging.rs:65:5:65:48 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:65:24:65:47 | MacroExpr | test_logging.rs:65:5:65:48 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:65:40:65:47 | password | test_logging.rs:65:24:65:47 | MacroExpr | provenance | | -| test_logging.rs:67:42:67:65 | MacroExpr | test_logging.rs:67:5:67:66 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:67:42:67:65 | MacroExpr | test_logging.rs:67:5:67:66 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:67:58:67:65 | password | test_logging.rs:67:42:67:65 | MacroExpr | provenance | | -| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | +| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | | test_logging.rs:68:18:68:26 | &password | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | provenance | | | test_logging.rs:68:18:68:26 | &password [&ref] | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | provenance | | | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | provenance | | | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | provenance | | | test_logging.rs:68:19:68:26 | password | test_logging.rs:68:18:68:26 | &password | provenance | Config | | test_logging.rs:68:19:68:26 | password | test_logging.rs:68:18:68:26 | &password [&ref] | provenance | | -| test_logging.rs:72:23:72:46 | MacroExpr | test_logging.rs:72:5:72:47 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:72:23:72:46 | MacroExpr | test_logging.rs:72:5:72:47 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:72:39:72:46 | password | test_logging.rs:72:23:72:46 | MacroExpr | provenance | | -| test_logging.rs:74:41:74:64 | MacroExpr | test_logging.rs:74:5:74:65 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:74:41:74:64 | MacroExpr | test_logging.rs:74:5:74:65 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:74:57:74:64 | password | test_logging.rs:74:41:74:64 | MacroExpr | provenance | | -| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | +| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | | test_logging.rs:75:20:75:28 | &password | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | provenance | | | test_logging.rs:75:20:75:28 | &password [&ref] | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | provenance | | | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | provenance | | | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | provenance | | | test_logging.rs:75:21:75:28 | password | test_logging.rs:75:20:75:28 | &password | provenance | Config | | test_logging.rs:75:21:75:28 | password | test_logging.rs:75:20:75:28 | &password [&ref] | provenance | | -| test_logging.rs:76:23:76:46 | MacroExpr | test_logging.rs:76:5:76:47 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:76:23:76:46 | MacroExpr | test_logging.rs:76:5:76:47 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:76:39:76:46 | password | test_logging.rs:76:23:76:46 | MacroExpr | provenance | | -| test_logging.rs:82:20:82:43 | MacroExpr | test_logging.rs:82:5:82:44 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:82:20:82:43 | MacroExpr | test_logging.rs:82:5:82:44 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:82:36:82:43 | password | test_logging.rs:82:20:82:43 | MacroExpr | provenance | | -| test_logging.rs:84:38:84:61 | MacroExpr | test_logging.rs:84:5:84:62 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:84:38:84:61 | MacroExpr | test_logging.rs:84:5:84:62 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:84:54:84:61 | password | test_logging.rs:84:38:84:61 | MacroExpr | provenance | | -| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 Sink:MaD:15 | -| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:15 Sink:MaD:15 Sink:MaD:15 | +| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 Sink:MaD:11 | +| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:11 Sink:MaD:11 Sink:MaD:11 | | test_logging.rs:85:20:85:28 | &password | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | provenance | | | test_logging.rs:85:20:85:28 | &password [&ref] | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | provenance | | | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | provenance | | | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | provenance | | | test_logging.rs:85:21:85:28 | password | test_logging.rs:85:20:85:28 | &password | provenance | Config | | test_logging.rs:85:21:85:28 | password | test_logging.rs:85:20:85:28 | &password [&ref] | provenance | | -| test_logging.rs:86:20:86:43 | MacroExpr | test_logging.rs:86:5:86:44 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:86:20:86:43 | MacroExpr | test_logging.rs:86:5:86:44 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:86:36:86:43 | password | test_logging.rs:86:20:86:43 | MacroExpr | provenance | | | test_logging.rs:93:9:93:10 | m1 | test_logging.rs:94:11:94:28 | MacroExpr | provenance | | | test_logging.rs:93:14:93:22 | &password | test_logging.rs:93:9:93:10 | m1 | provenance | | | test_logging.rs:93:15:93:22 | password | test_logging.rs:93:14:93:22 | &password | provenance | Config | -| test_logging.rs:94:11:94:28 | MacroExpr | test_logging.rs:94:5:94:29 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:94:11:94:28 | MacroExpr | test_logging.rs:94:5:94:29 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:96:9:96:10 | m2 | test_logging.rs:97:11:97:18 | MacroExpr | provenance | | | test_logging.rs:96:41:96:49 | &password | test_logging.rs:96:9:96:10 | m2 | provenance | | | test_logging.rs:96:42:96:49 | password | test_logging.rs:96:41:96:49 | &password | provenance | Config | -| test_logging.rs:97:11:97:18 | MacroExpr | test_logging.rs:97:5:97:19 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:97:11:97:18 | MacroExpr | test_logging.rs:97:5:97:19 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:99:9:99:10 | m3 | test_logging.rs:100:11:100:18 | MacroExpr | provenance | | | test_logging.rs:99:14:99:46 | res | test_logging.rs:99:22:99:45 | { ... } | provenance | | | test_logging.rs:99:22:99:45 | ...::format(...) | test_logging.rs:99:14:99:46 | res | provenance | | | test_logging.rs:99:22:99:45 | ...::must_use(...) | test_logging.rs:99:9:99:10 | m3 | provenance | | -| test_logging.rs:99:22:99:45 | MacroExpr | test_logging.rs:99:22:99:45 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:99:22:99:45 | { ... } | test_logging.rs:99:22:99:45 | ...::must_use(...) | provenance | MaD:19 | +| test_logging.rs:99:22:99:45 | MacroExpr | test_logging.rs:99:22:99:45 | ...::format(...) | provenance | MaD:12 | +| test_logging.rs:99:22:99:45 | { ... } | test_logging.rs:99:22:99:45 | ...::must_use(...) | provenance | MaD:13 | | test_logging.rs:99:38:99:45 | password | test_logging.rs:99:22:99:45 | MacroExpr | provenance | | -| test_logging.rs:100:11:100:18 | MacroExpr | test_logging.rs:100:5:100:19 | ...::log | provenance | MaD:14 Sink:MaD:14 | -| test_logging.rs:118:12:118:41 | MacroExpr | test_logging.rs:118:5:118:42 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:100:11:100:18 | MacroExpr | test_logging.rs:100:5:100:19 | ...::log | provenance | MaD:10 Sink:MaD:10 | +| test_logging.rs:118:12:118:41 | MacroExpr | test_logging.rs:118:5:118:42 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:118:28:118:41 | get_password(...) | test_logging.rs:118:12:118:41 | MacroExpr | provenance | | | test_logging.rs:129:9:129:10 | t1 [tuple.1] | test_logging.rs:131:28:131:29 | t1 [tuple.1] | provenance | | | test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | test_logging.rs:129:9:129:10 | t1 [tuple.1] | provenance | | | test_logging.rs:129:25:129:32 | password | test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | provenance | | -| test_logging.rs:131:12:131:31 | MacroExpr | test_logging.rs:131:5:131:32 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:131:12:131:31 | MacroExpr | test_logging.rs:131:5:131:32 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:131:28:131:29 | t1 [tuple.1] | test_logging.rs:131:28:131:31 | t1.1 | provenance | | | test_logging.rs:131:28:131:31 | t1.1 | test_logging.rs:131:12:131:31 | MacroExpr | provenance | | -| test_logging.rs:141:11:141:37 | MacroExpr | test_logging.rs:141:5:141:38 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:141:11:141:37 | MacroExpr | test_logging.rs:141:5:141:38 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:141:27:141:37 | s1.password | test_logging.rs:141:11:141:37 | MacroExpr | provenance | | -| test_logging.rs:151:11:151:37 | MacroExpr | test_logging.rs:151:5:151:38 | ...::log | provenance | MaD:14 Sink:MaD:14 | +| test_logging.rs:151:11:151:37 | MacroExpr | test_logging.rs:151:5:151:38 | ...::log | provenance | MaD:10 Sink:MaD:10 | | test_logging.rs:151:27:151:37 | s2.password | test_logging.rs:151:11:151:37 | MacroExpr | provenance | | -| test_logging.rs:176:33:176:79 | &... | test_logging.rs:176:22:176:31 | log_expect | provenance | MaD:10 Sink:MaD:10 | -| test_logging.rs:176:33:176:79 | &... [&ref] | test_logging.rs:176:22:176:31 | log_expect | provenance | MaD:10 Sink:MaD:10 | +| test_logging.rs:176:33:176:79 | &... | test_logging.rs:176:22:176:31 | log_expect | provenance | MaD:6 Sink:MaD:6 | +| test_logging.rs:176:33:176:79 | &... [&ref] | test_logging.rs:176:22:176:31 | log_expect | provenance | MaD:6 Sink:MaD:6 | | test_logging.rs:176:34:176:79 | MacroExpr | test_logging.rs:176:33:176:79 | &... | provenance | Config | | test_logging.rs:176:34:176:79 | MacroExpr | test_logging.rs:176:33:176:79 | &... [&ref] | provenance | | | test_logging.rs:176:34:176:79 | res | test_logging.rs:176:42:176:78 | { ... } | provenance | | | test_logging.rs:176:42:176:78 | ...::format(...) | test_logging.rs:176:34:176:79 | res | provenance | | | test_logging.rs:176:42:176:78 | ...::must_use(...) | test_logging.rs:176:34:176:79 | MacroExpr | provenance | | -| test_logging.rs:176:42:176:78 | MacroExpr | test_logging.rs:176:42:176:78 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:176:42:176:78 | { ... } | test_logging.rs:176:42:176:78 | ...::must_use(...) | provenance | MaD:19 | +| test_logging.rs:176:42:176:78 | MacroExpr | test_logging.rs:176:42:176:78 | ...::format(...) | provenance | MaD:12 | +| test_logging.rs:176:42:176:78 | { ... } | test_logging.rs:176:42:176:78 | ...::must_use(...) | provenance | MaD:13 | | test_logging.rs:176:70:176:78 | password2 | test_logging.rs:176:42:176:78 | MacroExpr | provenance | | -| test_logging.rs:180:35:180:81 | &... | test_logging.rs:180:24:180:33 | log_expect | provenance | MaD:11 Sink:MaD:11 | -| test_logging.rs:180:35:180:81 | &... [&ref] | test_logging.rs:180:24:180:33 | log_expect | provenance | MaD:11 Sink:MaD:11 | +| test_logging.rs:180:35:180:81 | &... | test_logging.rs:180:24:180:33 | log_expect | provenance | MaD:7 Sink:MaD:7 | +| test_logging.rs:180:35:180:81 | &... [&ref] | test_logging.rs:180:24:180:33 | log_expect | provenance | MaD:7 Sink:MaD:7 | | test_logging.rs:180:36:180:81 | MacroExpr | test_logging.rs:180:35:180:81 | &... | provenance | Config | | test_logging.rs:180:36:180:81 | MacroExpr | test_logging.rs:180:35:180:81 | &... [&ref] | provenance | | | test_logging.rs:180:36:180:81 | res | test_logging.rs:180:44:180:80 | { ... } | provenance | | | test_logging.rs:180:44:180:80 | ...::format(...) | test_logging.rs:180:36:180:81 | res | provenance | | | test_logging.rs:180:44:180:80 | ...::must_use(...) | test_logging.rs:180:36:180:81 | MacroExpr | provenance | | -| test_logging.rs:180:44:180:80 | MacroExpr | test_logging.rs:180:44:180:80 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:180:44:180:80 | { ... } | test_logging.rs:180:44:180:80 | ...::must_use(...) | provenance | MaD:19 | +| test_logging.rs:180:44:180:80 | MacroExpr | test_logging.rs:180:44:180:80 | ...::format(...) | provenance | MaD:12 | +| test_logging.rs:180:44:180:80 | { ... } | test_logging.rs:180:44:180:80 | ...::must_use(...) | provenance | MaD:13 | | test_logging.rs:180:72:180:80 | password2 | test_logging.rs:180:44:180:80 | MacroExpr | provenance | | | test_logging.rs:183:9:183:19 | err_result2 [Err] | test_logging.rs:184:13:184:23 | err_result2 [Err] | provenance | | | test_logging.rs:183:47:183:68 | Err(...) [Err] | test_logging.rs:183:9:183:19 | err_result2 [Err] | provenance | | | test_logging.rs:183:51:183:59 | password2 | test_logging.rs:183:51:183:67 | password2.clone() | provenance | generated | | test_logging.rs:183:51:183:67 | password2.clone() | test_logging.rs:183:47:183:68 | Err(...) [Err] | provenance | | -| test_logging.rs:184:13:184:23 | err_result2 [Err] | test_logging.rs:184:25:184:34 | log_expect | provenance | MaD:12 Sink:MaD:12 | +| test_logging.rs:184:13:184:23 | err_result2 [Err] | test_logging.rs:184:25:184:34 | log_expect | provenance | MaD:8 Sink:MaD:8 | | test_logging.rs:187:9:187:19 | err_result3 [Err] | test_logging.rs:188:13:188:23 | err_result3 [Err] | provenance | | | test_logging.rs:187:47:187:60 | Err(...) [Err] | test_logging.rs:187:9:187:19 | err_result3 [Err] | provenance | | | test_logging.rs:187:51:187:59 | password2 | test_logging.rs:187:47:187:60 | Err(...) [Err] | provenance | | -| test_logging.rs:188:13:188:23 | err_result3 [Err] | test_logging.rs:188:25:188:34 | log_unwrap | provenance | MaD:13 Sink:MaD:13 | -| test_logging.rs:192:12:192:37 | MacroExpr | test_logging.rs:192:5:192:38 | ...::_print | provenance | MaD:9 Sink:MaD:9 | +| test_logging.rs:188:13:188:23 | err_result3 [Err] | test_logging.rs:188:25:188:34 | log_unwrap | provenance | MaD:9 Sink:MaD:9 | +| test_logging.rs:192:12:192:37 | MacroExpr | test_logging.rs:192:5:192:38 | ...::_print | provenance | MaD:5 Sink:MaD:5 | | test_logging.rs:192:30:192:37 | password | test_logging.rs:192:12:192:37 | MacroExpr | provenance | | -| test_logging.rs:193:14:193:37 | MacroExpr | test_logging.rs:193:5:193:38 | ...::_print | provenance | MaD:9 Sink:MaD:9 | +| test_logging.rs:193:14:193:37 | MacroExpr | test_logging.rs:193:5:193:38 | ...::_print | provenance | MaD:5 Sink:MaD:5 | | test_logging.rs:193:30:193:37 | password | test_logging.rs:193:14:193:37 | MacroExpr | provenance | | -| test_logging.rs:194:13:194:38 | MacroExpr | test_logging.rs:194:5:194:39 | ...::_eprint | provenance | MaD:8 Sink:MaD:8 | +| test_logging.rs:194:13:194:38 | MacroExpr | test_logging.rs:194:5:194:39 | ...::_eprint | provenance | MaD:4 Sink:MaD:4 | | test_logging.rs:194:31:194:38 | password | test_logging.rs:194:13:194:38 | MacroExpr | provenance | | -| test_logging.rs:195:15:195:38 | MacroExpr | test_logging.rs:195:5:195:39 | ...::_eprint | provenance | MaD:8 Sink:MaD:8 | +| test_logging.rs:195:15:195:38 | MacroExpr | test_logging.rs:195:5:195:39 | ...::_eprint | provenance | MaD:4 Sink:MaD:4 | | test_logging.rs:195:31:195:38 | password | test_logging.rs:195:15:195:38 | MacroExpr | provenance | | -| test_logging.rs:199:20:199:43 | MacroExpr | test_logging.rs:199:13:199:44 | ...::panic_fmt | provenance | MaD:4 Sink:MaD:4 | +| test_logging.rs:199:20:199:43 | MacroExpr | test_logging.rs:199:13:199:44 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 | | test_logging.rs:199:36:199:43 | password | test_logging.rs:199:20:199:43 | MacroExpr | provenance | | -| test_logging.rs:202:19:202:42 | MacroExpr | test_logging.rs:202:13:202:43 | ...::panic_fmt | provenance | MaD:4 Sink:MaD:4 | +| test_logging.rs:202:19:202:42 | MacroExpr | test_logging.rs:202:13:202:43 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 | | test_logging.rs:202:35:202:42 | password | test_logging.rs:202:19:202:42 | MacroExpr | provenance | | -| test_logging.rs:205:28:205:51 | MacroExpr | test_logging.rs:205:13:205:52 | ...::panic_fmt | provenance | MaD:4 Sink:MaD:4 | +| test_logging.rs:205:28:205:51 | MacroExpr | test_logging.rs:205:13:205:52 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 | | test_logging.rs:205:44:205:51 | password | test_logging.rs:205:28:205:51 | MacroExpr | provenance | | -| test_logging.rs:208:26:208:49 | MacroExpr | test_logging.rs:208:13:208:50 | ...::panic_fmt | provenance | MaD:4 Sink:MaD:4 | +| test_logging.rs:208:26:208:49 | MacroExpr | test_logging.rs:208:13:208:50 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 | | test_logging.rs:208:42:208:49 | password | test_logging.rs:208:26:208:49 | MacroExpr | provenance | | -| test_logging.rs:211:28:211:51 | MacroExpr | test_logging.rs:211:13:211:52 | ...::panic_fmt | provenance | MaD:4 Sink:MaD:4 | +| test_logging.rs:211:28:211:51 | MacroExpr | test_logging.rs:211:13:211:52 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 | | test_logging.rs:211:44:211:51 | password | test_logging.rs:211:28:211:51 | MacroExpr | provenance | | -| test_logging.rs:214:13:214:54 | ...::assert_failed [Some] | test_logging.rs:214:13:214:54 | ...::assert_failed | provenance | Sink:MaD:3 | -| test_logging.rs:214:30:214:53 | ...::Some(...) [Some] | test_logging.rs:214:13:214:54 | ...::assert_failed | provenance | MaD:3 Sink:MaD:3 | -| test_logging.rs:214:30:214:53 | ...::Some(...) [Some] | test_logging.rs:214:13:214:54 | ...::assert_failed [Some] | provenance | MaD:2 | +| test_logging.rs:214:13:214:54 | ...::assert_failed [Some] | test_logging.rs:214:13:214:54 | ...::assert_failed | provenance | Sink:MaD:2 | +| test_logging.rs:214:30:214:53 | ...::Some(...) [Some] | test_logging.rs:214:13:214:54 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 | +| test_logging.rs:214:30:214:53 | ...::Some(...) [Some] | test_logging.rs:214:13:214:54 | ...::assert_failed [Some] | provenance | MaD:1 | | test_logging.rs:214:30:214:53 | MacroExpr | test_logging.rs:214:30:214:53 | ...::Some(...) [Some] | provenance | | | test_logging.rs:214:46:214:53 | password | test_logging.rs:214:30:214:53 | MacroExpr | provenance | | -| test_logging.rs:217:13:217:54 | ...::assert_failed [Some] | test_logging.rs:217:13:217:54 | ...::assert_failed | provenance | Sink:MaD:3 | -| test_logging.rs:217:30:217:53 | ...::Some(...) [Some] | test_logging.rs:217:13:217:54 | ...::assert_failed | provenance | MaD:3 Sink:MaD:3 | -| test_logging.rs:217:30:217:53 | ...::Some(...) [Some] | test_logging.rs:217:13:217:54 | ...::assert_failed [Some] | provenance | MaD:2 | +| test_logging.rs:217:13:217:54 | ...::assert_failed [Some] | test_logging.rs:217:13:217:54 | ...::assert_failed | provenance | Sink:MaD:2 | +| test_logging.rs:217:30:217:53 | ...::Some(...) [Some] | test_logging.rs:217:13:217:54 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 | +| test_logging.rs:217:30:217:53 | ...::Some(...) [Some] | test_logging.rs:217:13:217:54 | ...::assert_failed [Some] | provenance | MaD:1 | | test_logging.rs:217:30:217:53 | MacroExpr | test_logging.rs:217:30:217:53 | ...::Some(...) [Some] | provenance | | | test_logging.rs:217:46:217:53 | password | test_logging.rs:217:30:217:53 | MacroExpr | provenance | | -| test_logging.rs:220:34:220:57 | MacroExpr | test_logging.rs:220:13:220:58 | ...::panic_fmt | provenance | MaD:4 Sink:MaD:4 | +| test_logging.rs:220:34:220:57 | MacroExpr | test_logging.rs:220:13:220:58 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 | | test_logging.rs:220:50:220:57 | password | test_logging.rs:220:34:220:57 | MacroExpr | provenance | | -| test_logging.rs:223:13:223:60 | ...::assert_failed [Some] | test_logging.rs:223:13:223:60 | ...::assert_failed | provenance | Sink:MaD:3 | -| test_logging.rs:223:36:223:59 | ...::Some(...) [Some] | test_logging.rs:223:13:223:60 | ...::assert_failed | provenance | MaD:3 Sink:MaD:3 | -| test_logging.rs:223:36:223:59 | ...::Some(...) [Some] | test_logging.rs:223:13:223:60 | ...::assert_failed [Some] | provenance | MaD:2 | +| test_logging.rs:223:13:223:60 | ...::assert_failed [Some] | test_logging.rs:223:13:223:60 | ...::assert_failed | provenance | Sink:MaD:2 | +| test_logging.rs:223:36:223:59 | ...::Some(...) [Some] | test_logging.rs:223:13:223:60 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 | +| test_logging.rs:223:36:223:59 | ...::Some(...) [Some] | test_logging.rs:223:13:223:60 | ...::assert_failed [Some] | provenance | MaD:1 | | test_logging.rs:223:36:223:59 | MacroExpr | test_logging.rs:223:36:223:59 | ...::Some(...) [Some] | provenance | | | test_logging.rs:223:52:223:59 | password | test_logging.rs:223:36:223:59 | MacroExpr | provenance | | -| test_logging.rs:226:13:226:60 | ...::assert_failed [Some] | test_logging.rs:226:13:226:60 | ...::assert_failed | provenance | Sink:MaD:3 | -| test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | test_logging.rs:226:13:226:60 | ...::assert_failed | provenance | MaD:3 Sink:MaD:3 | -| test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | test_logging.rs:226:13:226:60 | ...::assert_failed [Some] | provenance | MaD:2 | +| test_logging.rs:226:13:226:60 | ...::assert_failed [Some] | test_logging.rs:226:13:226:60 | ...::assert_failed | provenance | Sink:MaD:2 | +| test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | test_logging.rs:226:13:226:60 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 | +| test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | test_logging.rs:226:13:226:60 | ...::assert_failed [Some] | provenance | MaD:1 | | test_logging.rs:226:36:226:59 | MacroExpr | test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | provenance | | | test_logging.rs:226:52:226:59 | password | test_logging.rs:226:36:226:59 | MacroExpr | provenance | | -| test_logging.rs:229:30:229:62 | res | test_logging.rs:229:38:229:61 | { ... } | provenance | | -| test_logging.rs:229:30:229:71 | ... .as_str() | test_logging.rs:229:23:229:28 | expect | provenance | MaD:1 Sink:MaD:1 | -| test_logging.rs:229:30:229:71 | ... .as_str() | test_logging.rs:229:23:229:28 | expect | provenance | MaD:1 Sink:MaD:1 | -| test_logging.rs:229:38:229:61 | ...::format(...) | test_logging.rs:229:30:229:62 | res | provenance | | -| test_logging.rs:229:38:229:61 | ...::must_use(...) | test_logging.rs:229:30:229:71 | ... .as_str() | provenance | MaD:17 | -| test_logging.rs:229:38:229:61 | MacroExpr | test_logging.rs:229:38:229:61 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:229:38:229:61 | { ... } | test_logging.rs:229:38:229:61 | ...::must_use(...) | provenance | MaD:19 | -| test_logging.rs:229:54:229:61 | password | test_logging.rs:229:38:229:61 | MacroExpr | provenance | | -| test_logging.rs:242:16:242:50 | res | test_logging.rs:242:24:242:49 | { ... } | provenance | | -| test_logging.rs:242:16:242:61 | ... .as_bytes() | test_logging.rs:242:10:242:14 | write | provenance | MaD:6 Sink:MaD:6 | -| test_logging.rs:242:24:242:49 | ...::format(...) | test_logging.rs:242:16:242:50 | res | provenance | | -| test_logging.rs:242:24:242:49 | ...::must_use(...) | test_logging.rs:242:16:242:61 | ... .as_bytes() | provenance | MaD:16 | -| test_logging.rs:242:24:242:49 | MacroExpr | test_logging.rs:242:24:242:49 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:242:24:242:49 | { ... } | test_logging.rs:242:24:242:49 | ...::must_use(...) | provenance | MaD:19 | -| test_logging.rs:242:42:242:49 | password | test_logging.rs:242:24:242:49 | MacroExpr | provenance | | -| test_logging.rs:245:20:245:54 | res | test_logging.rs:245:28:245:53 | { ... } | provenance | | -| test_logging.rs:245:20:245:65 | ... .as_bytes() | test_logging.rs:245:10:245:18 | write_all | provenance | MaD:7 Sink:MaD:7 | -| test_logging.rs:245:28:245:53 | ...::format(...) | test_logging.rs:245:20:245:54 | res | provenance | | -| test_logging.rs:245:28:245:53 | ...::must_use(...) | test_logging.rs:245:20:245:65 | ... .as_bytes() | provenance | MaD:16 | -| test_logging.rs:245:28:245:53 | MacroExpr | test_logging.rs:245:28:245:53 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:245:28:245:53 | { ... } | test_logging.rs:245:28:245:53 | ...::must_use(...) | provenance | MaD:19 | -| test_logging.rs:245:46:245:53 | password | test_logging.rs:245:28:245:53 | MacroExpr | provenance | | -| test_logging.rs:248:15:248:49 | res | test_logging.rs:248:23:248:48 | { ... } | provenance | | -| test_logging.rs:248:15:248:60 | ... .as_bytes() | test_logging.rs:248:9:248:13 | write | provenance | MaD:6 Sink:MaD:6 | -| test_logging.rs:248:23:248:48 | ...::format(...) | test_logging.rs:248:15:248:49 | res | provenance | | -| test_logging.rs:248:23:248:48 | ...::must_use(...) | test_logging.rs:248:15:248:60 | ... .as_bytes() | provenance | MaD:16 | -| test_logging.rs:248:23:248:48 | MacroExpr | test_logging.rs:248:23:248:48 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:248:23:248:48 | { ... } | test_logging.rs:248:23:248:48 | ...::must_use(...) | provenance | MaD:19 | -| test_logging.rs:248:41:248:48 | password | test_logging.rs:248:23:248:48 | MacroExpr | provenance | | -| test_logging.rs:251:15:251:49 | res | test_logging.rs:251:23:251:48 | { ... } | provenance | | -| test_logging.rs:251:15:251:60 | ... .as_bytes() | test_logging.rs:251:9:251:13 | write | provenance | MaD:5 Sink:MaD:5 | -| test_logging.rs:251:23:251:48 | ...::format(...) | test_logging.rs:251:15:251:49 | res | provenance | | -| test_logging.rs:251:23:251:48 | ...::must_use(...) | test_logging.rs:251:15:251:60 | ... .as_bytes() | provenance | MaD:16 | -| test_logging.rs:251:23:251:48 | MacroExpr | test_logging.rs:251:23:251:48 | ...::format(...) | provenance | MaD:18 | -| test_logging.rs:251:23:251:48 | { ... } | test_logging.rs:251:23:251:48 | ...::must_use(...) | provenance | MaD:19 | -| test_logging.rs:251:41:251:48 | password | test_logging.rs:251:23:251:48 | MacroExpr | provenance | | models -| 1 | Sink: lang:core; ::expect; log-injection; Argument[0] | -| 2 | Sink: lang:core; crate::panicking::assert_failed; log-injection; Argument[3] | -| 3 | Sink: lang:core; crate::panicking::assert_failed; log-injection; Argument[3].Field[core::option::Option::Some(0)] | -| 4 | Sink: lang:core; crate::panicking::panic_fmt; log-injection; Argument[0] | -| 5 | Sink: lang:std; ::write; log-injection; Argument[0] | -| 6 | Sink: lang:std; ::write; log-injection; Argument[0] | -| 7 | Sink: lang:std; ::write_all; log-injection; Argument[0] | -| 8 | Sink: lang:std; crate::io::stdio::_eprint; log-injection; Argument[0] | -| 9 | Sink: lang:std; crate::io::stdio::_print; log-injection; Argument[0] | -| 10 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_expect; log-injection; Argument[0] | -| 11 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_expect; log-injection; Argument[0] | -| 12 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_expect; log-injection; Argument[self].Field[core::result::Result::Err(0)] | -| 13 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_unwrap; log-injection; Argument[self].Field[core::result::Result::Err(0)] | -| 14 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[1] | -| 15 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[3] | -| 16 | Summary: lang:alloc; ::as_bytes; Argument[self]; ReturnValue; value | -| 17 | Summary: lang:alloc; ::as_str; Argument[self]; ReturnValue; value | -| 18 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint | -| 19 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value | +| 1 | Sink: lang:core; crate::panicking::assert_failed; log-injection; Argument[3] | +| 2 | Sink: lang:core; crate::panicking::assert_failed; log-injection; Argument[3].Field[core::option::Option::Some(0)] | +| 3 | Sink: lang:core; crate::panicking::panic_fmt; log-injection; Argument[0] | +| 4 | Sink: lang:std; crate::io::stdio::_eprint; log-injection; Argument[0] | +| 5 | Sink: lang:std; crate::io::stdio::_print; log-injection; Argument[0] | +| 6 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_expect; log-injection; Argument[0] | +| 7 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_expect; log-injection; Argument[0] | +| 8 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_expect; log-injection; Argument[self].Field[core::result::Result::Err(0)] | +| 9 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; ::log_unwrap; log-injection; Argument[self].Field[core::result::Result::Err(0)] | +| 10 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[1] | +| 11 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[3] | +| 12 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint | +| 13 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value | nodes | test_logging.rs:42:5:42:36 | ...::log | semmle.label | ...::log | | test_logging.rs:42:12:42:35 | MacroExpr | semmle.label | MacroExpr | @@ -493,45 +445,4 @@ nodes | test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] | | test_logging.rs:226:36:226:59 | MacroExpr | semmle.label | MacroExpr | | test_logging.rs:226:52:226:59 | password | semmle.label | password | -| test_logging.rs:229:23:229:28 | expect | semmle.label | expect | -| test_logging.rs:229:23:229:28 | expect | semmle.label | expect | -| test_logging.rs:229:30:229:62 | res | semmle.label | res | -| test_logging.rs:229:30:229:71 | ... .as_str() | semmle.label | ... .as_str() | -| test_logging.rs:229:38:229:61 | ...::format(...) | semmle.label | ...::format(...) | -| test_logging.rs:229:38:229:61 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| test_logging.rs:229:38:229:61 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:229:38:229:61 | { ... } | semmle.label | { ... } | -| test_logging.rs:229:54:229:61 | password | semmle.label | password | -| test_logging.rs:242:10:242:14 | write | semmle.label | write | -| test_logging.rs:242:16:242:50 | res | semmle.label | res | -| test_logging.rs:242:16:242:61 | ... .as_bytes() | semmle.label | ... .as_bytes() | -| test_logging.rs:242:24:242:49 | ...::format(...) | semmle.label | ...::format(...) | -| test_logging.rs:242:24:242:49 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| test_logging.rs:242:24:242:49 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:242:24:242:49 | { ... } | semmle.label | { ... } | -| test_logging.rs:242:42:242:49 | password | semmle.label | password | -| test_logging.rs:245:10:245:18 | write_all | semmle.label | write_all | -| test_logging.rs:245:20:245:54 | res | semmle.label | res | -| test_logging.rs:245:20:245:65 | ... .as_bytes() | semmle.label | ... .as_bytes() | -| test_logging.rs:245:28:245:53 | ...::format(...) | semmle.label | ...::format(...) | -| test_logging.rs:245:28:245:53 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| test_logging.rs:245:28:245:53 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:245:28:245:53 | { ... } | semmle.label | { ... } | -| test_logging.rs:245:46:245:53 | password | semmle.label | password | -| test_logging.rs:248:9:248:13 | write | semmle.label | write | -| test_logging.rs:248:15:248:49 | res | semmle.label | res | -| test_logging.rs:248:15:248:60 | ... .as_bytes() | semmle.label | ... .as_bytes() | -| test_logging.rs:248:23:248:48 | ...::format(...) | semmle.label | ...::format(...) | -| test_logging.rs:248:23:248:48 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| test_logging.rs:248:23:248:48 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:248:23:248:48 | { ... } | semmle.label | { ... } | -| test_logging.rs:248:41:248:48 | password | semmle.label | password | -| test_logging.rs:251:9:251:13 | write | semmle.label | write | -| test_logging.rs:251:15:251:49 | res | semmle.label | res | -| test_logging.rs:251:15:251:60 | ... .as_bytes() | semmle.label | ... .as_bytes() | -| test_logging.rs:251:23:251:48 | ...::format(...) | semmle.label | ...::format(...) | -| test_logging.rs:251:23:251:48 | ...::must_use(...) | semmle.label | ...::must_use(...) | -| test_logging.rs:251:23:251:48 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:251:23:251:48 | { ... } | semmle.label | { ... } | -| test_logging.rs:251:41:251:48 | password | semmle.label | password | subpaths diff --git a/rust/ql/test/query-tests/security/CWE-312/test_logging.rs b/rust/ql/test/query-tests/security/CWE-312/test_logging.rs index 4b12005a6cb..f5f94fc89f8 100644 --- a/rust/ql/test/query-tests/security/CWE-312/test_logging.rs +++ b/rust/ql/test/query-tests/security/CWE-312/test_logging.rs @@ -226,7 +226,7 @@ fn test_std(password: String, i: i32, opt_i: Option) { debug_assert_ne!(1, 1, "message = {}", password); // $ Alert[rust/cleartext-logging] } 11 => { - _ = opt_i.expect(format!("message = {}", password).as_str()); // $ Alert[rust/cleartext-logging] + _ = opt_i.expect(format!("message = {}", password).as_str()); // $ MISSING: Alert[rust/cleartext-logging] (https://github.com/github/codeql/pull/19658) } _ => {} } @@ -239,16 +239,16 @@ fn test_std(password: String, i: i32, opt_i: Option) { .write_fmt(format_args!("message = {}\n", password)); // $ MISSING: Alert[rust/cleartext-logging] std::io::stdout() .lock() - .write(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging] + .write(format!("message = {}\n", password).as_bytes()); // $ MISSING: Alert[rust/cleartext-logging] (https://github.com/github/codeql/pull/19658) std::io::stdout() .lock() - .write_all(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging] + .write_all(format!("message = {}\n", password).as_bytes()); // $ MISSING: Alert[rust/cleartext-logging] (https://github.com/github/codeql/pull/19658) let mut out = std::io::stdout().lock(); - out.write(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging] + out.write(format!("message = {}\n", password).as_bytes()); // $ MISSING: Alert[rust/cleartext-logging] (https://github.com/github/codeql/pull/19658) let mut err = std::io::stderr().lock(); - err.write(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging] + err.write(format!("message = {}\n", password).as_bytes()); // $ MISSING: Alert[rust/cleartext-logging] (https://github.com/github/codeql/pull/19658) } fn main() { diff --git a/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected b/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected index 4294bff6c08..34cb1edba83 100644 --- a/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected +++ b/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected @@ -14,9 +14,7 @@ | main.rs:54:13:54:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:54:13:54:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | | main.rs:59:13:59:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:59:13:59:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | | main.rs:61:13:61:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:61:13:61:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | -| main.rs:63:13:63:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:63:13:63:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | | main.rs:64:13:64:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:64:13:64:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | -| main.rs:65:13:65:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:65:13:65:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | | main.rs:68:13:68:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:68:13:68:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | | main.rs:88:13:88:29 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:88:13:88:29 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | | main.rs:96:17:96:33 | ...::alloc | main.rs:317:13:317:26 | ...::args | main.rs:96:17:96:33 | ...::alloc | This allocation size is derived from a $@ and could allocate arbitrary amounts of memory. | main.rs:317:13:317:26 | ...::args | user-provided value | @@ -65,40 +63,40 @@ edges | main.rs:18:41:18:41 | v | main.rs:32:60:32:89 | ... * ... | provenance | | | main.rs:18:41:18:41 | v | main.rs:35:9:35:10 | s6 | provenance | | | main.rs:20:9:20:10 | l2 | main.rs:21:31:21:32 | l2 | provenance | | -| main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | main.rs:20:14:20:63 | ... .unwrap() | provenance | MaD:38 | +| main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | main.rs:20:14:20:63 | ... .unwrap() | provenance | MaD:36 | | main.rs:20:14:20:63 | ... .unwrap() | main.rs:20:9:20:10 | l2 | provenance | | -| main.rs:20:50:20:50 | v | main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | provenance | MaD:28 | +| main.rs:20:50:20:50 | v | main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | provenance | MaD:26 | | main.rs:21:31:21:32 | l2 | main.rs:21:13:21:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:21:31:21:32 | l2 | main.rs:22:31:22:44 | l2.align_to(...) [Ok] | provenance | MaD:22 | | main.rs:21:31:21:32 | l2 | main.rs:23:31:23:44 | l2.align_to(...) [Ok] | provenance | MaD:22 | | main.rs:21:31:21:32 | l2 | main.rs:24:38:24:39 | l2 | provenance | | -| main.rs:22:31:22:44 | l2.align_to(...) [Ok] | main.rs:22:31:22:53 | ... .unwrap() | provenance | MaD:38 | +| main.rs:22:31:22:44 | l2.align_to(...) [Ok] | main.rs:22:31:22:53 | ... .unwrap() | provenance | MaD:36 | | main.rs:22:31:22:53 | ... .unwrap() | main.rs:22:13:22:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:23:31:23:44 | l2.align_to(...) [Ok] | main.rs:23:31:23:53 | ... .unwrap() | provenance | MaD:38 | -| main.rs:23:31:23:53 | ... .unwrap() | main.rs:23:31:23:68 | ... .pad_to_align() | provenance | MaD:31 | +| main.rs:23:31:23:44 | l2.align_to(...) [Ok] | main.rs:23:31:23:53 | ... .unwrap() | provenance | MaD:36 | +| main.rs:23:31:23:53 | ... .unwrap() | main.rs:23:31:23:68 | ... .pad_to_align() | provenance | MaD:29 | | main.rs:23:31:23:68 | ... .pad_to_align() | main.rs:23:13:23:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:24:38:24:39 | l2 | main.rs:24:13:24:36 | ...::alloc_zeroed | provenance | MaD:4 Sink:MaD:4 | | main.rs:29:9:29:10 | l4 | main.rs:30:31:30:32 | l4 | provenance | | | main.rs:29:14:29:64 | ...::from_size_align_unchecked(...) | main.rs:29:9:29:10 | l4 | provenance | | -| main.rs:29:60:29:60 | v | main.rs:29:14:29:64 | ...::from_size_align_unchecked(...) | provenance | MaD:30 | +| main.rs:29:60:29:60 | v | main.rs:29:14:29:64 | ...::from_size_align_unchecked(...) | provenance | MaD:28 | | main.rs:30:31:30:32 | l4 | main.rs:30:13:30:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:32:9:32:10 | l5 | main.rs:33:31:33:32 | l5 | provenance | | | main.rs:32:14:32:118 | ...::from_size_align_unchecked(...) | main.rs:32:9:32:10 | l5 | provenance | | -| main.rs:32:60:32:89 | ... * ... | main.rs:32:14:32:118 | ...::from_size_align_unchecked(...) | provenance | MaD:30 | +| main.rs:32:60:32:89 | ... * ... | main.rs:32:14:32:118 | ...::from_size_align_unchecked(...) | provenance | MaD:28 | | main.rs:33:31:33:32 | l5 | main.rs:33:13:33:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:35:9:35:10 | s6 | main.rs:36:60:36:61 | s6 | provenance | | | main.rs:36:9:36:10 | l6 | main.rs:37:31:37:32 | l6 | provenance | | | main.rs:36:9:36:10 | l6 [Layout.size] | main.rs:37:31:37:32 | l6 [Layout.size] | provenance | | | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | main.rs:36:9:36:10 | l6 | provenance | | | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) [Layout.size] | main.rs:36:9:36:10 | l6 [Layout.size] | provenance | | -| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | provenance | MaD:30 | -| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) [Layout.size] | provenance | MaD:29 | +| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | provenance | MaD:28 | +| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) [Layout.size] | provenance | MaD:27 | | main.rs:37:31:37:32 | l6 | main.rs:37:13:37:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:37:31:37:32 | l6 | main.rs:39:60:39:68 | l6.size() | provenance | MaD:35 | -| main.rs:37:31:37:32 | l6 [Layout.size] | main.rs:39:60:39:68 | l6.size() | provenance | MaD:34 | +| main.rs:37:31:37:32 | l6 | main.rs:39:60:39:68 | l6.size() | provenance | MaD:33 | +| main.rs:37:31:37:32 | l6 [Layout.size] | main.rs:39:60:39:68 | l6.size() | provenance | MaD:32 | | main.rs:39:9:39:10 | l7 | main.rs:40:31:40:32 | l7 | provenance | | | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | main.rs:39:9:39:10 | l7 | provenance | | -| main.rs:39:60:39:68 | l6.size() | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | provenance | MaD:30 | +| main.rs:39:60:39:68 | l6.size() | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | provenance | MaD:28 | | main.rs:40:31:40:32 | l7 | main.rs:40:13:40:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:43:44:43:51 | ...: usize | main.rs:50:41:50:41 | v | provenance | | | main.rs:43:44:43:51 | ...: usize | main.rs:51:41:51:45 | ... + ... | provenance | | @@ -106,56 +104,47 @@ edges | main.rs:43:44:43:51 | ...: usize | main.rs:54:48:54:53 | ... * ... | provenance | | | main.rs:43:44:43:51 | ...: usize | main.rs:58:34:58:34 | v | provenance | | | main.rs:43:44:43:51 | ...: usize | main.rs:67:46:67:46 | v | provenance | | -| main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | main.rs:50:31:50:51 | ... .unwrap() [tuple.0] | provenance | MaD:38 | +| main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | main.rs:50:31:50:51 | ... .unwrap() [tuple.0] | provenance | MaD:36 | | main.rs:50:31:50:51 | ... .unwrap() [tuple.0] | main.rs:50:31:50:53 | ... .0 | provenance | | | main.rs:50:31:50:53 | ... .0 | main.rs:50:13:50:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:50:41:50:41 | v | main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:32 | -| main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | provenance | MaD:38 | +| main.rs:50:41:50:41 | v | main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:30 | +| main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | provenance | MaD:36 | | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | main.rs:51:31:51:57 | ... .0 | provenance | | | main.rs:51:31:51:57 | ... .0 | main.rs:51:13:51:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:51:41:51:45 | ... + ... | main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:32 | -| main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | main.rs:53:31:53:58 | ... .unwrap() | provenance | MaD:38 | +| main.rs:51:41:51:45 | ... + ... | main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:30 | +| main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | main.rs:53:31:53:58 | ... .unwrap() | provenance | MaD:36 | | main.rs:53:31:53:58 | ... .unwrap() | main.rs:53:13:53:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:53:48:53:48 | v | main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | provenance | MaD:33 | -| main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | main.rs:54:31:54:63 | ... .unwrap() | provenance | MaD:38 | +| main.rs:53:48:53:48 | v | main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | provenance | MaD:31 | +| main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | main.rs:54:31:54:63 | ... .unwrap() | provenance | MaD:36 | | main.rs:54:31:54:63 | ... .unwrap() | main.rs:54:13:54:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:54:48:54:53 | ... * ... | main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | provenance | MaD:33 | +| main.rs:54:48:54:53 | ... * ... | main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | provenance | MaD:31 | | main.rs:58:9:58:20 | TuplePat [tuple.0] | main.rs:58:10:58:11 | k1 | provenance | | | main.rs:58:10:58:11 | k1 | main.rs:59:31:59:32 | k1 | provenance | | -| main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | main.rs:58:24:58:66 | ... .expect(...) [tuple.0] | provenance | MaD:37 | +| main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | main.rs:58:24:58:66 | ... .expect(...) [tuple.0] | provenance | MaD:35 | | main.rs:58:24:58:66 | ... .expect(...) [tuple.0] | main.rs:58:9:58:20 | TuplePat [tuple.0] | provenance | | -| main.rs:58:34:58:34 | v | main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | provenance | MaD:32 | +| main.rs:58:34:58:34 | v | main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | provenance | MaD:30 | | main.rs:59:31:59:32 | k1 | main.rs:59:13:59:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:59:31:59:32 | k1 | main.rs:60:34:60:35 | k1 | provenance | | -| main.rs:59:31:59:32 | k1 | main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | provenance | MaD:25 | | main.rs:59:31:59:32 | k1 | main.rs:64:48:64:49 | k1 | provenance | | -| main.rs:59:31:59:32 | k1 | main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | provenance | MaD:27 | | main.rs:60:9:60:20 | TuplePat [tuple.0] | main.rs:60:10:60:11 | k2 | provenance | | | main.rs:60:10:60:11 | k2 | main.rs:61:31:61:32 | k2 | provenance | | -| main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | main.rs:60:24:60:45 | ... .unwrap() [tuple.0] | provenance | MaD:38 | +| main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | main.rs:60:24:60:45 | ... .unwrap() [tuple.0] | provenance | MaD:36 | | main.rs:60:24:60:45 | ... .unwrap() [tuple.0] | main.rs:60:9:60:20 | TuplePat [tuple.0] | provenance | | | main.rs:60:34:60:35 | k1 | main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | provenance | MaD:24 | | main.rs:61:31:61:32 | k2 | main.rs:61:13:61:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:62:9:62:20 | TuplePat [tuple.0] | main.rs:62:10:62:11 | k3 | provenance | | -| main.rs:62:10:62:11 | k3 | main.rs:63:31:63:32 | k3 | provenance | | -| main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | provenance | MaD:38 | -| main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | main.rs:62:9:62:20 | TuplePat [tuple.0] | provenance | | -| main.rs:63:31:63:32 | k3 | main.rs:63:13:63:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | main.rs:64:31:64:59 | ... .unwrap() | provenance | MaD:38 | +| main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | main.rs:64:31:64:59 | ... .unwrap() | provenance | MaD:36 | | main.rs:64:31:64:59 | ... .unwrap() | main.rs:64:13:64:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | -| main.rs:64:48:64:49 | k1 | main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | provenance | MaD:26 | -| main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | main.rs:65:31:65:59 | ... .unwrap() | provenance | MaD:38 | -| main.rs:65:31:65:59 | ... .unwrap() | main.rs:65:13:65:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | +| main.rs:64:48:64:49 | k1 | main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | provenance | MaD:25 | | main.rs:67:9:67:10 | l4 | main.rs:68:31:68:32 | l4 | provenance | | -| main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | main.rs:67:14:67:56 | ... .unwrap() | provenance | MaD:38 | +| main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | main.rs:67:14:67:56 | ... .unwrap() | provenance | MaD:36 | | main.rs:67:14:67:56 | ... .unwrap() | main.rs:67:9:67:10 | l4 | provenance | | | main.rs:67:46:67:46 | v | main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | | main.rs:68:31:68:32 | l4 | main.rs:68:13:68:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:86:35:86:42 | ...: usize | main.rs:87:54:87:54 | v | provenance | | | main.rs:87:9:87:14 | layout | main.rs:88:31:88:36 | layout | provenance | | -| main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | main.rs:87:18:87:67 | ... .unwrap() | provenance | MaD:38 | +| main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | main.rs:87:18:87:67 | ... .unwrap() | provenance | MaD:36 | | main.rs:87:18:87:67 | ... .unwrap() | main.rs:87:9:87:14 | layout | provenance | | -| main.rs:87:54:87:54 | v | main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | provenance | MaD:28 | +| main.rs:87:54:87:54 | v | main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | provenance | MaD:26 | | main.rs:88:31:88:36 | layout | main.rs:88:13:88:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:91:38:91:45 | ...: usize | main.rs:92:47:92:47 | v | provenance | | | main.rs:91:38:91:45 | ...: usize | main.rs:101:51:101:51 | v | provenance | | @@ -166,14 +155,14 @@ edges | main.rs:91:38:91:45 | ...: usize | main.rs:161:55:161:55 | v | provenance | | | main.rs:92:9:92:10 | l1 | main.rs:96:35:96:36 | l1 | provenance | | | main.rs:92:9:92:10 | l1 | main.rs:102:35:102:36 | l1 | provenance | | -| main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | main.rs:92:14:92:57 | ... .unwrap() | provenance | MaD:38 | +| main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | main.rs:92:14:92:57 | ... .unwrap() | provenance | MaD:36 | | main.rs:92:14:92:57 | ... .unwrap() | main.rs:92:9:92:10 | l1 | provenance | | | main.rs:92:47:92:47 | v | main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | | main.rs:96:35:96:36 | l1 | main.rs:96:17:96:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:96:35:96:36 | l1 | main.rs:109:35:109:36 | l1 | provenance | | | main.rs:96:35:96:36 | l1 | main.rs:111:35:111:36 | l1 | provenance | | | main.rs:101:13:101:14 | l3 | main.rs:103:35:103:36 | l3 | provenance | | -| main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | main.rs:101:18:101:61 | ... .unwrap() | provenance | MaD:38 | +| main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | main.rs:101:18:101:61 | ... .unwrap() | provenance | MaD:36 | | main.rs:101:18:101:61 | ... .unwrap() | main.rs:101:13:101:14 | l3 | provenance | | | main.rs:101:51:101:51 | v | main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | | main.rs:102:35:102:36 | l1 | main.rs:102:17:102:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | @@ -186,28 +175,28 @@ edges | main.rs:111:35:111:36 | l1 | main.rs:111:17:111:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:111:35:111:36 | l1 | main.rs:146:35:146:36 | l1 | provenance | | | main.rs:145:13:145:14 | l9 | main.rs:148:35:148:36 | l9 | provenance | | -| main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | main.rs:145:18:145:61 | ... .unwrap() | provenance | MaD:38 | +| main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | main.rs:145:18:145:61 | ... .unwrap() | provenance | MaD:36 | | main.rs:145:18:145:61 | ... .unwrap() | main.rs:145:13:145:14 | l9 | provenance | | | main.rs:145:51:145:51 | v | main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | | main.rs:146:35:146:36 | l1 | main.rs:146:17:146:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:146:35:146:36 | l1 | main.rs:177:31:177:32 | l1 | provenance | | | main.rs:148:35:148:36 | l9 | main.rs:148:17:148:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:151:9:151:11 | l10 | main.rs:152:31:152:33 | l10 | provenance | | -| main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | main.rs:151:15:151:78 | ... .unwrap() | provenance | MaD:38 | +| main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | main.rs:151:15:151:78 | ... .unwrap() | provenance | MaD:36 | | main.rs:151:15:151:78 | ... .unwrap() | main.rs:151:9:151:11 | l10 | provenance | | | main.rs:151:48:151:68 | ...::min(...) | main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | -| main.rs:151:62:151:62 | v | main.rs:151:48:151:68 | ...::min(...) | provenance | MaD:41 | +| main.rs:151:62:151:62 | v | main.rs:151:48:151:68 | ...::min(...) | provenance | MaD:39 | | main.rs:152:31:152:33 | l10 | main.rs:152:13:152:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:154:9:154:11 | l11 | main.rs:155:31:155:33 | l11 | provenance | | -| main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | main.rs:154:15:154:78 | ... .unwrap() | provenance | MaD:38 | +| main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | main.rs:154:15:154:78 | ... .unwrap() | provenance | MaD:36 | | main.rs:154:15:154:78 | ... .unwrap() | main.rs:154:9:154:11 | l11 | provenance | | | main.rs:154:48:154:68 | ...::max(...) | main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | -| main.rs:154:62:154:62 | v | main.rs:154:48:154:68 | ...::max(...) | provenance | MaD:40 | +| main.rs:154:62:154:62 | v | main.rs:154:48:154:68 | ...::max(...) | provenance | MaD:38 | | main.rs:155:31:155:33 | l11 | main.rs:155:13:155:29 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:161:13:161:15 | l13 | main.rs:162:35:162:37 | l13 | provenance | | -| main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | main.rs:161:19:161:68 | ... .unwrap() | provenance | MaD:38 | +| main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | main.rs:161:19:161:68 | ... .unwrap() | provenance | MaD:36 | | main.rs:161:19:161:68 | ... .unwrap() | main.rs:161:13:161:15 | l13 | provenance | | -| main.rs:161:55:161:55 | v | main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | provenance | MaD:28 | +| main.rs:161:55:161:55 | v | main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | provenance | MaD:26 | | main.rs:162:35:162:37 | l13 | main.rs:162:17:162:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:162:35:162:37 | l13 | main.rs:169:35:169:37 | l13 | provenance | | | main.rs:169:35:169:37 | l13 | main.rs:169:17:169:33 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | @@ -215,7 +204,7 @@ edges | main.rs:183:29:183:36 | ...: usize | main.rs:192:46:192:46 | v | provenance | | | main.rs:183:29:183:36 | ...: usize | main.rs:202:48:202:48 | v | provenance | | | main.rs:192:9:192:10 | l2 | main.rs:193:38:193:39 | l2 | provenance | | -| main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | main.rs:192:14:192:56 | ... .unwrap() | provenance | MaD:38 | +| main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | main.rs:192:14:192:56 | ... .unwrap() | provenance | MaD:36 | | main.rs:192:14:192:56 | ... .unwrap() | main.rs:192:9:192:10 | l2 | provenance | | | main.rs:192:46:192:46 | v | main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | provenance | MaD:23 | | main.rs:193:38:193:39 | l2 | main.rs:193:32:193:36 | alloc | provenance | MaD:11 Sink:MaD:11 | @@ -256,18 +245,18 @@ edges | main.rs:223:26:223:26 | v | main.rs:223:13:223:24 | ...::calloc | provenance | MaD:18 Sink:MaD:18 | | main.rs:223:26:223:26 | v | main.rs:224:31:224:31 | v | provenance | | | main.rs:224:31:224:31 | v | main.rs:224:13:224:25 | ...::realloc | provenance | MaD:20 Sink:MaD:20 | -| main.rs:279:24:279:41 | ...: String | main.rs:280:21:280:47 | user_input.parse() [Ok] | provenance | MaD:39 | +| main.rs:279:24:279:41 | ...: String | main.rs:280:21:280:47 | user_input.parse() [Ok] | provenance | MaD:37 | | main.rs:280:9:280:17 | num_bytes | main.rs:282:54:282:62 | num_bytes | provenance | | | main.rs:280:21:280:47 | user_input.parse() [Ok] | main.rs:280:21:280:48 | TryExpr | provenance | | | main.rs:280:21:280:48 | TryExpr | main.rs:280:9:280:17 | num_bytes | provenance | | | main.rs:282:9:282:14 | layout | main.rs:284:40:284:45 | layout | provenance | | -| main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | main.rs:282:18:282:75 | ... .unwrap() | provenance | MaD:38 | +| main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | main.rs:282:18:282:75 | ... .unwrap() | provenance | MaD:36 | | main.rs:282:18:282:75 | ... .unwrap() | main.rs:282:9:282:14 | layout | provenance | | -| main.rs:282:54:282:62 | num_bytes | main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | provenance | MaD:28 | +| main.rs:282:54:282:62 | num_bytes | main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | provenance | MaD:26 | | main.rs:284:40:284:45 | layout | main.rs:284:22:284:38 | ...::alloc | provenance | MaD:3 Sink:MaD:3 | | main.rs:308:25:308:38 | ...::args | main.rs:308:25:308:40 | ...::args(...) [element] | provenance | Src:MaD:21 | -| main.rs:308:25:308:40 | ...::args(...) [element] | main.rs:308:25:308:47 | ... .nth(...) [Some] | provenance | MaD:42 | -| main.rs:308:25:308:47 | ... .nth(...) [Some] | main.rs:308:25:308:74 | ... .unwrap_or(...) | provenance | MaD:36 | +| main.rs:308:25:308:40 | ...::args(...) [element] | main.rs:308:25:308:47 | ... .nth(...) [Some] | provenance | MaD:40 | +| main.rs:308:25:308:47 | ... .nth(...) [Some] | main.rs:308:25:308:74 | ... .unwrap_or(...) | provenance | MaD:34 | | main.rs:308:25:308:74 | ... .unwrap_or(...) | main.rs:279:24:279:41 | ...: String | provenance | | | main.rs:317:9:317:9 | v | main.rs:320:34:320:34 | v | provenance | | | main.rs:317:9:317:9 | v | main.rs:321:42:321:42 | v | provenance | | @@ -275,10 +264,10 @@ edges | main.rs:317:9:317:9 | v | main.rs:323:27:323:27 | v | provenance | | | main.rs:317:9:317:9 | v | main.rs:324:25:324:25 | v | provenance | | | main.rs:317:13:317:26 | ...::args | main.rs:317:13:317:28 | ...::args(...) [element] | provenance | Src:MaD:21 | -| main.rs:317:13:317:28 | ...::args(...) [element] | main.rs:317:13:317:35 | ... .nth(...) [Some] | provenance | MaD:42 | -| main.rs:317:13:317:35 | ... .nth(...) [Some] | main.rs:317:13:317:65 | ... .unwrap_or(...) | provenance | MaD:36 | -| main.rs:317:13:317:65 | ... .unwrap_or(...) | main.rs:317:13:317:82 | ... .parse() [Ok] | provenance | MaD:39 | -| main.rs:317:13:317:82 | ... .parse() [Ok] | main.rs:317:13:317:91 | ... .unwrap() | provenance | MaD:38 | +| main.rs:317:13:317:28 | ...::args(...) [element] | main.rs:317:13:317:35 | ... .nth(...) [Some] | provenance | MaD:40 | +| main.rs:317:13:317:35 | ... .nth(...) [Some] | main.rs:317:13:317:65 | ... .unwrap_or(...) | provenance | MaD:34 | +| main.rs:317:13:317:65 | ... .unwrap_or(...) | main.rs:317:13:317:82 | ... .parse() [Ok] | provenance | MaD:37 | +| main.rs:317:13:317:82 | ... .parse() [Ok] | main.rs:317:13:317:91 | ... .unwrap() | provenance | MaD:36 | | main.rs:317:13:317:91 | ... .unwrap() | main.rs:317:9:317:9 | v | provenance | | | main.rs:320:34:320:34 | v | main.rs:12:36:12:43 | ...: usize | provenance | | | main.rs:321:42:321:42 | v | main.rs:43:44:43:51 | ...: usize | provenance | | @@ -310,24 +299,22 @@ models | 22 | Summary: lang:core; ::align_to; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | | 23 | Summary: lang:core; ::array; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | | 24 | Summary: lang:core; ::extend; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | -| 25 | Summary: lang:core; ::extend; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | -| 26 | Summary: lang:core; ::extend_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 27 | Summary: lang:core; ::extend_packed; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 28 | Summary: lang:core; ::from_size_align; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 29 | Summary: lang:core; ::from_size_align_unchecked; Argument[0]; ReturnValue.Field[core::alloc::layout::Layout::size]; value | -| 30 | Summary: lang:core; ::from_size_align_unchecked; Argument[0]; ReturnValue; taint | -| 31 | Summary: lang:core; ::pad_to_align; Argument[self]; ReturnValue; taint | -| 32 | Summary: lang:core; ::repeat; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | -| 33 | Summary: lang:core; ::repeat_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 34 | Summary: lang:core; ::size; Argument[self].Field[core::alloc::layout::Layout::size]; ReturnValue; value | -| 35 | Summary: lang:core; ::size; Argument[self]; ReturnValue; taint | -| 36 | Summary: lang:core; ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 37 | Summary: lang:core; ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 38 | Summary: lang:core; ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 39 | Summary: lang:core; ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 40 | Summary: lang:core; crate::cmp::max; Argument[0]; ReturnValue; value | -| 41 | Summary: lang:core; crate::cmp::min; Argument[0]; ReturnValue; value | -| 42 | Summary: lang:core; crate::iter::traits::iterator::Iterator::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 25 | Summary: lang:core; ::extend_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 26 | Summary: lang:core; ::from_size_align; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 27 | Summary: lang:core; ::from_size_align_unchecked; Argument[0]; ReturnValue.Field[core::alloc::layout::Layout::size]; value | +| 28 | Summary: lang:core; ::from_size_align_unchecked; Argument[0]; ReturnValue; taint | +| 29 | Summary: lang:core; ::pad_to_align; Argument[self]; ReturnValue; taint | +| 30 | Summary: lang:core; ::repeat; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | +| 31 | Summary: lang:core; ::repeat_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 32 | Summary: lang:core; ::size; Argument[self].Field[core::alloc::layout::Layout::size]; ReturnValue; value | +| 33 | Summary: lang:core; ::size; Argument[self]; ReturnValue; taint | +| 34 | Summary: lang:core; ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 35 | Summary: lang:core; ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 36 | Summary: lang:core; ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 37 | Summary: lang:core; ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 38 | Summary: lang:core; crate::cmp::max; Argument[0]; ReturnValue; value | +| 39 | Summary: lang:core; crate::cmp::min; Argument[0]; ReturnValue; value | +| 40 | Summary: lang:core; crate::iter::traits::iterator::Iterator::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | nodes | main.rs:12:36:12:43 | ...: usize | semmle.label | ...: usize | | main.rs:18:13:18:31 | ...::realloc | semmle.label | ...::realloc | @@ -404,19 +391,10 @@ nodes | main.rs:60:34:60:35 | k1 | semmle.label | k1 | | main.rs:61:13:61:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:61:31:61:32 | k2 | semmle.label | k2 | -| main.rs:62:9:62:20 | TuplePat [tuple.0] | semmle.label | TuplePat [tuple.0] | -| main.rs:62:10:62:11 | k3 | semmle.label | k3 | -| main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | semmle.label | k1.extend(...) [Ok, tuple.0] | -| main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | semmle.label | ... .unwrap() [tuple.0] | -| main.rs:63:13:63:29 | ...::alloc | semmle.label | ...::alloc | -| main.rs:63:31:63:32 | k3 | semmle.label | k3 | | main.rs:64:13:64:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | semmle.label | l3.extend_packed(...) [Ok] | | main.rs:64:31:64:59 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:64:48:64:49 | k1 | semmle.label | k1 | -| main.rs:65:13:65:29 | ...::alloc | semmle.label | ...::alloc | -| main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | semmle.label | k1.extend_packed(...) [Ok] | -| main.rs:65:31:65:59 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:67:9:67:10 | l4 | semmle.label | l4 | | main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | semmle.label | ...::array::<...>(...) [Ok] | | main.rs:67:14:67:56 | ... .unwrap() | semmle.label | ... .unwrap() | diff --git a/rust/ql/test/query-tests/security/CWE-770/main.rs b/rust/ql/test/query-tests/security/CWE-770/main.rs index 2aafe931761..f0b70190042 100644 --- a/rust/ql/test/query-tests/security/CWE-770/main.rs +++ b/rust/ql/test/query-tests/security/CWE-770/main.rs @@ -60,9 +60,9 @@ unsafe fn test_std_alloc_new_repeat_extend(v: usize) { let (k2, _offs2) = l3.extend(k1).unwrap(); let _ = std::alloc::alloc(k2); // $ Alert[rust/uncontrolled-allocation-size]=arg1 let (k3, _offs3) = k1.extend(l3).unwrap(); - let _ = std::alloc::alloc(k3); // $ Alert[rust/uncontrolled-allocation-size]=arg1 + let _ = std::alloc::alloc(k3); // $ MISSING: Alert[rust/uncontrolled-allocation-size]=arg1 (https://github.com/github/codeql/pull/19658) let _ = std::alloc::alloc(l3.extend_packed(k1).unwrap()); // $ Alert[rust/uncontrolled-allocation-size]=arg1 - let _ = std::alloc::alloc(k1.extend_packed(l3).unwrap()); // $ Alert[rust/uncontrolled-allocation-size]=arg1 + let _ = std::alloc::alloc(k1.extend_packed(l3).unwrap()); // $ MISSING: Alert[rust/uncontrolled-allocation-size]=arg1 (https://github.com/github/codeql/pull/19658) let l4 = std::alloc::Layout::array::(v).unwrap(); let _ = std::alloc::alloc(l4); // $ Alert[rust/uncontrolled-allocation-size]=arg1 diff --git a/rust/ql/test/utils-tests/modelgenerator/option.rs b/rust/ql/test/utils-tests/modelgenerator/option.rs index bc1332b75a4..4cb8bff2bc9 100644 --- a/rust/ql/test/utils-tests/modelgenerator/option.rs +++ b/rust/ql/test/utils-tests/modelgenerator/option.rs @@ -414,7 +414,7 @@ impl MyOption<&T> { } } - // summary=repo::test;::cloned;Argument[self].Field[test::option::MyOption::MySome(0)].Reference;ReturnValue.Field[test::option::MyOption::MySome(0)];value;dfc-generated + // MISSING: summary=repo::test;::cloned;Argument[self].Field[test::option::MyOption::MySome(0)].Reference;ReturnValue.Field[test::option::MyOption::MySome(0)];value;dfc-generated pub fn cloned(self) -> MyOption where T: Clone, @@ -438,7 +438,7 @@ impl MyOption<&mut T> { } } - // summary=repo::test;::cloned;Argument[self].Field[test::option::MyOption::MySome(0)].Reference;ReturnValue.Field[test::option::MyOption::MySome(0)];value;dfc-generated + // MISSING: summary=repo::test;::cloned;Argument[self].Field[test::option::MyOption::MySome(0)].Reference;ReturnValue.Field[test::option::MyOption::MySome(0)];value;dfc-generated pub fn cloned(self) -> MyOption where T: Clone, @@ -466,7 +466,7 @@ impl Clone for MyOption where T: Clone, { - // summary=repo::test;::clone;Argument[self].Field[test::option::MyOption::MySome(0)].Reference;ReturnValue.Field[test::option::MyOption::MySome(0)];value;dfc-generated + // MISSING: summary=repo::test;::clone;Argument[self].Field[test::option::MyOption::MySome(0)].Reference;ReturnValue.Field[test::option::MyOption::MySome(0)];value;dfc-generated fn clone(&self) -> Self { match self { MySome(x) => MySome(x.clone()), From 299fe2eb3f16ce7a9811fdd3f345ef01af4ce993 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 17 Jun 2025 16:19:50 +0200 Subject: [PATCH 23/35] Rust: add `proc-macro` capabilities to QL tests This adds the possibility to add a special `proc_macro.rs` source file to QL tests, which will be generated into a `proc_macro` crate the usual `lib` crate depends on. This allow to define procedural macros in QL tests, and is here used to move the `macro-expansion` integration test to be a language test instead. As the generated manifests involved were starting to get a bit complex, they are now generated from a `mustache` template. --- Cargo.lock | 1 + .../tree_sitter_extractors_deps/defs.bzl | 1 + rust/extractor/BUILD.bazel | 1 + rust/extractor/Cargo.toml | 1 + rust/extractor/src/qltest.rs | 67 +- rust/extractor/src/qltest_cargo.mustache | 42 + .../macro-expansion/Cargo.toml | 3 - .../macro-expansion/attributes/Cargo.toml | 7 - .../macro-expansion/attributes/src/lib.rs | 16 - .../macro-expansion/calls/Cargo.toml | 6 - .../macro-expansion/calls/src/lib.rs | 30 - .../macro-expansion/diagnostics.expected | 55 - .../macro-expansion/proc_macros/Cargo.toml | 11 - .../macro-expansion/source_archive.expected | 4 - .../macro-expansion/test.expected | 34 - .../macro-expansion/test_macro_expansion.py | 2 - rust/ql/test/.gitignore | 3 + .../PathResolutionConsistency.expected | 3 + .../Cargo.lock | 22 +- .../macro-expansion/PrintAst.expected | 2174 +++++++++++++++++ .../PrintAst.qlref | 0 .../extractor-tests/macro-expansion/call.rs | 14 + .../macro-expansion/included}/included.rs | 0 .../macro-expansion/macro_expansion.rs | 80 + .../macro-expansion/proc_macro.rs} | 16 + .../extractor-tests/macro-expansion}/some.txt | 0 .../macro-expansion/test.expected | 37 + .../extractor-tests}/macro-expansion/test.ql | 5 +- .../macro_expansion/PrintAst.expected | 155 -- .../macro_expansion/macro_expansion.rs | 8 - .../macro_expansion/options.yml | 2 - .../macro_expansion/test.expected | 2 - .../extractor-tests/macro_expansion/test.ql | 6 - 33 files changed, 2428 insertions(+), 380 deletions(-) create mode 100644 rust/extractor/src/qltest_cargo.mustache delete mode 100644 rust/ql/integration-tests/macro-expansion/Cargo.toml delete mode 100644 rust/ql/integration-tests/macro-expansion/attributes/Cargo.toml delete mode 100644 rust/ql/integration-tests/macro-expansion/attributes/src/lib.rs delete mode 100644 rust/ql/integration-tests/macro-expansion/calls/Cargo.toml delete mode 100644 rust/ql/integration-tests/macro-expansion/calls/src/lib.rs delete mode 100644 rust/ql/integration-tests/macro-expansion/diagnostics.expected delete mode 100644 rust/ql/integration-tests/macro-expansion/proc_macros/Cargo.toml delete mode 100644 rust/ql/integration-tests/macro-expansion/source_archive.expected delete mode 100644 rust/ql/integration-tests/macro-expansion/test.expected delete mode 100644 rust/ql/integration-tests/macro-expansion/test_macro_expansion.py create mode 100644 rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected rename rust/ql/test/extractor-tests/{macro_expansion => macro-expansion}/Cargo.lock (84%) create mode 100644 rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected rename rust/ql/test/extractor-tests/{macro_expansion => macro-expansion}/PrintAst.qlref (100%) create mode 100644 rust/ql/test/extractor-tests/macro-expansion/call.rs rename rust/ql/{integration-tests/macro-expansion/calls/src => test/extractor-tests/macro-expansion/included}/included.rs (100%) create mode 100644 rust/ql/test/extractor-tests/macro-expansion/macro_expansion.rs rename rust/ql/{integration-tests/macro-expansion/proc_macros/src/lib.rs => test/extractor-tests/macro-expansion/proc_macro.rs} (56%) rename rust/ql/{integration-tests/macro-expansion/calls/src => test/extractor-tests/macro-expansion}/some.txt (100%) create mode 100644 rust/ql/test/extractor-tests/macro-expansion/test.expected rename rust/ql/{integration-tests => test/extractor-tests}/macro-expansion/test.ql (81%) delete mode 100644 rust/ql/test/extractor-tests/macro_expansion/PrintAst.expected delete mode 100644 rust/ql/test/extractor-tests/macro_expansion/macro_expansion.rs delete mode 100644 rust/ql/test/extractor-tests/macro_expansion/options.yml delete mode 100644 rust/ql/test/extractor-tests/macro_expansion/test.expected delete mode 100644 rust/ql/test/extractor-tests/macro_expansion/test.ql diff --git a/Cargo.lock b/Cargo.lock index 934cae590c1..80417917020 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,6 +426,7 @@ dependencies = [ "figment", "glob", "itertools 0.14.0", + "mustache", "num-traits", "ra_ap_base_db", "ra_ap_cfg", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl index 0247ee36d9f..547a1e47606 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl @@ -334,6 +334,7 @@ _NORMAL_DEPENDENCIES = { "figment": Label("@vendor_ts__figment-0.10.19//:figment"), "glob": Label("@vendor_ts__glob-0.3.2//:glob"), "itertools": Label("@vendor_ts__itertools-0.14.0//:itertools"), + "mustache": Label("@vendor_ts__mustache-0.9.0//:mustache"), "num-traits": Label("@vendor_ts__num-traits-0.2.19//:num_traits"), "ra_ap_base_db": Label("@vendor_ts__ra_ap_base_db-0.0.273//:ra_ap_base_db"), "ra_ap_cfg": Label("@vendor_ts__ra_ap_cfg-0.0.273//:ra_ap_cfg"), diff --git a/rust/extractor/BUILD.bazel b/rust/extractor/BUILD.bazel index 124895b149c..fe5d8e50859 100644 --- a/rust/extractor/BUILD.bazel +++ b/rust/extractor/BUILD.bazel @@ -7,6 +7,7 @@ codeql_rust_binary( name = "extractor", srcs = glob(["src/**/*.rs"]), aliases = aliases(), + compile_data = ["src/qltest_cargo.mustache"], proc_macro_deps = all_crate_deps( proc_macro = True, ) + [ diff --git a/rust/extractor/Cargo.toml b/rust/extractor/Cargo.toml index bdbe7c969ee..fa3f6171bf8 100644 --- a/rust/extractor/Cargo.toml +++ b/rust/extractor/Cargo.toml @@ -41,3 +41,4 @@ tracing = "0.1.41" tracing-flame = "0.2.0" tracing-subscriber = "0.3.19" chalk-ir = "0.100.0" +mustache = "0.9.0" diff --git a/rust/extractor/src/qltest.rs b/rust/extractor/src/qltest.rs index de0c36df784..665a26469cb 100644 --- a/rust/extractor/src/qltest.rs +++ b/rust/extractor/src/qltest.rs @@ -16,39 +16,54 @@ fn dump_lib() -> anyhow::Result<()> { let lib = paths .iter() .map(|p| p.file_stem().expect("results of glob must have a name")) - .filter(|&p| !["main", "lib"].map(OsStr::new).contains(&p)) + .filter(|&p| !["main", "lib", "proc_macro"].map(OsStr::new).contains(&p)) .map(|p| format!("mod {};", p.to_string_lossy())) .join("\n"); fs::write("lib.rs", lib).context("writing lib.rs") } +#[derive(serde::Serialize)] +enum TestCargoManifest<'a> { + Workspace {}, + Lib { + uses_proc_macro: bool, + uses_main: bool, + dependencies: &'a [String], + }, + Macro {}, +} + +impl TestCargoManifest<'_> { + pub fn dump(&self, path: impl AsRef) -> anyhow::Result<()> { + static TEMPLATE: std::sync::LazyLock = std::sync::LazyLock::new(|| { + mustache::compile_str(include_str!("qltest_cargo.mustache")) + .expect("compiling template") + }); + + let path = path.as_ref(); + fs::create_dir_all(path).with_context(|| format!("creating {}", path.display()))?; + let path = path.join("Cargo.toml"); + let rendered = TEMPLATE + .render_to_string(&self) + .with_context(|| format!("rendering {}", path.display()))?; + fs::write(&path, rendered).with_context(|| format!("writing {}", path.display())) + } +} fn dump_cargo_manifest(dependencies: &[String]) -> anyhow::Result<()> { - let mut manifest = String::from( - r#"[workspace] -[package] -name = "test" -version="0.0.1" -edition="2021" -[lib] -path="lib.rs" -"#, - ); - if fs::exists("main.rs").context("checking existence of main.rs")? { - manifest.push_str( - r#"[[bin]] -name = "main" -path = "main.rs" -"#, - ); + let uses_proc_macro = + fs::exists("proc_macro.rs").context("checking existence of proc_macro.rs")?; + let lib_manifest = TestCargoManifest::Lib { + uses_proc_macro, + uses_main: fs::exists("main.rs").context("checking existence of main.rs")?, + dependencies, + }; + if uses_proc_macro { + TestCargoManifest::Workspace {}.dump("")?; + lib_manifest.dump(".lib")?; + TestCargoManifest::Macro {}.dump(".proc_macro") + } else { + lib_manifest.dump("") } - if !dependencies.is_empty() { - manifest.push_str("[dependencies]\n"); - for dep in dependencies { - manifest.push_str(dep); - manifest.push('\n'); - } - } - fs::write("Cargo.toml", manifest).context("writing Cargo.toml") } fn set_sources(config: &mut Config) -> anyhow::Result<()> { diff --git a/rust/extractor/src/qltest_cargo.mustache b/rust/extractor/src/qltest_cargo.mustache new file mode 100644 index 00000000000..183c7fffd15 --- /dev/null +++ b/rust/extractor/src/qltest_cargo.mustache @@ -0,0 +1,42 @@ +{{#Workspace}} +[workspace] +resolver = "2" +members = [".lib", ".proc_macro"] +{{/Workspace}} + +{{#Lib}} +{{^uses_proc_macro}} +[workspace] +{{/uses_proc_macro}} +[package] +name = "test" +version = "0.1.0" +edition = "2021" +[lib] +path = "{{#uses_proc_macro}}../{{/uses_proc_macro}}lib.rs" +{{#uses_main}} +[[bin]] +name = "main" +path = "{{#uses_proc_macro}}../{{/uses_proc_macro}}main.rs" +{{/uses_main}} +[dependencies] +{{#uses_proc_macro}} +proc_macro = { path = "../.proc_macro" } +{{/uses_proc_macro}} +{{#dependencies}} +{{.}} +{{/dependencies}} +{{/Lib}} + +{{#Macro}} +[package] +name = "proc_macro" +version = "0.1.0" +edition = "2021" +[lib] +path = "../proc_macro.rs" +proc_macro = true +[dependencies] +quote = "1.0.40" +syn = { version = "2.0.100", features = ["full"] } +{{/Macro}} diff --git a/rust/ql/integration-tests/macro-expansion/Cargo.toml b/rust/ql/integration-tests/macro-expansion/Cargo.toml deleted file mode 100644 index 9be2ec64b57..00000000000 --- a/rust/ql/integration-tests/macro-expansion/Cargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[workspace] -members = [ "attributes", "calls", "proc_macros"] -resolver = "2" diff --git a/rust/ql/integration-tests/macro-expansion/attributes/Cargo.toml b/rust/ql/integration-tests/macro-expansion/attributes/Cargo.toml deleted file mode 100644 index b475ead960a..00000000000 --- a/rust/ql/integration-tests/macro-expansion/attributes/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "attributes" -version = "0.1.0" -edition = "2024" - -[dependencies] -proc_macros = { path = "../proc_macros" } diff --git a/rust/ql/integration-tests/macro-expansion/attributes/src/lib.rs b/rust/ql/integration-tests/macro-expansion/attributes/src/lib.rs deleted file mode 100644 index 682083aa10a..00000000000 --- a/rust/ql/integration-tests/macro-expansion/attributes/src/lib.rs +++ /dev/null @@ -1,16 +0,0 @@ -use proc_macros::repeat; - -#[repeat(3)] -fn foo() { - _ = concat!("Hello ", "world!"); - - #[repeat(2)] - fn inner() {} -} - -#[repeat(2)] -#[repeat(3)] -fn bar() {} - -#[repeat(0)] -fn baz() {} diff --git a/rust/ql/integration-tests/macro-expansion/calls/Cargo.toml b/rust/ql/integration-tests/macro-expansion/calls/Cargo.toml deleted file mode 100644 index d38cf944489..00000000000 --- a/rust/ql/integration-tests/macro-expansion/calls/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "calls" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/rust/ql/integration-tests/macro-expansion/calls/src/lib.rs b/rust/ql/integration-tests/macro-expansion/calls/src/lib.rs deleted file mode 100644 index df3fccb7c40..00000000000 --- a/rust/ql/integration-tests/macro-expansion/calls/src/lib.rs +++ /dev/null @@ -1,30 +0,0 @@ -struct S; - -macro_rules! def_x { - () => { - fn x() {} - }; -} - -impl S { - def_x!(); // this doesn't expand since 0.0.274 -} - -macro_rules! my_macro { - ($head:expr, $($tail:tt)*) => { format!($head, $($tail)*) }; -} - - -fn test() { - _ = concat!("x", "y"); - - _ = my_macro!( - concat!("<", "{}", ">"), // this doesn't expand since 0.0.274 - "hi", - ); -} - -include!("included.rs"); - -#[doc = include_str!("some.txt")] // this doesn't expand since 0.0.274 -fn documented() {} diff --git a/rust/ql/integration-tests/macro-expansion/diagnostics.expected b/rust/ql/integration-tests/macro-expansion/diagnostics.expected deleted file mode 100644 index 511bd49f1a5..00000000000 --- a/rust/ql/integration-tests/macro-expansion/diagnostics.expected +++ /dev/null @@ -1,55 +0,0 @@ -{ - "attributes": { - "durations": { - "crateGraph": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "extract": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "extractLibrary": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "findManifests": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "loadManifest": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "loadSource": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "parse": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "parseLibrary": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - }, - "total": { - "ms": "__REDACTED__", - "pretty": "__REDACTED__" - } - }, - "numberOfFiles": 4, - "numberOfManifests": 1 - }, - "severity": "note", - "source": { - "extractorName": "rust", - "id": "rust/extractor/telemetry", - "name": "telemetry" - }, - "visibility": { - "cliSummaryTable": false, - "statusPage": false, - "telemetry": true - } -} diff --git a/rust/ql/integration-tests/macro-expansion/proc_macros/Cargo.toml b/rust/ql/integration-tests/macro-expansion/proc_macros/Cargo.toml deleted file mode 100644 index 712f7ba3393..00000000000 --- a/rust/ql/integration-tests/macro-expansion/proc_macros/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "proc_macros" -version = "0.1.0" -edition = "2024" - -[lib] -proc-macro = true - -[dependencies] -quote = "1.0.40" -syn = { version = "2.0.100", features = ["full"] } diff --git a/rust/ql/integration-tests/macro-expansion/source_archive.expected b/rust/ql/integration-tests/macro-expansion/source_archive.expected deleted file mode 100644 index c1700a0a300..00000000000 --- a/rust/ql/integration-tests/macro-expansion/source_archive.expected +++ /dev/null @@ -1,4 +0,0 @@ -attributes/src/lib.rs -calls/src/included.rs -calls/src/lib.rs -proc_macros/src/lib.rs diff --git a/rust/ql/integration-tests/macro-expansion/test.expected b/rust/ql/integration-tests/macro-expansion/test.expected deleted file mode 100644 index 24d95c99b35..00000000000 --- a/rust/ql/integration-tests/macro-expansion/test.expected +++ /dev/null @@ -1,34 +0,0 @@ -attribute_macros -| attributes/src/lib.rs:3:1:9:1 | fn foo | 0 | attributes/src/lib.rs:4:1:8:16 | fn foo_0 | -| attributes/src/lib.rs:3:1:9:1 | fn foo | 1 | attributes/src/lib.rs:4:1:8:16 | fn foo_1 | -| attributes/src/lib.rs:3:1:9:1 | fn foo | 2 | attributes/src/lib.rs:4:1:8:16 | fn foo_2 | -| attributes/src/lib.rs:7:5:8:16 | fn inner | 0 | attributes/src/lib.rs:8:5:8:16 | fn inner_0 | -| attributes/src/lib.rs:7:5:8:16 | fn inner | 0 | attributes/src/lib.rs:8:5:8:16 | fn inner_0 | -| attributes/src/lib.rs:7:5:8:16 | fn inner | 0 | attributes/src/lib.rs:8:5:8:16 | fn inner_0 | -| attributes/src/lib.rs:7:5:8:16 | fn inner | 1 | attributes/src/lib.rs:8:5:8:16 | fn inner_1 | -| attributes/src/lib.rs:7:5:8:16 | fn inner | 1 | attributes/src/lib.rs:8:5:8:16 | fn inner_1 | -| attributes/src/lib.rs:7:5:8:16 | fn inner | 1 | attributes/src/lib.rs:8:5:8:16 | fn inner_1 | -| attributes/src/lib.rs:11:1:13:11 | fn bar | 0 | attributes/src/lib.rs:12:1:13:10 | fn bar_0 | -| attributes/src/lib.rs:11:1:13:11 | fn bar | 1 | attributes/src/lib.rs:12:1:13:10 | fn bar_1 | -| attributes/src/lib.rs:12:1:13:10 | fn bar_0 | 0 | attributes/src/lib.rs:13:1:13:10 | fn bar_0_0 | -| attributes/src/lib.rs:12:1:13:10 | fn bar_0 | 1 | attributes/src/lib.rs:13:1:13:10 | fn bar_0_1 | -| attributes/src/lib.rs:12:1:13:10 | fn bar_0 | 2 | attributes/src/lib.rs:13:1:13:10 | fn bar_0_2 | -| attributes/src/lib.rs:12:1:13:10 | fn bar_1 | 0 | attributes/src/lib.rs:13:1:13:10 | fn bar_1_0 | -| attributes/src/lib.rs:12:1:13:10 | fn bar_1 | 1 | attributes/src/lib.rs:13:1:13:10 | fn bar_1_1 | -| attributes/src/lib.rs:12:1:13:10 | fn bar_1 | 2 | attributes/src/lib.rs:13:1:13:10 | fn bar_1_2 | -macro_calls -| attributes/src/lib.rs:5:9:5:34 | concat!... | attributes/src/lib.rs:5:17:5:34 | "Hello world!" | -| attributes/src/lib.rs:5:9:5:34 | concat!... | attributes/src/lib.rs:5:17:5:34 | "Hello world!" | -| attributes/src/lib.rs:5:9:5:34 | concat!... | attributes/src/lib.rs:5:17:5:34 | "Hello world!" | -| calls/src/included.rs:2:9:2:39 | concat!... | calls/src/included.rs:2:17:2:38 | "Hello world!" | -| calls/src/lib.rs:10:5:10:13 | def_x!... | calls/src/lib.rs:10:5:10:13 | MacroItems | -| calls/src/lib.rs:19:9:19:25 | concat!... | calls/src/lib.rs:19:17:19:24 | "xy" | -| calls/src/lib.rs:21:9:24:5 | my_macro!... | calls/src/lib.rs:22:9:23:13 | MacroExpr | -| calls/src/lib.rs:22:9:22:31 | concat!... | calls/src/lib.rs:22:17:22:30 | "<{}>" | -| calls/src/lib.rs:22:9:23:13 | ...::format_args!... | calls/src/lib.rs:22:9:23:13 | FormatArgsExpr | -| calls/src/lib.rs:22:9:23:13 | format!... | calls/src/lib.rs:22:9:23:13 | ...::must_use(...) | -| calls/src/lib.rs:27:1:27:24 | concat!... | calls/src/lib.rs:27:1:27:24 | "Hello world!" | -| calls/src/lib.rs:27:1:27:24 | include!... | calls/src/lib.rs:27:1:27:24 | MacroItems | -| calls/src/lib.rs:29:9:29:32 | include_str!... | calls/src/lib.rs:29:22:29:31 | "" | -unexpanded_macro_calls -| attributes/src/lib.rs:5:9:5:35 | concat!... | diff --git a/rust/ql/integration-tests/macro-expansion/test_macro_expansion.py b/rust/ql/integration-tests/macro-expansion/test_macro_expansion.py deleted file mode 100644 index 0d20cc2e27d..00000000000 --- a/rust/ql/integration-tests/macro-expansion/test_macro_expansion.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_macro_expansion(codeql, rust, check_source_archive, rust_check_diagnostics): - codeql.database.create() diff --git a/rust/ql/test/.gitignore b/rust/ql/test/.gitignore index bbbb5decae2..3c36d8c7797 100644 --- a/rust/ql/test/.gitignore +++ b/rust/ql/test/.gitignore @@ -1,3 +1,6 @@ Cargo.toml lib.rs target/ +.proc_macro/ +.lib/ + diff --git a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..947e541f0ca --- /dev/null +++ b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,3 @@ +multiplePathResolutions +| macro_expansion.rs:1:5:1:14 | proc_macro | file://:0:0:0:0 | Crate(proc_macro@0.0.0) | +| macro_expansion.rs:1:5:1:14 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.1.0) | diff --git a/rust/ql/test/extractor-tests/macro_expansion/Cargo.lock b/rust/ql/test/extractor-tests/macro-expansion/Cargo.lock similarity index 84% rename from rust/ql/test/extractor-tests/macro_expansion/Cargo.lock rename to rust/ql/test/extractor-tests/macro-expansion/Cargo.lock index 05d957e53f2..228850f0b3f 100644 --- a/rust/ql/test/extractor-tests/macro_expansion/Cargo.lock +++ b/rust/ql/test/extractor-tests/macro-expansion/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ctor" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "proc-macro2" version = "1.0.95" @@ -21,6 +11,14 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc_macro" +version = "0.1.0" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "quote" version = "1.0.40" @@ -43,9 +41,9 @@ dependencies = [ [[package]] name = "test" -version = "0.0.1" +version = "0.1.0" dependencies = [ - "ctor", + "proc_macro", ] [[package]] diff --git a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected new file mode 100644 index 00000000000..092c26051d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected @@ -0,0 +1,2174 @@ +call.rs: +# 1| [SourceFile] SourceFile +# 1| getItem(0): [Use] use ...::macro_expansion +# 1| getUseTree(): [UseTree] ...::macro_expansion +# 1| getPath(): [Path] ...::macro_expansion +# 1| getQualifier(): [Path] crate +# 1| getSegment(): [PathSegment] crate +# 1| getIdentifier(): [NameRef] crate +# 1| getSegment(): [PathSegment] macro_expansion +# 1| getIdentifier(): [NameRef] macro_expansion +# 3| getItem(1): [Function] fn call_some_functions +# 3| getParamList(): [ParamList] ParamList +# 3| getBody(): [BlockExpr] { ... } +# 3| getStmtList(): [StmtList] StmtList +# 4| getStatement(0): [ExprStmt] ExprStmt +# 4| getExpr(): [CallExpr] ...::foo(...) +# 4| getArgList(): [ArgList] ArgList +# 4| getFunction(): [PathExpr] ...::foo +# 4| getPath(): [Path] ...::foo +# 4| getQualifier(): [Path] macro_expansion +# 4| getSegment(): [PathSegment] macro_expansion +# 4| getIdentifier(): [NameRef] macro_expansion +# 4| getSegment(): [PathSegment] foo +# 4| getIdentifier(): [NameRef] foo +# 5| getStatement(1): [ExprStmt] ExprStmt +# 5| getExpr(): [CallExpr] ...::foo_new(...) +# 5| getArgList(): [ArgList] ArgList +# 5| getFunction(): [PathExpr] ...::foo_new +# 5| getPath(): [Path] ...::foo_new +# 5| getQualifier(): [Path] macro_expansion +# 5| getSegment(): [PathSegment] macro_expansion +# 5| getIdentifier(): [NameRef] macro_expansion +# 5| getSegment(): [PathSegment] foo_new +# 5| getIdentifier(): [NameRef] foo_new +# 6| getStatement(2): [ExprStmt] ExprStmt +# 6| getExpr(): [CallExpr] ...::bar_0(...) +# 6| getArgList(): [ArgList] ArgList +# 6| getFunction(): [PathExpr] ...::bar_0 +# 6| getPath(): [Path] ...::bar_0 +# 6| getQualifier(): [Path] macro_expansion +# 6| getSegment(): [PathSegment] macro_expansion +# 6| getIdentifier(): [NameRef] macro_expansion +# 6| getSegment(): [PathSegment] bar_0 +# 6| getIdentifier(): [NameRef] bar_0 +# 7| getStatement(3): [ExprStmt] ExprStmt +# 7| getExpr(): [CallExpr] ...::bar_1(...) +# 7| getArgList(): [ArgList] ArgList +# 7| getFunction(): [PathExpr] ...::bar_1 +# 7| getPath(): [Path] ...::bar_1 +# 7| getQualifier(): [Path] macro_expansion +# 7| getSegment(): [PathSegment] macro_expansion +# 7| getIdentifier(): [NameRef] macro_expansion +# 7| getSegment(): [PathSegment] bar_1 +# 7| getIdentifier(): [NameRef] bar_1 +# 8| getStatement(4): [ExprStmt] ExprStmt +# 8| getExpr(): [CallExpr] ...::bar_0_new(...) +# 8| getArgList(): [ArgList] ArgList +# 8| getFunction(): [PathExpr] ...::bar_0_new +# 8| getPath(): [Path] ...::bar_0_new +# 8| getQualifier(): [Path] macro_expansion +# 8| getSegment(): [PathSegment] macro_expansion +# 8| getIdentifier(): [NameRef] macro_expansion +# 8| getSegment(): [PathSegment] bar_0_new +# 8| getIdentifier(): [NameRef] bar_0_new +# 9| getStatement(5): [ExprStmt] ExprStmt +# 9| getExpr(): [CallExpr] ...::bar_1_new(...) +# 9| getArgList(): [ArgList] ArgList +# 9| getFunction(): [PathExpr] ...::bar_1_new +# 9| getPath(): [Path] ...::bar_1_new +# 9| getQualifier(): [Path] macro_expansion +# 9| getSegment(): [PathSegment] macro_expansion +# 9| getIdentifier(): [NameRef] macro_expansion +# 9| getSegment(): [PathSegment] bar_1_new +# 9| getIdentifier(): [NameRef] bar_1_new +# 10| getStatement(6): [ExprStmt] ExprStmt +# 10| getExpr(): [CallExpr] ...::bzz_0(...) +# 10| getArgList(): [ArgList] ArgList +# 10| getFunction(): [PathExpr] ...::bzz_0 +# 10| getPath(): [Path] ...::bzz_0 +# 10| getQualifier(): [Path] ...::S +# 10| getQualifier(): [Path] macro_expansion +# 10| getSegment(): [PathSegment] macro_expansion +# 10| getIdentifier(): [NameRef] macro_expansion +# 10| getSegment(): [PathSegment] S +# 10| getIdentifier(): [NameRef] S +# 10| getSegment(): [PathSegment] bzz_0 +# 10| getIdentifier(): [NameRef] bzz_0 +# 11| getStatement(7): [ExprStmt] ExprStmt +# 11| getExpr(): [CallExpr] ...::bzz_1(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getFunction(): [PathExpr] ...::bzz_1 +# 11| getPath(): [Path] ...::bzz_1 +# 11| getQualifier(): [Path] ...::S +# 11| getQualifier(): [Path] macro_expansion +# 11| getSegment(): [PathSegment] macro_expansion +# 11| getIdentifier(): [NameRef] macro_expansion +# 11| getSegment(): [PathSegment] S +# 11| getIdentifier(): [NameRef] S +# 11| getSegment(): [PathSegment] bzz_1 +# 11| getIdentifier(): [NameRef] bzz_1 +# 12| getStatement(8): [ExprStmt] ExprStmt +# 12| getExpr(): [CallExpr] ...::bzz_2(...) +# 12| getArgList(): [ArgList] ArgList +# 12| getFunction(): [PathExpr] ...::bzz_2 +# 12| getPath(): [Path] ...::bzz_2 +# 12| getQualifier(): [Path] ...::S +# 12| getQualifier(): [Path] macro_expansion +# 12| getSegment(): [PathSegment] macro_expansion +# 12| getIdentifier(): [NameRef] macro_expansion +# 12| getSegment(): [PathSegment] S +# 12| getIdentifier(): [NameRef] S +# 12| getSegment(): [PathSegment] bzz_2 +# 12| getIdentifier(): [NameRef] bzz_2 +# 13| getStatement(9): [ExprStmt] ExprStmt +# 13| getExpr(): [CallExpr] ...::x(...) +# 13| getArgList(): [ArgList] ArgList +# 13| getFunction(): [PathExpr] ...::x +# 13| getPath(): [Path] ...::x +# 13| getQualifier(): [Path] ...::S +# 13| getQualifier(): [Path] macro_expansion +# 13| getSegment(): [PathSegment] macro_expansion +# 13| getIdentifier(): [NameRef] macro_expansion +# 13| getSegment(): [PathSegment] S +# 13| getIdentifier(): [NameRef] S +# 13| getSegment(): [PathSegment] x +# 13| getIdentifier(): [NameRef] x +# 3| getName(): [Name] call_some_functions +included/included.rs: +# 1| [SourceFile] SourceFile +# 1| getItem(0): [Function] fn included +# 1| getParamList(): [ParamList] ParamList +# 1| getBody(): [BlockExpr] { ... } +# 1| getStmtList(): [StmtList] StmtList +# 2| getStatement(0): [ExprStmt] ExprStmt +# 2| getExpr(): [AssignmentExpr] ... = ... +# 2| getLhs(): [UnderscoreExpr] _ +# 2| getRhs(): [MacroExpr] MacroExpr +# 2| getMacroCall(): [MacroCall] concat!... +# 2| getPath(): [Path] concat +# 2| getSegment(): [PathSegment] concat +# 2| getIdentifier(): [NameRef] concat +# 2| getTokenTree(): [TokenTree] TokenTree +# 2| getMacroCallExpansion(): [StringLiteralExpr] "Hello world!" +# 1| getName(): [Name] included +# 2| [Comment] //... +lib.rs: +# 1| [SourceFile] SourceFile +# 1| getItem(0): [Module] mod call +# 1| getName(): [Name] call +# 2| getItem(1): [Module] mod macro_expansion +# 2| getName(): [Name] macro_expansion +macro_expansion.rs: +# 1| [SourceFile] SourceFile +# 1| getItem(0): [Use] use proc_macro::{...} +# 1| getUseTree(): [UseTree] proc_macro::{...} +# 1| getPath(): [Path] proc_macro +# 1| getSegment(): [PathSegment] proc_macro +# 1| getIdentifier(): [NameRef] proc_macro +# 1| getUseTreeList(): [UseTreeList] UseTreeList +# 1| getUseTree(0): [UseTree] repeat +# 1| getPath(): [Path] repeat +# 1| getSegment(): [PathSegment] repeat +# 1| getIdentifier(): [NameRef] repeat +# 1| getUseTree(1): [UseTree] add_one +# 1| getPath(): [Path] add_one +# 1| getSegment(): [PathSegment] add_one +# 1| getIdentifier(): [NameRef] add_one +# 1| getUseTree(2): [UseTree] erase +# 1| getPath(): [Path] erase +# 1| getSegment(): [PathSegment] erase +# 1| getIdentifier(): [NameRef] erase +# 3| getItem(1): [Function] fn foo +# 4| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 4| getItem(0): [Function] fn foo +# 4| getParamList(): [ParamList] ParamList +# 4| getBody(): [BlockExpr] { ... } +# 4| getStmtList(): [StmtList] StmtList +# 5| getStatement(0): [ExprStmt] ExprStmt +# 5| getExpr(): [AssignmentExpr] ... = ... +# 5| getLhs(): [UnderscoreExpr] _ +# 5| getRhs(): [MacroExpr] MacroExpr +# 5| getMacroCall(): [MacroCall] concat!... +# 5| getPath(): [Path] concat +# 5| getSegment(): [PathSegment] concat +# 5| getIdentifier(): [NameRef] concat +# 5| getTokenTree(): [TokenTree] TokenTree +# 5| getMacroCallExpansion(): [StringLiteralExpr] "Hello world!" +# 7| getStatement(1): [Function] fn inner +# 8| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 8| getItem(0): [Function] fn inner_0 +# 8| getParamList(): [ParamList] ParamList +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner_0 +# 8| getItem(1): [Function] fn inner_1 +# 8| getParamList(): [ParamList] ParamList +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner_1 +# 8| getParamList(): [ParamList] ParamList +# 7| getAttr(0): [Attr] Attr +# 7| getMeta(): [Meta] Meta +# 7| getPath(): [Path] repeat +# 7| getSegment(): [PathSegment] repeat +# 7| getIdentifier(): [NameRef] repeat +# 7| getTokenTree(): [TokenTree] TokenTree +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner +# 10| getStatement(2): [ExprStmt] ExprStmt +# 10| getExpr(): [CallExpr] inner_0(...) +# 10| getArgList(): [ArgList] ArgList +# 10| getFunction(): [PathExpr] inner_0 +# 10| getPath(): [Path] inner_0 +# 10| getSegment(): [PathSegment] inner_0 +# 10| getIdentifier(): [NameRef] inner_0 +# 11| getStatement(3): [ExprStmt] ExprStmt +# 11| getExpr(): [CallExpr] inner_1(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getFunction(): [PathExpr] inner_1 +# 11| getPath(): [Path] inner_1 +# 11| getSegment(): [PathSegment] inner_1 +# 11| getIdentifier(): [NameRef] inner_1 +# 4| getName(): [Name] foo +# 4| getVisibility(): [Visibility] Visibility +# 4| getItem(1): [Function] fn foo_new +# 4| getParamList(): [ParamList] ParamList +# 4| getBody(): [BlockExpr] { ... } +# 4| getStmtList(): [StmtList] StmtList +# 5| getStatement(0): [ExprStmt] ExprStmt +# 5| getExpr(): [AssignmentExpr] ... = ... +# 5| getLhs(): [UnderscoreExpr] _ +# 5| getRhs(): [MacroExpr] MacroExpr +# 5| getMacroCall(): [MacroCall] concat!... +# 5| getPath(): [Path] concat +# 5| getSegment(): [PathSegment] concat +# 5| getIdentifier(): [NameRef] concat +# 5| getTokenTree(): [TokenTree] TokenTree +# 5| getMacroCallExpansion(): [StringLiteralExpr] "Hello world!" +# 7| getStatement(1): [Function] fn inner +# 8| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 8| getItem(0): [Function] fn inner_0 +# 8| getParamList(): [ParamList] ParamList +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner_0 +# 8| getItem(1): [Function] fn inner_1 +# 8| getParamList(): [ParamList] ParamList +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner_1 +# 8| getParamList(): [ParamList] ParamList +# 7| getAttr(0): [Attr] Attr +# 7| getMeta(): [Meta] Meta +# 7| getPath(): [Path] repeat +# 7| getSegment(): [PathSegment] repeat +# 7| getIdentifier(): [NameRef] repeat +# 7| getTokenTree(): [TokenTree] TokenTree +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner +# 10| getStatement(2): [ExprStmt] ExprStmt +# 10| getExpr(): [CallExpr] inner_0(...) +# 10| getArgList(): [ArgList] ArgList +# 10| getFunction(): [PathExpr] inner_0 +# 10| getPath(): [Path] inner_0 +# 10| getSegment(): [PathSegment] inner_0 +# 10| getIdentifier(): [NameRef] inner_0 +# 11| getStatement(3): [ExprStmt] ExprStmt +# 11| getExpr(): [CallExpr] inner_1(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getFunction(): [PathExpr] inner_1 +# 11| getPath(): [Path] inner_1 +# 11| getSegment(): [PathSegment] inner_1 +# 11| getIdentifier(): [NameRef] inner_1 +# 4| getName(): [Name] foo_new +# 4| getVisibility(): [Visibility] Visibility +# 4| getParamList(): [ParamList] ParamList +# 3| getAttr(0): [Attr] Attr +# 3| getMeta(): [Meta] Meta +# 3| getPath(): [Path] add_one +# 3| getSegment(): [PathSegment] add_one +# 3| getIdentifier(): [NameRef] add_one +# 4| getBody(): [BlockExpr] { ... } +# 4| getStmtList(): [StmtList] StmtList +# 5| getStatement(0): [ExprStmt] ExprStmt +# 5| getExpr(): [AssignmentExpr] ... = ... +# 5| getLhs(): [UnderscoreExpr] _ +# 5| getRhs(): [MacroExpr] MacroExpr +# 5| getMacroCall(): [MacroCall] concat!... +# 5| getPath(): [Path] concat +# 5| getSegment(): [PathSegment] concat +# 5| getIdentifier(): [NameRef] concat +# 5| getTokenTree(): [TokenTree] TokenTree +# 7| getStatement(1): [Function] fn inner +# 8| getParamList(): [ParamList] ParamList +# 7| getAttr(0): [Attr] Attr +# 7| getMeta(): [Meta] Meta +# 7| getPath(): [Path] repeat +# 7| getSegment(): [PathSegment] repeat +# 7| getIdentifier(): [NameRef] repeat +# 7| getTokenTree(): [TokenTree] TokenTree +# 8| getBody(): [BlockExpr] { ... } +# 8| getStmtList(): [StmtList] StmtList +# 8| getName(): [Name] inner +# 10| getStatement(2): [ExprStmt] ExprStmt +# 10| getExpr(): [CallExpr] inner_0(...) +# 10| getArgList(): [ArgList] ArgList +# 10| getFunction(): [PathExpr] inner_0 +# 10| getPath(): [Path] inner_0 +# 10| getSegment(): [PathSegment] inner_0 +# 10| getIdentifier(): [NameRef] inner_0 +# 11| getStatement(3): [ExprStmt] ExprStmt +# 11| getExpr(): [CallExpr] inner_1(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getFunction(): [PathExpr] inner_1 +# 11| getPath(): [Path] inner_1 +# 11| getSegment(): [PathSegment] inner_1 +# 11| getIdentifier(): [NameRef] inner_1 +# 4| getName(): [Name] foo +# 4| getVisibility(): [Visibility] Visibility +# 14| getItem(2): [Function] fn bar +# 15| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 15| getItem(0): [Function] fn bar_0 +# 16| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 16| getItem(0): [Function] fn bar_0 +# 16| getParamList(): [ParamList] ParamList +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar_0 +# 16| getVisibility(): [Visibility] Visibility +# 16| getItem(1): [Function] fn bar_0_new +# 16| getParamList(): [ParamList] ParamList +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar_0_new +# 16| getVisibility(): [Visibility] Visibility +# 16| getParamList(): [ParamList] ParamList +# 15| getAttr(0): [Attr] Attr +# 15| getMeta(): [Meta] Meta +# 15| getPath(): [Path] add_one +# 15| getSegment(): [PathSegment] add_one +# 15| getIdentifier(): [NameRef] add_one +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar_0 +# 16| getVisibility(): [Visibility] Visibility +# 15| getItem(1): [Function] fn bar_1 +# 16| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 16| getItem(0): [Function] fn bar_1 +# 16| getParamList(): [ParamList] ParamList +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar_1 +# 16| getVisibility(): [Visibility] Visibility +# 16| getItem(1): [Function] fn bar_1_new +# 16| getParamList(): [ParamList] ParamList +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar_1_new +# 16| getVisibility(): [Visibility] Visibility +# 16| getParamList(): [ParamList] ParamList +# 15| getAttr(0): [Attr] Attr +# 15| getMeta(): [Meta] Meta +# 15| getPath(): [Path] add_one +# 15| getSegment(): [PathSegment] add_one +# 15| getIdentifier(): [NameRef] add_one +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar_1 +# 16| getVisibility(): [Visibility] Visibility +# 16| getParamList(): [ParamList] ParamList +# 14| getAttr(0): [Attr] Attr +# 14| getMeta(): [Meta] Meta +# 14| getPath(): [Path] repeat +# 14| getSegment(): [PathSegment] repeat +# 14| getIdentifier(): [NameRef] repeat +# 14| getTokenTree(): [TokenTree] TokenTree +# 15| getAttr(1): [Attr] Attr +# 15| getMeta(): [Meta] Meta +# 15| getPath(): [Path] add_one +# 15| getSegment(): [PathSegment] add_one +# 15| getIdentifier(): [NameRef] add_one +# 16| getBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getName(): [Name] bar +# 16| getVisibility(): [Visibility] Visibility +# 18| getItem(3): [Function] fn baz +# 18| getAttributeMacroExpansion(): [MacroItems] MacroItems +# 19| getParamList(): [ParamList] ParamList +# 18| getAttr(0): [Attr] Attr +# 18| getMeta(): [Meta] Meta +# 18| getPath(): [Path] erase +# 18| getSegment(): [PathSegment] erase +# 18| getIdentifier(): [NameRef] erase +# 19| getBody(): [BlockExpr] { ... } +# 19| getStmtList(): [StmtList] StmtList +# 19| getName(): [Name] baz +# 19| getVisibility(): [Visibility] Visibility +# 22| getItem(4): [MacroRules] MacroRules +# 22| getName(): [Name] hello +# 22| getTokenTree(): [TokenTree] TokenTree +# 28| getItem(5): [Struct] struct S +# 28| getName(): [Name] S +# 28| getVisibility(): [Visibility] Visibility +# 30| getItem(6): [Impl] impl S { ... } +# 30| getAssocItemList(): [AssocItemList] AssocItemList +# 31| getAssocItem(0): [Function] fn bzz +# 32| getParamList(): [ParamList] ParamList +# 31| getAttr(0): [Attr] Attr +# 31| getMeta(): [Meta] Meta +# 31| getPath(): [Path] repeat +# 31| getSegment(): [PathSegment] repeat +# 31| getIdentifier(): [NameRef] repeat +# 31| getTokenTree(): [TokenTree] TokenTree +# 32| getBody(): [BlockExpr] { ... } +# 32| getStmtList(): [StmtList] StmtList +# 33| getStatement(0): [ExprStmt] ExprStmt +# 33| getExpr(): [MacroExpr] MacroExpr +# 33| getMacroCall(): [MacroCall] hello!... +# 33| getPath(): [Path] hello +# 33| getSegment(): [PathSegment] hello +# 33| getIdentifier(): [NameRef] hello +# 33| getTokenTree(): [TokenTree] TokenTree +# 33| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 33| getStatement(0): [ExprStmt] ExprStmt +# 33| getExpr(): [MacroExpr] MacroExpr +# 33| getMacroCall(): [MacroCall] println!... +# 33| getPath(): [Path] println +# 33| getSegment(): [PathSegment] println +# 33| getIdentifier(): [NameRef] println +# 33| getTokenTree(): [TokenTree] TokenTree +# 33| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 33| getTailExpr(): [BlockExpr] { ... } +# 33| getStmtList(): [StmtList] StmtList +# 33| getStatement(0): [ExprStmt] ExprStmt +# 33| getExpr(): [CallExpr] ...::_print(...) +# 33| getArgList(): [ArgList] ArgList +# 33| getArg(0): [MacroExpr] MacroExpr +# 33| getMacroCall(): [MacroCall] ...::format_args_nl!... +# 33| getPath(): [Path] ...::format_args_nl +# 33| getQualifier(): [Path] $crate +# 33| getSegment(): [PathSegment] $crate +# 33| getIdentifier(): [NameRef] $crate +# 33| getSegment(): [PathSegment] format_args_nl +# 33| getIdentifier(): [NameRef] format_args_nl +# 33| getTokenTree(): [TokenTree] TokenTree +# 33| getMacroCallExpansion(): [FormatArgsExpr] FormatArgsExpr +# 33| getTemplate(): [StringLiteralExpr] "hello!\n" +# 33| getFunction(): [PathExpr] ...::_print +# 33| getPath(): [Path] ...::_print +# 33| getQualifier(): [Path] ...::io +# 33| getQualifier(): [Path] $crate +# 33| getSegment(): [PathSegment] $crate +# 33| getIdentifier(): [NameRef] $crate +# 33| getSegment(): [PathSegment] io +# 33| getIdentifier(): [NameRef] io +# 33| getSegment(): [PathSegment] _print +# 33| getIdentifier(): [NameRef] _print +# 32| getName(): [Name] bzz +# 32| getVisibility(): [Visibility] Visibility +# 30| getSelfTy(): [PathTypeRepr] S +# 30| getPath(): [Path] S +# 30| getSegment(): [PathSegment] S +# 30| getIdentifier(): [NameRef] S +# 37| getItem(7): [MacroRules] MacroRules +# 37| getName(): [Name] def_x +# 37| getTokenTree(): [TokenTree] TokenTree +# 43| getItem(8): [Impl] impl S { ... } +# 43| getAssocItemList(): [AssocItemList] AssocItemList +# 44| getAssocItem(0): [MacroCall] def_x!... +# 44| getPath(): [Path] def_x +# 44| getSegment(): [PathSegment] def_x +# 44| getIdentifier(): [NameRef] def_x +# 44| getTokenTree(): [TokenTree] TokenTree +# 44| getMacroCallExpansion(): [MacroItems] MacroItems +# 44| getItem(0): [Function] fn x +# 44| getParamList(): [ParamList] ParamList +# 44| getBody(): [BlockExpr] { ... } +# 44| getStmtList(): [StmtList] StmtList +# 44| getName(): [Name] x +# 44| getVisibility(): [Visibility] Visibility +# 43| getSelfTy(): [PathTypeRepr] S +# 43| getPath(): [Path] S +# 43| getSegment(): [PathSegment] S +# 43| getIdentifier(): [NameRef] S +# 47| getItem(9): [MacroRules] MacroRules +# 47| getName(): [Name] my_macro +# 47| getTokenTree(): [TokenTree] TokenTree +# 52| getItem(10): [Function] fn test +# 52| getParamList(): [ParamList] ParamList +# 52| getBody(): [BlockExpr] { ... } +# 52| getStmtList(): [StmtList] StmtList +# 53| getStatement(0): [ExprStmt] ExprStmt +# 53| getExpr(): [AssignmentExpr] ... = ... +# 53| getLhs(): [UnderscoreExpr] _ +# 53| getRhs(): [MacroExpr] MacroExpr +# 53| getMacroCall(): [MacroCall] concat!... +# 53| getPath(): [Path] concat +# 53| getSegment(): [PathSegment] concat +# 53| getIdentifier(): [NameRef] concat +# 53| getTokenTree(): [TokenTree] TokenTree +# 53| getMacroCallExpansion(): [StringLiteralExpr] "xy" +# 55| getStatement(1): [ExprStmt] ExprStmt +# 55| getExpr(): [AssignmentExpr] ... = ... +# 55| getLhs(): [UnderscoreExpr] _ +# 55| getRhs(): [MacroExpr] MacroExpr +# 55| getMacroCall(): [MacroCall] my_macro!... +# 55| getPath(): [Path] my_macro +# 55| getSegment(): [PathSegment] my_macro +# 55| getIdentifier(): [NameRef] my_macro +# 55| getTokenTree(): [TokenTree] TokenTree +# 56| getMacroCallExpansion(): [MacroExpr] MacroExpr +# 56| getMacroCall(): [MacroCall] format!... +# 55| getPath(): [Path] format +# 55| getSegment(): [PathSegment] format +# 55| getIdentifier(): [NameRef] format +# 56| getTokenTree(): [TokenTree] TokenTree +# 56| getMacroCallExpansion(): [CallExpr] ...::must_use(...) +# 56| getArgList(): [ArgList] ArgList +# 56| getArg(0): [BlockExpr] { ... } +# 56| getStmtList(): [StmtList] StmtList +# 56| getStatement(0): [LetStmt] let ... = ... +# 56| getInitializer(): [CallExpr] ...::format(...) +# 56| getArgList(): [ArgList] ArgList +# 56| getArg(0): [MacroExpr] MacroExpr +# 56| getMacroCall(): [MacroCall] ...::format_args!... +# 55| getPath(): [Path] ...::format_args +# 55| getQualifier(): [Path] ...::__export +# 55| getQualifier(): [Path] $crate +# 55| getSegment(): [PathSegment] $crate +# 55| getIdentifier(): [NameRef] $crate +# 55| getSegment(): [PathSegment] __export +# 55| getIdentifier(): [NameRef] __export +# 55| getSegment(): [PathSegment] format_args +# 55| getIdentifier(): [NameRef] format_args +# 56| getTokenTree(): [TokenTree] TokenTree +# 56| getMacroCallExpansion(): [FormatArgsExpr] FormatArgsExpr +# 57| getArg(0): [FormatArgsArg] FormatArgsArg +# 57| getExpr(): [StringLiteralExpr] "hi" +# 56| getTemplate(): [ParenExpr] (...) +# 56| getExpr(): [MacroExpr] MacroExpr +# 56| getMacroCall(): [MacroCall] concat!... +# 56| getPath(): [Path] concat +# 56| getSegment(): [PathSegment] concat +# 56| getIdentifier(): [NameRef] concat +# 56| getTokenTree(): [TokenTree] TokenTree +# 56| getMacroCallExpansion(): [StringLiteralExpr] "<{}>" +# 55| getFunction(): [PathExpr] ...::format +# 55| getPath(): [Path] ...::format +# 55| getQualifier(): [Path] ...::fmt +# 55| getQualifier(): [Path] $crate +# 55| getSegment(): [PathSegment] $crate +# 55| getIdentifier(): [NameRef] $crate +# 55| getSegment(): [PathSegment] fmt +# 55| getIdentifier(): [NameRef] fmt +# 55| getSegment(): [PathSegment] format +# 55| getIdentifier(): [NameRef] format +# 55| getPat(): [IdentPat] res +# 55| getName(): [Name] res +# 55| getTailExpr(): [PathExpr,VariableAccess] res +# 55| getPath(): [Path] res +# 55| getSegment(): [PathSegment] res +# 55| getIdentifier(): [NameRef] res +# 55| getFunction(): [PathExpr] ...::must_use +# 55| getPath(): [Path] ...::must_use +# 55| getQualifier(): [Path] ...::__export +# 55| getQualifier(): [Path] $crate +# 55| getSegment(): [PathSegment] $crate +# 55| getIdentifier(): [NameRef] $crate +# 55| getSegment(): [PathSegment] __export +# 55| getIdentifier(): [NameRef] __export +# 55| getSegment(): [PathSegment] must_use +# 55| getIdentifier(): [NameRef] must_use +# 52| getName(): [Name] test +# 61| getItem(11): [MacroCall] include!... +# 61| getPath(): [Path] include +# 61| getSegment(): [PathSegment] include +# 61| getIdentifier(): [NameRef] include +# 61| getTokenTree(): [TokenTree] TokenTree +# 61| getMacroCallExpansion(): [MacroItems] MacroItems +# 61| getItem(0): [Function] fn included +# 61| getParamList(): [ParamList] ParamList +# 61| getBody(): [BlockExpr] { ... } +# 61| getStmtList(): [StmtList] StmtList +# 61| getStatement(0): [ExprStmt] ExprStmt +# 61| getExpr(): [AssignmentExpr] ... = ... +# 61| getLhs(): [UnderscoreExpr] _ +# 61| getRhs(): [MacroExpr] MacroExpr +# 61| getMacroCall(): [MacroCall] concat!... +# 61| getPath(): [Path] concat +# 61| getSegment(): [PathSegment] concat +# 61| getIdentifier(): [NameRef] concat +# 61| getTokenTree(): [TokenTree] TokenTree +# 61| getMacroCallExpansion(): [StringLiteralExpr] "Hello world!" +# 61| getName(): [Name] included +# 63| getItem(12): [Function] fn documented +# 64| getParamList(): [ParamList] ParamList +# 63| getAttr(0): [Attr] Attr +# 63| getMeta(): [Meta] Meta +# 63| getExpr(): [MacroExpr] MacroExpr +# 63| getMacroCall(): [MacroCall] include_str!... +# 63| getPath(): [Path] include_str +# 63| getSegment(): [PathSegment] include_str +# 63| getIdentifier(): [NameRef] include_str +# 63| getTokenTree(): [TokenTree] TokenTree +# 63| getMacroCallExpansion(): [StringLiteralExpr] "" +# 63| getPath(): [Path] doc +# 63| getSegment(): [PathSegment] doc +# 63| getIdentifier(): [NameRef] doc +# 64| getBody(): [BlockExpr] { ... } +# 64| getStmtList(): [StmtList] StmtList +# 64| getName(): [Name] documented +# 66| getItem(13): [MacroRules] MacroRules +# 66| getName(): [Name] my_int +# 66| getTokenTree(): [TokenTree] TokenTree +# 70| getItem(14): [Function] fn answer +# 70| getParamList(): [ParamList] ParamList +# 70| getBody(): [BlockExpr] { ... } +# 70| getStmtList(): [StmtList] StmtList +# 71| getStatement(0): [LetStmt] let ... = 42 +# 71| getInitializer(): [IntegerLiteralExpr] 42 +# 71| getPat(): [IdentPat] a +# 71| getName(): [Name] a +# 71| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr +# 71| getMacroCall(): [MacroCall] my_int!... +# 71| getPath(): [Path] my_int +# 71| getSegment(): [PathSegment] my_int +# 71| getIdentifier(): [NameRef] my_int +# 71| getTokenTree(): [TokenTree] TokenTree +# 71| getMacroCallExpansion(): [PathTypeRepr] i32 +# 71| getPath(): [Path] i32 +# 71| getSegment(): [PathSegment] i32 +# 71| getIdentifier(): [NameRef] i32 +# 72| getTailExpr(): [CastExpr] a as ... +# 72| getExpr(): [PathExpr,VariableAccess] a +# 72| getPath(): [Path] a +# 72| getSegment(): [PathSegment] a +# 72| getIdentifier(): [NameRef] a +# 72| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr +# 72| getMacroCall(): [MacroCall] my_int!... +# 72| getPath(): [Path] my_int +# 72| getSegment(): [PathSegment] my_int +# 72| getIdentifier(): [NameRef] my_int +# 72| getTokenTree(): [TokenTree] TokenTree +# 72| getMacroCallExpansion(): [PathTypeRepr] i32 +# 72| getPath(): [Path] i32 +# 72| getSegment(): [PathSegment] i32 +# 72| getIdentifier(): [NameRef] i32 +# 70| getName(): [Name] answer +# 70| getRetType(): [RetTypeRepr] RetTypeRepr +# 70| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr +# 70| getMacroCall(): [MacroCall] my_int!... +# 70| getPath(): [Path] my_int +# 70| getSegment(): [PathSegment] my_int +# 70| getIdentifier(): [NameRef] my_int +# 70| getTokenTree(): [TokenTree] TokenTree +# 70| getMacroCallExpansion(): [PathTypeRepr] i32 +# 70| getPath(): [Path] i32 +# 70| getSegment(): [PathSegment] i32 +# 70| getIdentifier(): [NameRef] i32 +# 76| getItem(15): [TypeAlias] type MyInt +# 76| getName(): [Name] MyInt +# 76| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr +# 76| getMacroCall(): [MacroCall] my_int!... +# 76| getPath(): [Path] my_int +# 76| getSegment(): [PathSegment] my_int +# 76| getIdentifier(): [NameRef] my_int +# 76| getTokenTree(): [TokenTree] TokenTree +# 76| getMacroCallExpansion(): [PathTypeRepr] i32 +# 76| getPath(): [Path] i32 +# 76| getSegment(): [PathSegment] i32 +# 76| getIdentifier(): [NameRef] i32 +# 78| getItem(16): [Struct] struct MyStruct +# 78| getFieldList(): [StructFieldList] StructFieldList +# 79| getField(0): [StructField] StructField +# 79| getName(): [Name] field +# 79| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr +# 79| getMacroCall(): [MacroCall] my_int!... +# 79| getPath(): [Path] my_int +# 79| getSegment(): [PathSegment] my_int +# 79| getIdentifier(): [NameRef] my_int +# 79| getTokenTree(): [TokenTree] TokenTree +# 79| getMacroCallExpansion(): [PathTypeRepr] i32 +# 79| getPath(): [Path] i32 +# 79| getSegment(): [PathSegment] i32 +# 79| getIdentifier(): [NameRef] i32 +# 78| getName(): [Name] MyStruct +# 44| [Comment] //... +# 56| [Comment] //... +# 63| [Comment] //... +# 70| [Comment] //... +# 71| [Comment] //... +# 72| [Comment] //... +# 76| [Comment] //... +# 79| [Comment] //... +proc_macro.rs: +# 1| [SourceFile] SourceFile +# 1| getItem(0): [Use] use ...::TokenStream +# 1| getUseTree(): [UseTree] ...::TokenStream +# 1| getPath(): [Path] ...::TokenStream +# 1| getQualifier(): [Path] proc_macro +# 1| getSegment(): [PathSegment] proc_macro +# 1| getIdentifier(): [NameRef] proc_macro +# 1| getSegment(): [PathSegment] TokenStream +# 1| getIdentifier(): [NameRef] TokenStream +# 2| getItem(1): [Use] use ...::quote +# 2| getUseTree(): [UseTree] ...::quote +# 2| getPath(): [Path] ...::quote +# 2| getQualifier(): [Path] quote +# 2| getSegment(): [PathSegment] quote +# 2| getIdentifier(): [NameRef] quote +# 2| getSegment(): [PathSegment] quote +# 2| getIdentifier(): [NameRef] quote +# 4| getItem(2): [Function] fn repeat +# 5| getParamList(): [ParamList] ParamList +# 5| getParam(0): [Param] ...: TokenStream +# 5| getTypeRepr(): [PathTypeRepr] TokenStream +# 5| getPath(): [Path] TokenStream +# 5| getSegment(): [PathSegment] TokenStream +# 5| getIdentifier(): [NameRef] TokenStream +# 5| getPat(): [IdentPat] attr +# 5| getName(): [Name] attr +# 5| getParam(1): [Param] ...: TokenStream +# 5| getTypeRepr(): [PathTypeRepr] TokenStream +# 5| getPath(): [Path] TokenStream +# 5| getSegment(): [PathSegment] TokenStream +# 5| getIdentifier(): [NameRef] TokenStream +# 5| getPat(): [IdentPat] item +# 5| getName(): [Name] item +# 4| getAttr(0): [Attr] Attr +# 4| getMeta(): [Meta] Meta +# 4| getPath(): [Path] proc_macro_attribute +# 4| getSegment(): [PathSegment] proc_macro_attribute +# 4| getIdentifier(): [NameRef] proc_macro_attribute +# 5| getBody(): [BlockExpr] { ... } +# 5| getStmtList(): [StmtList] StmtList +# 6| getStatement(0): [LetStmt] let ... = ... +# 6| getInitializer(): [MethodCallExpr] ... .unwrap() +# 6| getArgList(): [ArgList] ArgList +# 6| getIdentifier(): [NameRef] unwrap +# 6| getReceiver(): [MethodCallExpr] ... .base10_parse() +# 6| getArgList(): [ArgList] ArgList +# 6| getGenericArgList(): [GenericArgList] <...> +# 6| getGenericArg(0): [TypeArg] TypeArg +# 6| getTypeRepr(): [PathTypeRepr] usize +# 6| getPath(): [Path] usize +# 6| getSegment(): [PathSegment] usize +# 6| getIdentifier(): [NameRef] usize +# 6| getIdentifier(): [NameRef] base10_parse +# 6| getReceiver(): [MacroExpr] MacroExpr +# 6| getMacroCall(): [MacroCall] ...::parse_macro_input!... +# 6| getPath(): [Path] ...::parse_macro_input +# 6| getQualifier(): [Path] syn +# 6| getSegment(): [PathSegment] syn +# 6| getIdentifier(): [NameRef] syn +# 6| getSegment(): [PathSegment] parse_macro_input +# 6| getIdentifier(): [NameRef] parse_macro_input +# 6| getTokenTree(): [TokenTree] TokenTree +# 6| getMacroCallExpansion(): [MatchExpr] match ... { ... } +# 6| getScrutinee(): [CallExpr] ...::parse::<...>(...) +# 6| getArgList(): [ArgList] ArgList +# 6| getArg(0): [PathExpr,VariableAccess] attr +# 6| getPath(): [Path] attr +# 6| getSegment(): [PathSegment] attr +# 6| getIdentifier(): [NameRef] attr +# 6| getFunction(): [PathExpr] ...::parse::<...> +# 6| getPath(): [Path] ...::parse::<...> +# 6| getQualifier(): [Path] $crate +# 6| getSegment(): [PathSegment] $crate +# 6| getIdentifier(): [NameRef] $crate +# 6| getSegment(): [PathSegment] parse::<...> +# 6| getGenericArgList(): [GenericArgList] <...> +# 6| getGenericArg(0): [TypeArg] TypeArg +# 6| getTypeRepr(): [PathTypeRepr] ...::LitInt +# 6| getPath(): [Path] ...::LitInt +# 6| getQualifier(): [Path] syn +# 6| getSegment(): [PathSegment] syn +# 6| getIdentifier(): [NameRef] syn +# 6| getSegment(): [PathSegment] LitInt +# 6| getIdentifier(): [NameRef] LitInt +# 6| getIdentifier(): [NameRef] parse +# 6| getMatchArmList(): [MatchArmList] MatchArmList +# 6| getArm(0): [MatchArm] ... => data +# 6| getExpr(): [PathExpr,VariableAccess] data +# 6| getPath(): [Path] data +# 6| getSegment(): [PathSegment] data +# 6| getIdentifier(): [NameRef] data +# 6| getPat(): [TupleStructPat] ...::Ok(...) +# 6| getPath(): [Path] ...::Ok +# 6| getQualifier(): [Path] ...::__private +# 6| getQualifier(): [Path] $crate +# 6| getSegment(): [PathSegment] $crate +# 6| getIdentifier(): [NameRef] $crate +# 6| getSegment(): [PathSegment] __private +# 6| getIdentifier(): [NameRef] __private +# 6| getSegment(): [PathSegment] Ok +# 6| getIdentifier(): [NameRef] Ok +# 6| getField(0): [IdentPat] data +# 6| getName(): [Name] data +# 6| getArm(1): [MatchArm] ... => ... +# 6| getExpr(): [BlockExpr] { ... } +# 6| getStmtList(): [StmtList] StmtList +# 6| getStatement(0): [ExprStmt] ExprStmt +# 6| getExpr(): [ReturnExpr] return ... +# 6| getExpr(): [CallExpr] ...::from(...) +# 6| getArgList(): [ArgList] ArgList +# 6| getArg(0): [MethodCallExpr] err.to_compile_error() +# 6| getArgList(): [ArgList] ArgList +# 6| getIdentifier(): [NameRef] to_compile_error +# 6| getReceiver(): [PathExpr,VariableAccess] err +# 6| getPath(): [Path] err +# 6| getSegment(): [PathSegment] err +# 6| getIdentifier(): [NameRef] err +# 6| getFunction(): [PathExpr] ...::from +# 6| getPath(): [Path] ...::from +# 6| getQualifier(): [Path] ...::TokenStream +# 6| getQualifier(): [Path] ...::__private +# 6| getQualifier(): [Path] $crate +# 6| getSegment(): [PathSegment] $crate +# 6| getIdentifier(): [NameRef] $crate +# 6| getSegment(): [PathSegment] __private +# 6| getIdentifier(): [NameRef] __private +# 6| getSegment(): [PathSegment] TokenStream +# 6| getIdentifier(): [NameRef] TokenStream +# 6| getSegment(): [PathSegment] from +# 6| getIdentifier(): [NameRef] from +# 6| getPat(): [TupleStructPat] ...::Err(...) +# 6| getPath(): [Path] ...::Err +# 6| getQualifier(): [Path] ...::__private +# 6| getQualifier(): [Path] $crate +# 6| getSegment(): [PathSegment] $crate +# 6| getIdentifier(): [NameRef] $crate +# 6| getSegment(): [PathSegment] __private +# 6| getIdentifier(): [NameRef] __private +# 6| getSegment(): [PathSegment] Err +# 6| getIdentifier(): [NameRef] Err +# 6| getField(0): [IdentPat] err +# 6| getName(): [Name] err +# 6| getPat(): [IdentPat] number +# 6| getName(): [Name] number +# 7| getStatement(1): [LetStmt] let ... = ... +# 7| getInitializer(): [MacroExpr] MacroExpr +# 7| getMacroCall(): [MacroCall] ...::parse_macro_input!... +# 7| getPath(): [Path] ...::parse_macro_input +# 7| getQualifier(): [Path] syn +# 7| getSegment(): [PathSegment] syn +# 7| getIdentifier(): [NameRef] syn +# 7| getSegment(): [PathSegment] parse_macro_input +# 7| getIdentifier(): [NameRef] parse_macro_input +# 7| getTokenTree(): [TokenTree] TokenTree +# 7| getMacroCallExpansion(): [MatchExpr] match ... { ... } +# 7| getScrutinee(): [CallExpr] ...::parse::<...>(...) +# 7| getArgList(): [ArgList] ArgList +# 7| getArg(0): [PathExpr,VariableAccess] item +# 7| getPath(): [Path] item +# 7| getSegment(): [PathSegment] item +# 7| getIdentifier(): [NameRef] item +# 7| getFunction(): [PathExpr] ...::parse::<...> +# 7| getPath(): [Path] ...::parse::<...> +# 7| getQualifier(): [Path] $crate +# 7| getSegment(): [PathSegment] $crate +# 7| getIdentifier(): [NameRef] $crate +# 7| getSegment(): [PathSegment] parse::<...> +# 7| getGenericArgList(): [GenericArgList] <...> +# 7| getGenericArg(0): [TypeArg] TypeArg +# 7| getTypeRepr(): [PathTypeRepr] ...::ItemFn +# 7| getPath(): [Path] ...::ItemFn +# 7| getQualifier(): [Path] syn +# 7| getSegment(): [PathSegment] syn +# 7| getIdentifier(): [NameRef] syn +# 7| getSegment(): [PathSegment] ItemFn +# 7| getIdentifier(): [NameRef] ItemFn +# 7| getIdentifier(): [NameRef] parse +# 7| getMatchArmList(): [MatchArmList] MatchArmList +# 7| getArm(0): [MatchArm] ... => data +# 7| getExpr(): [PathExpr,VariableAccess] data +# 7| getPath(): [Path] data +# 7| getSegment(): [PathSegment] data +# 7| getIdentifier(): [NameRef] data +# 7| getPat(): [TupleStructPat] ...::Ok(...) +# 7| getPath(): [Path] ...::Ok +# 7| getQualifier(): [Path] ...::__private +# 7| getQualifier(): [Path] $crate +# 7| getSegment(): [PathSegment] $crate +# 7| getIdentifier(): [NameRef] $crate +# 7| getSegment(): [PathSegment] __private +# 7| getIdentifier(): [NameRef] __private +# 7| getSegment(): [PathSegment] Ok +# 7| getIdentifier(): [NameRef] Ok +# 7| getField(0): [IdentPat] data +# 7| getName(): [Name] data +# 7| getArm(1): [MatchArm] ... => ... +# 7| getExpr(): [BlockExpr] { ... } +# 7| getStmtList(): [StmtList] StmtList +# 7| getStatement(0): [ExprStmt] ExprStmt +# 7| getExpr(): [ReturnExpr] return ... +# 7| getExpr(): [CallExpr] ...::from(...) +# 7| getArgList(): [ArgList] ArgList +# 7| getArg(0): [MethodCallExpr] err.to_compile_error() +# 7| getArgList(): [ArgList] ArgList +# 7| getIdentifier(): [NameRef] to_compile_error +# 7| getReceiver(): [PathExpr,VariableAccess] err +# 7| getPath(): [Path] err +# 7| getSegment(): [PathSegment] err +# 7| getIdentifier(): [NameRef] err +# 7| getFunction(): [PathExpr] ...::from +# 7| getPath(): [Path] ...::from +# 7| getQualifier(): [Path] ...::TokenStream +# 7| getQualifier(): [Path] ...::__private +# 7| getQualifier(): [Path] $crate +# 7| getSegment(): [PathSegment] $crate +# 7| getIdentifier(): [NameRef] $crate +# 7| getSegment(): [PathSegment] __private +# 7| getIdentifier(): [NameRef] __private +# 7| getSegment(): [PathSegment] TokenStream +# 7| getIdentifier(): [NameRef] TokenStream +# 7| getSegment(): [PathSegment] from +# 7| getIdentifier(): [NameRef] from +# 7| getPat(): [TupleStructPat] ...::Err(...) +# 7| getPath(): [Path] ...::Err +# 7| getQualifier(): [Path] ...::__private +# 7| getQualifier(): [Path] $crate +# 7| getSegment(): [PathSegment] $crate +# 7| getIdentifier(): [NameRef] $crate +# 7| getSegment(): [PathSegment] __private +# 7| getIdentifier(): [NameRef] __private +# 7| getSegment(): [PathSegment] Err +# 7| getIdentifier(): [NameRef] Err +# 7| getField(0): [IdentPat] err +# 7| getName(): [Name] err +# 7| getPat(): [IdentPat] ast +# 7| getName(): [Name] ast +# 8| getStatement(2): [LetStmt] let ... = ... +# 8| getInitializer(): [MethodCallExpr] ... .collect() +# 14| getArgList(): [ArgList] ArgList +# 14| getGenericArgList(): [GenericArgList] <...> +# 14| getGenericArg(0): [TypeArg] TypeArg +# 14| getTypeRepr(): [PathTypeRepr] Vec::<...> +# 14| getPath(): [Path] Vec::<...> +# 14| getSegment(): [PathSegment] Vec::<...> +# 14| getGenericArgList(): [GenericArgList] <...> +# 14| getGenericArg(0): [TypeArg] TypeArg +# 14| getTypeRepr(): [InferTypeRepr] _ +# 14| getIdentifier(): [NameRef] Vec +# 14| getIdentifier(): [NameRef] collect +# 8| getReceiver(): [MethodCallExpr] ... .map(...) +# 9| getArgList(): [ArgList] ArgList +# 9| getArg(0): [ClosureExpr] |...| ... +# 9| getParamList(): [ParamList] ParamList +# 9| getParam(0): [Param] ... +# 9| getPat(): [IdentPat] i +# 9| getName(): [Name] i +# 9| getBody(): [BlockExpr] { ... } +# 9| getStmtList(): [StmtList] StmtList +# 10| getStatement(0): [LetStmt] let ... = ... +# 10| getInitializer(): [MethodCallExpr] ast.clone() +# 10| getArgList(): [ArgList] ArgList +# 10| getIdentifier(): [NameRef] clone +# 10| getReceiver(): [PathExpr,VariableAccess] ast +# 10| getPath(): [Path] ast +# 10| getSegment(): [PathSegment] ast +# 10| getIdentifier(): [NameRef] ast +# 10| getPat(): [IdentPat] mut new_ast +# 10| getName(): [Name] new_ast +# 11| getStatement(1): [ExprStmt] ExprStmt +# 11| getExpr(): [AssignmentExpr] ... = ... +# 11| getLhs(): [FieldExpr] ... .ident +# 11| getContainer(): [FieldExpr] new_ast.sig +# 11| getContainer(): [PathExpr,VariableAccess] new_ast +# 11| getPath(): [Path] new_ast +# 11| getSegment(): [PathSegment] new_ast +# 11| getIdentifier(): [NameRef] new_ast +# 11| getIdentifier(): [NameRef] sig +# 11| getIdentifier(): [NameRef] ident +# 11| getRhs(): [CallExpr] ...::new(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getArg(0): [RefExpr] &... +# 11| getExpr(): [MacroExpr] MacroExpr +# 11| getMacroCall(): [MacroCall] format!... +# 11| getPath(): [Path] format +# 11| getSegment(): [PathSegment] format +# 11| getIdentifier(): [NameRef] format +# 11| getTokenTree(): [TokenTree] TokenTree +# 11| getMacroCallExpansion(): [CallExpr] ...::must_use(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getArg(0): [BlockExpr] { ... } +# 11| getStmtList(): [StmtList] StmtList +# 11| getStatement(0): [LetStmt] let ... = ... +# 11| getInitializer(): [CallExpr] ...::format(...) +# 11| getArgList(): [ArgList] ArgList +# 11| getArg(0): [MacroExpr] MacroExpr +# 11| getMacroCall(): [MacroCall] ...::format_args!... +# 11| getPath(): [Path] ...::format_args +# 11| getQualifier(): [Path] ...::__export +# 11| getQualifier(): [Path] $crate +# 11| getSegment(): [PathSegment] $crate +# 11| getIdentifier(): [NameRef] $crate +# 11| getSegment(): [PathSegment] __export +# 11| getIdentifier(): [NameRef] __export +# 11| getSegment(): [PathSegment] format_args +# 11| getIdentifier(): [NameRef] format_args +# 11| getTokenTree(): [TokenTree] TokenTree +# 11| getMacroCallExpansion(): [FormatArgsExpr] FormatArgsExpr +# 11| getArg(0): [FormatArgsArg] FormatArgsArg +# 11| getExpr(): [FieldExpr] ... .ident +# 11| getContainer(): [FieldExpr] ast.sig +# 11| getContainer(): [PathExpr,VariableAccess] ast +# 11| getPath(): [Path] ast +# 11| getSegment(): [PathSegment] ast +# 11| getIdentifier(): [NameRef] ast +# 11| getIdentifier(): [NameRef] sig +# 11| getIdentifier(): [NameRef] ident +# 11| getArg(1): [FormatArgsArg] FormatArgsArg +# 11| getExpr(): [PathExpr,VariableAccess] i +# 11| getPath(): [Path] i +# 11| getSegment(): [PathSegment] i +# 11| getIdentifier(): [NameRef] i +# 11| getTemplate(): [StringLiteralExpr] "{}_{}" +# 11| getFormat(0): [Format] {} +# 11| getFormat(1): [Format] {} +# 11| getFunction(): [PathExpr] ...::format +# 11| getPath(): [Path] ...::format +# 11| getQualifier(): [Path] ...::fmt +# 11| getQualifier(): [Path] $crate +# 11| getSegment(): [PathSegment] $crate +# 11| getIdentifier(): [NameRef] $crate +# 11| getSegment(): [PathSegment] fmt +# 11| getIdentifier(): [NameRef] fmt +# 11| getSegment(): [PathSegment] format +# 11| getIdentifier(): [NameRef] format +# 11| getPat(): [IdentPat] res +# 11| getName(): [Name] res +# 11| getTailExpr(): [PathExpr,VariableAccess] res +# 11| getPath(): [Path] res +# 11| getSegment(): [PathSegment] res +# 11| getIdentifier(): [NameRef] res +# 11| getFunction(): [PathExpr] ...::must_use +# 11| getPath(): [Path] ...::must_use +# 11| getQualifier(): [Path] ...::__export +# 11| getQualifier(): [Path] $crate +# 11| getSegment(): [PathSegment] $crate +# 11| getIdentifier(): [NameRef] $crate +# 11| getSegment(): [PathSegment] __export +# 11| getIdentifier(): [NameRef] __export +# 11| getSegment(): [PathSegment] must_use +# 11| getIdentifier(): [NameRef] must_use +# 11| getArg(1): [MethodCallExpr] ... .span() +# 11| getArgList(): [ArgList] ArgList +# 11| getIdentifier(): [NameRef] span +# 11| getReceiver(): [FieldExpr] ... .ident +# 11| getContainer(): [FieldExpr] ast.sig +# 11| getContainer(): [PathExpr,VariableAccess] ast +# 11| getPath(): [Path] ast +# 11| getSegment(): [PathSegment] ast +# 11| getIdentifier(): [NameRef] ast +# 11| getIdentifier(): [NameRef] sig +# 11| getIdentifier(): [NameRef] ident +# 11| getFunction(): [PathExpr] ...::new +# 11| getPath(): [Path] ...::new +# 11| getQualifier(): [Path] ...::Ident +# 11| getQualifier(): [Path] syn +# 11| getSegment(): [PathSegment] syn +# 11| getIdentifier(): [NameRef] syn +# 11| getSegment(): [PathSegment] Ident +# 11| getIdentifier(): [NameRef] Ident +# 11| getSegment(): [PathSegment] new +# 11| getIdentifier(): [NameRef] new +# 12| getTailExpr(): [PathExpr,VariableAccess] new_ast +# 12| getPath(): [Path] new_ast +# 12| getSegment(): [PathSegment] new_ast +# 12| getIdentifier(): [NameRef] new_ast +# 9| getIdentifier(): [NameRef] map +# 8| getReceiver(): [ParenExpr] (...) +# 8| getExpr(): [RangeExpr] 0..number +# 8| getEnd(): [PathExpr,VariableAccess] number +# 8| getPath(): [Path] number +# 8| getSegment(): [PathSegment] number +# 8| getIdentifier(): [NameRef] number +# 8| getStart(): [IntegerLiteralExpr] 0 +# 8| getPat(): [IdentPat] items +# 8| getName(): [Name] items +# 15| getTailExpr(): [MethodCallExpr] ... .into() +# 17| getArgList(): [ArgList] ArgList +# 17| getIdentifier(): [NameRef] into +# 15| getReceiver(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] quote!... +# 15| getPath(): [Path] quote +# 15| getSegment(): [PathSegment] quote +# 15| getIdentifier(): [NameRef] quote +# 15| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 15| getStatement(0): [LetStmt] let ... = ... +# 15| getInitializer(): [CallExpr] ...::new(...) +# 15| getArgList(): [ArgList] ArgList +# 15| getFunction(): [PathExpr] ...::new +# 15| getPath(): [Path] ...::new +# 15| getQualifier(): [Path] ...::TokenStream +# 15| getQualifier(): [Path] ...::__private +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] __private +# 15| getIdentifier(): [NameRef] __private +# 15| getSegment(): [PathSegment] TokenStream +# 15| getIdentifier(): [NameRef] TokenStream +# 15| getSegment(): [PathSegment] new +# 15| getIdentifier(): [NameRef] new +# 15| getPat(): [IdentPat] mut _s +# 15| getName(): [Name] _s +# 16| getStatement(1): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_each_token!... +# 15| getPath(): [Path] ...::quote_each_token +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_each_token +# 15| getIdentifier(): [NameRef] quote_each_token +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_tokens_with_context!... +# 15| getPath(): [Path] ...::quote_tokens_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_tokens_with_context +# 15| getIdentifier(): [NameRef] quote_tokens_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(1): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(2): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(3): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 15| getStatement(0): [Use] use ...::ext::* +# 15| getUseTree(): [UseTree] ...::ext::* +# 15| getPath(): [Path] ...::ext +# 15| getQualifier(): [Path] ...::__private +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] __private +# 15| getIdentifier(): [NameRef] __private +# 15| getSegment(): [PathSegment] ext +# 15| getIdentifier(): [NameRef] ext +# 15| getStatement(1): [LetStmt] let ... = ...::ThereIsNoIteratorInRepetition +# 15| getInitializer(): [PathExpr] ...::ThereIsNoIteratorInRepetition +# 15| getPath(): [Path] ...::ThereIsNoIteratorInRepetition +# 15| getQualifier(): [Path] ...::__private +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] __private +# 15| getIdentifier(): [NameRef] __private +# 15| getSegment(): [PathSegment] ThereIsNoIteratorInRepetition +# 15| getIdentifier(): [NameRef] ThereIsNoIteratorInRepetition +# 15| getPat(): [IdentPat] has_iter +# 15| getName(): [Name] has_iter +# 16| getStatement(2): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_names!... +# 15| getPath(): [Path] ...::pounded_var_names +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names +# 15| getIdentifier(): [NameRef] pounded_var_names +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_names_with_context!... +# 15| getPath(): [Path] ...::pounded_var_names_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names_with_context +# 15| getIdentifier(): [NameRef] pounded_var_names_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getStatement(0): [ExprStmt] ExprStmt +# 15| getExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_names!... +# 15| getPath(): [Path] ...::pounded_var_names +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names +# 15| getIdentifier(): [NameRef] pounded_var_names +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_names_with_context!... +# 15| getPath(): [Path] ...::pounded_var_names_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names_with_context +# 15| getIdentifier(): [NameRef] pounded_var_names_with_context +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(1): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(2): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_bind_into_iter!... +# 15| getPath(): [Path] ...::quote_bind_into_iter +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_bind_into_iter +# 15| getIdentifier(): [NameRef] quote_bind_into_iter +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [LetStmt] let ... = ... +# 15| getAttr(0): [Attr] Attr +# 15| getMeta(): [Meta] Meta +# 15| getPath(): [Path] allow +# 15| getSegment(): [PathSegment] allow +# 15| getIdentifier(): [NameRef] allow +# 15| getTokenTree(): [TokenTree] TokenTree +# 16| getInitializer(): [MethodCallExpr] items.quote_into_iter() +# 15| getArgList(): [ArgList] ArgList +# 15| getIdentifier(): [NameRef] quote_into_iter +# 16| getReceiver(): [PathExpr,VariableAccess] items +# 16| getPath(): [Path] items +# 16| getSegment(): [PathSegment] items +# 16| getIdentifier(): [NameRef] items +# 16| getPat(): [TuplePat] TuplePat +# 16| getField(0): [IdentPat] mut items +# 16| getName(): [Name] items +# 15| getField(1): [IdentPat] i +# 15| getName(): [Name] i +# 15| getStatement(1): [LetStmt] let ... = ... +# 15| getInitializer(): [BinaryExpr] ... | ... +# 15| getLhs(): [PathExpr,VariableAccess] has_iter +# 15| getPath(): [Path] has_iter +# 15| getSegment(): [PathSegment] has_iter +# 15| getIdentifier(): [NameRef] has_iter +# 15| getRhs(): [PathExpr,VariableAccess] i +# 15| getPath(): [Path] i +# 15| getSegment(): [PathSegment] i +# 15| getIdentifier(): [NameRef] i +# 15| getPat(): [IdentPat] has_iter +# 15| getName(): [Name] has_iter +# 15| getStatement(3): [LetStmt] let _ = has_iter +# 15| getInitializer(): [PathExpr,VariableAccess] has_iter +# 15| getPath(): [Path] has_iter +# 15| getSegment(): [PathSegment] has_iter +# 15| getIdentifier(): [NameRef] has_iter +# 15| getPat(): [WildcardPat] _ +# 15| getTypeRepr(): [PathTypeRepr] ...::HasIterator +# 15| getPath(): [Path] ...::HasIterator +# 15| getQualifier(): [Path] ...::__private +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] __private +# 15| getIdentifier(): [NameRef] __private +# 15| getSegment(): [PathSegment] HasIterator +# 15| getIdentifier(): [NameRef] HasIterator +# 16| getTailExpr(): [WhileExpr] while true { ... } +# 16| getLoopBody(): [BlockExpr] { ... } +# 16| getStmtList(): [StmtList] StmtList +# 16| getStatement(0): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_names!... +# 15| getPath(): [Path] ...::pounded_var_names +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names +# 15| getIdentifier(): [NameRef] pounded_var_names +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_names_with_context!... +# 15| getPath(): [Path] ...::pounded_var_names_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names_with_context +# 15| getIdentifier(): [NameRef] pounded_var_names_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getStatement(0): [ExprStmt] ExprStmt +# 15| getExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_names!... +# 15| getPath(): [Path] ...::pounded_var_names +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names +# 15| getIdentifier(): [NameRef] pounded_var_names +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_names_with_context!... +# 15| getPath(): [Path] ...::pounded_var_names_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_names_with_context +# 15| getIdentifier(): [NameRef] pounded_var_names_with_context +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [MacroExpr] MacroExpr +# 15| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 15| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(1): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(2): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::pounded_var_with_context!... +# 15| getPath(): [Path] ...::pounded_var_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] pounded_var_with_context +# 15| getIdentifier(): [NameRef] pounded_var_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_bind_next_or_break!... +# 15| getPath(): [Path] ...::quote_bind_next_or_break +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_bind_next_or_break +# 15| getIdentifier(): [NameRef] quote_bind_next_or_break +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [LetStmt] let ... = ... +# 16| getInitializer(): [MatchExpr] match ... { ... } +# 16| getScrutinee(): [MethodCallExpr] items.next() +# 15| getArgList(): [ArgList] ArgList +# 15| getIdentifier(): [NameRef] next +# 16| getReceiver(): [PathExpr,VariableAccess] items +# 16| getPath(): [Path] items +# 16| getSegment(): [PathSegment] items +# 16| getIdentifier(): [NameRef] items +# 15| getMatchArmList(): [MatchArmList] MatchArmList +# 15| getArm(0): [MatchArm] ... => ... +# 15| getExpr(): [CallExpr] ...::RepInterp(...) +# 15| getArgList(): [ArgList] ArgList +# 15| getArg(0): [PathExpr] _x +# 15| getPath(): [Path] _x +# 15| getSegment(): [PathSegment] _x +# 15| getIdentifier(): [NameRef] _x +# 15| getFunction(): [PathExpr] ...::RepInterp +# 15| getPath(): [Path] ...::RepInterp +# 15| getQualifier(): [Path] ...::__private +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] __private +# 15| getIdentifier(): [NameRef] __private +# 15| getSegment(): [PathSegment] RepInterp +# 15| getIdentifier(): [NameRef] RepInterp +# 15| getPat(): [TupleStructPat] Some(...) +# 15| getPath(): [Path] Some +# 15| getSegment(): [PathSegment] Some +# 15| getIdentifier(): [NameRef] Some +# 15| getField(0): [IdentPat] _x +# 15| getName(): [Name] _x +# 15| getArm(1): [MatchArm] ... => ... +# 15| getExpr(): [BreakExpr] break +# 15| getPat(): [IdentPat] None +# 15| getName(): [Name] None +# 16| getPat(): [IdentPat] items +# 16| getName(): [Name] items +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_each_token!... +# 15| getPath(): [Path] ...::quote_each_token +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_each_token +# 15| getIdentifier(): [NameRef] quote_each_token +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_tokens_with_context!... +# 15| getPath(): [Path] ...::quote_tokens_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_tokens_with_context +# 15| getIdentifier(): [NameRef] quote_tokens_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getTailExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(1): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(2): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(3): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 16| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(0): [ExprStmt] ExprStmt +# 16| getExpr(): [CallExpr] ...::to_tokens(...) +# 16| getArgList(): [ArgList] ArgList +# 16| getArg(0): [RefExpr] &items +# 16| getExpr(): [PathExpr,VariableAccess] items +# 16| getPath(): [Path] items +# 16| getSegment(): [PathSegment] items +# 16| getIdentifier(): [NameRef] items +# 15| getArg(1): [RefExpr] &mut _s +# 15| getExpr(): [PathExpr] _s +# 15| getPath(): [Path] _s +# 15| getSegment(): [PathSegment] _s +# 15| getIdentifier(): [NameRef] _s +# 15| getFunction(): [PathExpr] ...::to_tokens +# 15| getPath(): [Path] ...::to_tokens +# 15| getQualifier(): [Path] ...::ToTokens +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] ToTokens +# 15| getIdentifier(): [NameRef] ToTokens +# 15| getSegment(): [PathSegment] to_tokens +# 15| getIdentifier(): [NameRef] to_tokens +# 16| getStatement(4): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(5): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(6): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getCondition(): [BooleanLiteralExpr] true +# 16| getStatement(4): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(5): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(6): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 16| getStatement(7): [ExprStmt] ExprStmt +# 16| getExpr(): [MacroExpr] MacroExpr +# 16| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 15| getPath(): [Path] ...::quote_token_with_context +# 15| getQualifier(): [Path] $crate +# 15| getSegment(): [PathSegment] $crate +# 15| getIdentifier(): [NameRef] $crate +# 15| getSegment(): [PathSegment] quote_token_with_context +# 15| getIdentifier(): [NameRef] quote_token_with_context +# 16| getTokenTree(): [TokenTree] TokenTree +# 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 15| getTailExpr(): [PathExpr] _s +# 15| getPath(): [Path] _s +# 15| getSegment(): [PathSegment] _s +# 15| getIdentifier(): [NameRef] _s +# 5| getName(): [Name] repeat +# 5| getRetType(): [RetTypeRepr] RetTypeRepr +# 5| getTypeRepr(): [PathTypeRepr] TokenStream +# 5| getPath(): [Path] TokenStream +# 5| getSegment(): [PathSegment] TokenStream +# 5| getIdentifier(): [NameRef] TokenStream +# 5| getVisibility(): [Visibility] Visibility +# 20| getItem(3): [Function] fn add_one +# 21| getParamList(): [ParamList] ParamList +# 21| getParam(0): [Param] ...: TokenStream +# 21| getTypeRepr(): [PathTypeRepr] TokenStream +# 21| getPath(): [Path] TokenStream +# 21| getSegment(): [PathSegment] TokenStream +# 21| getIdentifier(): [NameRef] TokenStream +# 21| getPat(): [IdentPat] _attr +# 21| getName(): [Name] _attr +# 21| getParam(1): [Param] ...: TokenStream +# 21| getTypeRepr(): [PathTypeRepr] TokenStream +# 21| getPath(): [Path] TokenStream +# 21| getSegment(): [PathSegment] TokenStream +# 21| getIdentifier(): [NameRef] TokenStream +# 21| getPat(): [IdentPat] item +# 21| getName(): [Name] item +# 20| getAttr(0): [Attr] Attr +# 20| getMeta(): [Meta] Meta +# 20| getPath(): [Path] proc_macro_attribute +# 20| getSegment(): [PathSegment] proc_macro_attribute +# 20| getIdentifier(): [NameRef] proc_macro_attribute +# 21| getBody(): [BlockExpr] { ... } +# 21| getStmtList(): [StmtList] StmtList +# 22| getStatement(0): [LetStmt] let ... = ... +# 22| getInitializer(): [MacroExpr] MacroExpr +# 22| getMacroCall(): [MacroCall] ...::parse_macro_input!... +# 22| getPath(): [Path] ...::parse_macro_input +# 22| getQualifier(): [Path] syn +# 22| getSegment(): [PathSegment] syn +# 22| getIdentifier(): [NameRef] syn +# 22| getSegment(): [PathSegment] parse_macro_input +# 22| getIdentifier(): [NameRef] parse_macro_input +# 22| getTokenTree(): [TokenTree] TokenTree +# 22| getMacroCallExpansion(): [MatchExpr] match ... { ... } +# 22| getScrutinee(): [CallExpr] ...::parse::<...>(...) +# 22| getArgList(): [ArgList] ArgList +# 22| getArg(0): [PathExpr,VariableAccess] item +# 22| getPath(): [Path] item +# 22| getSegment(): [PathSegment] item +# 22| getIdentifier(): [NameRef] item +# 22| getFunction(): [PathExpr] ...::parse::<...> +# 22| getPath(): [Path] ...::parse::<...> +# 22| getQualifier(): [Path] $crate +# 22| getSegment(): [PathSegment] $crate +# 22| getIdentifier(): [NameRef] $crate +# 22| getSegment(): [PathSegment] parse::<...> +# 22| getGenericArgList(): [GenericArgList] <...> +# 22| getGenericArg(0): [TypeArg] TypeArg +# 22| getTypeRepr(): [PathTypeRepr] ...::ItemFn +# 22| getPath(): [Path] ...::ItemFn +# 22| getQualifier(): [Path] syn +# 22| getSegment(): [PathSegment] syn +# 22| getIdentifier(): [NameRef] syn +# 22| getSegment(): [PathSegment] ItemFn +# 22| getIdentifier(): [NameRef] ItemFn +# 22| getIdentifier(): [NameRef] parse +# 22| getMatchArmList(): [MatchArmList] MatchArmList +# 22| getArm(0): [MatchArm] ... => data +# 22| getExpr(): [PathExpr,VariableAccess] data +# 22| getPath(): [Path] data +# 22| getSegment(): [PathSegment] data +# 22| getIdentifier(): [NameRef] data +# 22| getPat(): [TupleStructPat] ...::Ok(...) +# 22| getPath(): [Path] ...::Ok +# 22| getQualifier(): [Path] ...::__private +# 22| getQualifier(): [Path] $crate +# 22| getSegment(): [PathSegment] $crate +# 22| getIdentifier(): [NameRef] $crate +# 22| getSegment(): [PathSegment] __private +# 22| getIdentifier(): [NameRef] __private +# 22| getSegment(): [PathSegment] Ok +# 22| getIdentifier(): [NameRef] Ok +# 22| getField(0): [IdentPat] data +# 22| getName(): [Name] data +# 22| getArm(1): [MatchArm] ... => ... +# 22| getExpr(): [BlockExpr] { ... } +# 22| getStmtList(): [StmtList] StmtList +# 22| getStatement(0): [ExprStmt] ExprStmt +# 22| getExpr(): [ReturnExpr] return ... +# 22| getExpr(): [CallExpr] ...::from(...) +# 22| getArgList(): [ArgList] ArgList +# 22| getArg(0): [MethodCallExpr] err.to_compile_error() +# 22| getArgList(): [ArgList] ArgList +# 22| getIdentifier(): [NameRef] to_compile_error +# 22| getReceiver(): [PathExpr,VariableAccess] err +# 22| getPath(): [Path] err +# 22| getSegment(): [PathSegment] err +# 22| getIdentifier(): [NameRef] err +# 22| getFunction(): [PathExpr] ...::from +# 22| getPath(): [Path] ...::from +# 22| getQualifier(): [Path] ...::TokenStream +# 22| getQualifier(): [Path] ...::__private +# 22| getQualifier(): [Path] $crate +# 22| getSegment(): [PathSegment] $crate +# 22| getIdentifier(): [NameRef] $crate +# 22| getSegment(): [PathSegment] __private +# 22| getIdentifier(): [NameRef] __private +# 22| getSegment(): [PathSegment] TokenStream +# 22| getIdentifier(): [NameRef] TokenStream +# 22| getSegment(): [PathSegment] from +# 22| getIdentifier(): [NameRef] from +# 22| getPat(): [TupleStructPat] ...::Err(...) +# 22| getPath(): [Path] ...::Err +# 22| getQualifier(): [Path] ...::__private +# 22| getQualifier(): [Path] $crate +# 22| getSegment(): [PathSegment] $crate +# 22| getIdentifier(): [NameRef] $crate +# 22| getSegment(): [PathSegment] __private +# 22| getIdentifier(): [NameRef] __private +# 22| getSegment(): [PathSegment] Err +# 22| getIdentifier(): [NameRef] Err +# 22| getField(0): [IdentPat] err +# 22| getName(): [Name] err +# 22| getPat(): [IdentPat] ast +# 22| getName(): [Name] ast +# 23| getStatement(1): [LetStmt] let ... = ... +# 23| getInitializer(): [MethodCallExpr] ast.clone() +# 23| getArgList(): [ArgList] ArgList +# 23| getIdentifier(): [NameRef] clone +# 23| getReceiver(): [PathExpr,VariableAccess] ast +# 23| getPath(): [Path] ast +# 23| getSegment(): [PathSegment] ast +# 23| getIdentifier(): [NameRef] ast +# 23| getPat(): [IdentPat] mut new_ast +# 23| getName(): [Name] new_ast +# 24| getStatement(2): [ExprStmt] ExprStmt +# 24| getExpr(): [AssignmentExpr] ... = ... +# 24| getLhs(): [FieldExpr] ... .ident +# 24| getContainer(): [FieldExpr] new_ast.sig +# 24| getContainer(): [PathExpr,VariableAccess] new_ast +# 24| getPath(): [Path] new_ast +# 24| getSegment(): [PathSegment] new_ast +# 24| getIdentifier(): [NameRef] new_ast +# 24| getIdentifier(): [NameRef] sig +# 24| getIdentifier(): [NameRef] ident +# 24| getRhs(): [CallExpr] ...::new(...) +# 24| getArgList(): [ArgList] ArgList +# 24| getArg(0): [RefExpr] &... +# 24| getExpr(): [MacroExpr] MacroExpr +# 24| getMacroCall(): [MacroCall] format!... +# 24| getPath(): [Path] format +# 24| getSegment(): [PathSegment] format +# 24| getIdentifier(): [NameRef] format +# 24| getTokenTree(): [TokenTree] TokenTree +# 24| getMacroCallExpansion(): [CallExpr] ...::must_use(...) +# 24| getArgList(): [ArgList] ArgList +# 24| getArg(0): [BlockExpr] { ... } +# 24| getStmtList(): [StmtList] StmtList +# 24| getStatement(0): [LetStmt] let ... = ... +# 24| getInitializer(): [CallExpr] ...::format(...) +# 24| getArgList(): [ArgList] ArgList +# 24| getArg(0): [MacroExpr] MacroExpr +# 24| getMacroCall(): [MacroCall] ...::format_args!... +# 24| getPath(): [Path] ...::format_args +# 24| getQualifier(): [Path] ...::__export +# 24| getQualifier(): [Path] $crate +# 24| getSegment(): [PathSegment] $crate +# 24| getIdentifier(): [NameRef] $crate +# 24| getSegment(): [PathSegment] __export +# 24| getIdentifier(): [NameRef] __export +# 24| getSegment(): [PathSegment] format_args +# 24| getIdentifier(): [NameRef] format_args +# 24| getTokenTree(): [TokenTree] TokenTree +# 24| getMacroCallExpansion(): [FormatArgsExpr] FormatArgsExpr +# 24| getArg(0): [FormatArgsArg] FormatArgsArg +# 24| getExpr(): [FieldExpr] ... .ident +# 24| getContainer(): [FieldExpr] ast.sig +# 24| getContainer(): [PathExpr,VariableAccess] ast +# 24| getPath(): [Path] ast +# 24| getSegment(): [PathSegment] ast +# 24| getIdentifier(): [NameRef] ast +# 24| getIdentifier(): [NameRef] sig +# 24| getIdentifier(): [NameRef] ident +# 24| getTemplate(): [StringLiteralExpr] "{}_new" +# 24| getFormat(0): [Format] {} +# 24| getFunction(): [PathExpr] ...::format +# 24| getPath(): [Path] ...::format +# 24| getQualifier(): [Path] ...::fmt +# 24| getQualifier(): [Path] $crate +# 24| getSegment(): [PathSegment] $crate +# 24| getIdentifier(): [NameRef] $crate +# 24| getSegment(): [PathSegment] fmt +# 24| getIdentifier(): [NameRef] fmt +# 24| getSegment(): [PathSegment] format +# 24| getIdentifier(): [NameRef] format +# 24| getPat(): [IdentPat] res +# 24| getName(): [Name] res +# 24| getTailExpr(): [PathExpr,VariableAccess] res +# 24| getPath(): [Path] res +# 24| getSegment(): [PathSegment] res +# 24| getIdentifier(): [NameRef] res +# 24| getFunction(): [PathExpr] ...::must_use +# 24| getPath(): [Path] ...::must_use +# 24| getQualifier(): [Path] ...::__export +# 24| getQualifier(): [Path] $crate +# 24| getSegment(): [PathSegment] $crate +# 24| getIdentifier(): [NameRef] $crate +# 24| getSegment(): [PathSegment] __export +# 24| getIdentifier(): [NameRef] __export +# 24| getSegment(): [PathSegment] must_use +# 24| getIdentifier(): [NameRef] must_use +# 24| getArg(1): [MethodCallExpr] ... .span() +# 24| getArgList(): [ArgList] ArgList +# 24| getIdentifier(): [NameRef] span +# 24| getReceiver(): [FieldExpr] ... .ident +# 24| getContainer(): [FieldExpr] ast.sig +# 24| getContainer(): [PathExpr,VariableAccess] ast +# 24| getPath(): [Path] ast +# 24| getSegment(): [PathSegment] ast +# 24| getIdentifier(): [NameRef] ast +# 24| getIdentifier(): [NameRef] sig +# 24| getIdentifier(): [NameRef] ident +# 24| getFunction(): [PathExpr] ...::new +# 24| getPath(): [Path] ...::new +# 24| getQualifier(): [Path] ...::Ident +# 24| getQualifier(): [Path] syn +# 24| getSegment(): [PathSegment] syn +# 24| getIdentifier(): [NameRef] syn +# 24| getSegment(): [PathSegment] Ident +# 24| getIdentifier(): [NameRef] Ident +# 24| getSegment(): [PathSegment] new +# 24| getIdentifier(): [NameRef] new +# 25| getTailExpr(): [MethodCallExpr] ... .into() +# 28| getArgList(): [ArgList] ArgList +# 28| getIdentifier(): [NameRef] into +# 25| getReceiver(): [MacroExpr] MacroExpr +# 25| getMacroCall(): [MacroCall] quote!... +# 25| getPath(): [Path] quote +# 25| getSegment(): [PathSegment] quote +# 25| getIdentifier(): [NameRef] quote +# 25| getTokenTree(): [TokenTree] TokenTree +# 26| getMacroCallExpansion(): [BlockExpr] { ... } +# 26| getStmtList(): [StmtList] StmtList +# 25| getStatement(0): [LetStmt] let ... = ... +# 25| getInitializer(): [CallExpr] ...::new(...) +# 25| getArgList(): [ArgList] ArgList +# 25| getFunction(): [PathExpr] ...::new +# 25| getPath(): [Path] ...::new +# 25| getQualifier(): [Path] ...::TokenStream +# 25| getQualifier(): [Path] ...::__private +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] __private +# 25| getIdentifier(): [NameRef] __private +# 25| getSegment(): [PathSegment] TokenStream +# 25| getIdentifier(): [NameRef] TokenStream +# 25| getSegment(): [PathSegment] new +# 25| getIdentifier(): [NameRef] new +# 25| getPat(): [IdentPat] mut _s +# 25| getName(): [Name] _s +# 26| getStatement(1): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_each_token!... +# 25| getPath(): [Path] ...::quote_each_token +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_each_token +# 25| getIdentifier(): [NameRef] quote_each_token +# 26| getTokenTree(): [TokenTree] TokenTree +# 26| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getTailExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_tokens_with_context!... +# 25| getPath(): [Path] ...::quote_tokens_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_tokens_with_context +# 25| getIdentifier(): [NameRef] quote_tokens_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 26| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 27| getTailExpr(): [MacroExpr] MacroExpr +# 27| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 27| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(0): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(1): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(2): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(3): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 26| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(0): [ExprStmt] ExprStmt +# 26| getExpr(): [CallExpr] ...::to_tokens(...) +# 26| getArgList(): [ArgList] ArgList +# 26| getArg(0): [RefExpr] &ast +# 26| getExpr(): [PathExpr,VariableAccess] ast +# 26| getPath(): [Path] ast +# 26| getSegment(): [PathSegment] ast +# 26| getIdentifier(): [NameRef] ast +# 25| getArg(1): [RefExpr] &mut _s +# 25| getExpr(): [PathExpr] _s +# 25| getPath(): [Path] _s +# 25| getSegment(): [PathSegment] _s +# 25| getIdentifier(): [NameRef] _s +# 25| getFunction(): [PathExpr] ...::to_tokens +# 25| getPath(): [Path] ...::to_tokens +# 25| getQualifier(): [Path] ...::ToTokens +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] ToTokens +# 25| getIdentifier(): [NameRef] ToTokens +# 25| getSegment(): [PathSegment] to_tokens +# 25| getIdentifier(): [NameRef] to_tokens +# 26| getStatement(4): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(5): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 27| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 27| getStatement(0): [ExprStmt] ExprStmt +# 27| getExpr(): [CallExpr] ...::to_tokens(...) +# 27| getArgList(): [ArgList] ArgList +# 27| getArg(0): [RefExpr] &new_ast +# 27| getExpr(): [PathExpr,VariableAccess] new_ast +# 27| getPath(): [Path] new_ast +# 27| getSegment(): [PathSegment] new_ast +# 27| getIdentifier(): [NameRef] new_ast +# 25| getArg(1): [RefExpr] &mut _s +# 25| getExpr(): [PathExpr] _s +# 25| getPath(): [Path] _s +# 25| getSegment(): [PathSegment] _s +# 25| getIdentifier(): [NameRef] _s +# 25| getFunction(): [PathExpr] ...::to_tokens +# 25| getPath(): [Path] ...::to_tokens +# 25| getQualifier(): [Path] ...::ToTokens +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] ToTokens +# 25| getIdentifier(): [NameRef] ToTokens +# 25| getSegment(): [PathSegment] to_tokens +# 25| getIdentifier(): [NameRef] to_tokens +# 26| getStatement(6): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 26| getStatement(7): [ExprStmt] ExprStmt +# 26| getExpr(): [MacroExpr] MacroExpr +# 26| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 26| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 27| getStatement(8): [ExprStmt] ExprStmt +# 27| getExpr(): [MacroExpr] MacroExpr +# 27| getMacroCall(): [MacroCall] ...::quote_token_with_context!... +# 25| getPath(): [Path] ...::quote_token_with_context +# 25| getQualifier(): [Path] $crate +# 25| getSegment(): [PathSegment] $crate +# 25| getIdentifier(): [NameRef] $crate +# 25| getSegment(): [PathSegment] quote_token_with_context +# 25| getIdentifier(): [NameRef] quote_token_with_context +# 27| getTokenTree(): [TokenTree] TokenTree +# 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr +# 25| getTailExpr(): [PathExpr] _s +# 25| getPath(): [Path] _s +# 25| getSegment(): [PathSegment] _s +# 25| getIdentifier(): [NameRef] _s +# 21| getName(): [Name] add_one +# 21| getRetType(): [RetTypeRepr] RetTypeRepr +# 21| getTypeRepr(): [PathTypeRepr] TokenStream +# 21| getPath(): [Path] TokenStream +# 21| getSegment(): [PathSegment] TokenStream +# 21| getIdentifier(): [NameRef] TokenStream +# 21| getVisibility(): [Visibility] Visibility +# 31| getItem(4): [Function] fn erase +# 32| getParamList(): [ParamList] ParamList +# 32| getParam(0): [Param] ...: TokenStream +# 32| getTypeRepr(): [PathTypeRepr] TokenStream +# 32| getPath(): [Path] TokenStream +# 32| getSegment(): [PathSegment] TokenStream +# 32| getIdentifier(): [NameRef] TokenStream +# 32| getPat(): [IdentPat] _attr +# 32| getName(): [Name] _attr +# 32| getParam(1): [Param] ...: TokenStream +# 32| getTypeRepr(): [PathTypeRepr] TokenStream +# 32| getPath(): [Path] TokenStream +# 32| getSegment(): [PathSegment] TokenStream +# 32| getIdentifier(): [NameRef] TokenStream +# 32| getPat(): [IdentPat] _item +# 32| getName(): [Name] _item +# 31| getAttr(0): [Attr] Attr +# 31| getMeta(): [Meta] Meta +# 31| getPath(): [Path] proc_macro_attribute +# 31| getSegment(): [PathSegment] proc_macro_attribute +# 31| getIdentifier(): [NameRef] proc_macro_attribute +# 32| getBody(): [BlockExpr] { ... } +# 32| getStmtList(): [StmtList] StmtList +# 33| getTailExpr(): [CallExpr] ...::new(...) +# 33| getArgList(): [ArgList] ArgList +# 33| getFunction(): [PathExpr] ...::new +# 33| getPath(): [Path] ...::new +# 33| getQualifier(): [Path] TokenStream +# 33| getSegment(): [PathSegment] TokenStream +# 33| getIdentifier(): [NameRef] TokenStream +# 33| getSegment(): [PathSegment] new +# 33| getIdentifier(): [NameRef] new +# 32| getName(): [Name] erase +# 32| getRetType(): [RetTypeRepr] RetTypeRepr +# 32| getTypeRepr(): [PathTypeRepr] TokenStream +# 32| getPath(): [Path] TokenStream +# 32| getSegment(): [PathSegment] TokenStream +# 32| getIdentifier(): [NameRef] TokenStream +# 32| getVisibility(): [Visibility] Visibility diff --git a/rust/ql/test/extractor-tests/macro_expansion/PrintAst.qlref b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.qlref similarity index 100% rename from rust/ql/test/extractor-tests/macro_expansion/PrintAst.qlref rename to rust/ql/test/extractor-tests/macro-expansion/PrintAst.qlref diff --git a/rust/ql/test/extractor-tests/macro-expansion/call.rs b/rust/ql/test/extractor-tests/macro-expansion/call.rs new file mode 100644 index 00000000000..974f4b57051 --- /dev/null +++ b/rust/ql/test/extractor-tests/macro-expansion/call.rs @@ -0,0 +1,14 @@ +use crate::macro_expansion; + +fn call_some_functions() { + macro_expansion::foo(); + macro_expansion::foo_new(); + macro_expansion::bar_0(); + macro_expansion::bar_1(); + macro_expansion::bar_0_new(); + macro_expansion::bar_1_new(); + macro_expansion::S::bzz_0(); + macro_expansion::S::bzz_1(); + macro_expansion::S::bzz_2(); + macro_expansion::S::x(); +} \ No newline at end of file diff --git a/rust/ql/integration-tests/macro-expansion/calls/src/included.rs b/rust/ql/test/extractor-tests/macro-expansion/included/included.rs similarity index 100% rename from rust/ql/integration-tests/macro-expansion/calls/src/included.rs rename to rust/ql/test/extractor-tests/macro-expansion/included/included.rs diff --git a/rust/ql/test/extractor-tests/macro-expansion/macro_expansion.rs b/rust/ql/test/extractor-tests/macro-expansion/macro_expansion.rs new file mode 100644 index 00000000000..419105547a1 --- /dev/null +++ b/rust/ql/test/extractor-tests/macro-expansion/macro_expansion.rs @@ -0,0 +1,80 @@ +use proc_macro::{repeat, add_one, erase}; + +#[add_one] +pub fn foo() { + _ = concat!("Hello ", "world!"); + + #[repeat(2)] + fn inner() {} + + inner_0(); + inner_1(); +} + +#[repeat(2)] +#[add_one] +pub fn bar() {} + +#[erase] +pub fn baz() {} + + +macro_rules! hello { + () => { + println!("hello!"); + }; +} + +pub struct S; + +impl S { + #[repeat(3)] + pub fn bzz() { + hello!(); + } +} + +macro_rules! def_x { + () => { + pub fn x() {} + }; +} + +impl S { + def_x!(); // this doesn't expand since 0.0.274 +} + +macro_rules! my_macro { + ($head:expr, $($tail:tt)*) => { format!($head, $($tail)*) }; +} + + +fn test() { + _ = concat!("x", "y"); + + _ = my_macro!( + concat!("<", "{}", ">"), // this doesn't expand since 0.0.274 + "hi", + ); +} + +include!("included/included.rs"); + +#[doc = include_str!("some.txt")] // this doesn't expand since 0.0.274 +fn documented() {} + +macro_rules! my_int { + () => { i32 }; +} + +fn answer() -> my_int!() { // this didn't expand in 0.0.274..0.0.287 + let a: my_int!() = 42; // this is fine + a as my_int!() // this is fine too +} + + +type MyInt = my_int!(); // this didn't expand in 0.0.274..0.0.287 + +struct MyStruct { + field: my_int!(), // this didn't expand in 0.0.274..0.0.287 +} diff --git a/rust/ql/integration-tests/macro-expansion/proc_macros/src/lib.rs b/rust/ql/test/extractor-tests/macro-expansion/proc_macro.rs similarity index 56% rename from rust/ql/integration-tests/macro-expansion/proc_macros/src/lib.rs rename to rust/ql/test/extractor-tests/macro-expansion/proc_macro.rs index 8d1f3be0e4e..3e9e7ccd1cf 100644 --- a/rust/ql/integration-tests/macro-expansion/proc_macros/src/lib.rs +++ b/rust/ql/test/extractor-tests/macro-expansion/proc_macro.rs @@ -16,3 +16,19 @@ pub fn repeat(attr: TokenStream, item: TokenStream) -> TokenStream { #(#items)* }.into() } + +#[proc_macro_attribute] +pub fn add_one(_attr: TokenStream, item: TokenStream) -> TokenStream { + let ast = syn::parse_macro_input!(item as syn::ItemFn); + let mut new_ast = ast.clone(); + new_ast.sig.ident = syn::Ident::new(&format!("{}_new", ast.sig.ident), ast.sig.ident.span()); + quote! { + #ast + #new_ast + }.into() +} + +#[proc_macro_attribute] +pub fn erase(_attr: TokenStream, _item: TokenStream) -> TokenStream { + TokenStream::new() +} diff --git a/rust/ql/integration-tests/macro-expansion/calls/src/some.txt b/rust/ql/test/extractor-tests/macro-expansion/some.txt similarity index 100% rename from rust/ql/integration-tests/macro-expansion/calls/src/some.txt rename to rust/ql/test/extractor-tests/macro-expansion/some.txt diff --git a/rust/ql/test/extractor-tests/macro-expansion/test.expected b/rust/ql/test/extractor-tests/macro-expansion/test.expected new file mode 100644 index 00000000000..10a73fd947c --- /dev/null +++ b/rust/ql/test/extractor-tests/macro-expansion/test.expected @@ -0,0 +1,37 @@ +attribute_macros +| macro_expansion.rs:3:1:12:1 | fn foo | 0 | macro_expansion.rs:4:1:11:14 | fn foo | +| macro_expansion.rs:3:1:12:1 | fn foo | 1 | macro_expansion.rs:4:1:11:14 | fn foo_new | +| macro_expansion.rs:7:5:8:16 | fn inner | 0 | macro_expansion.rs:8:5:8:16 | fn inner_0 | +| macro_expansion.rs:7:5:8:16 | fn inner | 0 | macro_expansion.rs:8:5:8:16 | fn inner_0 | +| macro_expansion.rs:7:5:8:16 | fn inner | 1 | macro_expansion.rs:8:5:8:16 | fn inner_1 | +| macro_expansion.rs:7:5:8:16 | fn inner | 1 | macro_expansion.rs:8:5:8:16 | fn inner_1 | +| macro_expansion.rs:14:1:16:15 | fn bar | 0 | macro_expansion.rs:15:1:16:14 | fn bar_0 | +| macro_expansion.rs:14:1:16:15 | fn bar | 1 | macro_expansion.rs:15:1:16:14 | fn bar_1 | +| macro_expansion.rs:15:1:16:14 | fn bar_0 | 0 | macro_expansion.rs:16:1:16:14 | fn bar_0 | +| macro_expansion.rs:15:1:16:14 | fn bar_0 | 1 | macro_expansion.rs:16:1:16:14 | fn bar_0_new | +| macro_expansion.rs:15:1:16:14 | fn bar_1 | 0 | macro_expansion.rs:16:1:16:14 | fn bar_1 | +| macro_expansion.rs:15:1:16:14 | fn bar_1 | 1 | macro_expansion.rs:16:1:16:14 | fn bar_1_new | +macro_calls +| included/included.rs:2:9:2:39 | concat!... | included/included.rs:2:17:2:38 | "Hello world!" | +| macro_expansion.rs:5:9:5:34 | concat!... | macro_expansion.rs:5:17:5:34 | "Hello world!" | +| macro_expansion.rs:5:9:5:34 | concat!... | macro_expansion.rs:5:17:5:34 | "Hello world!" | +| macro_expansion.rs:33:9:33:16 | ...::format_args_nl!... | macro_expansion.rs:33:9:33:16 | FormatArgsExpr | +| macro_expansion.rs:33:9:33:16 | hello!... | macro_expansion.rs:33:9:33:16 | MacroBlockExpr | +| macro_expansion.rs:33:9:33:16 | println!... | macro_expansion.rs:33:9:33:16 | MacroBlockExpr | +| macro_expansion.rs:44:5:44:13 | def_x!... | macro_expansion.rs:44:5:44:13 | MacroItems | +| macro_expansion.rs:53:9:53:25 | concat!... | macro_expansion.rs:53:17:53:24 | "xy" | +| macro_expansion.rs:55:9:58:5 | my_macro!... | macro_expansion.rs:56:9:57:13 | MacroExpr | +| macro_expansion.rs:56:9:56:31 | concat!... | macro_expansion.rs:56:17:56:30 | "<{}>" | +| macro_expansion.rs:56:9:57:13 | ...::format_args!... | macro_expansion.rs:56:9:57:13 | FormatArgsExpr | +| macro_expansion.rs:56:9:57:13 | format!... | macro_expansion.rs:56:9:57:13 | ...::must_use(...) | +| macro_expansion.rs:61:1:61:33 | concat!... | macro_expansion.rs:61:1:61:33 | "Hello world!" | +| macro_expansion.rs:61:1:61:33 | include!... | macro_expansion.rs:61:1:61:33 | MacroItems | +| macro_expansion.rs:63:9:63:32 | include_str!... | macro_expansion.rs:63:22:63:31 | "" | +| macro_expansion.rs:70:16:70:24 | my_int!... | macro_expansion.rs:70:16:70:24 | i32 | +| macro_expansion.rs:71:12:71:20 | my_int!... | macro_expansion.rs:71:12:71:20 | i32 | +| macro_expansion.rs:72:10:72:18 | my_int!... | macro_expansion.rs:72:10:72:18 | i32 | +| macro_expansion.rs:76:14:76:22 | my_int!... | macro_expansion.rs:76:14:76:22 | i32 | +| macro_expansion.rs:79:12:79:20 | my_int!... | macro_expansion.rs:79:12:79:20 | i32 | +unexpanded_macro_calls +| macro_expansion.rs:5:9:5:35 | concat!... | +warnings diff --git a/rust/ql/integration-tests/macro-expansion/test.ql b/rust/ql/test/extractor-tests/macro-expansion/test.ql similarity index 81% rename from rust/ql/integration-tests/macro-expansion/test.ql rename to rust/ql/test/extractor-tests/macro-expansion/test.ql index 439ffab9a29..1952dff3041 100644 --- a/rust/ql/integration-tests/macro-expansion/test.ql +++ b/rust/ql/test/extractor-tests/macro-expansion/test.ql @@ -1,4 +1,5 @@ import rust +import codeql.rust.Diagnostics query predicate attribute_macros(Item i, int index, Item expanded) { i.fromSource() and expanded = i.getAttributeMacroExpansion().getItem(index) @@ -6,10 +7,12 @@ query predicate attribute_macros(Item i, int index, Item expanded) { query predicate macro_calls(MacroCall c, AstNode expansion) { c.fromSource() and - not c.getLocation().getFile().getAbsolutePath().matches("%proc_macros%") and + not c.getLocation().getFile().getAbsolutePath().matches("%proc_macro.rs") and expansion = c.getMacroCallExpansion() } query predicate unexpanded_macro_calls(MacroCall c) { c.fromSource() and not c.hasMacroCallExpansion() } + +query predicate warnings(ExtractionWarning w) { any() } diff --git a/rust/ql/test/extractor-tests/macro_expansion/PrintAst.expected b/rust/ql/test/extractor-tests/macro_expansion/PrintAst.expected deleted file mode 100644 index 3881faafeac..00000000000 --- a/rust/ql/test/extractor-tests/macro_expansion/PrintAst.expected +++ /dev/null @@ -1,155 +0,0 @@ -lib.rs: -# 1| [SourceFile] SourceFile -# 1| getItem(0): [Module] mod macro_expansion -# 1| getName(): [Name] macro_expansion -macro_expansion.rs: -# 1| [SourceFile] SourceFile -# 1| getItem(0): [Function] fn foo -# 2| getAttributeMacroExpansion(): [MacroItems] MacroItems -# 2| getItem(0): [Function] fn foo -# 1| getParamList(): [ParamList] ParamList -# 1| getAbi(): [Abi] Abi -# 2| getBody(): [BlockExpr] { ... } -# 2| getStmtList(): [StmtList] StmtList -# 2| getName(): [Name] foo -# 2| getItem(1): [Static] Static -# 1| getAttr(0): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] used -# 1| getSegment(): [PathSegment] used -# 1| getIdentifier(): [NameRef] used -# 1| getAttr(1): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] allow -# 1| getSegment(): [PathSegment] allow -# 1| getIdentifier(): [NameRef] allow -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(2): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] doc -# 1| getSegment(): [PathSegment] doc -# 1| getIdentifier(): [NameRef] doc -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(3): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(4): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(5): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(6): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(7): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(8): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(9): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(10): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(11): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 2| getBody(): [BlockExpr] { ... } -# 2| getStmtList(): [StmtList] StmtList -# 2| getStatement(0): [Function] fn foo___rust_ctor___ctor -# 1| getParamList(): [ParamList] ParamList -# 1| getAttr(0): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] allow -# 1| getSegment(): [PathSegment] allow -# 1| getIdentifier(): [NameRef] allow -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAttr(1): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] cfg_attr -# 1| getSegment(): [PathSegment] cfg_attr -# 1| getIdentifier(): [NameRef] cfg_attr -# 1| getTokenTree(): [TokenTree] TokenTree -# 1| getAbi(): [Abi] Abi -# 2| getBody(): [BlockExpr] { ... } -# 2| getStmtList(): [StmtList] StmtList -# 2| getStatement(0): [ExprStmt] ExprStmt -# 2| getExpr(): [CallExpr] foo(...) -# 1| getArgList(): [ArgList] ArgList -# 2| getFunction(): [PathExpr] foo -# 2| getPath(): [Path] foo -# 2| getSegment(): [PathSegment] foo -# 2| getIdentifier(): [NameRef] foo -# 1| getTailExpr(): [IntegerLiteralExpr] 0 -# 1| getName(): [Name] foo___rust_ctor___ctor -# 1| getRetType(): [RetTypeRepr] RetTypeRepr -# 1| getTypeRepr(): [PathTypeRepr] usize -# 1| getPath(): [Path] usize -# 1| getSegment(): [PathSegment] usize -# 1| getIdentifier(): [NameRef] usize -# 1| getTailExpr(): [PathExpr] foo___rust_ctor___ctor -# 1| getPath(): [Path] foo___rust_ctor___ctor -# 1| getSegment(): [PathSegment] foo___rust_ctor___ctor -# 1| getIdentifier(): [NameRef] foo___rust_ctor___ctor -# 1| getName(): [Name] foo___rust_ctor___ctor -# 1| getTypeRepr(): [FnPtrTypeRepr] FnPtrTypeRepr -# 1| getAbi(): [Abi] Abi -# 1| getParamList(): [ParamList] ParamList -# 1| getRetType(): [RetTypeRepr] RetTypeRepr -# 1| getTypeRepr(): [PathTypeRepr] usize -# 1| getPath(): [Path] usize -# 1| getSegment(): [PathSegment] usize -# 1| getIdentifier(): [NameRef] usize -# 2| getParamList(): [ParamList] ParamList -# 1| getAttr(0): [Attr] Attr -# 1| getMeta(): [Meta] Meta -# 1| getPath(): [Path] ...::ctor -# 1| getQualifier(): [Path] ctor -# 1| getSegment(): [PathSegment] ctor -# 1| getIdentifier(): [NameRef] ctor -# 1| getSegment(): [PathSegment] ctor -# 1| getIdentifier(): [NameRef] ctor -# 2| getBody(): [BlockExpr] { ... } -# 2| getStmtList(): [StmtList] StmtList -# 2| getName(): [Name] foo -# 4| getItem(1): [Function] fn bar -# 5| getParamList(): [ParamList] ParamList -# 4| getAttr(0): [Attr] Attr -# 4| getMeta(): [Meta] Meta -# 4| getPath(): [Path] cfg -# 4| getSegment(): [PathSegment] cfg -# 4| getIdentifier(): [NameRef] cfg -# 4| getTokenTree(): [TokenTree] TokenTree -# 5| getBody(): [BlockExpr] { ... } -# 5| getStmtList(): [StmtList] StmtList -# 5| getName(): [Name] bar diff --git a/rust/ql/test/extractor-tests/macro_expansion/macro_expansion.rs b/rust/ql/test/extractor-tests/macro_expansion/macro_expansion.rs deleted file mode 100644 index 1825f1056e3..00000000000 --- a/rust/ql/test/extractor-tests/macro_expansion/macro_expansion.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[ctor::ctor] -fn foo() {} - -#[cfg(any(linux, not(linux)))] -fn bar() {} - -#[cfg(all(linux, not(linux)))] -fn baz() {} diff --git a/rust/ql/test/extractor-tests/macro_expansion/options.yml b/rust/ql/test/extractor-tests/macro_expansion/options.yml deleted file mode 100644 index 07ec8d1b4eb..00000000000 --- a/rust/ql/test/extractor-tests/macro_expansion/options.yml +++ /dev/null @@ -1,2 +0,0 @@ -qltest_dependencies: - - ctor = { version = "0.2.9" } diff --git a/rust/ql/test/extractor-tests/macro_expansion/test.expected b/rust/ql/test/extractor-tests/macro_expansion/test.expected deleted file mode 100644 index 26a02ec8252..00000000000 --- a/rust/ql/test/extractor-tests/macro_expansion/test.expected +++ /dev/null @@ -1,2 +0,0 @@ -| macro_expansion.rs:1:1:2:11 | fn foo | 0 | macro_expansion.rs:2:4:2:10 | fn foo | -| macro_expansion.rs:1:1:2:11 | fn foo | 1 | macro_expansion.rs:2:4:2:6 | Static | diff --git a/rust/ql/test/extractor-tests/macro_expansion/test.ql b/rust/ql/test/extractor-tests/macro_expansion/test.ql deleted file mode 100644 index 17bc7d47b1d..00000000000 --- a/rust/ql/test/extractor-tests/macro_expansion/test.ql +++ /dev/null @@ -1,6 +0,0 @@ -import rust -import TestUtils - -from Item i, MacroItems items, int index, Item expanded -where toBeTested(i) and i.getAttributeMacroExpansion() = items and items.getItem(index) = expanded -select i, index, expanded From 71b92634705f4882827fd2cbf12bb9836e947ecc Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 17 Jun 2025 17:11:05 +0200 Subject: [PATCH 24/35] Rust: do not remove `Cargo.lock` file when running QL tests --- rust/extractor/src/qltest.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/rust/extractor/src/qltest.rs b/rust/extractor/src/qltest.rs index de0c36df784..b127c2b388d 100644 --- a/rust/extractor/src/qltest.rs +++ b/rust/extractor/src/qltest.rs @@ -4,7 +4,6 @@ use glob::glob; use itertools::Itertools; use std::ffi::OsStr; use std::fs; -use std::path::Path; use std::process::Command; use tracing::info; @@ -60,18 +59,9 @@ fn set_sources(config: &mut Config) -> anyhow::Result<()> { Ok(()) } -fn remove_file_if_exists(path: &Path) -> anyhow::Result<()> { - match fs::remove_file(path) { - Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()), - x => x, - } - .context(format!("removing file {}", path.display())) -} - pub(crate) fn prepare(config: &mut Config) -> anyhow::Result<()> { dump_lib()?; set_sources(config)?; - remove_file_if_exists(Path::new("Cargo.lock"))?; dump_cargo_manifest(&config.qltest_dependencies)?; if config.qltest_cargo_check { let status = Command::new("cargo") From d2a05886c83ea29156c3f7276ac336701e721421 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 17 Jun 2025 17:16:47 +0200 Subject: [PATCH 25/35] Rust: do not do html escaping in cargo template --- rust/extractor/src/qltest_cargo.mustache | 2 +- rust/ql/test/library-tests/dataflow/models/Cargo.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/extractor/src/qltest_cargo.mustache b/rust/extractor/src/qltest_cargo.mustache index 183c7fffd15..444734a6885 100644 --- a/rust/extractor/src/qltest_cargo.mustache +++ b/rust/extractor/src/qltest_cargo.mustache @@ -24,7 +24,7 @@ path = "{{#uses_proc_macro}}../{{/uses_proc_macro}}main.rs" proc_macro = { path = "../.proc_macro" } {{/uses_proc_macro}} {{#dependencies}} -{{.}} +{{{.}}} {{/dependencies}} {{/Lib}} diff --git a/rust/ql/test/library-tests/dataflow/models/Cargo.lock b/rust/ql/test/library-tests/dataflow/models/Cargo.lock index 7fcff65a5e5..58ec89eb390 100644 --- a/rust/ql/test/library-tests/dataflow/models/Cargo.lock +++ b/rust/ql/test/library-tests/dataflow/models/Cargo.lock @@ -219,7 +219,7 @@ dependencies = [ [[package]] name = "test" -version = "0.0.1" +version = "0.1.0" dependencies = [ "tokio", ] From 3f595fdd0370ea55c6d2f04b4c9310cf2a66a2f4 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Tue, 17 Jun 2025 18:47:42 +0200 Subject: [PATCH 26/35] C++: add tests for `ArrayType` typedef resolution --- cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp | 7 +++++++ cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected | 5 +++++ cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp create mode 100644 cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected create mode 100644 cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp new file mode 100644 index 00000000000..393ab4c7d9e --- /dev/null +++ b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp @@ -0,0 +1,7 @@ +typedef int int_t; +int_t g1[10]; +int_t g2[2][4]; + +typedef float float_t; +float_t arr1[5]; +float_t (*a_pointer)[10]; diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected new file mode 100644 index 00000000000..9b91579e8dc --- /dev/null +++ b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected @@ -0,0 +1,5 @@ +| file://:0:0:0:0 | float_t[5] | file://:0:0:0:0 | float_t[5] | ArrayTypedefs.cpp:6:9:6:12 | definition of arr1 | +| file://:0:0:0:0 | float_t[10] | file://:0:0:0:0 | float_t[10] | ArrayTypedefs.cpp:7:11:7:19 | definition of a_pointer | +| file://:0:0:0:0 | int_t[2][4] | file://:0:0:0:0 | int_t[2][4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 | +| file://:0:0:0:0 | int_t[4] | file://:0:0:0:0 | int_t[4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 | +| file://:0:0:0:0 | int_t[10] | file://:0:0:0:0 | int_t[10] | ArrayTypedefs.cpp:2:7:2:8 | definition of g1 | diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql new file mode 100644 index 00000000000..73ebe35d8ff --- /dev/null +++ b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql @@ -0,0 +1,4 @@ +import cpp + +from ArrayType type +select type, type.resolveTypedefs(), type.getATypeNameUse() From a6d7fb6aad5fe6ef7e06b18b74ca0e63e87a47ee Mon Sep 17 00:00:00 2001 From: idrissrio Date: Tue, 17 Jun 2025 18:49:39 +0200 Subject: [PATCH 27/35] C++: fix typedef resolution in `ArrayType` --- cpp/ql/lib/semmle/code/cpp/Type.qll | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll index fef978b198d..3db3cd49e54 100644 --- a/cpp/ql/lib/semmle/code/cpp/Type.qll +++ b/cpp/ql/lib/semmle/code/cpp/Type.qll @@ -1589,6 +1589,11 @@ class ArrayType extends DerivedType { * Holds if this array is a variable-length array (VLA). */ predicate isVla() { type_is_vla(underlyingElement(this)) } + + override Type resolveTypedefs() { + result.(ArrayType).getBaseType() = this.getBaseType().resolveTypedefs() and + result.(ArrayType).getArraySize() = this.getArraySize() + } } /** From 6ffba11f134cffcd110166a3de0c21731abc5626 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Tue, 17 Jun 2025 18:51:43 +0200 Subject: [PATCH 28/35] C++: accept new test results after changes --- .../test/library-tests/typedefs/ArrayTypedefs.expected | 10 +++++----- cpp/ql/test/library-tests/typedefs/Typedefs1.expected | 6 ++++++ cpp/ql/test/library-tests/typedefs/Typedefs3.expected | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected index 9b91579e8dc..83e003b5bb1 100644 --- a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected +++ b/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected @@ -1,5 +1,5 @@ -| file://:0:0:0:0 | float_t[5] | file://:0:0:0:0 | float_t[5] | ArrayTypedefs.cpp:6:9:6:12 | definition of arr1 | -| file://:0:0:0:0 | float_t[10] | file://:0:0:0:0 | float_t[10] | ArrayTypedefs.cpp:7:11:7:19 | definition of a_pointer | -| file://:0:0:0:0 | int_t[2][4] | file://:0:0:0:0 | int_t[2][4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 | -| file://:0:0:0:0 | int_t[4] | file://:0:0:0:0 | int_t[4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 | -| file://:0:0:0:0 | int_t[10] | file://:0:0:0:0 | int_t[10] | ArrayTypedefs.cpp:2:7:2:8 | definition of g1 | +| file://:0:0:0:0 | float_t[5] | file://:0:0:0:0 | float[5] | ArrayTypedefs.cpp:6:9:6:12 | definition of arr1 | +| file://:0:0:0:0 | float_t[10] | file://:0:0:0:0 | float[10] | ArrayTypedefs.cpp:7:11:7:19 | definition of a_pointer | +| file://:0:0:0:0 | int_t[2][4] | file://:0:0:0:0 | int[2][4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 | +| file://:0:0:0:0 | int_t[4] | file://:0:0:0:0 | int[4] | ArrayTypedefs.cpp:3:7:3:8 | definition of g2 | +| file://:0:0:0:0 | int_t[10] | file://:0:0:0:0 | int[10] | ArrayTypedefs.cpp:2:7:2:8 | definition of g1 | diff --git a/cpp/ql/test/library-tests/typedefs/Typedefs1.expected b/cpp/ql/test/library-tests/typedefs/Typedefs1.expected index 21b506c015a..f64afc49ccd 100644 --- a/cpp/ql/test/library-tests/typedefs/Typedefs1.expected +++ b/cpp/ql/test/library-tests/typedefs/Typedefs1.expected @@ -1,3 +1,9 @@ +| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:1:13:1:17 | int_t | +| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:2:7:2:8 | g1 | +| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:3:7:3:8 | g2 | +| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:5:15:5:21 | float_t | +| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:6:9:6:12 | arr1 | +| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:7:11:7:19 | a_pointer | | file://:0:0:0:0 | (global namespace) | ODASA-6095-A.hpp:2:8:2:17 | MyTemplate | | file://:0:0:0:0 | (global namespace) | ODASA-6095-A.hpp:2:8:2:17 | MyTemplate | | file://:0:0:0:0 | (global namespace) | ODASA-6095-B.hpp:4:8:4:18 | MyTemplate2 | diff --git a/cpp/ql/test/library-tests/typedefs/Typedefs3.expected b/cpp/ql/test/library-tests/typedefs/Typedefs3.expected index c0f584a04e6..1cd9bc34f15 100644 --- a/cpp/ql/test/library-tests/typedefs/Typedefs3.expected +++ b/cpp/ql/test/library-tests/typedefs/Typedefs3.expected @@ -1,3 +1,5 @@ +| ArrayTypedefs.cpp:1:13:1:17 | int_t | int_t | getBaseType() = int | +| ArrayTypedefs.cpp:5:15:5:21 | float_t | float_t | getBaseType() = float | | ODASA-6095-A.hpp:5:25:5:30 | mytype | MyTemplate::mytype | NestedTypedefType, getBaseType() = MyTemplate, member of MyTemplate | | ODASA-6095-B.hpp:6:43:6:49 | mytype2 | MyTemplate2::mytype2 | NestedTypedefType, getBaseType() = decltype(...), member of MyTemplate2 | | file://:0:0:0:0 | mytype | MyTemplate::mytype | NestedTypedefType, getBaseType() = MyTemplate, member of MyTemplate | From b145523a717bdfcf7089af6f8fc9e8ccaadaf2c8 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Tue, 17 Jun 2025 19:00:37 +0200 Subject: [PATCH 29/35] C++: add change note --- cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md diff --git a/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md b/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md new file mode 100644 index 00000000000..e4e6e732cc7 --- /dev/null +++ b/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed how typedefs are resolved for ArrayType by overriding the `resolveTypedefs` predicate. From 214bbf46e8fd8349be9735f950e68ea1fdd1e559 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Wed, 18 Jun 2025 09:01:06 +0200 Subject: [PATCH 30/35] Rust: fix test version to `0.0.1` as previously --- rust/extractor/src/qltest_cargo.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/extractor/src/qltest_cargo.mustache b/rust/extractor/src/qltest_cargo.mustache index 444734a6885..02ecfc45681 100644 --- a/rust/extractor/src/qltest_cargo.mustache +++ b/rust/extractor/src/qltest_cargo.mustache @@ -10,7 +10,7 @@ members = [".lib", ".proc_macro"] {{/uses_proc_macro}} [package] name = "test" -version = "0.1.0" +version = "0.0.1" edition = "2021" [lib] path = "{{#uses_proc_macro}}../{{/uses_proc_macro}}lib.rs" From 5c575ac18765f856572fff0a6b58f7be868a96d4 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 18 Jun 2025 09:18:36 +0200 Subject: [PATCH 31/35] C#: Address review comments. --- .../posix/query-suite/csharp-code-quality.qls.expected | 1 - .../Refactoring Opportunities/InappropriateIntimacy.ql | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected b/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected index f1117b4c719..53810418624 100644 --- a/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected +++ b/csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected @@ -5,7 +5,6 @@ ql/csharp/ql/src/API Abuse/FormatInvalid.ql ql/csharp/ql/src/API Abuse/NoDisposeCallOnLocalIDisposable.ql ql/csharp/ql/src/API Abuse/NullArgumentToEquals.ql ql/csharp/ql/src/ASP/BlockCodeResponseWrite.ql -ql/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql ql/csharp/ql/src/Bad Practices/CallsUnmanagedCode.ql ql/csharp/ql/src/Bad Practices/CatchOfNullReferenceException.ql ql/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql diff --git a/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql b/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql index c8014edb3af..78f6ab5b57a 100644 --- a/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql +++ b/csharp/ql/src/Architecture/Refactoring Opportunities/InappropriateIntimacy.ql @@ -6,8 +6,7 @@ * @problem.severity recommendation * @precision high * @id cs/coupled-types - * @tags quality - * maintainability + * @tags maintainability * complexity * modularity */ From 8bf171fd8585ab2227430fcd58c0c143c7de3e56 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Wed, 18 Jun 2025 09:21:40 +0200 Subject: [PATCH 32/35] Rust: add missing `use` because of semantic conflict --- rust/extractor/src/qltest.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/extractor/src/qltest.rs b/rust/extractor/src/qltest.rs index f1a70be8762..f558981e44b 100644 --- a/rust/extractor/src/qltest.rs +++ b/rust/extractor/src/qltest.rs @@ -4,6 +4,7 @@ use glob::glob; use itertools::Itertools; use std::ffi::OsStr; use std::fs; +use std::path::Path; use std::process::Command; use tracing::info; From 4ec64021e10970c1a1a985a7b1f0b172a29d525d Mon Sep 17 00:00:00 2001 From: idrissrio Date: Wed, 18 Jun 2025 09:49:12 +0200 Subject: [PATCH 33/35] C++: update change note after review comments --- cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md b/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md index e4e6e732cc7..0bc3130e6a3 100644 --- a/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md +++ b/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md @@ -1,4 +1,4 @@ --- category: fix --- -* Fixed how typedefs are resolved for ArrayType by overriding the `resolveTypedefs` predicate. +* `resolveTypedefs` now properly resolves typedefs for `ArrayType`s. From 72559d5198a2bdb4d0d5ac89e84eebf66d66c315 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Wed, 18 Jun 2025 09:50:54 +0200 Subject: [PATCH 34/35] C++: move `resolveTypedefs` tests to dedicated directory --- .../{typedefs => resolve_typedefs}/ArrayTypedefs.cpp | 0 .../{typedefs => resolve_typedefs}/ArrayTypedefs.expected | 0 .../{typedefs => resolve_typedefs}/ArrayTypedefs.ql | 0 cpp/ql/test/library-tests/typedefs/Typedefs1.expected | 6 ------ cpp/ql/test/library-tests/typedefs/Typedefs3.expected | 2 -- 5 files changed, 8 deletions(-) rename cpp/ql/test/library-tests/{typedefs => resolve_typedefs}/ArrayTypedefs.cpp (100%) rename cpp/ql/test/library-tests/{typedefs => resolve_typedefs}/ArrayTypedefs.expected (100%) rename cpp/ql/test/library-tests/{typedefs => resolve_typedefs}/ArrayTypedefs.ql (100%) diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp b/cpp/ql/test/library-tests/resolve_typedefs/ArrayTypedefs.cpp similarity index 100% rename from cpp/ql/test/library-tests/typedefs/ArrayTypedefs.cpp rename to cpp/ql/test/library-tests/resolve_typedefs/ArrayTypedefs.cpp diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected b/cpp/ql/test/library-tests/resolve_typedefs/ArrayTypedefs.expected similarity index 100% rename from cpp/ql/test/library-tests/typedefs/ArrayTypedefs.expected rename to cpp/ql/test/library-tests/resolve_typedefs/ArrayTypedefs.expected diff --git a/cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql b/cpp/ql/test/library-tests/resolve_typedefs/ArrayTypedefs.ql similarity index 100% rename from cpp/ql/test/library-tests/typedefs/ArrayTypedefs.ql rename to cpp/ql/test/library-tests/resolve_typedefs/ArrayTypedefs.ql diff --git a/cpp/ql/test/library-tests/typedefs/Typedefs1.expected b/cpp/ql/test/library-tests/typedefs/Typedefs1.expected index f64afc49ccd..21b506c015a 100644 --- a/cpp/ql/test/library-tests/typedefs/Typedefs1.expected +++ b/cpp/ql/test/library-tests/typedefs/Typedefs1.expected @@ -1,9 +1,3 @@ -| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:1:13:1:17 | int_t | -| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:2:7:2:8 | g1 | -| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:3:7:3:8 | g2 | -| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:5:15:5:21 | float_t | -| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:6:9:6:12 | arr1 | -| file://:0:0:0:0 | (global namespace) | ArrayTypedefs.cpp:7:11:7:19 | a_pointer | | file://:0:0:0:0 | (global namespace) | ODASA-6095-A.hpp:2:8:2:17 | MyTemplate | | file://:0:0:0:0 | (global namespace) | ODASA-6095-A.hpp:2:8:2:17 | MyTemplate | | file://:0:0:0:0 | (global namespace) | ODASA-6095-B.hpp:4:8:4:18 | MyTemplate2 | diff --git a/cpp/ql/test/library-tests/typedefs/Typedefs3.expected b/cpp/ql/test/library-tests/typedefs/Typedefs3.expected index 1cd9bc34f15..c0f584a04e6 100644 --- a/cpp/ql/test/library-tests/typedefs/Typedefs3.expected +++ b/cpp/ql/test/library-tests/typedefs/Typedefs3.expected @@ -1,5 +1,3 @@ -| ArrayTypedefs.cpp:1:13:1:17 | int_t | int_t | getBaseType() = int | -| ArrayTypedefs.cpp:5:15:5:21 | float_t | float_t | getBaseType() = float | | ODASA-6095-A.hpp:5:25:5:30 | mytype | MyTemplate::mytype | NestedTypedefType, getBaseType() = MyTemplate, member of MyTemplate | | ODASA-6095-B.hpp:6:43:6:49 | mytype2 | MyTemplate2::mytype2 | NestedTypedefType, getBaseType() = decltype(...), member of MyTemplate2 | | file://:0:0:0:0 | mytype | MyTemplate::mytype | NestedTypedefType, getBaseType() = MyTemplate, member of MyTemplate | From b29ad5b12a25cb6ca0c00c306c6b9233b1cb72e1 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Wed, 18 Jun 2025 10:22:19 +0200 Subject: [PATCH 35/35] Rust: add attribute macro expansion to path resolution test --- .../PathResolutionInlineExpectationsTest.qll | 1 + .../library-tests/path-resolution/Cargo.lock | 46 +++++ .../library-tests/path-resolution/main.rs | 16 ++ .../path-resolution/path-resolution.expected | 159 +++++++++++------- .../path-resolution/proc_macro.rs | 12 ++ 5 files changed, 169 insertions(+), 65 deletions(-) create mode 100644 rust/ql/test/library-tests/path-resolution/proc_macro.rs diff --git a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll index e6cf20da84d..c5a95ac9038 100644 --- a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll +++ b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll @@ -37,6 +37,7 @@ private module ResolveTest implements TestSig { not n = any(Path parent).getQualifier() and location = n.getLocation() and n.fromSource() and + not location.getFile().getAbsolutePath().matches("%proc_macro.rs") and not n.isFromMacroExpansion() and element = n.toString() and tag = "item" diff --git a/rust/ql/test/library-tests/path-resolution/Cargo.lock b/rust/ql/test/library-tests/path-resolution/Cargo.lock index b9856cfaf77..c200b79e06c 100644 --- a/rust/ql/test/library-tests/path-resolution/Cargo.lock +++ b/rust/ql/test/library-tests/path-resolution/Cargo.lock @@ -2,6 +2,52 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc_macro" +version = "0.1.0" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "syn" +version = "2.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "test" version = "0.0.1" +dependencies = [ + "proc_macro", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" diff --git a/rust/ql/test/library-tests/path-resolution/main.rs b/rust/ql/test/library-tests/path-resolution/main.rs index 3b68cff897a..c8c6f36ac3f 100644 --- a/rust/ql/test/library-tests/path-resolution/main.rs +++ b/rust/ql/test/library-tests/path-resolution/main.rs @@ -623,6 +623,18 @@ mod m24 { extern crate self as zelf; +#[proc_macro::add_suffix("changed")] // $ item=add_suffix +fn z() {} // I122 + +struct AStruct {} //I123 +impl AStruct { // $ item=I123 + #[proc_macro::add_suffix("on_type")] // $ item=add_suffix + pub fn z() {} // I124 + + #[proc_macro::add_suffix("on_instance")] // $ item=add_suffix + pub fn z(&self) {} // I125 +} + fn main() { my::nested::nested1::nested2::f(); // $ item=I4 my::f(); // $ item=I38 @@ -653,4 +665,8 @@ fn main() { m23::f(); // $ item=I108 m24::f(); // $ item=I121 zelf::h(); // $ item=I25 + z_changed(); // $ MISSING: item=I122 + AStruct::z_on_type(); // $ MISSING: item=I124 + AStruct{} // $ item=I123 + .z_on_instance(); // MISSING: item=I125 } diff --git a/rust/ql/test/library-tests/path-resolution/path-resolution.expected b/rust/ql/test/library-tests/path-resolution/path-resolution.expected index 666c80dae77..1ecec5f8dc2 100644 --- a/rust/ql/test/library-tests/path-resolution/path-resolution.expected +++ b/rust/ql/test/library-tests/path-resolution/path-resolution.expected @@ -61,7 +61,7 @@ resolvePath | main.rs:30:17:30:21 | super | main.rs:18:5:36:5 | mod m2 | | main.rs:30:17:30:24 | ...::f | main.rs:19:9:21:9 | fn f | | main.rs:33:17:33:17 | f | main.rs:19:9:21:9 | fn f | -| main.rs:40:9:40:13 | super | main.rs:1:1:656:2 | SourceFile | +| main.rs:40:9:40:13 | super | main.rs:1:1:672:2 | SourceFile | | main.rs:40:9:40:17 | ...::m1 | main.rs:13:1:37:1 | mod m1 | | main.rs:40:9:40:21 | ...::m2 | main.rs:18:5:36:5 | mod m2 | | main.rs:40:9:40:24 | ...::g | main.rs:23:9:27:9 | fn g | @@ -73,7 +73,7 @@ resolvePath | main.rs:61:17:61:19 | Foo | main.rs:59:9:59:21 | struct Foo | | main.rs:64:13:64:15 | Foo | main.rs:53:5:53:17 | struct Foo | | main.rs:66:5:66:5 | f | main.rs:55:5:62:5 | fn f | -| main.rs:68:5:68:8 | self | main.rs:1:1:656:2 | SourceFile | +| main.rs:68:5:68:8 | self | main.rs:1:1:672:2 | SourceFile | | main.rs:68:5:68:11 | ...::i | main.rs:71:1:83:1 | fn i | | main.rs:74:13:74:15 | Foo | main.rs:48:1:48:13 | struct Foo | | main.rs:78:16:78:18 | i32 | {EXTERNAL LOCATION} | struct i32 | @@ -88,7 +88,7 @@ resolvePath | main.rs:87:57:87:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g | | main.rs:87:80:87:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | | main.rs:100:5:100:22 | f_defined_in_macro | main.rs:99:18:99:42 | fn f_defined_in_macro | -| main.rs:117:13:117:17 | super | main.rs:1:1:656:2 | SourceFile | +| main.rs:117:13:117:17 | super | main.rs:1:1:672:2 | SourceFile | | main.rs:117:13:117:21 | ...::m5 | main.rs:103:1:107:1 | mod m5 | | main.rs:118:9:118:9 | f | main.rs:104:5:106:5 | fn f | | main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f | @@ -266,67 +266,79 @@ resolvePath | main.rs:620:9:620:36 | GenericStruct::<...> | main.rs:563:5:566:5 | struct GenericStruct | | main.rs:620:9:620:47 | ...::call_both | main.rs:586:9:589:9 | fn call_both | | main.rs:620:25:620:35 | Implementor | main.rs:592:5:592:23 | struct Implementor | -| main.rs:627:5:627:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:627:5:627:14 | ...::nested | my.rs:1:1:1:15 | mod nested | -| main.rs:627:5:627:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | -| main.rs:627:5:627:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | -| main.rs:627:5:627:35 | ...::f | my/nested.rs:3:9:5:9 | fn f | -| main.rs:628:5:628:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:628:5:628:9 | ...::f | my.rs:5:1:7:1 | fn f | -| main.rs:629:5:629:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | -| main.rs:629:5:629:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | -| main.rs:629:5:629:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:629:5:629:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:630:5:630:5 | f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:631:5:631:5 | g | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:632:5:632:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:632:5:632:12 | ...::h | main.rs:50:1:69:1 | fn h | -| main.rs:633:5:633:6 | m1 | main.rs:13:1:37:1 | mod m1 | -| main.rs:633:5:633:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 | -| main.rs:633:5:633:13 | ...::g | main.rs:23:9:27:9 | fn g | -| main.rs:634:5:634:6 | m1 | main.rs:13:1:37:1 | mod m1 | -| main.rs:634:5:634:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 | -| main.rs:634:5:634:14 | ...::m3 | main.rs:29:9:35:9 | mod m3 | -| main.rs:634:5:634:17 | ...::h | main.rs:30:27:34:13 | fn h | -| main.rs:635:5:635:6 | m4 | main.rs:39:1:46:1 | mod m4 | -| main.rs:635:5:635:9 | ...::i | main.rs:42:5:45:5 | fn i | -| main.rs:636:5:636:5 | h | main.rs:50:1:69:1 | fn h | -| main.rs:637:5:637:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:638:5:638:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:639:5:639:5 | j | main.rs:97:1:101:1 | fn j | -| main.rs:640:5:640:6 | m6 | main.rs:109:1:120:1 | mod m6 | -| main.rs:640:5:640:9 | ...::g | main.rs:114:5:119:5 | fn g | -| main.rs:641:5:641:6 | m7 | main.rs:122:1:141:1 | mod m7 | -| main.rs:641:5:641:9 | ...::f | main.rs:133:5:140:5 | fn f | -| main.rs:642:5:642:6 | m8 | main.rs:143:1:197:1 | mod m8 | -| main.rs:642:5:642:9 | ...::g | main.rs:181:5:196:5 | fn g | -| main.rs:643:5:643:6 | m9 | main.rs:199:1:207:1 | mod m9 | -| main.rs:643:5:643:9 | ...::f | main.rs:202:5:206:5 | fn f | -| main.rs:644:5:644:7 | m11 | main.rs:230:1:267:1 | mod m11 | -| main.rs:644:5:644:10 | ...::f | main.rs:235:5:238:5 | fn f | -| main.rs:645:5:645:7 | m15 | main.rs:298:1:352:1 | mod m15 | -| main.rs:645:5:645:10 | ...::f | main.rs:339:5:351:5 | fn f | -| main.rs:646:5:646:7 | m16 | main.rs:354:1:446:1 | mod m16 | -| main.rs:646:5:646:10 | ...::f | main.rs:421:5:445:5 | fn f | -| main.rs:647:5:647:7 | m17 | main.rs:448:1:478:1 | mod m17 | -| main.rs:647:5:647:10 | ...::f | main.rs:472:5:477:5 | fn f | -| main.rs:648:5:648:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 | -| main.rs:648:5:648:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f | -| main.rs:649:5:649:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 | -| main.rs:649:5:649:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f | -| main.rs:650:5:650:7 | my3 | my2/mod.rs:12:1:12:12 | mod my3 | -| main.rs:650:5:650:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f | -| main.rs:651:5:651:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | -| main.rs:652:5:652:7 | m18 | main.rs:480:1:498:1 | mod m18 | -| main.rs:652:5:652:12 | ...::m19 | main.rs:485:5:497:5 | mod m19 | -| main.rs:652:5:652:17 | ...::m20 | main.rs:490:9:496:9 | mod m20 | -| main.rs:652:5:652:20 | ...::g | main.rs:491:13:495:13 | fn g | -| main.rs:653:5:653:7 | m23 | main.rs:527:1:552:1 | mod m23 | -| main.rs:653:5:653:10 | ...::f | main.rs:547:5:551:5 | fn f | -| main.rs:654:5:654:7 | m24 | main.rs:554:1:622:1 | mod m24 | -| main.rs:654:5:654:10 | ...::f | main.rs:608:5:621:5 | fn f | -| main.rs:655:5:655:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:655:5:655:11 | ...::h | main.rs:50:1:69:1 | fn h | +| main.rs:626:3:626:12 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) | +| main.rs:626:3:626:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.1.0) | +| main.rs:626:3:626:24 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix | +| main.rs:630:6:630:12 | AStruct | main.rs:629:1:629:17 | struct AStruct | +| main.rs:631:7:631:16 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) | +| main.rs:631:7:631:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.1.0) | +| main.rs:631:7:631:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix | +| main.rs:634:7:634:16 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) | +| main.rs:634:7:634:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.1.0) | +| main.rs:634:7:634:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix | +| main.rs:639:5:639:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:639:5:639:14 | ...::nested | my.rs:1:1:1:15 | mod nested | +| main.rs:639:5:639:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | +| main.rs:639:5:639:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | +| main.rs:639:5:639:35 | ...::f | my/nested.rs:3:9:5:9 | fn f | +| main.rs:640:5:640:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:640:5:640:9 | ...::f | my.rs:5:1:7:1 | fn f | +| main.rs:641:5:641:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | +| main.rs:641:5:641:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | +| main.rs:641:5:641:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:641:5:641:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:642:5:642:5 | f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:643:5:643:5 | g | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:644:5:644:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:644:5:644:12 | ...::h | main.rs:50:1:69:1 | fn h | +| main.rs:645:5:645:6 | m1 | main.rs:13:1:37:1 | mod m1 | +| main.rs:645:5:645:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 | +| main.rs:645:5:645:13 | ...::g | main.rs:23:9:27:9 | fn g | +| main.rs:646:5:646:6 | m1 | main.rs:13:1:37:1 | mod m1 | +| main.rs:646:5:646:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 | +| main.rs:646:5:646:14 | ...::m3 | main.rs:29:9:35:9 | mod m3 | +| main.rs:646:5:646:17 | ...::h | main.rs:30:27:34:13 | fn h | +| main.rs:647:5:647:6 | m4 | main.rs:39:1:46:1 | mod m4 | +| main.rs:647:5:647:9 | ...::i | main.rs:42:5:45:5 | fn i | +| main.rs:648:5:648:5 | h | main.rs:50:1:69:1 | fn h | +| main.rs:649:5:649:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:650:5:650:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:651:5:651:5 | j | main.rs:97:1:101:1 | fn j | +| main.rs:652:5:652:6 | m6 | main.rs:109:1:120:1 | mod m6 | +| main.rs:652:5:652:9 | ...::g | main.rs:114:5:119:5 | fn g | +| main.rs:653:5:653:6 | m7 | main.rs:122:1:141:1 | mod m7 | +| main.rs:653:5:653:9 | ...::f | main.rs:133:5:140:5 | fn f | +| main.rs:654:5:654:6 | m8 | main.rs:143:1:197:1 | mod m8 | +| main.rs:654:5:654:9 | ...::g | main.rs:181:5:196:5 | fn g | +| main.rs:655:5:655:6 | m9 | main.rs:199:1:207:1 | mod m9 | +| main.rs:655:5:655:9 | ...::f | main.rs:202:5:206:5 | fn f | +| main.rs:656:5:656:7 | m11 | main.rs:230:1:267:1 | mod m11 | +| main.rs:656:5:656:10 | ...::f | main.rs:235:5:238:5 | fn f | +| main.rs:657:5:657:7 | m15 | main.rs:298:1:352:1 | mod m15 | +| main.rs:657:5:657:10 | ...::f | main.rs:339:5:351:5 | fn f | +| main.rs:658:5:658:7 | m16 | main.rs:354:1:446:1 | mod m16 | +| main.rs:658:5:658:10 | ...::f | main.rs:421:5:445:5 | fn f | +| main.rs:659:5:659:7 | m17 | main.rs:448:1:478:1 | mod m17 | +| main.rs:659:5:659:10 | ...::f | main.rs:472:5:477:5 | fn f | +| main.rs:660:5:660:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 | +| main.rs:660:5:660:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f | +| main.rs:661:5:661:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 | +| main.rs:661:5:661:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f | +| main.rs:662:5:662:7 | my3 | my2/mod.rs:12:1:12:12 | mod my3 | +| main.rs:662:5:662:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f | +| main.rs:663:5:663:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | +| main.rs:664:5:664:7 | m18 | main.rs:480:1:498:1 | mod m18 | +| main.rs:664:5:664:12 | ...::m19 | main.rs:485:5:497:5 | mod m19 | +| main.rs:664:5:664:17 | ...::m20 | main.rs:490:9:496:9 | mod m20 | +| main.rs:664:5:664:20 | ...::g | main.rs:491:13:495:13 | fn g | +| main.rs:665:5:665:7 | m23 | main.rs:527:1:552:1 | mod m23 | +| main.rs:665:5:665:10 | ...::f | main.rs:547:5:551:5 | fn f | +| main.rs:666:5:666:7 | m24 | main.rs:554:1:622:1 | mod m24 | +| main.rs:666:5:666:10 | ...::f | main.rs:608:5:621:5 | fn f | +| main.rs:667:5:667:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:667:5:667:11 | ...::h | main.rs:50:1:69:1 | fn h | +| main.rs:669:5:669:11 | AStruct | main.rs:629:1:629:17 | struct AStruct | +| main.rs:670:5:670:11 | AStruct | main.rs:629:1:629:17 | struct AStruct | | my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | | my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | | my2/mod.rs:5:5:5:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | @@ -342,7 +354,7 @@ resolvePath | my2/my3/mod.rs:3:5:3:5 | g | my2/mod.rs:3:1:6:1 | fn g | | my2/my3/mod.rs:4:5:4:5 | h | main.rs:50:1:69:1 | fn h | | my2/my3/mod.rs:7:5:7:9 | super | my2/mod.rs:1:1:17:30 | SourceFile | -| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:656:2 | SourceFile | +| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:672:2 | SourceFile | | my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:50:1:69:1 | fn h | | my2/my3/mod.rs:8:5:8:9 | super | my2/mod.rs:1:1:17:30 | SourceFile | | my2/my3/mod.rs:8:5:8:12 | ...::g | my2/mod.rs:3:1:6:1 | fn g | @@ -369,4 +381,21 @@ resolvePath | my/nested.rs:21:5:21:11 | nested1 | my/nested.rs:1:1:17:1 | mod nested1 | | my/nested.rs:21:5:21:20 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | | my/nested.rs:21:5:21:23 | ...::f | my/nested.rs:3:9:5:9 | fn f | +| proc_macro.rs:1:5:1:14 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) | +| proc_macro.rs:1:5:1:27 | ...::TokenStream | {EXTERNAL LOCATION} | struct TokenStream | +| proc_macro.rs:2:5:2:9 | quote | {EXTERNAL LOCATION} | Crate(quote@1.0.40) | +| proc_macro.rs:5:25:5:35 | TokenStream | {EXTERNAL LOCATION} | struct TokenStream | +| proc_macro.rs:5:44:5:54 | TokenStream | {EXTERNAL LOCATION} | struct TokenStream | +| proc_macro.rs:5:60:5:70 | TokenStream | {EXTERNAL LOCATION} | struct TokenStream | +| proc_macro.rs:6:16:6:18 | syn | {EXTERNAL LOCATION} | Crate(syn@2.0.103) | +| proc_macro.rs:6:48:6:50 | syn | {EXTERNAL LOCATION} | Crate(syn@2.0.103) | +| proc_macro.rs:6:48:6:58 | ...::LitStr | {EXTERNAL LOCATION} | struct LitStr | +| proc_macro.rs:6:48:6:58 | ...::parse::<...> | {EXTERNAL LOCATION} | fn parse | +| proc_macro.rs:7:19:7:21 | syn | {EXTERNAL LOCATION} | Crate(syn@2.0.103) | +| proc_macro.rs:7:51:7:53 | syn | {EXTERNAL LOCATION} | Crate(syn@2.0.103) | +| proc_macro.rs:7:51:7:61 | ...::ItemFn | {EXTERNAL LOCATION} | struct ItemFn | +| proc_macro.rs:7:51:7:61 | ...::parse::<...> | {EXTERNAL LOCATION} | fn parse | +| proc_macro.rs:8:21:8:23 | syn | {EXTERNAL LOCATION} | Crate(syn@2.0.103) | +| proc_macro.rs:8:21:8:30 | ...::Ident | {EXTERNAL LOCATION} | struct Ident | +| proc_macro.rs:8:21:8:35 | ...::new | {EXTERNAL LOCATION} | fn new | testFailures diff --git a/rust/ql/test/library-tests/path-resolution/proc_macro.rs b/rust/ql/test/library-tests/path-resolution/proc_macro.rs new file mode 100644 index 00000000000..c95fc6fe640 --- /dev/null +++ b/rust/ql/test/library-tests/path-resolution/proc_macro.rs @@ -0,0 +1,12 @@ +use proc_macro::TokenStream; +use quote::quote; + +#[proc_macro_attribute] +pub fn add_suffix(attr: TokenStream, item: TokenStream) -> TokenStream { + let suff = syn::parse_macro_input!(attr as syn::LitStr).value(); + let mut ast = syn::parse_macro_input!(item as syn::ItemFn); + ast.sig.ident = syn::Ident::new(&format!("{}_{}", ast.sig.ident, suff), ast.sig.ident.span()); + quote! { + #ast + }.into() +}