diff --git a/.gitattributes b/.gitattributes
index df5bed028be1..251558a58941 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -88,3 +88,8 @@
# swift prebuilt resources
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text
+
+# This upgrade script must use windows line-endings to be compatible with old
+# databases.
+/powershell/ql/lib/upgrades/ce269c61feda10a8ca0d16519085f7e55741a694/old.dbscheme eol=crlf
+/powershell/downgrades/802d5b9f407fb0dac894df1c0b4584f2215e1512/semmlecode.powershell.dbscheme eol=crlf
\ No newline at end of file
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
deleted file mode 100644
index 6621d59b7c23..000000000000
--- a/.github/copilot-instructions.md
+++ /dev/null
@@ -1,4 +0,0 @@
-When reviewing code:
-* do not review changes in files with `.expected` extension (they are automatically ensured to be correct).
-* in `.ql` and `.qll` files, do not try to review the code itself as you don't understand the programming language
- well enough to make comments in these languages. You can still check for typos or comment improvements.
diff --git a/.github/workflows/check-change-note.yml b/.github/workflows/check-change-note.yml
index 70b78ce72944..3330e6e1136d 100644
--- a/.github/workflows/check-change-note.yml
+++ b/.github/workflows/check-change-note.yml
@@ -16,6 +16,7 @@ on:
- "shared/**/*.qll"
- "!**/experimental/**"
- "!ql/**"
+ - "!rust/**"
- ".github/workflows/check-change-note.yml"
jobs:
diff --git a/.github/workflows/check-overlay-annotations.yml b/.github/workflows/check-overlay-annotations.yml
deleted file mode 100644
index 5369dfd49d00..000000000000
--- a/.github/workflows/check-overlay-annotations.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Check overlay annotations
-
-on:
- push:
- branches:
- - main
- - 'rc/*'
- pull_request:
- branches:
- - main
- - 'rc/*'
-
-permissions:
- contents: read
-
-jobs:
- sync:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Check overlay annotations
- run: python config/add-overlay-annotations.py --check java
-
diff --git a/.github/workflows/microsoft-codeql-pack-publish.yml b/.github/workflows/microsoft-codeql-pack-publish.yml
new file mode 100644
index 000000000000..9dc8a4c38999
--- /dev/null
+++ b/.github/workflows/microsoft-codeql-pack-publish.yml
@@ -0,0 +1,152 @@
+name: Microsoft CodeQL Pack Publish
+
+on:
+ workflow_dispatch:
+
+jobs:
+ check-branch:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Fail if not on main branch
+ run: |
+ if [ "$GITHUB_REF" != "refs/heads/main" ]; then
+ echo "This workflow can only run on the 'main' branch."
+ exit 1
+ fi
+ codeqlversion:
+ needs: check-branch
+ runs-on: ubuntu-latest
+ outputs:
+ codeql_version: ${{ steps.set_codeql_version.outputs.codeql_version }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set CodeQL Version
+ id: set_codeql_version
+ run: |
+ git fetch
+ git fetch --tags
+ CURRENT_COMMIT=$(git rev-list -1 HEAD)
+ CURRENT_TAG=$(git describe --tags --abbrev=0 --match 'codeql-cli/v*' $CURRENT_COMMIT)
+ CODEQL_VERSION="${CURRENT_TAG#codeql-cli/}"
+ echo "CODEQL_VERSION=$CODEQL_VERSION" >> $GITHUB_OUTPUT
+ publishlibs:
+ environment: secure-publish
+ needs: codeqlversion
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ language: ['powershell']
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install CodeQL
+ shell: bash
+ run: |
+ gh extension install github/gh-codeql
+ gh codeql download "${{ needs.codeqlversion.outputs.codeql_version }}"
+ gh codeql set-version "${{ needs.codeqlversion.outputs.codeql_version }}"
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ - name: Publish OS Microsoft CodeQL Lib Pack
+ shell: bash
+ run: |
+ # Download latest qlpack
+ gh codeql pack download "microsoft/$LANGUAGE-all"
+ PACK_DIR="$HOME/.codeql/packages/microsoft/$LANGUAGE-all"
+ VERSION_COUNT=$(ls -d "$PACK_DIR"/*/ | wc -l)
+ [[ "$VERSION_COUNT" -ne 1 ]] && { echo "Expected exactly one version in $PACK_DIR, but found $VERSION_COUNT. Exiting."; exit 1; }
+
+ # Increment version
+ CURRENT_VERSION=$(ls -v "$PACK_DIR" | tail -n 1)
+ MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1)
+ MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2)
+ PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3)
+ NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
+
+ # Extract dependencies from the existing qlpack.yml before deleting
+ DEPENDENCIES=$(yq 'select(has("dependencies")) | .dependencies | {"dependencies": .}' "$LANGUAGE/ql/lib/qlpack.yml" 2>/dev/null)
+ DATAEXTENSIONS=$(yq 'select(has("dataExtensions")) | .dataExtensions | {"dataExtensions": .}' "$LANGUAGE/ql/lib/qlpack.yml" 2>/dev/null)
+ rm -f "$LANGUAGE/ql/lib/qlpack.yml" "$LANGUAGE/ql/lib/qlpack.lock"
+
+ # Create new qlpack.yml with modified content
+ cat < "$LANGUAGE/ql/lib/qlpack.yml"
+ name: microsoft/$LANGUAGE-all
+ version: $NEXT_VERSION
+ extractor: $LANGUAGE
+ groups:
+ - $LANGUAGE
+ - microsoft-all
+ dbscheme: semmlecode.$LANGUAGE.dbscheme
+ extractor: $LANGUAGE
+ library: true
+ upgrades: upgrades
+ $DEPENDENCIES
+ $DATAEXTENSIONS
+ warnOnImplicitThis: true
+ EOF
+
+ # Publish pack
+ cat "$LANGUAGE/ql/lib/qlpack.yml"
+ gh codeql pack publish "$LANGUAGE/ql/lib"
+ env:
+ LANGUAGE: ${{ matrix.language }}
+ GITHUB_TOKEN: ${{ secrets.PACKAGE_PUBLISH }}
+ publish:
+ environment: secure-publish
+ needs: codeqlversion
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ language: ['csharp', 'cpp', 'java', 'javascript', 'python', 'ruby', 'go', 'rust', 'swift', 'powershell']
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install CodeQL
+ shell: bash
+ run: |
+ gh extension install github/gh-codeql
+ gh codeql download "${{ needs.codeqlversion.outputs.codeql_version }}"
+ gh codeql set-version "${{ needs.codeqlversion.outputs.codeql_version }}"
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ - name: Publish OS Microsoft CodeQL Pack
+ shell: bash
+ run: |
+ # Download latest qlpack
+ gh codeql pack download "microsoft/$LANGUAGE-queries"
+ PACK_DIR="$HOME/.codeql/packages/microsoft/$LANGUAGE-queries"
+ VERSION_COUNT=$(ls -d "$PACK_DIR"/*/ | wc -l)
+ [[ "$VERSION_COUNT" -ne 1 ]] && { echo "Expected exactly one version in $PACK_DIR, but found $VERSION_COUNT. Exiting."; exit 1; }
+
+ # Increment version
+ CURRENT_VERSION=$(ls -v "$PACK_DIR" | tail -n 1)
+ MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1)
+ MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2)
+ PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3)
+ NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
+
+ # Extract dependencies from the existing qlpack.yml before deleting
+ DEPENDENCIES=$(yq 'select(has("dependencies")) | .dependencies | {"dependencies": .}' "$LANGUAGE/ql/src/qlpack.yml" 2>/dev/null)
+ rm -f "$LANGUAGE/ql/src/qlpack.yml" "$LANGUAGE/ql/src/qlpack.lock"
+
+ # Create new qlpack.yml with modified content
+ cat < "$LANGUAGE/ql/src/qlpack.yml"
+ name: microsoft/$LANGUAGE-queries
+ version: $NEXT_VERSION
+ extractor: $LANGUAGE
+ groups:
+ - $LANGUAGE
+ - queries
+ $DEPENDENCIES
+ EOF
+
+ # Publish pack
+ cat "$LANGUAGE/ql/src/qlpack.yml"
+ gh codeql pack publish "$LANGUAGE/ql/src"
+ env:
+ LANGUAGE: ${{ matrix.language }}
+ GITHUB_TOKEN: ${{ secrets.PACKAGE_PUBLISH }}
+
diff --git a/.github/workflows/powershell-pr-check.yml b/.github/workflows/powershell-pr-check.yml
new file mode 100644
index 000000000000..d6ab90989808
--- /dev/null
+++ b/.github/workflows/powershell-pr-check.yml
@@ -0,0 +1,32 @@
+name: PowerShell PR Check
+
+on:
+ pull_request:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ powershell-pr-check:
+ name: powershell-pr-check
+ runs-on: windows-latest
+ if: github.repository == 'microsoft/codeql'
+ permissions:
+ contents: read
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ token: ${{ github.token }}
+ - name: Setup CodeQL
+ uses: ./.github/actions/fetch-codeql
+ with:
+ channel: release
+ - name: Install PowerShell
+ run: |
+ $path = Split-Path (Get-Command codeql).Source
+ ./powershell/build-win64.ps1 $path
+ - name: Run QL tests
+ run: |
+ codeql test run --threads=0 powershell/ql/test
diff --git a/.github/workflows/ql-for-ql-dataset_measure.yml b/.github/workflows/ql-for-ql-dataset_measure.yml
index c3441ffa4074..d133eb0ad350 100644
--- a/.github/workflows/ql-for-ql-dataset_measure.yml
+++ b/.github/workflows/ql-for-ql-dataset_measure.yml
@@ -53,7 +53,7 @@ jobs:
- name: Create database
run: |
"${CODEQL}" database create \
- --search-path "${{ github.workspace }}" \
+ --search-path "${{ github.workspace }}"
--threads 4 \
--language ql --source-root "${{ github.workspace }}/repo" \
"${{ runner.temp }}/database"
diff --git a/.github/workflows/sync-main-tags.yml b/.github/workflows/sync-main-tags.yml
new file mode 100644
index 000000000000..a22cf8ceba9b
--- /dev/null
+++ b/.github/workflows/sync-main-tags.yml
@@ -0,0 +1,28 @@
+name: Sync Main Tags
+
+on:
+ pull_request:
+ types:
+ - closed
+ branches:
+ - main
+
+jobs:
+ sync-main-tags:
+ name: Sync Main Tags
+ runs-on: ubuntu-latest
+ if: github.repository == 'microsoft/codeql' && github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'auto/sync-main-pr'
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: Push Tags
+ run: |
+ git remote add upstream https://github.com/github/codeql.git
+ git fetch upstream --tags --force
+ git push --force origin --tags
+ env:
+ GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
diff --git a/.github/workflows/sync-main.yml b/.github/workflows/sync-main.yml
new file mode 100644
index 000000000000..cdc3e27f0e89
--- /dev/null
+++ b/.github/workflows/sync-main.yml
@@ -0,0 +1,91 @@
+name: Sync Main
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - .github/workflows/sync-main.yml
+ schedule:
+ - cron: '55 * * * *'
+
+jobs:
+ sync-main:
+ name: Sync-main
+ runs-on: ubuntu-latest
+ if: github.repository == 'microsoft/codeql'
+ permissions:
+ contents: write
+ pull-requests: write
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.WORKFLOW_TOKEN }}
+ - name: Git config
+ shell: bash
+ run: |
+ git config user.name "dilanbhalla"
+ git config user.email "dilanbhalla@microsoft.com"
+ - name: Git checkout auto/sync-main-pr
+ shell: bash
+ run: |
+ git fetch origin
+ if git ls-remote --exit-code --heads origin auto/sync-main-pr > /dev/null; then
+ echo "Branch exists remotely. Checking it out."
+ git checkout -B auto/sync-main-pr origin/auto/sync-main-pr
+ else
+ echo "Branch does not exist remotely. Creating from main."
+ git checkout -B auto/sync-main-pr origin/main
+ git push -u origin auto/sync-main-pr
+ fi
+ - name: Sync origin/main
+ shell: bash
+ run: |
+ echo "::group::Sync with main branch"
+ git pull origin auto/sync-main-pr; exitCode=$?; if [ $exitCode -ne 0 ]; then exitCode=0; fi
+ git pull origin main --no-rebase
+ git push --force origin auto/sync-main-pr
+ echo "::endgroup::"
+ - name: Sync upstream/codeql-cli/latest
+ shell: bash
+ run: |
+ echo "::group::Set up remote"
+ git remote add upstream https://github.com/github/codeql.git
+ git fetch upstream --tags --force
+ echo "::endgroup::"
+ echo "::group::Merge codeql-cli/latest"
+ set -x
+ git merge codeql-cli/latest
+ set +x
+ echo "::endgroup::"
+ - name: Push sync branch
+ run: |
+ git push origin auto/sync-main-pr
+ env:
+ GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
+ GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
+ - name: Create PR if it doesn't exist
+ shell: bash
+ run: |
+ pr_number=$(gh pr list --repo microsoft/codeql --head auto/sync-main-pr --base main --json number --jq '.[0].number')
+ if [ -n "$pr_number" ]; then
+ echo "PR from auto/sync-main-pr to main already exists (PR #$pr_number). Exiting gracefully."
+ else
+ if git fetch origin main auto/sync-main-pr && [ -n "$(git rev-list origin/main..origin/auto/sync-main-pr)" ]; then
+ echo "PR does not exist. Creating one..."
+ gh pr create --repo microsoft/codeql --fill -B main -H auto/sync-main-pr \
+ --label 'autogenerated' \
+ --title 'Sync Main (autogenerated)' \
+ --body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\`." \
+ --reviewer 'MathiasVP' \
+ --reviewer 'ropwareJB'
+ else
+ echo "No changes to sync from auto/sync-main-pr to main. Exiting gracefully."
+ fi
+ fi
+ env:
+ GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
+
diff --git a/Cargo.lock b/Cargo.lock
index 263b16482a98..9e7905aa99b0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -419,7 +419,6 @@ dependencies = [
"lazy_static",
"rayon",
"regex",
- "serde_json",
"tracing",
"tracing-subscriber",
"tree-sitter",
diff --git a/README.md b/README.md
index 99433b8ca49f..b0f6c52bbdcd 100644
--- a/README.md
+++ b/README.md
@@ -29,3 +29,5 @@ You can install the [CodeQL for Visual Studio Code](https://marketplace.visualst
### Tasks
The `.vscode/tasks.json` file defines custom tasks specific to working in this repository. To invoke one of these tasks, select the `Terminal | Run Task...` menu option, and then select the desired task from the dropdown. You can also invoke the `Tasks: Run Task` command from the command palette.
+
+
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 000000000000..e138ec5d6a77
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,41 @@
+
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+ * Full paths of source file(s) related to the manifestation of the issue
+ * The location of the affected source code (tag/branch/commit or direct URL)
+ * Any special configuration required to reproduce the issue
+ * Step-by-step instructions to reproduce the issue
+ * Proof-of-concept or exploit code (if possible)
+ * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+
diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml
index c6a0df46cfc1..f5e82a8647a6 100644
--- a/actions/ql/lib/qlpack.yml
+++ b/actions/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/actions-all
-version: 0.4.13-dev
+version: 0.4.12
library: true
warnOnImplicitThis: true
dependencies:
diff --git a/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.md b/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.md
index 486b3cb24972..36622d127d80 100644
--- a/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.md
+++ b/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.md
@@ -1,4 +1,6 @@
-## Overview
+# Environment Path Injection
+
+## Description
GitHub Actions allow to define the system PATH variable by writing to a file pointed to by the `GITHUB_PATH` environment variable. Writing to this file appends a directory to the system PATH variable and automatically makes it available to all subsequent actions in the current job.
@@ -10,11 +12,11 @@ echo "$HOME/.local/bin" >> $GITHUB_PATH
If an attacker can control the contents of the system PATH, they are able to influence what commands are run in subsequent steps of the same job.
-## Recommendation
+## Recommendations
Do not allow untrusted data to influence the system PATH: Avoid using untrusted data sources (e.g., artifact content) to define the system PATH.
-## Example
+## Examples
### Incorrect Usage
@@ -34,4 +36,4 @@ If an attacker can manipulate the value being set, such as through artifact down
## References
-- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).
+- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
diff --git a/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.md b/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.md
index 486b3cb24972..36622d127d80 100644
--- a/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.md
+++ b/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.md
@@ -1,4 +1,6 @@
-## Overview
+# Environment Path Injection
+
+## Description
GitHub Actions allow to define the system PATH variable by writing to a file pointed to by the `GITHUB_PATH` environment variable. Writing to this file appends a directory to the system PATH variable and automatically makes it available to all subsequent actions in the current job.
@@ -10,11 +12,11 @@ echo "$HOME/.local/bin" >> $GITHUB_PATH
If an attacker can control the contents of the system PATH, they are able to influence what commands are run in subsequent steps of the same job.
-## Recommendation
+## Recommendations
Do not allow untrusted data to influence the system PATH: Avoid using untrusted data sources (e.g., artifact content) to define the system PATH.
-## Example
+## Examples
### Incorrect Usage
@@ -34,4 +36,4 @@ If an attacker can manipulate the value being set, such as through artifact down
## References
-- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).
+- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
diff --git a/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.md b/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.md
index 94cdc439fbda..cc35402b804d 100644
--- a/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.md
+++ b/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.md
@@ -1,4 +1,6 @@
-## Overview
+# Environment Variable Injection
+
+## Description
GitHub Actions allow to define environment variables by writing to a file pointed to by the `GITHUB_ENV` environment variable:
@@ -35,7 +37,7 @@ steps:
If an attacker can control the values assigned to environment variables and there is no sanitization in place, the attacker will be able to inject additional variables by injecting new lines or `{delimiters}`.
-## Recommendation
+## Recommendations
1. **Do not allow untrusted data to influence environment variables**:
@@ -62,7 +64,7 @@ If an attacker can control the values assigned to environment variables and ther
} >> "$GITHUB_ENV"
```
-## Example
+## Examples
### Example of Vulnerability
@@ -111,5 +113,5 @@ An attacker is be able to run arbitrary code by injecting environment variables
## References
-- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).
-- Synacktiv: [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation).
+- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
+- [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation)
diff --git a/actions/ql/src/Security/CWE-077/EnvVarInjectionMedium.md b/actions/ql/src/Security/CWE-077/EnvVarInjectionMedium.md
index d604ccf19652..5d2c61150972 100644
--- a/actions/ql/src/Security/CWE-077/EnvVarInjectionMedium.md
+++ b/actions/ql/src/Security/CWE-077/EnvVarInjectionMedium.md
@@ -1,4 +1,6 @@
-## Overview
+# Environment Variable Injection
+
+## Description
GitHub Actions allow to define environment variables by writing to a file pointed to by the `GITHUB_ENV` environment variable:
@@ -35,7 +37,7 @@ steps:
If an attacker can control the values assigned to environment variables and there is no sanitization in place, the attacker will be able to inject additional variables by injecting new lines or `{delimiters}`.
-## Recommendation
+## Recommendations
1. **Do not allow untrusted data to influence environment variables**:
@@ -62,7 +64,7 @@ If an attacker can control the values assigned to environment variables and ther
} >> "$GITHUB_ENV"
```
-## Example
+## Examples
### Example of Vulnerability
@@ -111,5 +113,5 @@ An attacker would be able to run arbitrary code by injecting environment variabl
## References
-- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).
-- Synacktiv: [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation).
+- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
+- [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation)
diff --git a/actions/ql/src/Security/CWE-094/CodeInjectionCritical.md b/actions/ql/src/Security/CWE-094/CodeInjectionCritical.md
index 1c8c016dade8..f2e494468112 100644
--- a/actions/ql/src/Security/CWE-094/CodeInjectionCritical.md
+++ b/actions/ql/src/Security/CWE-094/CodeInjectionCritical.md
@@ -1,16 +1,18 @@
-## Overview
+# Code Injection in GitHub Actions
+
+## Description
Using user-controlled input in GitHub Actions may lead to code injection in contexts like _run:_ or _script:_.
Code injection in GitHub Actions may allow an attacker to exfiltrate any secrets used in the workflow and the temporary GitHub repository authorization token. The token may have write access to the repository, allowing an attacker to make changes to the repository.
-## Recommendation
+## Recommendations
The best practice to avoid code injection vulnerabilities in GitHub workflows is to set the untrusted input value of the expression to an intermediate environment variable and then use the environment variable using the native syntax of the shell/script interpreter (that is, not _${{ env.VAR }}_).
It is also recommended to limit the permissions of any tokens used by a workflow such as the GITHUB_TOKEN.
-## Example
+## Examples
### Incorrect Usage
diff --git a/actions/ql/src/Security/CWE-094/CodeInjectionMedium.md b/actions/ql/src/Security/CWE-094/CodeInjectionMedium.md
index 1c8c016dade8..f2e494468112 100644
--- a/actions/ql/src/Security/CWE-094/CodeInjectionMedium.md
+++ b/actions/ql/src/Security/CWE-094/CodeInjectionMedium.md
@@ -1,16 +1,18 @@
-## Overview
+# Code Injection in GitHub Actions
+
+## Description
Using user-controlled input in GitHub Actions may lead to code injection in contexts like _run:_ or _script:_.
Code injection in GitHub Actions may allow an attacker to exfiltrate any secrets used in the workflow and the temporary GitHub repository authorization token. The token may have write access to the repository, allowing an attacker to make changes to the repository.
-## Recommendation
+## Recommendations
The best practice to avoid code injection vulnerabilities in GitHub workflows is to set the untrusted input value of the expression to an intermediate environment variable and then use the environment variable using the native syntax of the shell/script interpreter (that is, not _${{ env.VAR }}_).
It is also recommended to limit the permissions of any tokens used by a workflow such as the GITHUB_TOKEN.
-## Example
+## Examples
### Incorrect Usage
diff --git a/actions/ql/src/Security/CWE-1395/UseOfKnownVulnerableAction.md b/actions/ql/src/Security/CWE-1395/UseOfKnownVulnerableAction.md
index d9c02b6d7f79..91360a30ed88 100644
--- a/actions/ql/src/Security/CWE-1395/UseOfKnownVulnerableAction.md
+++ b/actions/ql/src/Security/CWE-1395/UseOfKnownVulnerableAction.md
@@ -1,11 +1,13 @@
-## Overview
+# Use of Actions with known vulnerabilities
+
+## Description
The security of the workflow and the repository could be compromised by GitHub Actions workflows that utilize GitHub Actions with known vulnerabilities.
-## Recommendation
+## Recommendations
Either remove the component from the workflow or upgrade it to a version that is not vulnerable.
## References
-- GitHub Docs: [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot).
+- [GitHub Docs: Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot)
diff --git a/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md b/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md
index e932fcf50fdc..9385759dae95 100644
--- a/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md
+++ b/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md
@@ -1,21 +1,12 @@
-## Overview
+# Actions Job and Workflow Permissions are not set
-If a GitHub Actions job or workflow has no explicit permissions set, then the repository permissions are used. Repositories created under organizations inherit the organization permissions. The organizations or repositories created before February 2023 have the default permissions set to read-write. Often these permissions do not adhere to the principle of least privilege and can be reduced to read-only, leaving the `write` permission only to a specific types as `issues: write` or `pull-requests: write`.
-
-## Recommendation
-
-Add the `permissions` key to the job or the root of workflow (in this case it is applied to all jobs in the workflow that do not have their own `permissions` key) and assign the least privileges required to complete the task.
-
-## Example
+## Description
-### Incorrect Usage
+If a GitHub Actions job or workflow has no explicit permissions set, then the repository permissions are used. Repositories created under organizations inherit the organization permissions. The organizations or repositories created before February 2023 have the default permissions set to read-write. Often these permissions do not adhere to the principle of least privilege and can be reduced to read-only, leaving the `write` permission only to a specific types as `issues: write` or `pull-requests: write`.
-```yaml
-name: "My workflow"
-# No permissions block
-```
+## Recommendations
-### Correct Usage
+Add the `permissions` key to the job or the root of workflow (in this case it is applied to all jobs in the workflow that do not have their own `permissions` key) and assign the least privileges required to complete the task:
```yaml
name: "My workflow"
@@ -36,4 +27,4 @@ jobs:
## References
-- GitHub Docs: [Assigning permissions to jobs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/assigning-permissions-to-jobs).
+- [Assigning permissions to jobs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/assigning-permissions-to-jobs)
diff --git a/actions/ql/src/Security/CWE-285/ImproperAccessControl.md b/actions/ql/src/Security/CWE-285/ImproperAccessControl.md
index f8596c4c3471..594f381d8ce0 100644
--- a/actions/ql/src/Security/CWE-285/ImproperAccessControl.md
+++ b/actions/ql/src/Security/CWE-285/ImproperAccessControl.md
@@ -1,12 +1,14 @@
-## Overview
+# Improper Access Control
+
+## Description
Sometimes labels are used to approve GitHub Actions. An authorization check may not be properly implemented, allowing an attacker to mutate the code after it has been reviewed and approved by label.
-## Recommendation
+## Recommendations
When using labels, make sure that the code cannot be modified after it has been reviewed and the label has been set.
-## Example
+## Examples
### Incorrect Usage
@@ -55,4 +57,4 @@ jobs:
## References
-- GitHub Docs: [Events that trigger workflows](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target).
+- [Events that trigger workflows](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target)
diff --git a/actions/ql/src/Security/CWE-312/ExcessiveSecretsExposure.md b/actions/ql/src/Security/CWE-312/ExcessiveSecretsExposure.md
index b56acf07ad63..9351af5cf1e2 100644
--- a/actions/ql/src/Security/CWE-312/ExcessiveSecretsExposure.md
+++ b/actions/ql/src/Security/CWE-312/ExcessiveSecretsExposure.md
@@ -1,12 +1,14 @@
-## Overview
+# Excessive Secrets Exposure
+
+## Description
When the workflow runner cannot determine what secrets are needed to run the workflow, it will pass all the available secrets to the runner including organization and repository secrets. This violates the least privileged principle and increases the impact of a potential vulnerability affecting the workflow.
-## Recommendation
+## Recommendations
Only pass those secrets that are needed by the workflow. Avoid using expressions such as `toJSON(secrets)` or dynamically accessed secrets such as `secrets[format('GH_PAT_%s', matrix.env)]` since the workflow will need to receive all secrets to decide at runtime which one needs to be used.
-## Example
+## Examples
### Incorrect Usage
@@ -46,5 +48,5 @@ env:
## References
-- GitHub Docs: [Using secrets in GitHub Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#using-encrypted-secrets-in-a-workflow).
-- poutine: [Job uses all secrets](https://github.com/boostsecurityio/poutine/blob/main/docs/content/en/rules/job_all_secrets.md).
+- [Using secrets in GitHub Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#using-encrypted-secrets-in-a-workflow)
+- [Job uses all secrets](https://github.com/boostsecurityio/poutine/blob/main/docs/content/en/rules/job_all_secrets.md)
diff --git a/actions/ql/src/Security/CWE-312/SecretsInArtifacts.md b/actions/ql/src/Security/CWE-312/SecretsInArtifacts.md
index bf658864ed7e..5b05c9a118fa 100644
--- a/actions/ql/src/Security/CWE-312/SecretsInArtifacts.md
+++ b/actions/ql/src/Security/CWE-312/SecretsInArtifacts.md
@@ -1,4 +1,6 @@
-## Overview
+# Storage of sensitive information in GitHub Actions artifact
+
+## Description
Sensitive information included in a GitHub Actions artifact can allow an attacker to access the sensitive information if the artifact is published.
@@ -8,8 +10,6 @@ Only store information that is meant to be publicly available in a GitHub Action
## Example
-### Incorrect Usage
-
The following example uses `actions/checkout` to checkout code which stores the GITHUB_TOKEN in the \`.git/config\` file and then stores the contents of the \`.git\` repository into the artifact:
```yaml
@@ -28,8 +28,6 @@ jobs:
path: .
```
-### Correct Usage
-
The issue has been fixed below, where the `actions/upload-artifact` uses a version (v4+) which does not include hidden files or directories into the artifact.
```yaml
diff --git a/actions/ql/src/Security/CWE-312/UnmaskedSecretExposure.md b/actions/ql/src/Security/CWE-312/UnmaskedSecretExposure.md
index 031bd5957881..c33b89fdcec6 100644
--- a/actions/ql/src/Security/CWE-312/UnmaskedSecretExposure.md
+++ b/actions/ql/src/Security/CWE-312/UnmaskedSecretExposure.md
@@ -1,12 +1,14 @@
-## Overview
+# Unmasked Secret Exposure
+
+## Description
Secrets derived from other secrets are not known to the workflow runner, and therefore are not masked unless explicitly registered.
-## Recommendation
+## Recommendations
Avoid defining non-plain secrets. For example, do not define a new secret containing a JSON object and then read properties out of it from the workflow, since these read values will not be masked by the workflow runner.
-## Example
+## Examples
### Incorrect Usage
@@ -32,4 +34,4 @@ Avoid defining non-plain secrets. For example, do not define a new secret contai
## References
-- GitHub Docs: [Using secrets in GitHub Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#using-encrypted-secrets-in-a-workflow).
+- [Using secrets in GitHub Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#using-encrypted-secrets-in-a-workflow)
diff --git a/actions/ql/src/Security/CWE-349/CachePoisoningViaCodeInjection.md b/actions/ql/src/Security/CWE-349/CachePoisoningViaCodeInjection.md
index f75028a27e61..667c41dc153e 100644
--- a/actions/ql/src/Security/CWE-349/CachePoisoningViaCodeInjection.md
+++ b/actions/ql/src/Security/CWE-349/CachePoisoningViaCodeInjection.md
@@ -1,4 +1,6 @@
-## Overview
+# Cache Poisoning in GitHub Actions
+
+## Description
GitHub Actions cache poisoning is a technique that allows an attacker to inject malicious content into the Action's cache from unprivileged workflow, potentially leading to code execution in privileged workflows.
@@ -21,7 +23,7 @@ In GitHub Actions, cache scopes are primarily determined by the branch structure
Due to the above design, if something is cached in the context of the default branch (e.g., `main`), it becomes accessible to any feature branch derived from `main`.
-## Recommendation
+## Recommendations
1. Avoid using caching in workflows that handle sensitive operations like releases.
2. If caching must be used:
@@ -32,7 +34,7 @@ Due to the above design, if something is cached in the context of the default br
4. Never run untrusted code in the context of the default branch.
5. Sign the cache value cryptographically and verify the signature before usage.
-## Example
+## Examples
### Incorrect Usage
@@ -76,6 +78,6 @@ jobs:
## References
-- Adnan Khan's Blog: [The Monsters in Your Build Cache – GitHub Actions Cache Poisoning](https://adnanthekhan.com/2024/05/06/the-monsters-in-your-build-cache-github-actions-cache-poisoning/).
-- GitHub Docs: [GitHub Actions Caching Documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
-- Scribe Security Blog: [Cache Poisoning in GitHub Actions](https://scribesecurity.com/blog/github-cache-poisoning/).
+- [The Monsters in Your Build Cache – GitHub Actions Cache Poisoning](https://adnanthekhan.com/2024/05/06/the-monsters-in-your-build-cache-github-actions-cache-poisoning/)
+- [GitHub Actions Caching Documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)
+- [Cache Poisoning in GitHub Actions](https://scribesecurity.com/blog/github-cache-poisoning/)
diff --git a/actions/ql/src/Security/CWE-349/CachePoisoningViaDirectCache.md b/actions/ql/src/Security/CWE-349/CachePoisoningViaDirectCache.md
index 849b771a8ff0..c12fb7998929 100644
--- a/actions/ql/src/Security/CWE-349/CachePoisoningViaDirectCache.md
+++ b/actions/ql/src/Security/CWE-349/CachePoisoningViaDirectCache.md
@@ -1,4 +1,6 @@
-## Overview
+# Cache Poisoning in GitHub Actions
+
+## Description
GitHub Actions cache poisoning is a technique that allows an attacker to inject malicious content into the Action's cache from unprivileged workflow, potentially leading to code execution in privileged workflows.
@@ -21,7 +23,7 @@ In GitHub Actions, cache scopes are primarily determined by the branch structure
Due to the above design, if something is cached in the context of the default branch (e.g., `main`), it becomes accessible to any feature branch derived from `main`.
-## Recommendation
+## Recommendations
1. Avoid using caching in workflows that handle sensitive operations like releases.
2. If caching must be used:
@@ -32,7 +34,7 @@ Due to the above design, if something is cached in the context of the default br
4. Never run untrusted code in the context of the default branch.
5. Sign the cache value cryptographically and verify the signature before usage.
-## Example
+## Examples
### Incorrect Usage
@@ -121,6 +123,6 @@ jobs:
## References
-- Adnan Khan's Blog: [The Monsters in Your Build Cache – GitHub Actions Cache Poisoning](https://adnanthekhan.com/2024/05/06/the-monsters-in-your-build-cache-github-actions-cache-poisoning/).
-- GitHub Docs: [GitHub Actions Caching Documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
-- Scribe Security Blog: [Cache Poisoning in GitHub Actions](https://scribesecurity.com/blog/github-cache-poisoning/).
+- [The Monsters in Your Build Cache – GitHub Actions Cache Poisoning](https://adnanthekhan.com/2024/05/06/the-monsters-in-your-build-cache-github-actions-cache-poisoning/)
+- [GitHub Actions Caching Documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)
+- [Cache Poisoning in GitHub Actions](https://scribesecurity.com/blog/github-cache-poisoning/)
diff --git a/actions/ql/src/Security/CWE-349/CachePoisoningViaPoisonableStep.md b/actions/ql/src/Security/CWE-349/CachePoisoningViaPoisonableStep.md
index fefd6d61a44d..c777e1980393 100644
--- a/actions/ql/src/Security/CWE-349/CachePoisoningViaPoisonableStep.md
+++ b/actions/ql/src/Security/CWE-349/CachePoisoningViaPoisonableStep.md
@@ -1,4 +1,6 @@
-## Overview
+# Cache Poisoning in GitHub Actions
+
+## Description
GitHub Actions cache poisoning is a technique that allows an attacker to inject malicious content into the Action's cache from unprivileged workflow, potentially leading to code execution in privileged workflows.
@@ -21,7 +23,7 @@ In GitHub Actions, cache scopes are primarily determined by the branch structure
Due to the above design, if something is cached in the context of the default branch (e.g., `main`), it becomes accessible to any feature branch derived from `main`.
-## Recommendation
+## Recommendations
1. Avoid using caching in workflows that handle sensitive operations like releases.
2. If caching must be used:
@@ -32,7 +34,7 @@ Due to the above design, if something is cached in the context of the default br
4. Never run untrusted code in the context of the default branch.
5. Sign the cache value cryptographically and verify the signature before usage.
-## Example
+## Examples
### Incorrect Usage
@@ -78,6 +80,6 @@ jobs:
## References
-- Adnan Khan's Blog: [The Monsters in Your Build Cache – GitHub Actions Cache Poisoning](https://adnanthekhan.com/2024/05/06/the-monsters-in-your-build-cache-github-actions-cache-poisoning/).
-- GitHub Docs: [GitHub Actions Caching Documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
-- Scribe Security Blog: [Cache Poisoning in GitHub Actions](https://scribesecurity.com/blog/github-cache-poisoning/).
+- [The Monsters in Your Build Cache – GitHub Actions Cache Poisoning](https://adnanthekhan.com/2024/05/06/the-monsters-in-your-build-cache-github-actions-cache-poisoning/)
+- [GitHub Actions Caching Documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)
+- [Cache Poisoning in GitHub Actions](https://scribesecurity.com/blog/github-cache-poisoning/)
diff --git a/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUCritical.md b/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUCritical.md
index c1912b97fa8f..4e9b389834e8 100644
--- a/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUCritical.md
+++ b/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUCritical.md
@@ -1,15 +1,17 @@
-## Overview
+# Untrusted Checkout TOCTOU (Time-of-check to time-of-use)
+
+## Description
Untrusted Checkout is protected by a security check but the checked-out branch can be changed after the check.
-## Recommendation
+## Recommendations
Verify that the code has not been modified after the security check. This may be achieved differently depending on the type of check:
- Deployment Environment Approval: Make sure to use a non-mutable reference to the code to be executed. For example use a `sha` instead of a `ref`.
- Label Gates: Make sure to use a non-mutable reference to the code to be executed. For example use a `sha` instead of a `ref`.
-## Example
+## Examples
### Incorrect Usage (Deployment Environment Approval)
@@ -97,4 +99,4 @@ jobs:
## References
-- [ActionsTOCTOU](https://github.com/AdnaneKhan/ActionsTOCTOU).
+- [ActionsTOCTOU](https://github.com/AdnaneKhan/ActionsTOCTOU)
diff --git a/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUHigh.md b/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUHigh.md
index c1912b97fa8f..4e9b389834e8 100644
--- a/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUHigh.md
+++ b/actions/ql/src/Security/CWE-367/UntrustedCheckoutTOCTOUHigh.md
@@ -1,15 +1,17 @@
-## Overview
+# Untrusted Checkout TOCTOU (Time-of-check to time-of-use)
+
+## Description
Untrusted Checkout is protected by a security check but the checked-out branch can be changed after the check.
-## Recommendation
+## Recommendations
Verify that the code has not been modified after the security check. This may be achieved differently depending on the type of check:
- Deployment Environment Approval: Make sure to use a non-mutable reference to the code to be executed. For example use a `sha` instead of a `ref`.
- Label Gates: Make sure to use a non-mutable reference to the code to be executed. For example use a `sha` instead of a `ref`.
-## Example
+## Examples
### Incorrect Usage (Deployment Environment Approval)
@@ -97,4 +99,4 @@ jobs:
## References
-- [ActionsTOCTOU](https://github.com/AdnaneKhan/ActionsTOCTOU).
+- [ActionsTOCTOU](https://github.com/AdnaneKhan/ActionsTOCTOU)
diff --git a/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueCritical.md b/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueCritical.md
index eedb3871230e..1e7ea120cbaa 100644
--- a/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueCritical.md
+++ b/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueCritical.md
@@ -1,4 +1,6 @@
-## Overview
+# If Condition Always Evaluates to True
+
+## Description
GitHub Workflow Expressions (`${{ ... }}`) used in the `if` condition of jobs or steps must not contain extra characters or spaces. Otherwise, the condition is invariably evaluated to `true`.
@@ -12,7 +14,7 @@ To avoid the vulnerability where an `if` condition always evaluates to `true`, i
2. Avoid multiline or spaced-out conditional expressions that might inadvertently introduce unwanted characters or formatting.
3. Test the workflow to ensure the `if` conditions behave as expected under different scenarios.
-## Example
+## Examples
### Correct Usage
@@ -58,4 +60,4 @@ To avoid the vulnerability where an `if` condition always evaluates to `true`, i
## References
-- GitHub actions/runner Issues: [Expression Always True](https://github.com/actions/runner/issues/1173).
+- [Expression Always True Github Issue](https://github.com/actions/runner/issues/1173)
diff --git a/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueHigh.md b/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueHigh.md
index eedb3871230e..1e7ea120cbaa 100644
--- a/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueHigh.md
+++ b/actions/ql/src/Security/CWE-571/ExpressionIsAlwaysTrueHigh.md
@@ -1,4 +1,6 @@
-## Overview
+# If Condition Always Evaluates to True
+
+## Description
GitHub Workflow Expressions (`${{ ... }}`) used in the `if` condition of jobs or steps must not contain extra characters or spaces. Otherwise, the condition is invariably evaluated to `true`.
@@ -12,7 +14,7 @@ To avoid the vulnerability where an `if` condition always evaluates to `true`, i
2. Avoid multiline or spaced-out conditional expressions that might inadvertently introduce unwanted characters or formatting.
3. Test the workflow to ensure the `if` conditions behave as expected under different scenarios.
-## Example
+## Examples
### Correct Usage
@@ -58,4 +60,4 @@ To avoid the vulnerability where an `if` condition always evaluates to `true`, i
## References
-- GitHub actions/runner Issues: [Expression Always True](https://github.com/actions/runner/issues/1173).
+- [Expression Always True Github Issue](https://github.com/actions/runner/issues/1173)
diff --git a/actions/ql/src/Security/CWE-829/ArtifactPoisoningCritical.md b/actions/ql/src/Security/CWE-829/ArtifactPoisoningCritical.md
index 932dad198fce..aa7bcf4b0bf7 100644
--- a/actions/ql/src/Security/CWE-829/ArtifactPoisoningCritical.md
+++ b/actions/ql/src/Security/CWE-829/ArtifactPoisoningCritical.md
@@ -1,14 +1,16 @@
-## Overview
+# Artifact poisoning
+
+## Description
The workflow downloads artifacts that may be poisoned by an attacker in previously triggered workflows. If the contents of these artifacts are not correctly extracted, stored and verified, they may lead to repository compromise if untrusted code gets executed in a privileged job.
-## Recommendation
+## Recommendations
- Always consider artifacts content as untrusted.
- Extract the contents of artifacts to a temporary folder so they cannot override existing files.
- Verify the contents of the artifacts downloaded. If an artifact is expected to contain a numeric value, verify it before using it.
-## Example
+## Examples
### Incorrect Usage
@@ -67,4 +69,4 @@ jobs:
## References
-- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+- [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
diff --git a/actions/ql/src/Security/CWE-829/ArtifactPoisoningMedium.md b/actions/ql/src/Security/CWE-829/ArtifactPoisoningMedium.md
index 932dad198fce..aa7bcf4b0bf7 100644
--- a/actions/ql/src/Security/CWE-829/ArtifactPoisoningMedium.md
+++ b/actions/ql/src/Security/CWE-829/ArtifactPoisoningMedium.md
@@ -1,14 +1,16 @@
-## Overview
+# Artifact poisoning
+
+## Description
The workflow downloads artifacts that may be poisoned by an attacker in previously triggered workflows. If the contents of these artifacts are not correctly extracted, stored and verified, they may lead to repository compromise if untrusted code gets executed in a privileged job.
-## Recommendation
+## Recommendations
- Always consider artifacts content as untrusted.
- Extract the contents of artifacts to a temporary folder so they cannot override existing files.
- Verify the contents of the artifacts downloaded. If an artifact is expected to contain a numeric value, verify it before using it.
-## Example
+## Examples
### Incorrect Usage
@@ -67,4 +69,4 @@ jobs:
## References
-- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+- [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
diff --git a/actions/ql/src/Security/CWE-829/UnpinnedActionsTag.md b/actions/ql/src/Security/CWE-829/UnpinnedActionsTag.md
index 16551e9c89a7..f8ea2fdc82fe 100644
--- a/actions/ql/src/Security/CWE-829/UnpinnedActionsTag.md
+++ b/actions/ql/src/Security/CWE-829/UnpinnedActionsTag.md
@@ -1,12 +1,14 @@
-## Overview
+# Unpinned tag for 3rd party Action in workflow
+
+## Description
Using a tag for a 3rd party Action that is not pinned to a commit can lead to executing an untrusted Action through a supply chain attack.
-## Recommendation
+## Recommendations
Pinning an action to a full length commit SHA is currently the only way to use a non-immutable action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.
-## Example
+## Examples
### Incorrect Usage
@@ -22,4 +24,4 @@ Pinning an action to a full length commit SHA is currently the only way to use a
## References
-- GitHub Docs: [Using third-party actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions).
+- [Using third-party actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions)
\ No newline at end of file
diff --git a/actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.md b/actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.md
index 50e81cc240ca..71ba2032a9d0 100644
--- a/actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.md
+++ b/actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.md
@@ -1,8 +1,10 @@
-## Overview
+# Execution of Untrusted Checked-out Code
+
+## Description
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed in a privileged job.
-## Recommendation
+## Recommendations
- Avoid using `pull_request_target` unless necessary.
- Employ unprivileged `pull_request` workflows followed by `workflow_run` for privileged operations.
@@ -12,7 +14,7 @@ The best practice is to handle the potentially untrusted pull request via the **
The artifacts downloaded from the first workflow should be considered untrusted and must be verified.
-## Example
+## Examples
### Incorrect Usage
@@ -132,4 +134,4 @@ jobs:
## References
-- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+- [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
diff --git a/actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.md b/actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.md
index 50e81cc240ca..71ba2032a9d0 100644
--- a/actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.md
+++ b/actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.md
@@ -1,8 +1,10 @@
-## Overview
+# Execution of Untrusted Checked-out Code
+
+## Description
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed in a privileged job.
-## Recommendation
+## Recommendations
- Avoid using `pull_request_target` unless necessary.
- Employ unprivileged `pull_request` workflows followed by `workflow_run` for privileged operations.
@@ -12,7 +14,7 @@ The best practice is to handle the potentially untrusted pull request via the **
The artifacts downloaded from the first workflow should be considered untrusted and must be verified.
-## Example
+## Examples
### Incorrect Usage
@@ -132,4 +134,4 @@ jobs:
## References
-- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+- [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
diff --git a/actions/ql/src/Security/CWE-829/UntrustedCheckoutMedium.md b/actions/ql/src/Security/CWE-829/UntrustedCheckoutMedium.md
index 50e81cc240ca..71ba2032a9d0 100644
--- a/actions/ql/src/Security/CWE-829/UntrustedCheckoutMedium.md
+++ b/actions/ql/src/Security/CWE-829/UntrustedCheckoutMedium.md
@@ -1,8 +1,10 @@
-## Overview
+# Execution of Untrusted Checked-out Code
+
+## Description
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed in a privileged job.
-## Recommendation
+## Recommendations
- Avoid using `pull_request_target` unless necessary.
- Employ unprivileged `pull_request` workflows followed by `workflow_run` for privileged operations.
@@ -12,7 +14,7 @@ The best practice is to handle the potentially untrusted pull request via the **
The artifacts downloaded from the first workflow should be considered untrusted and must be verified.
-## Example
+## Examples
### Incorrect Usage
@@ -132,4 +134,4 @@ jobs:
## References
-- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+- [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
diff --git a/actions/ql/src/Violations Of Best Practice/CodeQL/UnnecessaryUseOfAdvancedConfig.md b/actions/ql/src/Violations Of Best Practice/CodeQL/UnnecessaryUseOfAdvancedConfig.md
index a64f69af8d68..21a56e8d84d6 100644
--- a/actions/ql/src/Violations Of Best Practice/CodeQL/UnnecessaryUseOfAdvancedConfig.md
+++ b/actions/ql/src/Violations Of Best Practice/CodeQL/UnnecessaryUseOfAdvancedConfig.md
@@ -1,11 +1,13 @@
-## Overview
+# Unneccesary use of advanced configuration
+
+## Description
The CodeQL workflow does not use any custom settings and could be simplified by switching to the CodeQL default setup.
-## Recommendation
+## Recommendations
If there is no reason to have a custom configuration switch to the CodeQL default setup.
## References
-- GitHub Docs: [Configuring Default Setup for a repository](https://docs.github.com/en/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning#configuring-default-setup-for-a-repository).
+- [GitHub Docs: Configuring Default Setup for a repository](https://docs.github.com/en/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning#configuring-default-setup-for-a-repository)
\ No newline at end of file
diff --git a/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionCritical.md b/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionCritical.md
index 27ef5fce7009..92e480e4a7ae 100644
--- a/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionCritical.md
+++ b/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionCritical.md
@@ -1,16 +1,18 @@
-## Overview
+# Argument Injection in GitHub Actions
+
+## Description
Passing user-controlled arguments to certain commands in the context of `Run` steps may lead to arbitrary code execution.
Argument injection in GitHub Actions may allow an attacker to exfiltrate any secrets used in the workflow and the temporary GitHub repository authorization token. The token may have write access to the repository, allowing the attacker to make changes to the repository.
-## Recommendation
+## Recommendations
When possible avoid passing user-controlled data to commands which may spawn new processes using some of their arguments.
It is also recommended to limit the permissions of any tokens used by a workflow such as the GITHUB_TOKEN.
-## Example
+## Examples
### Incorrect Usage
@@ -33,7 +35,7 @@ An attacker may set the body of an Issue comment to `BAR/g;1e whoami;#` and the
## References
-- Common Weakness Enumeration: [CWE-88](https://cwe.mitre.org/data/definitions/88.html).
-- [Argument Injection Vectors](https://sonarsource.github.io/argument-injection-vectors/).
-- Argument Injection Vectors: [Argument Injection Explained](https://sonarsource.github.io/argument-injection-vectors/explained/).
-- [GTFOBins](https://gtfobins.github.io/).
+- [Common Weakness Enumeration: CWE-88](https://cwe.mitre.org/data/definitions/88.html).
+- [Argument Injection Explained](https://sonarsource.github.io/argument-injection-vectors/explained/)
+- [Argument Injection Vectors](https://sonarsource.github.io/argument-injection-vectors/)
+- [GTFOBins](https://gtfobins.github.io/)
diff --git a/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionMedium.md b/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionMedium.md
index bd3f84a2c089..4957297be92a 100644
--- a/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionMedium.md
+++ b/actions/ql/src/experimental/Security/CWE-088/ArgumentInjectionMedium.md
@@ -1,16 +1,18 @@
-## Overview
+# Argument Injection in GitHub Actions
+
+## Description
Passing user-controlled arguments to certain commands in the context of `Run` steps may lead to arbitrary code execution.
Argument injection in GitHub Actions may allow an attacker to exfiltrate any secrets used in the workflow and the temporary GitHub repository authorization token. The token may have write access to the repository, allowing the attacker to make changes to the repository.
-## Recommendation
+## Recommendations
When possible avoid passing user-controlled data to commands which may spawn new processes using some of their arguments.
It is also recommended to limit the permissions of any tokens used by a workflow such as the GITHUB_TOKEN.
-## Example
+## Examples
### Incorrect Usage
@@ -33,7 +35,7 @@ An attacker may set the body of an Issue comment to `BAR|g;1e whoami;#` and the
## References
-- Common Weakness Enumeration: [CWE-88](https://cwe.mitre.org/data/definitions/88.html).
-- [Argument Injection Vectors](https://sonarsource.github.io/argument-injection-vectors/).
-- Argument Injection Vectors: [Argument Injection Explained](https://sonarsource.github.io/argument-injection-vectors/explained/).
-- [GTFOBins](https://gtfobins.github.io/).
+- [Common Weakness Enumeration: CWE-88](https://cwe.mitre.org/data/definitions/88.html).
+- [Argument Injection Explained](https://sonarsource.github.io/argument-injection-vectors/explained/)
+- [Argument Injection Vectors](https://sonarsource.github.io/argument-injection-vectors/)
+- [GTFOBins](https://gtfobins.github.io/)
diff --git a/actions/ql/src/experimental/Security/CWE-829/UnversionedImmutableAction.md b/actions/ql/src/experimental/Security/CWE-829/UnversionedImmutableAction.md
index 5101eebceee4..754c54b9ca06 100644
--- a/actions/ql/src/experimental/Security/CWE-829/UnversionedImmutableAction.md
+++ b/actions/ql/src/experimental/Security/CWE-829/UnversionedImmutableAction.md
@@ -1,12 +1,14 @@
-## Overview
+# Unversioned Immutable Action
+
+## Description
This action is eligible for Immutable Actions, a new GitHub feature that is currently only available for internal users. Immutable Actions are released as packages in the GitHub package registry instead of resolved from a pinned SHA at the repository. The Immutable Action provides the same immutability as pinning the version to a SHA but with improved readability and additional security guarantees.
-## Recommendation
+## Recommendations
For internal users: when using [immutable actions](https://github.com/github/package-registry-team/blob/main/docs/immutable-actions/immutable-actions-howto.md) use the full semantic version of the action. This will ensure that the action is resolved to the exact version stored in the GitHub package registry.
-## Example
+## Examples
### Incorrect Usage
@@ -23,4 +25,4 @@ For internal users: when using [immutable actions](https://github.com/github/pac
## References
-- [Consuming immutable actions]().
+- [Consuming immutable actions]()
diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml
index 4a4bdde8147c..442839b0dcf2 100644
--- a/actions/ql/src/qlpack.yml
+++ b/actions/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/actions-queries
-version: 0.6.5-dev
+version: 0.6.4
library: false
warnOnImplicitThis: true
groups: [actions, queries]
diff --git a/config/add-overlay-annotations.py b/config/add-overlay-annotations.py
index 85b42026d8d7..c6e3db24ae07 100644
--- a/config/add-overlay-annotations.py
+++ b/config/add-overlay-annotations.py
@@ -17,16 +17,16 @@
#!/usr/bin/python3
import sys
import os
-import re
from difflib import context_diff
-OVERLAY_PATTERN = re.compile(r'overlay\[[a-zA-Z?_-]+\]')
def has_overlay_annotations(lines):
'''
Check whether the given lines contain any overlay[...] annotations.
'''
- return any(OVERLAY_PATTERN.search(line) for line in lines)
+ overlays = ["local", "local?", "global", "caller", "caller?"]
+ annotations = [f"overlay[{t}]" for t in overlays]
+ return any(ann in line for ann in annotations for line in lines)
def is_line_comment(line):
diff --git a/config/dbscheme-fragments.json b/config/dbscheme-fragments.json
index c2a9a5e734b9..c56289ff1716 100644
--- a/config/dbscheme-fragments.json
+++ b/config/dbscheme-fragments.json
@@ -1,19 +1,16 @@
{
"files": [
- "cpp/ql/lib/semmlecode.cpp.dbscheme",
"javascript/ql/lib/semmlecode.javascript.dbscheme",
"python/ql/lib/semmlecode.python.dbscheme",
"ruby/ql/lib/ruby.dbscheme",
"ql/ql/src/ql.dbscheme"
],
"fragments": [
- "/*- Compilations -*/",
"/*- External data -*/",
"/*- Files and folders -*/",
"/*- Diagnostic messages -*/",
"/*- Diagnostic messages: severity -*/",
"/*- Source location prefix -*/",
- "/*- Database metadata -*/",
"/*- Lines of code -*/",
"/*- Configuration files with key value pairs -*/",
"/*- YAML -*/",
@@ -23,7 +20,6 @@
"/*- DEPRECATED: Snapshot date -*/",
"/*- DEPRECATED: Duplicate code -*/",
"/*- DEPRECATED: Version control data -*/",
- "/*- C++ dbscheme -*/",
"/*- JavaScript-specific part -*/",
"/*- Ruby dbscheme -*/",
"/*- Erb dbscheme -*/",
@@ -35,4 +31,4 @@
"/*- Python dbscheme -*/",
"/*- Empty location -*/"
]
-}
+}
\ No newline at end of file
diff --git a/config/opcode-qldoc.py b/config/opcode-qldoc.py
index 1c892ee3c85b..e379e6a3ea96 100644
--- a/config/opcode-qldoc.py
+++ b/config/opcode-qldoc.py
@@ -8,9 +8,9 @@
start_qldoc_re = re.compile(r'^\s*/\*\*') # Start of a QLDoc comment
end_qldoc_re = re.compile(r'\*/\s*$') # End of a QLDoc comment
blank_qldoc_line_re = re.compile(r'^\s*\*\s*$') # A line in a QLDoc comment with only the '*'
-instruction_class_re = re.compile(r'^class (?P[A-Za-z0-9]+)Instruction\s') # Declaration of an `Instruction` class
-opcode_base_class_re = re.compile(r'^abstract class (?P[A-Za-z0-9]+)Opcode\s') # Declaration of an `Opcode` base class
-opcode_class_re = re.compile(r'^ class (?P[A-Za-z0-9]+)\s') # Declaration of an `Opcode` class
+instruction_class_re = re.compile(r'^class (?P[A-aa-z0-9]+)Instruction\s') # Declaration of an `Instruction` class
+opcode_base_class_re = re.compile(r'^abstract class (?P[A-aa-z0-9]+)Opcode\s') # Declaration of an `Opcode` base class
+opcode_class_re = re.compile(r'^ class (?P[A-aa-z0-9]+)\s') # Declaration of an `Opcode` class
script_dir = path.realpath(path.dirname(__file__))
instruction_path = path.realpath(path.join(script_dir, '../cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll'))
diff --git a/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/old.dbscheme b/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/old.dbscheme
deleted file mode 100644
index 5491582ac851..000000000000
--- a/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/old.dbscheme
+++ /dev/null
@@ -1,2428 +0,0 @@
-/*- 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
- *
- * 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 -*/
-
-/**
- * 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
-);
-
-/*- Source location prefix -*/
-
-/**
- * The source location of the snapshot.
- */
-sourceLocationPrefix(string prefix : string ref);
-
-/*- Files and folders -*/
-
-/**
- * The location of an element.
- * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
-);
-
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string ref
-);
-
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container ref
-);
-
-/*- Lines of code -*/
-
-numlines(
- int element_id: @sourceline ref,
- int num_lines: int ref,
- int num_code: int ref,
- int num_comment: int ref
-);
-
-/*- Diagnostic messages -*/
-
-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
-);
-
-/*- C++ dbscheme -*/
-
-/*
- * C++ dbscheme
- */
-
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
-
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
-
-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_default 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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_default 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_default 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_default 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_default 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/5491582ac8511726e12fae3e2399000f9201cd9a/semmlecode.cpp.dbscheme b/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/semmlecode.cpp.dbscheme
deleted file mode 100644
index 827dbc206ea5..000000000000
--- a/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2451 +0,0 @@
-/*- 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
- *
- * 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 -*/
-
-/**
- * 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
-);
-
-/*- Source location prefix -*/
-
-/**
- * The source location of the snapshot.
- */
-sourceLocationPrefix(string prefix : string ref);
-
-/*- Files and folders -*/
-
-/**
- * The location of an element.
- * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
-);
-
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string ref
-);
-
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container ref
-);
-
-/*- Lines of code -*/
-
-numlines(
- int element_id: @sourceline ref,
- int num_lines: int ref,
- int num_code: int ref,
- int num_comment: int ref
-);
-
-/*- Diagnostic messages -*/
-
-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
-);
-
-/*- C++ dbscheme -*/
-
-/**
- * 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
-);
-
-/*
- * C++ dbscheme
- */
-
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
-
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
-
-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_default 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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_default 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_default 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_default 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_default 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/5491582ac8511726e12fae3e2399000f9201cd9a/upgrade.properties b/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/upgrade.properties
deleted file mode 100644
index 1a8afbbb9c3a..000000000000
--- a/cpp/downgrades/5491582ac8511726e12fae3e2399000f9201cd9a/upgrade.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-description: Remove unused external_package tables from the dbscheme
-compatibility: full
diff --git a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/builtintypes.ql b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/builtintypes.ql
deleted file mode 100644
index 9088493ce34c..000000000000
--- a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/builtintypes.ql
+++ /dev/null
@@ -1,14 +0,0 @@
-class BuiltinType extends @builtintype {
- string toString() { none() }
-}
-
-from BuiltinType type, string name, int kind, int kind_new, int size, int sign, int alignment
-where
- builtintypes(type, name, kind, size, sign, alignment) and
- if
- type instanceof @complex_fp16 or
- type instanceof @complex_std_bfloat16 or
- type instanceof @complex_std_float16
- then kind_new = 2
- else kind_new = kind
-select type, name, kind_new, size, sign, alignment
diff --git a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme
deleted file mode 100644
index 7bc12b02a436..000000000000
--- a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme
+++ /dev/null
@@ -1,2509 +0,0 @@
-
-/**
- * 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme
deleted file mode 100644
index e38346051783..000000000000
--- a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2506 +0,0 @@
-
-/**
- * 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
-| 63 = @scalable_vector_count // __SVCount_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties
deleted file mode 100644
index c8d1d2d3c3a3..000000000000
--- a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-description: Introduce new complex 16-bit floating-point types
-compatibility: backwards
-builtintypes.rel: run builtintypes.qlo
diff --git a/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/old.dbscheme b/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/old.dbscheme
deleted file mode 100644
index 827dbc206ea5..000000000000
--- a/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/old.dbscheme
+++ /dev/null
@@ -1,2451 +0,0 @@
-/*- 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
- *
- * 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 -*/
-
-/**
- * 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
-);
-
-/*- Source location prefix -*/
-
-/**
- * The source location of the snapshot.
- */
-sourceLocationPrefix(string prefix : string ref);
-
-/*- Files and folders -*/
-
-/**
- * The location of an element.
- * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
-);
-
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string ref
-);
-
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container ref
-);
-
-/*- Lines of code -*/
-
-numlines(
- int element_id: @sourceline ref,
- int num_lines: int ref,
- int num_code: int ref,
- int num_comment: int ref
-);
-
-/*- Diagnostic messages -*/
-
-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
-);
-
-/*- C++ dbscheme -*/
-
-/**
- * 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
-);
-
-/*
- * C++ dbscheme
- */
-
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
-
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
-
-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_default 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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_default 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_default 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_default 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_default 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/827dbc206ea55377e032a8a934c8903fedc50fa0/semmlecode.cpp.dbscheme b/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/semmlecode.cpp.dbscheme
deleted file mode 100644
index e70d0b653187..000000000000
--- a/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2475 +0,0 @@
-
-/**
- * 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_default ;
-
-/**
- * The location of an element.
- * 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
-);
-
-/** 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 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 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 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 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 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 ref,
- int bodylocation: @location 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 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 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 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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 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 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 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 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 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 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 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 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 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 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 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 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/827dbc206ea55377e032a8a934c8903fedc50fa0/upgrade.properties b/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/upgrade.properties
deleted file mode 100644
index c77161910eea..000000000000
--- a/cpp/downgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/upgrade.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-description: sync dbscheme and delete svn tables
-compatibility: full
diff --git a/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/downgrades.ql b/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/downgrades.ql
deleted file mode 100644
index 973fdeaba7c5..000000000000
--- a/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/downgrades.ql
+++ /dev/null
@@ -1,161 +0,0 @@
-class Accessible extends @accessible {
- string toString() { none() }
-}
-
-class Container extends @container {
- string toString() { none() }
-}
-
-class Expr extends @expr {
- string toString() { none() }
-}
-
-class Initialiser extends @initialiser {
- string toString() { none() }
-}
-
-class Location extends @location_default {
- string toString() { none() }
-}
-
-class Stmt extends @stmt {
- string toString() { none() }
-}
-
-predicate isLocationDefault(Location l) {
- diagnostics(_, _, _, _, _, l)
- or
- macroinvocations(_, _, l, _)
- or
- fun_decls(_, _, _, _, l)
- or
- var_decls(_, _, _, _, l)
- or
- type_decls(_, _, l)
- or
- namespace_decls(_, _, l, _)
- or
- namespace_decls(_, _, _, l)
- or
- usings(_, _, l, _)
- or
- static_asserts(_, _, _, l, _)
- or
- enumconstants(_, _, _, _, _, l)
- or
- concept_templates(_, _, l)
- or
- attributes(_, _, _, _, l)
- or
- attribute_args(_, _, _, _, l)
- or
- derivations(_, _, _, _, l)
- or
- frienddecls(_, _, _, l)
- or
- comments(_, _, l)
- or
- namequalifiers(_, _, _, l)
- or
- lambda_capture(_, _, _, _, _, _, l)
- or
- preprocdirects(_, _, l)
- or
- xmllocations(_, l)
- or
- locations_default(l, _, 0, 0, 0, 0) // For containers.
-}
-
-predicate isLocationExpr(Location l) {
- initialisers(_, _, _, l)
- or
- exprs(_, _, l)
-}
-
-predicate isLocationStmt(Location l) { stmts(_, _, l) }
-
-newtype TExprOrStmtLocation =
- TExprLocation(Location l, Container c, int startLine, int startColumn, int endLine, int endColumn) {
- isLocationExpr(l) and
- (isLocationDefault(l) or isLocationStmt(l)) and
- locations_default(l, c, startLine, startColumn, endLine, endColumn)
- } or
- TStmtLocation(Location l, Container c, int startLine, int startColumn, int endLine, int endColumn) {
- isLocationStmt(l) and
- (isLocationDefault(l) or isLocationExpr(l)) and
- locations_default(l, c, startLine, startColumn, endLine, endColumn)
- }
-
-module Fresh = QlBuiltins::NewEntity;
-
-class NewLocationBase = @location_default or Fresh::EntityId;
-
-class NewLocation extends NewLocationBase {
- string toString() { none() }
-}
-
-query predicate new_locations_default(
- NewLocation l, Container c, int startLine, int startColumn, int endLine, int endColumn
-) {
- isLocationDefault(l) and
- locations_default(l, c, startLine, startColumn, endLine, endColumn)
-}
-
-query predicate new_locations_expr(
- NewLocation l, Container c, int startLine, int startColumn, int endLine, int endColumn
-) {
- exists(Location l_old |
- isLocationExpr(l_old) and
- locations_default(l_old, c, startLine, startColumn, endLine, endColumn)
- |
- if not isLocationDefault(l_old) and not isLocationStmt(l)
- then l = l_old
- else l = Fresh::map(TExprLocation(l_old, c, startLine, startColumn, endLine, endColumn))
- )
-}
-
-query predicate new_locations_stmt(
- NewLocation l, Container c, int startLine, int startColumn, int endLine, int endColumn
-) {
- exists(Location l_old |
- isLocationStmt(l_old) and
- locations_default(l_old, c, startLine, startColumn, endLine, endColumn)
- |
- if not isLocationDefault(l_old) and not isLocationExpr(l)
- then l = l_old
- else l = Fresh::map(TStmtLocation(l_old, c, startLine, startColumn, endLine, endColumn))
- )
-}
-
-query predicate new_exprs(Expr e, int kind, NewLocation l) {
- exists(Location l_old, Container c, int startLine, int startColumn, int endLine, int endColumn |
- exprs(e, kind, l_old) and
- locations_default(l_old, c, startLine, startColumn, endLine, endColumn)
- |
- if not isLocationDefault(l_old) and not isLocationStmt(l)
- then l = l_old
- else l = Fresh::map(TExprLocation(l_old, c, startLine, startColumn, endLine, endColumn))
- )
-}
-
-query predicate new_initialisers(Initialiser i, Accessible v, Expr e, NewLocation l) {
- exists(Location l_old, Container c, int startLine, int startColumn, int endLine, int endColumn |
- initialisers(i, v, e, l_old) and
- locations_default(l_old, c, startLine, startColumn, endLine, endColumn)
- |
- if not isLocationDefault(l_old) and not isLocationStmt(l)
- then l = l_old
- else l = Fresh::map(TExprLocation(l_old, c, startLine, startColumn, endLine, endColumn))
- )
-}
-
-query predicate new_stmts(Stmt s, int kind, NewLocation l) {
- exists(Location l_old, Container c, int startLine, int startColumn, int endLine, int endColumn |
- stmts(s, kind, l_old) and
- locations_default(l_old, c, startLine, startColumn, endLine, endColumn)
- |
- if not isLocationDefault(l_old) and not isLocationExpr(l)
- then l = l_old
- else l = Fresh::map(TStmtLocation(l_old, c, startLine, startColumn, endLine, endColumn))
- )
-}
diff --git a/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/old.dbscheme b/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/old.dbscheme
deleted file mode 100644
index e70d0b653187..000000000000
--- a/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/old.dbscheme
+++ /dev/null
@@ -1,2475 +0,0 @@
-
-/**
- * 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_default ;
-
-/**
- * The location of an element.
- * 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
-);
-
-/** 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 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 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 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 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 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 ref,
- int bodylocation: @location 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 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 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 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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 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 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 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 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 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 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 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 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 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 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 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 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/e70d0b653187b93d9688f21c9db46bb1cd46ab78/semmlecode.cpp.dbscheme b/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/semmlecode.cpp.dbscheme
deleted file mode 100644
index 7bc12b02a436..000000000000
--- a/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2509 +0,0 @@
-
-/**
- * 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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/e70d0b653187b93d9688f21c9db46bb1cd46ab78/upgrade.properties b/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/upgrade.properties
deleted file mode 100644
index 25f408d9b7e5..000000000000
--- a/cpp/downgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/upgrade.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-description: Merge location tables
-compatibility: partial
-locations_default.rel: run downgrades.ql new_locations_default
-locations_expr.rel: run downgrades.ql new_locations_expr
-locations_stmt.rel: run downgrades.ql new_locations_stmt
-exprs.rel: run downgrades.ql new_exprs
-initialisers.rel: run downgrades.ql new_initialisers
-stmts.rel: run downgrades.ql new_stmts
diff --git a/cpp/ql/lib/change-notes/2023-10-12-additional-call-targets.md b/cpp/ql/lib/change-notes/2023-10-12-additional-call-targets.md
new file mode 100644
index 000000000000..f87fba1f1720
--- /dev/null
+++ b/cpp/ql/lib/change-notes/2023-10-12-additional-call-targets.md
@@ -0,0 +1,4 @@
+---
+category: feature
+---
+* Added a new class `AdditionalCallTarget` for specifying additional call targets.
diff --git a/cpp/ql/lib/change-notes/2025-06-20-oracle-oci-models.md b/cpp/ql/lib/change-notes/2025-06-20-oracle-oci-models.md
deleted file mode 100644
index 09661e619385..000000000000
--- a/cpp/ql/lib/change-notes/2025-06-20-oracle-oci-models.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added `sql-injection` sink models for the Oracle Call Interface (OCI) database library functions `OCIStmtPrepare` and `OCIStmtPrepare2`.
diff --git a/cpp/ql/lib/change-notes/2025-06-24-float16 copy.md b/cpp/ql/lib/change-notes/2025-06-24-float16 copy.md
deleted file mode 100644
index 0e88694e1169..000000000000
--- a/cpp/ql/lib/change-notes/2025-06-24-float16 copy.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* The analysis of C/C++ code targeting 64-bit Arm platforms has been improved. This includes support for the Arm-specific builtin functions, support for the `arm_neon.h` header and Neon vector types, and support for the `fp8` scalar type. The `arm_sve.h` header and scalable vectors are only partially supported at this point.
diff --git a/cpp/ql/lib/change-notes/2025-06-24-float16.md b/cpp/ql/lib/change-notes/2025-06-24-float16.md
deleted file mode 100644
index 24737d2b4065..000000000000
--- a/cpp/ql/lib/change-notes/2025-06-24-float16.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added support for `__fp16 _Complex` and `__bf16 _Complex` types
diff --git a/cpp/ql/lib/change-notes/2025-06-27-locations.md b/cpp/ql/lib/change-notes/2025-06-27-locations.md
deleted file mode 100644
index 55acf55ee87e..000000000000
--- a/cpp/ql/lib/change-notes/2025-06-27-locations.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: deprecated
----
-* The `UnknownDefaultLocation`, `UnknownExprLocation`, and `UnknownStmtLocation` classes have been deprecated. Use `UnknownLocation` instead.
diff --git a/cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll b/cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll
index 2c46a7c06744..a265241a36bd 100644
--- a/cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll
+++ b/cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll
@@ -115,6 +115,10 @@ private string normalizeFunctionName(Function f, string algType) {
(result.matches("RSA") implies not f.getName().toUpperCase().matches("%UNIVERSAL%")) and
//rsaz functions deemed to be too low level, and can be ignored
not f.getLocation().getFile().getBaseName().matches("rsaz_exp.c") and
+ // SHA false positives
+ (result.matches("SHA") implies not f.getName().toUpperCase().matches("%SHAKE%")) and
+ // CAST false positives
+ (result.matches("CAST") implies not f.getName().toUpperCase().matches(["%UPCAST%", "%DOWNCAST%"])) and
// General False positives
// Functions that 'get' do not set an algorithm, and therefore are considered ignorable
not f.getName().toLowerCase().matches("%get%")
diff --git a/cpp/ql/lib/experimental/quantum/Language.qll b/cpp/ql/lib/experimental/quantum/Language.qll
index 53cf7292b12f..168c25cdfaa0 100644
--- a/cpp/ql/lib/experimental/quantum/Language.qll
+++ b/cpp/ql/lib/experimental/quantum/Language.qll
@@ -8,7 +8,7 @@ module CryptoInput implements InputSig {
class LocatableElement = Language::Locatable;
- class UnknownLocation = Language::UnknownLocation;
+ class UnknownLocation = Language::UnknownDefaultLocation;
LocatableElement dfn_to_element(DataFlow::Node node) {
result = node.asExpr() or
@@ -56,7 +56,7 @@ module ArtifactFlowConfig implements DataFlow::ConfigSig {
module ArtifactFlow = DataFlow::Global;
/**
- * An artifact output to node input configuration
+ * Artifact output to node input configuration
*/
abstract class AdditionalFlowInputStep extends DataFlow::Node {
abstract DataFlow::Node getOutput();
@@ -91,8 +91,9 @@ module GenericDataSourceFlowConfig implements DataFlow::ConfigSig {
module GenericDataSourceFlow = TaintTracking::Global;
-private class ConstantDataSource extends Crypto::GenericConstantSourceInstance instanceof OpenSslGenericSourceCandidateLiteral
-{
+private class ConstantDataSource extends Crypto::GenericConstantSourceInstance instanceof Literal {
+ ConstantDataSource() { this instanceof OpenSslGenericSourceCandidateLiteral }
+
override DataFlow::Node getOutputNode() { result.asExpr() = this }
override predicate flowsTo(Crypto::FlowAwareElement other) {
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/AlgToAVCFlow.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/AlgToAVCFlow.qll
index f802e58d0a76..d46c2f691916 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/AlgToAVCFlow.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/AlgToAVCFlow.qll
@@ -48,7 +48,7 @@ module KnownOpenSslAlgorithmToAlgorithmValueConsumerConfig implements DataFlow::
module KnownOpenSslAlgorithmToAlgorithmValueConsumerFlow =
DataFlow::Global;
-module RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig implements DataFlow::ConfigSig {
+module RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source.asExpr() instanceof OpenSslPaddingLiteral }
predicate isSink(DataFlow::Node sink) {
@@ -60,8 +60,8 @@ module RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig implements DataF
}
}
-module RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow =
- DataFlow::Global;
+module RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow =
+ DataFlow::Global;
class OpenSslAlgorithmAdditionalFlowStep extends AdditionalFlowInputStep {
OpenSslAlgorithmAdditionalFlowStep() { exists(AlgorithmPassthroughCall c | c.getInNode() = this) }
@@ -114,11 +114,11 @@ class CopyAndDupAlgorithmPassthroughCall extends AlgorithmPassthroughCall {
override DataFlow::Node getOutNode() { result = outNode }
}
-class NidToPointerPassthroughCall extends AlgorithmPassthroughCall {
+class NIDToPointerPassthroughCall extends AlgorithmPassthroughCall {
DataFlow::Node inNode;
DataFlow::Node outNode;
- NidToPointerPassthroughCall() {
+ NIDToPointerPassthroughCall() {
this.getTarget().getName() in ["OBJ_nid2obj", "OBJ_nid2ln", "OBJ_nid2sn"] and
inNode.asExpr() = this.getArgument(0) and
outNode.asExpr() = this
@@ -150,11 +150,11 @@ class PointerToPointerPassthroughCall extends AlgorithmPassthroughCall {
override DataFlow::Node getOutNode() { result = outNode }
}
-class PointerToNidPassthroughCall extends AlgorithmPassthroughCall {
+class PointerToNIDPassthroughCall extends AlgorithmPassthroughCall {
DataFlow::Node inNode;
DataFlow::Node outNode;
- PointerToNidPassthroughCall() {
+ PointerToNIDPassthroughCall() {
this.getTarget().getName() in ["OBJ_obj2nid", "OBJ_ln2nid", "OBJ_sn2nid", "OBJ_txt2nid"] and
(
inNode.asIndirectExpr() = this.getArgument(0)
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/BlockAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/BlockAlgorithmInstance.qll
index 4bd4b4497660..ba5f65a2203f 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/BlockAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/BlockAlgorithmInstance.qll
@@ -5,35 +5,36 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.KnownAlgorithmCon
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.DirectAlgorithmValueConsumer
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
private import AlgToAVCFlow
-private import codeql.quantum.experimental.Standardization::Types::KeyOpAlg as KeyOpAlg
/**
* Given a `KnownOpenSslBlockModeAlgorithmExpr`, converts this to a block family type.
* Does not bind if there is no mapping (no mapping to 'unknown' or 'other').
*/
predicate knownOpenSslConstantToBlockModeFamilyType(
- KnownOpenSslBlockModeAlgorithmExpr e, KeyOpAlg::ModeOfOperationType type
+ KnownOpenSslBlockModeAlgorithmExpr e, Crypto::TBlockCipherModeOfOperationType type
) {
exists(string name |
name = e.(KnownOpenSslAlgorithmExpr).getNormalizedName() and
(
- name = "CBC" and type instanceof KeyOpAlg::CBC
+ name.matches("CBC") and type instanceof Crypto::CBC
or
- name = "CFB%" and type instanceof KeyOpAlg::CFB
+ name.matches("CFB%") and type instanceof Crypto::CFB
or
- name = "CTR" and type instanceof KeyOpAlg::CTR
+ name.matches("CTR") and type instanceof Crypto::CTR
or
- name = "GCM" and type instanceof KeyOpAlg::GCM
+ name.matches("GCM") and type instanceof Crypto::GCM
or
- name = "OFB" and type instanceof KeyOpAlg::OFB
+ name.matches("OFB") and type instanceof Crypto::OFB
or
- name = "XTS" and type instanceof KeyOpAlg::XTS
+ name.matches("XTS") and type instanceof Crypto::XTS
or
- name = "CCM" and type instanceof KeyOpAlg::CCM
+ name.matches("CCM") and type instanceof Crypto::CCM
or
- name = "CCM" and type instanceof KeyOpAlg::CCM
+ name.matches("GCM") and type instanceof Crypto::GCM
or
- name = "ECB" and type instanceof KeyOpAlg::ECB
+ name.matches("CCM") and type instanceof Crypto::CCM
+ or
+ name.matches("ECB") and type instanceof Crypto::ECB
)
)
}
@@ -63,10 +64,10 @@ class KnownOpenSslBlockModeConstantAlgorithmInstance extends OpenSslAlgorithmIns
getterCall = this
}
- override KeyOpAlg::ModeOfOperationType getModeType() {
+ override Crypto::TBlockCipherModeOfOperationType getModeType() {
knownOpenSslConstantToBlockModeFamilyType(this, result)
or
- not knownOpenSslConstantToBlockModeFamilyType(this, _) and result = KeyOpAlg::OtherMode()
+ not knownOpenSslConstantToBlockModeFamilyType(this, _) and result = Crypto::OtherMode()
}
// NOTE: I'm not going to attempt to parse out the mode specific part, so returning
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/CipherAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/CipherAlgorithmInstance.qll
index 47ffd67924a6..0fb8ecf95398 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/CipherAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/CipherAlgorithmInstance.qll
@@ -33,9 +33,9 @@ predicate knownOpenSslConstantToCipherFamilyType(
or
name.matches("CAST5%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::CAST5())
or
- name.matches("2DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DOUBLE_DES())
+ name.matches("2DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DoubleDES())
or
- name.matches("3DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TRIPLE_DES())
+ name.matches("3DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TripleDES())
or
name.matches("DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DES())
or
@@ -113,7 +113,7 @@ class KnownOpenSslCipherConstantAlgorithmInstance extends OpenSslAlgorithmInstan
this.(KnownOpenSslCipherAlgorithmExpr).getExplicitKeySize() = result
}
- override KeyOpAlg::AlgorithmType getAlgorithmType() {
+ override Crypto::KeyOpAlg::Algorithm getAlgorithmType() {
knownOpenSslConstantToCipherFamilyType(this, result)
or
not knownOpenSslConstantToCipherFamilyType(this, _) and
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll
index 82a2b1357f27..78cba4962864 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll
@@ -39,14 +39,8 @@ class KnownOpenSslEllipticCurveConstantAlgorithmInstance extends OpenSslAlgorith
result = this.(Call).getTarget().getName()
}
- override Crypto::EllipticCurveFamilyType getEllipticCurveFamilyType() {
- if
- Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _,
- _)
- then
- Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _,
- result)
- else result = Crypto::OtherEllipticCurveType()
+ override Crypto::TEllipticCurveType getEllipticCurveType() {
+ Crypto::ellipticCurveNameToKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _, result)
}
override string getParsedEllipticCurveName() {
@@ -54,7 +48,7 @@ class KnownOpenSslEllipticCurveConstantAlgorithmInstance extends OpenSslAlgorith
}
override int getKeySize() {
- Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.(KnownOpenSslAlgorithmExpr)
+ Crypto::ellipticCurveNameToKeySizeAndFamilyMapping(this.(KnownOpenSslAlgorithmExpr)
.getNormalizedName(), result, _)
}
}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll
index 2be84b68f616..0cc8e24f0a6c 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll
@@ -11,21 +11,21 @@ predicate knownOpenSslConstantToHashFamilyType(
exists(string name |
name = e.(KnownOpenSslAlgorithmExpr).getNormalizedName() and
(
- name = "BLAKE2B" and type instanceof Crypto::BLAKE2B
+ name.matches("BLAKE2B") and type instanceof Crypto::BLAKE2B
or
- name = "BLAKE2S" and type instanceof Crypto::BLAKE2S
+ name.matches("BLAKE2S") and type instanceof Crypto::BLAKE2S
or
- name.matches("GOST%") and type instanceof Crypto::GOST_HASH
+ name.matches("GOST%") and type instanceof Crypto::GOSTHash
or
- name = "MD2" and type instanceof Crypto::MD2
+ name.matches("MD2") and type instanceof Crypto::MD2
or
- name = "MD4" and type instanceof Crypto::MD4
+ name.matches("MD4") and type instanceof Crypto::MD4
or
- name = "MD5" and type instanceof Crypto::MD5
+ name.matches("MD5") and type instanceof Crypto::MD5
or
- name = "MDC2" and type instanceof Crypto::MDC2
+ name.matches("MDC2") and type instanceof Crypto::MDC2
or
- name = "POLY1305" and type instanceof Crypto::POLY1305
+ name.matches("POLY1305") and type instanceof Crypto::POLY1305
or
name.matches(["SHA", "SHA1"]) and type instanceof Crypto::SHA1
or
@@ -33,13 +33,13 @@ predicate knownOpenSslConstantToHashFamilyType(
or
name.matches("SHA3-%") and type instanceof Crypto::SHA3
or
- name = "SHAKE" and type instanceof Crypto::SHAKE
+ name.matches(["SHAKE"]) and type instanceof Crypto::SHAKE
or
- name = "SM3" and type instanceof Crypto::SM3
+ name.matches("SM3") and type instanceof Crypto::SM3
or
- name = "RIPEMD160" and type instanceof Crypto::RIPEMD160
+ name.matches("RIPEMD160") and type instanceof Crypto::RIPEMD160
or
- name = "WHIRLPOOL" and type instanceof Crypto::WHIRLPOOL
+ name.matches("WHIRLPOOL") and type instanceof Crypto::WHIRLPOOL
)
)
}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll
index 4328253f1a4f..9d60547a45ad 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll
@@ -210,8 +210,7 @@ string getAlgorithmAlias(string alias) {
}
/**
- * Holds for aliases of known algorithms defined by users
- * (through obj_name_add and various macros pointing to this function).
+ * Finds aliases of known alagorithms defined by users (through obj_name_add and various macros pointing to this function)
*
* The `target` and `alias` are converted to lowercase to be of a standard form.
*/
@@ -223,7 +222,7 @@ predicate customAliases(string target, string alias) {
}
/**
- * Holds for a hard-coded mapping of known algorithm aliases in OpenSsl.
+ * A hard-coded mapping of known algorithm aliases in OpenSsl.
* This was derived by applying the same kind of logic foun din `customAliases` to the
* OpenSsl code base directly.
*
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/MACAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/MACAlgorithmInstance.qll
index 97b183b7e7d3..2e476824316b 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/MACAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/MACAlgorithmInstance.qll
@@ -7,7 +7,7 @@ private import experimental.quantum.OpenSSL.Operations.OpenSSLOperations
private import AlgToAVCFlow
class KnownOpenSslMacConstantAlgorithmInstance extends OpenSslAlgorithmInstance,
- Crypto::MacAlgorithmInstance instanceof KnownOpenSslMacAlgorithmExpr
+ Crypto::MACAlgorithmInstance instanceof KnownOpenSslMacAlgorithmExpr
{
OpenSslAlgorithmValueConsumer getterCall;
@@ -39,14 +39,14 @@ class KnownOpenSslMacConstantAlgorithmInstance extends OpenSslAlgorithmInstance,
result = this.(Call).getTarget().getName()
}
- override Crypto::MacType getMacType() {
- this instanceof KnownOpenSslHMacAlgorithmExpr and result = Crypto::HMAC()
+ override Crypto::TMACType getMacType() {
+ this instanceof KnownOpenSslHMacAlgorithmExpr and result instanceof Crypto::THMAC
or
- this instanceof KnownOpenSslCMacAlgorithmExpr and result = Crypto::CMAC()
+ this instanceof KnownOpenSslCMacAlgorithmExpr and result instanceof Crypto::TCMAC
}
}
-class KnownOpenSslHMacConstantAlgorithmInstance extends Crypto::HmacAlgorithmInstance,
+class KnownOpenSslHMacConstantAlgorithmInstance extends Crypto::HMACAlgorithmInstance,
KnownOpenSslMacConstantAlgorithmInstance
{
override Crypto::AlgorithmValueConsumer getHashAlgorithmValueConsumer() {
@@ -54,15 +54,13 @@ class KnownOpenSslHMacConstantAlgorithmInstance extends Crypto::HmacAlgorithmIns
then
// ASSUMPTION: if there is an explicit hash algorithm, it is already modeled
// and we can simply grab that model's AVC
- this.(OpenSslAlgorithmInstance).getAvc() = result
+ exists(OpenSslAlgorithmInstance inst | inst.getAvc() = result and inst = this)
else
- // ASSUMPTION: If no explicit algorithm is given, then find
- // where the current AVC traces to a HashAlgorithmIO consuming operation step.
- // TODO: need to consider getting reset values, tracing down to the first set for now
- exists(OperationStep s, AvcContextCreationStep avc |
- avc = this.getAvc() and
- avc.flowsToOperationStep(s) and
- s.getAlgorithmValueConsumerForInput(HashAlgorithmIO()) = result
+ // ASSUMPTION: If no explicit algorithm is given, then it is assumed to be configured by
+ // a signature operation
+ exists(Crypto::SignatureOperationInstance s |
+ s.getHashAlgorithmValueConsumer() = result and
+ s.getAnAlgorithmValueConsumer() = this.getAvc()
)
}
}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll
index d487e05d0660..7a34b69ddf54 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll
@@ -5,7 +5,6 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.KnownAlgorithmCon
private import AlgToAVCFlow
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.DirectAlgorithmValueConsumer
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
-private import codeql.quantum.experimental.Standardization::Types::KeyOpAlg as KeyOpAlg
/**
* A class to define padding specific integer values.
@@ -29,18 +28,18 @@ class OpenSslPaddingLiteral extends Literal {
* Does not bind if there is no mapping (no mapping to 'unknown' or 'other').
*/
predicate knownOpenSslConstantToPaddingFamilyType(
- KnownOpenSslPaddingAlgorithmExpr e, KeyOpAlg::PaddingSchemeType type
+ KnownOpenSslPaddingAlgorithmExpr e, Crypto::TPaddingType type
) {
exists(string name |
name = e.(KnownOpenSslAlgorithmExpr).getNormalizedName() and
(
- name = "OAEP" and type = KeyOpAlg::OAEP()
+ name.matches("OAEP") and type = Crypto::OAEP()
or
- name = "PSS" and type = KeyOpAlg::PSS()
+ name.matches("PSS") and type = Crypto::PSS()
or
- name = "PKCS7" and type = KeyOpAlg::PKCS7()
+ name.matches("PKCS7") and type = Crypto::PKCS7()
or
- name = "PKCS1V15" and type = KeyOpAlg::PKCS1_V1_5()
+ name.matches("PKCS1V15") and type = Crypto::PKCS1_v1_5()
)
)
}
@@ -86,7 +85,7 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
// Source is `this`
src.asExpr() = this and
// This traces to a padding-specific consumer
- RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow::flow(src, sink)
+ RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow::flow(src, sink)
) and
isPaddingSpecificConsumer = true
}
@@ -99,24 +98,24 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
override OpenSslAlgorithmValueConsumer getAvc() { result = getterCall }
- KeyOpAlg::PaddingSchemeType getKnownPaddingType() {
- this.(Literal).getValue().toInt() in [1, 7, 8] and result = KeyOpAlg::PKCS1_V1_5()
+ Crypto::TPaddingType getKnownPaddingType() {
+ this.(Literal).getValue().toInt() in [1, 7, 8] and result = Crypto::PKCS1_v1_5()
or
- this.(Literal).getValue().toInt() = 3 and result = KeyOpAlg::NoPadding()
+ this.(Literal).getValue().toInt() = 3 and result = Crypto::NoPadding()
or
- this.(Literal).getValue().toInt() = 4 and result = KeyOpAlg::OAEP()
+ this.(Literal).getValue().toInt() = 4 and result = Crypto::OAEP()
or
- this.(Literal).getValue().toInt() = 5 and result = KeyOpAlg::ANSI_X9_23()
+ this.(Literal).getValue().toInt() = 5 and result = Crypto::ANSI_X9_23()
or
- this.(Literal).getValue().toInt() = 6 and result = KeyOpAlg::PSS()
+ this.(Literal).getValue().toInt() = 6 and result = Crypto::PSS()
}
- override KeyOpAlg::PaddingSchemeType getPaddingType() {
+ override Crypto::TPaddingType getPaddingType() {
isPaddingSpecificConsumer = true and
(
result = this.getKnownPaddingType()
or
- not exists(this.getKnownPaddingType()) and result = KeyOpAlg::OtherPadding()
+ not exists(this.getKnownPaddingType()) and result = Crypto::OtherPadding()
)
or
isPaddingSpecificConsumer = false and
@@ -144,7 +143,7 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
// this instanceof Literal and
// this.getValue().toInt() in [0, 1, 3, 4, 5, 6, 7, 8]
// // TODO: trace to padding-specific consumers
-// RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow
+// RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow
// }
// override string getRawPaddingAlgorithmName() { result = this.(Literal).getValue().toString() }
// override Crypto::TPaddingType getPaddingType() {
@@ -162,18 +161,18 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
// else result = Crypto::OtherPadding()
// }
// }
-class OaepPaddingAlgorithmInstance extends Crypto::OaepPaddingAlgorithmInstance,
+class OAEPPaddingAlgorithmInstance extends Crypto::OAEPPaddingAlgorithmInstance,
KnownOpenSslPaddingConstantAlgorithmInstance
{
- OaepPaddingAlgorithmInstance() {
- this.(Crypto::PaddingAlgorithmInstance).getPaddingType() = KeyOpAlg::OAEP()
+ OAEPPaddingAlgorithmInstance() {
+ this.(Crypto::PaddingAlgorithmInstance).getPaddingType() = Crypto::OAEP()
}
- override Crypto::HashAlgorithmInstance getOaepEncodingHashAlgorithm() {
+ override Crypto::HashAlgorithmInstance getOAEPEncodingHashAlgorithm() {
none() //TODO
}
- override Crypto::HashAlgorithmInstance getMgf1HashAlgorithm() {
+ override Crypto::HashAlgorithmInstance getMGF1HashAlgorithm() {
none() //TODO
}
}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/SignatureAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/SignatureAlgorithmInstance.qll
index cc2e5771ffc8..afd67410c0ad 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/SignatureAlgorithmInstance.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/SignatureAlgorithmInstance.qll
@@ -73,7 +73,7 @@ class KnownOpenSslSignatureConstantAlgorithmInstance extends OpenSslAlgorithmIns
none()
}
- override KeyOpAlg::AlgorithmType getAlgorithmType() {
+ override KeyOpAlg::Algorithm getAlgorithmType() {
knownOpenSslConstantToSignatureFamilyType(this, result)
or
not knownOpenSslConstantToSignatureFamilyType(this, _) and
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/DirectAlgorithmValueConsumer.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/DirectAlgorithmValueConsumer.qll
index d200cf2a0961..a4a65ead63d8 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/DirectAlgorithmValueConsumer.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/DirectAlgorithmValueConsumer.qll
@@ -4,10 +4,10 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.KnownAlgorithmCon
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
/**
- * A call that is considered to inherently 'consume' an algorithm value.
- * E.g., cases like EVP_MD5(),
- * where there is no input, rather it directly gets an algorithm
- * and returns it. Also includes operations directly using an algorithm
+ * Cases like EVP_MD5(),
+ * there is no input, rather it directly gets an algorithm
+ * and returns it.
+ * Also includes operations directly using an algorithm
* like AES_encrypt().
*/
class DirectAlgorithmValueConsumer extends OpenSslAlgorithmValueConsumer instanceof OpenSslAlgorithmCall
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/HashAlgorithmValueConsumer.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/HashAlgorithmValueConsumer.qll
index 114cf78a112e..a03114b276d2 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/HashAlgorithmValueConsumer.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmValueConsumers/HashAlgorithmValueConsumer.qll
@@ -7,7 +7,7 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.OpenSSLAlgorithmI
abstract class HashAlgorithmValueConsumer extends OpenSslAlgorithmValueConsumer { }
/**
- * An EVP_Q_Digest directly consumes algorithm constant values
+ * EVP_Q_Digest directly consumes algorithm constant values
*/
class Evp_Q_Digest_Algorithm_Consumer extends HashAlgorithmValueConsumer {
Evp_Q_Digest_Algorithm_Consumer() { this.(Call).getTarget().getName() = "EVP_Q_digest" }
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/CtxFlow.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/CtxFlow.qll
new file mode 100644
index 000000000000..63ec3e181325
--- /dev/null
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/CtxFlow.qll
@@ -0,0 +1,221 @@
+//TODO: model as data on open APIs should be able to get common flows, and obviate some of this
+// e.g., copy/dup calls, need to ingest those models for openSSL and refactor.
+/**
+ * In OpenSSL, flow between 'context' parameters is often used to
+ * store state/config of how an operation will eventually be performed.
+ * Tracing algorithms and configurations to operations therefore
+ * requires tracing context parameters for many OpenSSL apis.
+ *
+ * This library provides a dataflow analysis to track context parameters
+ * between any two functions accepting openssl context parameters.
+ * The dataflow takes into consideration flowing through duplication and copy calls
+ * as well as flow through flow killers (free/reset calls).
+ *
+ * TODO: we may need to revisit 'free' as a dataflow killer, depending on how
+ * we want to model use after frees.
+ *
+ * This library also provides classes to represent context Types and relevant
+ * arguments/expressions.
+ */
+
+import semmle.code.cpp.dataflow.new.DataFlow
+
+/**
+ * An openSSL CTX type, which is type for which the stripped underlying type
+ * matches the pattern 'evp_%ctx_%st'.
+ * This includes types like:
+ * - EVP_CIPHER_CTX
+ * - EVP_MD_CTX
+ * - EVP_PKEY_CTX
+ */
+class CtxType extends Type {
+ CtxType() {
+ // It is possible for users to use the underlying type of the CTX variables
+ // these have a name matching 'evp_%ctx_%st
+ this.getUnspecifiedType().stripType().getName().matches("evp_%ctx_%st")
+ or
+ // In principal the above check should be sufficient, but in case of build mode none issues
+ // i.e., if a typedef cannot be resolved,
+ // or issues with properly stubbing test cases, we also explicitly check for the wrapping type defs
+ // i.e., patterns matching 'EVP_%_CTX'
+ exists(Type base | base = this or base = this.(DerivedType).getBaseType() |
+ base.getName().matches("EVP_%_CTX")
+ )
+ }
+}
+
+/**
+ * A pointer to a CtxType
+ */
+class CtxPointerExpr extends Expr {
+ CtxPointerExpr() {
+ this.getType() instanceof CtxType and
+ this.getType() instanceof PointerType
+ }
+}
+
+/**
+ * A call argument of type CtxPointerExpr.
+ */
+class CtxPointerArgument extends CtxPointerExpr {
+ CtxPointerArgument() { exists(Call c | c.getAnArgument() = this) }
+
+ Call getCall() { result.getAnArgument() = this }
+}
+
+/**
+ * A call returning a CtxPointerExpr.
+ */
+private class CtxPointerReturn extends CtxPointerExpr instanceof Call {
+ Call getCall() { result = this }
+}
+
+/**
+ * A call whose target contains 'free' or 'reset' and has an argument of type
+ * CtxPointerArgument.
+ */
+private class CtxClearCall extends Call {
+ CtxClearCall() {
+ this.getTarget().getName().toLowerCase().matches(["%free%", "%reset%"]) and
+ this.getAnArgument() instanceof CtxPointerArgument
+ }
+}
+
+abstract private class CtxPassThroughCall extends Call {
+ abstract DataFlow::Node getNode1();
+
+ abstract DataFlow::Node getNode2();
+}
+
+/**
+ * A call whose target contains 'copy' and has an argument of type
+ * CtxPointerArgument.
+ */
+private class CtxCopyOutArgCall extends CtxPassThroughCall {
+ DataFlow::Node n1;
+ DataFlow::Node n2;
+
+ CtxCopyOutArgCall() {
+ this.getTarget().getName().toLowerCase().matches("%copy%") and
+ n1.asExpr() = this.getAnArgument() and
+ n1.getType() instanceof CtxType and
+ n2.asDefiningArgument() = this.getAnArgument() and
+ n2.getType() instanceof CtxType and
+ n1.asDefiningArgument() != n2.asExpr()
+ }
+
+ override DataFlow::Node getNode1() { result = n1 }
+
+ override DataFlow::Node getNode2() { result = n2 }
+}
+
+/**
+ * A call whose target contains 'dup' and has an argument of type
+ * CtxPointerArgument.
+ */
+private class CtxCopyReturnCall extends CtxPassThroughCall, CtxPointerExpr {
+ DataFlow::Node n1;
+
+ CtxCopyReturnCall() {
+ this.getTarget().getName().toLowerCase().matches("%dup%") and
+ n1.asExpr() = this.getAnArgument() and
+ n1.getType() instanceof CtxType
+ }
+
+ override DataFlow::Node getNode1() { result = n1 }
+
+ override DataFlow::Node getNode2() { result.asExpr() = this }
+}
+
+/**
+ * A call to `EVP_PKEY_paramgen` acts as a kind of pass through.
+ * It's output pkey is eventually used in a new operation generating
+ * a fresh context pointer (e.g., `EVP_PKEY_CTX_new`).
+ * It is easier to model this as a pass through
+ * than to model the flow from the paramgen to the new key generation.
+ */
+private class CtxParamGenCall extends CtxPassThroughCall {
+ DataFlow::Node n1;
+ DataFlow::Node n2;
+
+ CtxParamGenCall() {
+ this.getTarget().getName() = "EVP_PKEY_paramgen" and
+ n1.asExpr() = this.getArgument(0) and
+ (
+ n2.asExpr() = this.getArgument(1)
+ or
+ n2.asDefiningArgument() = this.getArgument(1)
+ )
+ }
+
+ override DataFlow::Node getNode1() { result = n1 }
+
+ override DataFlow::Node getNode2() { result = n2 }
+}
+
+/**
+ * If the current node gets is an argument to a function
+ * that returns a pointer type, immediately flow through.
+ * NOTE: this passthrough is required if we allow
+ * intermediate steps to go into variables that are not a CTX type.
+ * See for example `CtxParamGenCall`.
+ */
+private class CallArgToCtxRet extends CtxPassThroughCall, CtxPointerExpr {
+ DataFlow::Node n1;
+ DataFlow::Node n2;
+
+ CallArgToCtxRet() {
+ this.getAnArgument() = n1.asExpr() and
+ n2.asExpr() = this
+ }
+
+ override DataFlow::Node getNode1() { result = n1 }
+
+ override DataFlow::Node getNode2() { result = n2 }
+}
+
+/**
+ * A source Ctx of interest is any argument or return of type CtxPointerExpr.
+ */
+class CtxPointerSource extends CtxPointerExpr {
+ CtxPointerSource() {
+ this instanceof CtxPointerReturn or
+ this instanceof CtxPointerArgument
+ }
+
+ DataFlow::Node asNode() {
+ result.asExpr() = this
+ or
+ result.asDefiningArgument() = this
+ }
+}
+
+/**
+ * Flow from any CtxPointerSource to other CtxPointerSource.
+ */
+module OpenSslCtxSourceToSourceFlowConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { exists(CtxPointerSource s | s.asNode() = source) }
+
+ predicate isSink(DataFlow::Node sink) { exists(CtxPointerSource s | s.asNode() = sink) }
+
+ predicate isBarrier(DataFlow::Node node) {
+ exists(CtxClearCall c | c.getAnArgument() = node.asExpr())
+ }
+
+ predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
+ exists(CtxPassThroughCall c | c.getNode1() = node1 and c.getNode2() = node2)
+ }
+}
+
+module OpenSslCtxSourceToArgumentFlow = DataFlow::Global;
+
+/**
+ * Holds if there is a context flow from the source to the sink.
+ */
+predicate ctxSrcToSrcFlow(CtxPointerSource source, CtxPointerSource sink) {
+ exists(DataFlow::Node a, DataFlow::Node b |
+ OpenSslCtxSourceToArgumentFlow::flow(a, b) and
+ a = source.asNode() and
+ b = sink.asNode()
+ )
+}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/CipherOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/CipherOperation.qll
deleted file mode 100644
index 44e30ddf9fc9..000000000000
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/CipherOperation.qll
+++ /dev/null
@@ -1,273 +0,0 @@
-import experimental.quantum.Language
-private import OpenSSLOperationBase
-private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
-import EVPPKeyCtxInitializer
-
-/**
- * A base class for all EVP cipher operations.
- */
-abstract class EvpCipherInitializer extends OperationStep {
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and
- type = PrimaryAlgorithmIO() and
- // Constants that are not equal to zero or
- // non-constants (e.g., variable accesses, which require data-flow to determine the value)
- // A zero (null) value typically indicates use of this operation step to initialize
- // other out parameters in a multi-step initialization.
- (exists(result.asExpr().getValue()) implies result.asExpr().getValue().toInt() != 0)
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-/**
- * A base class for EVP cipher/decrypt/encrypt 'ex' operations.
- */
-abstract class EvpEXInitializer extends EvpCipherInitializer {
- override DataFlow::Node getInput(IOType type) {
- result = super.getInput(type)
- or
- (
- // Constants that are not equal to zero or
- // non-constants (e.g., variable accesses, which require data-flow to determine the value)
- // A zero (null) value typically indicates use of this operation step to initialize
- // other out parameters in a multi-step initialization.
- result.asExpr() = this.getArgument(3) and type = KeyIO()
- or
- result.asExpr() = this.getArgument(4) and type = IVorNonceIO()
- ) and
- (exists(result.asExpr().getValue()) implies result.asExpr().getValue().toInt() != 0)
- }
-}
-
-/**
- * A base class for EVP cipher/decrypt/encrypt 'ex2' operations.
- */
-abstract class EvpEX2Initializer extends EvpCipherInitializer {
- override DataFlow::Node getInput(IOType type) {
- result = super.getInput(type)
- or
- result.asExpr() = this.getArgument(2) and type = KeyIO()
- or
- result.asExpr() = this.getArgument(3) and type = IVorNonceIO()
- }
-}
-
-/**
- * A Call to an EVP Cipher/Encrypt/Decrypt initialization operation.
- */
-class EvpCipherEXInitCall extends EvpEXInitializer {
- EvpCipherEXInitCall() {
- this.getTarget().getName() in ["EVP_EncryptInit_ex", "EVP_DecryptInit_ex", "EVP_CipherInit_ex"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result = super.getInput(type)
- or
- // NOTE: for EncryptInit and DecryptInit there is no subtype arg
- // the subtype is determined automatically by the initializer based on the operation name
- this.getTarget().getName().toLowerCase().matches("%cipherinit%") and
- result.asExpr() = this.getArgument(5) and
- type = KeyOperationSubtypeIO()
- }
-}
-
-class Evp_Cipher_EX2_or_Simple_Init_Call extends EvpEX2Initializer {
- Evp_Cipher_EX2_or_Simple_Init_Call() {
- this.getTarget().getName() in [
- "EVP_EncryptInit_ex2", "EVP_DecryptInit_ex2", "EVP_CipherInit_ex2", "EVP_EncryptInit",
- "EVP_DecryptInit", "EVP_CipherInit"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result = super.getInput(type)
- or
- this.getTarget().getName().toLowerCase().matches("%cipherinit%") and
- result.asExpr() = this.getArgument(4) and
- type = KeyOperationSubtypeIO()
- }
-}
-
-/**
- * A call to EVP_Pkey_encrypt_init, EVP_Pkey_decrypt_init, or their 'ex' variants.
- */
-class EvpPkeyEncryptDecryptInit extends OperationStep {
- EvpPkeyEncryptDecryptInit() {
- this.getTarget().getName() in [
- "EVP_PKEY_encrypt_init", "EVP_PKEY_encrypt_init_ex", "EVP_PKEY_decrypt_init",
- "EVP_PKEY_decrypt_init_ex"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = OsslParamIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-class EvpCipherInitSKeyCall extends EvpEX2Initializer {
- EvpCipherInitSKeyCall() { this.getTarget().getName() = "EVP_CipherInit_SKEY" }
-
- override DataFlow::Node getInput(IOType type) {
- result = super.getInput(type)
- or
- result.asExpr() = this.getArgument(5) and
- type = KeyOperationSubtypeIO()
- }
-}
-
-//EVP_PKEY_encrypt_init
-/**
- * A Call to EVP_Cipher/Encrypt/DecryptUpdate.
- * https://docs.openssl.org/3.2/man3/EVP_CipherUpdate
- */
-class EvpCipherUpdateCall extends OperationStep {
- EvpCipherUpdateCall() {
- this.getTarget().getName() in ["EVP_EncryptUpdate", "EVP_DecryptUpdate", "EVP_CipherUpdate"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(3) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(1) and type = CiphertextIO()
- or
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = UpdateStep() }
-}
-
-/**
- * A base configuration for all EVP cipher operations.
- */
-abstract class EvpCipherOperationFinalStep extends OperationStep {
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = FinalStep() }
-}
-
-/**
- * A Call to EVP_Cipher.
- */
-class EvpCipherCall extends EvpCipherOperationFinalStep {
- EvpCipherCall() { this.getTarget().getName() = "EVP_Cipher" }
-
- override DataFlow::Node getInput(IOType type) {
- super.getInput(type) = result
- or
- result.asExpr() = this.getArgument(2) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- super.getOutput(type) = result
- or
- result.asExpr() = this.getArgument(1) and type = CiphertextIO()
- }
-}
-
-/**
- * A Call to an EVP Cipher/Encrypt/Decrypt final operation.
- */
-class EvpCipherFinalCall extends EvpCipherOperationFinalStep {
- EvpCipherFinalCall() {
- this.getTarget().getName() in [
- "EVP_EncryptFinal_ex", "EVP_DecryptFinal_ex", "EVP_CipherFinal_ex", "EVP_EncryptFinal",
- "EVP_DecryptFinal", "EVP_CipherFinal"
- ]
- }
-
- override DataFlow::Node getOutput(IOType type) {
- super.getOutput(type) = result
- or
- result.asDefiningArgument() = this.getArgument(1) and
- type = CiphertextIO()
- // TODO: could indicate text lengths here, as well
- }
-}
-
-/**
- * A call to a PKEY_encrypt or PKEY_decrypt operation.
- * https://docs.openssl.org/3.2/man3/EVP_PKEY_decrypt/
- * https://docs.openssl.org/3.2/man3/EVP_PKEY_encrypt
- */
-class EvpPKeyCipherOperation extends EvpCipherOperationFinalStep {
- EvpPKeyCipherOperation() {
- this.getTarget().getName() in ["EVP_PKEY_encrypt", "EVP_PKEY_decrypt"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- super.getInput(type) = result
- or
- result.asExpr() = this.getArgument(3) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- super.getOutput(type) = result
- or
- result.asExpr() = this.getArgument(1) and type = CiphertextIO()
- // TODO: could indicate text lengths here, as well
- }
-}
-
-/**
- * An EVP cipher operation instance.
- * Any operation step that is a final operation step for EVP cipher operation steps.
- */
-class EvpCipherOperationInstance extends Crypto::KeyOperationInstance instanceof EvpCipherOperationFinalStep
-{
- override Crypto::AlgorithmValueConsumer getAnAlgorithmValueConsumer() {
- super.getPrimaryAlgorithmValueConsumer() = result
- }
-
- override Crypto::KeyOperationSubtype getKeyOperationSubtype() {
- result instanceof Crypto::TEncryptMode and
- super.getTarget().getName().toLowerCase().matches("%encrypt%")
- or
- result instanceof Crypto::TDecryptMode and
- super.getTarget().getName().toLowerCase().matches("%decrypt%")
- or
- super.getTarget().getName().toLowerCase().matches("%cipher%") and
- resolveKeyOperationSubTypeOperationStep(super
- .getDominatingInitializersToStep(KeyOperationSubtypeIO())) = result
- }
-
- override Crypto::ConsumerInputDataFlowNode getNonceConsumer() {
- super.getDominatingInitializersToStep(IVorNonceIO()).getInput(IVorNonceIO()) = result
- }
-
- override Crypto::ConsumerInputDataFlowNode getKeyConsumer() {
- super.getDominatingInitializersToStep(KeyIO()).getInput(KeyIO()) = result
- }
-
- override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
- super.getOutputStepFlowingToStep(CiphertextIO()).getOutput(CiphertextIO()) = result
- }
-
- override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
- super.getDominatingInitializersToStep(PlaintextIO()).getInput(PlaintextIO()) = result
- }
-}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/ECKeyGenOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/ECKeyGenOperation.qll
new file mode 100644
index 000000000000..65eebae585b3
--- /dev/null
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/ECKeyGenOperation.qll
@@ -0,0 +1,33 @@
+private import experimental.quantum.Language
+private import OpenSSLOperationBase
+private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
+private import semmle.code.cpp.dataflow.new.DataFlow
+
+class ECKeyGenOperation extends OpenSslOperation, Crypto::KeyGenerationOperationInstance {
+ ECKeyGenOperation() { this.(Call).getTarget().getName() = "EC_KEY_generate_key" }
+
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(0) }
+
+ override Crypto::KeyArtifactType getOutputKeyType() { result = Crypto::TAsymmetricKeyType() }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputKeyArtifact() {
+ result.asExpr() = this.(Call).getArgument(0)
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getKeySizeConsumer() {
+ none() // no explicit key size, inferred from algorithm
+ }
+
+ override int getKeySizeFixed() {
+ none()
+ // TODO: marked as none as the operation itself has no key size, it
+ // comes from the algorithm source, but note we could grab the
+ // algorithm source and get the key size (see below).
+ // We may need to reconsider what is the best approach here.
+ // result =
+ // this.getAnAlgorithmValueConsumer()
+ // .getAKnownAlgorithmSource()
+ // .(Crypto::EllipticCurveInstance)
+ // .getKeySize()
+ }
+}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPCipherOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPCipherOperation.qll
new file mode 100644
index 000000000000..1f5bf9e442ca
--- /dev/null
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPCipherOperation.qll
@@ -0,0 +1,181 @@
+private import experimental.quantum.Language
+private import experimental.quantum.OpenSSL.CtxFlow
+private import OpenSSLOperationBase
+private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
+
+// TODO: need to add key consumer
+abstract class Evp_Cipher_Initializer extends EvpKeyOperationSubtypeInitializer,
+ EvpPrimaryAlgorithmInitializer, EvpKeyInitializer, EvpIVInitializer
+{
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(1) }
+}
+
+abstract class Evp_EX_Initializer extends Evp_Cipher_Initializer {
+ override Expr getKeyArg() {
+ // Null key indicates the key is not actually set
+ // This pattern can occur during a multi-step initialization
+ // TODO/Note: not flowing 0 to the sink, assuming a direct use of NULL for now
+ result = this.(Call).getArgument(3) and
+ (exists(result.getValue()) implies result.getValue().toInt() != 0)
+ }
+
+ override Expr getIVArg() {
+ // Null IV indicates the IV is not actually set
+ // This occurs given that setting the IV sometimes requires first setting the IV size.
+ // TODO/Note: not flowing 0 to the sink, assuming a direct use of NULL for now
+ result = this.(Call).getArgument(4) and
+ (exists(result.getValue()) implies result.getValue().toInt() != 0)
+ }
+}
+
+abstract class Evp_EX2_Initializer extends Evp_Cipher_Initializer {
+ override Expr getKeyArg() { result = this.(Call).getArgument(2) }
+
+ override Expr getIVArg() { result = this.(Call).getArgument(3) }
+}
+
+class EvpCipherEXInitCall extends Evp_EX_Initializer {
+ EvpCipherEXInitCall() {
+ this.(Call).getTarget().getName() in [
+ "EVP_EncryptInit_ex", "EVP_DecryptInit_ex", "EVP_CipherInit_ex"
+ ]
+ }
+
+ override Expr getKeyOperationSubtypeArg() {
+ // NOTE: for EncryptInit and DecryptInit there is no subtype arg
+ // the subtype is determined automatically by the initializer based on the operation name
+ this.(Call).getTarget().getName().toLowerCase().matches("%cipherinit%") and
+ result = this.(Call).getArgument(5)
+ }
+}
+
+// if this.(Call).getTarget().getName().toLowerCase().matches("%encrypt%")
+// then result instanceof Crypto::TEncryptMode
+// else
+// if this.(Call).getTarget().getName().toLowerCase().matches("%decrypt%")
+// then result instanceof Crypto::TDecryptMode
+class Evp_Cipher_EX2_or_Simple_Init_Call extends Evp_EX2_Initializer {
+ Evp_Cipher_EX2_or_Simple_Init_Call() {
+ this.(Call).getTarget().getName() in [
+ "EVP_EncryptInit_ex2", "EVP_DecryptInit_ex2", "EVP_CipherInit_ex2", "EVP_EncryptInit",
+ "EVP_DecryptInit", "EVP_CipherInit"
+ ]
+ }
+
+ override Expr getKeyOperationSubtypeArg() {
+ this.(Call).getTarget().getName().toLowerCase().matches("%cipherinit%") and
+ result = this.(Call).getArgument(4)
+ }
+}
+
+class Evp_CipherInit_SKey_Call extends Evp_EX2_Initializer {
+ Evp_CipherInit_SKey_Call() { this.(Call).getTarget().getName() = "EVP_CipherInit_SKEY" }
+
+ override Expr getKeyOperationSubtypeArg() { result = this.(Call).getArgument(5) }
+}
+
+class Evp_Cipher_Update_Call extends EvpUpdate {
+ Evp_Cipher_Update_Call() {
+ this.(Call).getTarget().getName() in [
+ "EVP_EncryptUpdate", "EVP_DecryptUpdate", "EVP_CipherUpdate"
+ ]
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ override Expr getInputArg() { result = this.(Call).getArgument(3) }
+
+ override Expr getOutputArg() { result = this.(Call).getArgument(1) }
+}
+
+/**
+ * see: https://docs.openssl.org/master/man3/EVP_EncryptInit/#synopsis
+ * Base configuration for all EVP cipher operations.
+ */
+abstract class Evp_Cipher_Operation extends EvpOperation, Crypto::KeyOperationInstance {
+ override Expr getOutputArg() { result = this.(Call).getArgument(1) }
+
+ override Crypto::KeyOperationSubtype getKeyOperationSubtype() {
+ result instanceof Crypto::TEncryptMode and
+ this.(Call).getTarget().getName().toLowerCase().matches("%encrypt%")
+ or
+ result instanceof Crypto::TDecryptMode and
+ this.(Call).getTarget().getName().toLowerCase().matches("%decrypt%")
+ or
+ result = this.getInitCall().(EvpKeyOperationSubtypeInitializer).getKeyOperationSubtype() and
+ this.(Call).getTarget().getName().toLowerCase().matches("%cipher%")
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getNonceConsumer() {
+ this.getInitCall().(EvpIVInitializer).getIVArg() = result.asExpr()
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getKeyConsumer() {
+ this.getInitCall().(EvpKeyInitializer).getKeyArg() = result.asExpr()
+ // todo: or track to the EVP_PKEY_CTX_new
+ }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
+ result = EvpOperation.super.getOutputArtifact()
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
+ result = EvpOperation.super.getInputConsumer()
+ }
+}
+
+class Evp_Cipher_Call extends EvpOperation, Evp_Cipher_Operation {
+ Evp_Cipher_Call() { this.(Call).getTarget().getName() = "EVP_Cipher" }
+
+ override Expr getInputArg() { result = this.(Call).getArgument(2) }
+
+ override Expr getAlgorithmArg() {
+ result = this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg()
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class Evp_Cipher_Final_Call extends EvpFinal, Evp_Cipher_Operation {
+ Evp_Cipher_Final_Call() {
+ this.(Call).getTarget().getName() in [
+ "EVP_EncryptFinal_ex", "EVP_DecryptFinal_ex", "EVP_CipherFinal_ex", "EVP_EncryptFinal",
+ "EVP_DecryptFinal", "EVP_CipherFinal"
+ ]
+ }
+
+ /**
+ * Output is both from update calls and from the final call.
+ */
+ override Expr getOutputArg() {
+ result = EvpFinal.super.getOutputArg()
+ or
+ result = Evp_Cipher_Operation.super.getOutputArg()
+ }
+
+ override Expr getAlgorithmArg() {
+ result = this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg()
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+/**
+ * https://docs.openssl.org/3.2/man3/EVP_PKEY_decrypt/
+ * https://docs.openssl.org/3.2/man3/EVP_PKEY_encrypt
+ */
+class Evp_PKey_Cipher_Operation extends Evp_Cipher_Operation {
+ Evp_PKey_Cipher_Operation() {
+ this.(Call).getTarget().getName() in ["EVP_PKEY_encrypt", "EVP_PKEY_decrypt"]
+ }
+
+ override Expr getInputArg() { result = this.(Call).getArgument(3) }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ override Expr getAlgorithmArg() {
+ result = this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg()
+ }
+}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPHashOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPHashOperation.qll
new file mode 100644
index 000000000000..b99c5432a1a0
--- /dev/null
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPHashOperation.qll
@@ -0,0 +1,106 @@
+/**
+ * https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
+ */
+
+private import experimental.quantum.Language
+private import experimental.quantum.OpenSSL.CtxFlow
+private import OpenSSLOperationBase
+private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
+
+class Evp_DigestInit_Variant_Calls extends EvpPrimaryAlgorithmInitializer {
+ Evp_DigestInit_Variant_Calls() {
+ this.(Call).getTarget().getName() in [
+ "EVP_DigestInit", "EVP_DigestInit_ex", "EVP_DigestInit_ex2"
+ ]
+ }
+
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(1) }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class Evp_Digest_Update_Call extends EvpUpdate {
+ Evp_Digest_Update_Call() { this.(Call).getTarget().getName() = "EVP_DigestUpdate" }
+
+ override Expr getInputArg() { result = this.(Call).getArgument(1) }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+//https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
+class Evp_Q_Digest_Operation extends EvpOperation, Crypto::HashOperationInstance {
+ Evp_Q_Digest_Operation() { this.(Call).getTarget().getName() = "EVP_Q_digest" }
+
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(1) }
+
+ override EvpInitializer getInitCall() {
+ // This variant of digest does not use an init
+ // and even if it were used, the init would be ignored/undefined
+ none()
+ }
+
+ override Expr getInputArg() { result = this.(Call).getArgument(3) }
+
+ override Expr getOutputArg() { result = this.(Call).getArgument(5) }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
+ result = EvpOperation.super.getOutputArtifact()
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
+ result = EvpOperation.super.getInputConsumer()
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class Evp_Digest_Operation extends EvpOperation, Crypto::HashOperationInstance {
+ Evp_Digest_Operation() { this.(Call).getTarget().getName() = "EVP_Digest" }
+
+ // There is no context argument for this function
+ override CtxPointerSource getContext() { none() }
+
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(4) }
+
+ override EvpPrimaryAlgorithmInitializer getInitCall() {
+ // This variant of digest does not use an init
+ // and even if it were used, the init would be ignored/undefined
+ none()
+ }
+
+ override Expr getInputArg() { result = this.(Call).getArgument(0) }
+
+ override Expr getOutputArg() { result = this.(Call).getArgument(2) }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
+ result = EvpOperation.super.getOutputArtifact()
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
+ result = EvpOperation.super.getInputConsumer()
+ }
+}
+
+class Evp_Digest_Final_Call extends EvpFinal, Crypto::HashOperationInstance {
+ Evp_Digest_Final_Call() {
+ this.(Call).getTarget().getName() in [
+ "EVP_DigestFinal", "EVP_DigestFinal_ex", "EVP_DigestFinalXOF"
+ ]
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ override Expr getOutputArg() { result = this.(Call).getArgument(1) }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
+ result = EvpFinal.super.getOutputArtifact()
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
+ result = EvpFinal.super.getInputConsumer()
+ }
+
+ override Expr getAlgorithmArg() {
+ result = this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg()
+ }
+}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPKeyGenOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPKeyGenOperation.qll
new file mode 100644
index 000000000000..47f341e17b1a
--- /dev/null
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPKeyGenOperation.qll
@@ -0,0 +1,96 @@
+private import experimental.quantum.Language
+private import experimental.quantum.OpenSSL.CtxFlow
+private import OpenSSLOperationBase
+private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
+
+class EvpKeyGenInitialize extends EvpPrimaryAlgorithmInitializer {
+ EvpKeyGenInitialize() {
+ this.(Call).getTarget().getName() in [
+ "EVP_PKEY_keygen_init",
+ "EVP_PKEY_paramgen_init"
+ ]
+ }
+
+ /**
+ * Gets the algorithm argument.
+ * In this case the algorithm is encoded through the context argument.
+ * The context may be directly created from an algorithm consumer,
+ * or from a new operation off of a prior key. Either way,
+ * we will treat this argument as the algorithm argument.
+ */
+ override Expr getAlgorithmArg() { result = this.getContext() }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class EvpKeyGenOperation extends EvpOperation, Crypto::KeyGenerationOperationInstance {
+ DataFlow::Node keyResultNode;
+
+ EvpKeyGenOperation() {
+ this.(Call).getTarget().getName() in ["EVP_RSA_gen", "EVP_PKEY_Q_keygen"] and
+ keyResultNode.asExpr() = this
+ or
+ this.(Call).getTarget().getName() in ["EVP_PKEY_generate", "EVP_PKEY_keygen"] and
+ keyResultNode.asDefiningArgument() = this.(Call).getArgument(1)
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ override Expr getAlgorithmArg() {
+ this.(Call).getTarget().getName() = "EVP_PKEY_Q_keygen" and
+ result = this.(Call).getArgument(0)
+ or
+ result = this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg()
+ }
+
+ override Crypto::KeyArtifactType getOutputKeyType() { result = Crypto::TAsymmetricKeyType() }
+
+ override Expr getInputArg() { none() }
+
+ override Expr getOutputArg() { result = keyResultNode.asExpr() }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputKeyArtifact() { result = keyResultNode }
+
+ override Crypto::ConsumerInputDataFlowNode getKeySizeConsumer() {
+ this.(Call).getTarget().getName() = "EVP_PKEY_Q_keygen" and
+ result = DataFlow::exprNode(this.(Call).getArgument(3)) and
+ // Arg 3 (0 based) is only a key size if the 'type' parameter is RSA, however,
+ // as a crude approximation, assume that if the type of the argument is not a derived type
+ // the argument must specify a key size (this is to avoid tracing if "rsa" is in the type parameter)
+ not this.(Call).getArgument(3).getType().getUnderlyingType() instanceof DerivedType
+ or
+ this.(Call).getTarget().getName() = "EVP_RSA_gen" and
+ result = DataFlow::exprNode(this.(Call).getArgument(0))
+ or
+ result = DataFlow::exprNode(this.getInitCall().(EvpKeySizeInitializer).getKeySizeArg())
+ }
+}
+
+/**
+ * A call to `EVP_PKEY_new_mac_key` that creatse a new generic MAC key.
+ * Signature: EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen);
+ */
+class EvpNewMacKey extends EvpOperation, Crypto::KeyGenerationOperationInstance {
+ DataFlow::Node keyResultNode;
+
+ EvpNewMacKey() {
+ this.(Call).getTarget().getName() = "EVP_PKEY_new_mac_key" and keyResultNode.asExpr() = this
+ }
+
+ override CtxPointerSource getContext() { none() }
+
+ override Crypto::KeyArtifactType getOutputKeyType() { result = Crypto::TSymmetricKeyType() }
+
+ override Expr getOutputArg() { result = keyResultNode.asExpr() }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputKeyArtifact() { result = keyResultNode }
+
+ override Expr getInputArg() { none() }
+
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(0) }
+
+ override Crypto::ConsumerInputDataFlowNode getKeySizeConsumer() {
+ result = DataFlow::exprNode(this.(Call).getArgument(3))
+ }
+}
+/// TODO: https://docs.openssl.org/3.0/man3/EVP_PKEY_new/#synopsis
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPPKeyCtxInitializer.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPPKeyCtxInitializer.qll
index 2208407e53ca..d7060931317f 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPPKeyCtxInitializer.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPPKeyCtxInitializer.qll
@@ -6,6 +6,7 @@
*/
import cpp
+private import experimental.quantum.OpenSSL.CtxFlow
private import OpenSSLOperations
/**
@@ -13,66 +14,49 @@ private import OpenSSLOperations
* These calls initialize the context from a prior key.
* The key may be generated previously, or merely had it's
* parameters set (e.g., `EVP_PKEY_paramgen`).
+ * NOTE: for the case of `EVP_PKEY_paramgen`, these calls
+ * are encoded as context passthroughs, and any operation
+ * will get all associated initializers for the paramgen
+ * at the final keygen operation automatically.
*/
-class EvpNewKeyCtx extends OperationStep instanceof Call {
+class EvpNewKeyCtx extends EvpKeyInitializer {
Expr keyArg;
EvpNewKeyCtx() {
- this.getTarget().getName() = "EVP_PKEY_CTX_new" and
- keyArg = this.getArgument(0)
+ this.(Call).getTarget().getName() = "EVP_PKEY_CTX_new" and
+ keyArg = this.(Call).getArgument(0)
or
- this.getTarget().getName() = "EVP_PKEY_CTX_new_from_pkey" and
- keyArg = this.getArgument(1)
+ this.(Call).getTarget().getName() = "EVP_PKEY_CTX_new_from_pkey" and
+ keyArg = this.(Call).getArgument(1)
}
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = keyArg and type = KeyIO()
- or
- this.getTarget().getName() = "EVP_PKEY_CTX_new_from_pkey" and
- result.asExpr() = this.getArgument(0) and
- type = OsslLibContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) { result.asExpr() = this and type = ContextIO() }
+ /**
+ * Context is returned
+ */
+ override CtxPointerSource getContext() { result = this }
- override OperationStepType getStepType() { result = ContextCreationStep() }
+ override Expr getKeyArg() { result = keyArg }
}
/**
* A call to "EVP_PKEY_CTX_set_ec_paramgen_curve_nid".
+ * Note that this is a primary algorithm as the pattenr is to specify an "EC" context,
+ * then set the specific curve later. Although the curve is set later, it is the primary
+ * algorithm intended for an operation.
*/
-class EvpCtxSetEcParamgenCurveNidInitializer extends OperationStep {
- EvpCtxSetEcParamgenCurveNidInitializer() {
- this.getTarget().getName() = "EVP_PKEY_CTX_set_ec_paramgen_curve_nid"
+class EvpCtxSetPrimaryAlgorithmInitializer extends EvpPrimaryAlgorithmInitializer {
+ EvpCtxSetPrimaryAlgorithmInitializer() {
+ this.(Call).getTarget().getName() = "EVP_PKEY_CTX_set_ec_paramgen_curve_nid"
}
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = PrimaryAlgorithmIO()
- }
+ override Expr getAlgorithmArg() { result = this.(Call).getArgument(1) }
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
}
-/**
- * A call to the following:
- * - `EVP_PKEY_CTX_set_signature_md`
- * - `EVP_PKEY_CTX_set_rsa_mgf1_md_name`
- * - `EVP_PKEY_CTX_set_rsa_mgf1_md`
- * - `EVP_PKEY_CTX_set_rsa_oaep_md_name`
- * - `EVP_PKEY_CTX_set_rsa_oaep_md`
- * - `EVP_PKEY_CTX_set_dsa_paramgen_md`
- * - `EVP_PKEY_CTX_set_dh_kdf_md`
- * - `EVP_PKEY_CTX_set_ecdh_kdf_md`
- */
-class EvpCtxSetHashInitializer extends OperationStep {
- EvpCtxSetHashInitializer() {
- this.getTarget().getName() in [
+class EvpCtxSetHashAlgorithmInitializer extends EvpHashAlgorithmInitializer {
+ EvpCtxSetHashAlgorithmInitializer() {
+ this.(Call).getTarget().getName() in [
"EVP_PKEY_CTX_set_signature_md", "EVP_PKEY_CTX_set_rsa_mgf1_md_name",
"EVP_PKEY_CTX_set_rsa_mgf1_md", "EVP_PKEY_CTX_set_rsa_oaep_md_name",
"EVP_PKEY_CTX_set_rsa_oaep_md", "EVP_PKEY_CTX_set_dsa_paramgen_md",
@@ -80,95 +64,56 @@ class EvpCtxSetHashInitializer extends OperationStep {
]
}
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = HashAlgorithmIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
+ override Expr getHashAlgorithmArg() { result = this.(Call).getArgument(1) }
- override OperationStepType getStepType() { result = InitializerStep() }
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
}
-/**
- * A call to `EVP_PKEY_CTX_set_rsa_keygen_bits`, `EVP_PKEY_CTX_set_dsa_paramgen_bits`,
- * or `EVP_CIPHER_CTX_set_key_length`.
- */
-class EvpCtxSetKeySizeInitializer extends OperationStep {
+class EvpCtxSetKeySizeInitializer extends EvpKeySizeInitializer {
+ Expr arg;
+
EvpCtxSetKeySizeInitializer() {
- this.getTarget().getName() in [
+ this.(Call).getTarget().getName() in [
"EVP_PKEY_CTX_set_rsa_keygen_bits", "EVP_PKEY_CTX_set_dsa_paramgen_bits",
"EVP_CIPHER_CTX_set_key_length"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
+ ] and
+ arg = this.(Call).getArgument(1)
or
- result.asExpr() = this.getArgument(1) and type = KeySizeIO()
+ this.(Call).getTarget().getName() = "EVP_PKEY_CTX_set_mac_key" and
+ arg = this.(Call).getArgument(2)
}
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
+ override Expr getKeySizeArg() { result = arg }
- override OperationStepType getStepType() { result = InitializerStep() }
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
}
-class EvpCtxSetMacKeyInitializer extends OperationStep {
- EvpCtxSetMacKeyInitializer() { this.getTarget().getName() = "EVP_PKEY_CTX_set_mac_key" }
+class EvpCtxSetKeyInitializer extends EvpKeyInitializer {
+ EvpCtxSetKeyInitializer() { this.(Call).getTarget().getName() = "EVP_PKEY_CTX_set_mac_key" }
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(2) and type = KeySizeIO()
- or
- // the raw key that is configured into the output key
- result.asExpr() = this.getArgument(1) and type = KeyIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
+ override Expr getKeyArg() { result = this.(Call).getArgument(1) }
- override OperationStepType getStepType() { result = InitializerStep() }
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
}
-class EvpCtxSetPaddingInitializer extends OperationStep {
+class EvpCtxSetPaddingInitializer extends EvpPaddingInitializer {
EvpCtxSetPaddingInitializer() {
- this.getTarget().getName() in ["EVP_PKEY_CTX_set_rsa_padding", "EVP_CIPHER_CTX_set_padding"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = PaddingAlgorithmIO()
+ this.(Call).getTarget().getName() in [
+ "EVP_PKEY_CTX_set_rsa_padding", "EVP_CIPHER_CTX_set_padding"
+ ]
}
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
+ override Expr getPaddingArg() { result = this.(Call).getArgument(1) }
- override OperationStepType getStepType() { result = InitializerStep() }
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
}
-class EvpCtxSetSaltLengthInitializer extends OperationStep {
+class EvpCtxSetSaltLengthInitializer extends EvpSaltLengthInitializer {
EvpCtxSetSaltLengthInitializer() {
- this.getTarget().getName() = "EVP_PKEY_CTX_set_rsa_pss_saltlen"
+ this.(Call).getTarget().getName() = "EVP_PKEY_CTX_set_rsa_pss_saltlen"
}
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = SaltLengthIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
+ override Expr getSaltLengthArg() { result = this.(Call).getArgument(1) }
- override OperationStepType getStepType() { result = InitializerStep() }
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPSignatureOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPSignatureOperation.qll
new file mode 100644
index 000000000000..41a828652917
--- /dev/null
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPSignatureOperation.qll
@@ -0,0 +1,200 @@
+/**
+ * Provides classes for modeling OpenSSL's EVP signature operations
+ */
+
+private import experimental.quantum.Language
+private import experimental.quantum.OpenSSL.AvcFlow
+private import experimental.quantum.OpenSSL.CtxFlow
+private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
+private import experimental.quantum.OpenSSL.Operations.OpenSSLOperations
+
+// TODO: verification functions
+class EvpSignatureDigestInitializer extends EvpHashAlgorithmInitializer {
+ Expr arg;
+
+ EvpSignatureDigestInitializer() {
+ this.(Call).getTarget().getName() in ["EVP_DigestSignInit_ex", "EVP_DigestSignInit"] and
+ arg = this.(Call).getArgument(2)
+ or
+ this.(Call).getTarget().getName() in ["EVP_SignInit", "EVP_SignInit_ex"] and
+ arg = this.(Call).getArgument(1)
+ }
+
+ override Expr getHashAlgorithmArg() { result = arg }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class EvpSignatureKeyInitializer extends EvpKeyInitializer {
+ Expr arg;
+
+ EvpSignatureKeyInitializer() {
+ this.(Call).getTarget().getName() = "EVP_DigestSignInit_ex" and
+ arg = this.(Call).getArgument(5)
+ or
+ this.(Call).getTarget().getName() = "EVP_DigestSignInit" and
+ arg = this.(Call).getArgument(4)
+ }
+
+ override Expr getKeyArg() { result = arg }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class EvpSignaturePrimaryAlgorithmInitializer extends EvpPrimaryAlgorithmInitializer {
+ Expr arg;
+
+ EvpSignaturePrimaryAlgorithmInitializer() {
+ // signature algorithm
+ this.(Call).getTarget().getName() in ["EVP_PKEY_sign_init_ex2", "EVP_PKEY_sign_message_init"] and
+ arg = this.(Call).getArgument(1)
+ or
+ // configuration through the context argument
+ this.(Call).getTarget().getName() in ["EVP_PKEY_sign_init", "EVP_PKEY_sign_init_ex"] and
+ arg = this.getContext()
+ }
+
+ override Expr getAlgorithmArg() { result = arg }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+class Evp_Signature_Update_Call extends EvpUpdate {
+ Evp_Signature_Update_Call() {
+ this.(Call).getTarget().getName() in [
+ "EVP_DigestSignUpdate", "EVP_SignUpdate", "EVP_PKEY_sign_message_update"
+ ]
+ }
+
+ /**
+ * Input is the message to sign.
+ */
+ override Expr getInputArg() { result = this.(Call).getArgument(1) }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+}
+
+/**
+ * We model output explicit output arguments as predicate to use it in constructors.
+ * The predicate must cover all EVP_Signature_Operation subclasses.
+ */
+pragma[inline]
+private Expr signatureOperationOutputArg(Call call) {
+ if call.getTarget().getName() = "EVP_SignFinal_ex"
+ then result = call.getArgument(2)
+ else result = call.getArgument(1)
+}
+
+/**
+ * The base configuration for all EVP signature operations.
+ */
+abstract class EvpSignatureOperation extends EvpOperation, Crypto::SignatureOperationInstance {
+ EvpSignatureOperation() {
+ this.(Call).getTarget().getName().matches("EVP_%") and
+ // NULL output argument means the call is to get the size of the signature and such call is not an operation
+ (
+ not exists(signatureOperationOutputArg(this).getValue())
+ or
+ signatureOperationOutputArg(this).getValue() != "0"
+ )
+ }
+
+ Expr getHashAlgorithmArg() {
+ this.getInitCall().(EvpHashAlgorithmInitializer).getHashAlgorithmArg() = result
+ }
+
+ override Expr getAlgorithmArg() {
+ this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg() = result
+ }
+
+ override Crypto::AlgorithmValueConsumer getHashAlgorithmValueConsumer() {
+ AvcToCallArgFlow::flow(result.(OpenSslAlgorithmValueConsumer).getResultNode(),
+ DataFlow::exprNode(this.getHashAlgorithmArg()))
+ }
+
+ /**
+ * Signing, verification or unknown.
+ */
+ override Crypto::KeyOperationSubtype getKeyOperationSubtype() {
+ // TODO: if this KeyOperationSubtype does not match initialization call's KeyOperationSubtype then we found a bug
+ if this.(Call).getTarget().getName().toLowerCase().matches("%sign%")
+ then result instanceof Crypto::TSignMode
+ else
+ if this.(Call).getTarget().getName().toLowerCase().matches("%verify%")
+ then result instanceof Crypto::TVerifyMode
+ else result instanceof Crypto::TUnknownKeyOperationMode
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getNonceConsumer() {
+ // TODO: some signing operations may have explicit nonce generators
+ none()
+ }
+
+ /**
+ * Keys provided in the initialization call or in a context are found by this method.
+ * Keys in explicit arguments are found by overridden methods in extending classes.
+ */
+ override Crypto::ConsumerInputDataFlowNode getKeyConsumer() {
+ result = DataFlow::exprNode(this.getInitCall().(EvpKeyInitializer).getKeyArg())
+ }
+
+ override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
+ result = EvpOperation.super.getOutputArtifact()
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
+ result = EvpOperation.super.getInputConsumer()
+ }
+
+ /**
+ * TODO: only signing operations for now, change when verificaiton is added
+ */
+ override Crypto::ConsumerInputDataFlowNode getSignatureConsumer() { none() }
+}
+
+class Evp_Signature_Call extends EvpSignatureOperation {
+ Evp_Signature_Call() { this.(Call).getTarget().getName() in ["EVP_DigestSign", "EVP_PKEY_sign"] }
+
+ /**
+ * Output is the signature.
+ */
+ override Expr getOutputArg() { result = signatureOperationOutputArg(this) }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ /**
+ * Input is the message to sign.
+ */
+ override Expr getInputArg() { result = this.(Call).getArgument(3) }
+}
+
+class Evp_Signature_Final_Call extends EvpFinal, EvpSignatureOperation {
+ Evp_Signature_Final_Call() {
+ this.(Call).getTarget().getName() in [
+ "EVP_DigestSignFinal",
+ "EVP_SignFinal_ex",
+ "EVP_SignFinal",
+ "EVP_PKEY_sign_message_final"
+ ]
+ }
+
+ override CtxPointerSource getContext() { result = this.(Call).getArgument(0) }
+
+ override Expr getAlgorithmArg() {
+ this.getInitCall().(EvpPrimaryAlgorithmInitializer).getAlgorithmArg() = result
+ }
+
+ override Crypto::ConsumerInputDataFlowNode getKeyConsumer() {
+ // key provided as an argument
+ this.(Call).getTarget().getName() in ["EVP_SignFinal", "EVP_SignFinal_ex"] and
+ result = DataFlow::exprNode(this.(Call).getArgument(3))
+ or
+ // or find key in the initialization call
+ result = EvpSignatureOperation.super.getKeyConsumer()
+ }
+
+ /**
+ * Output is the signature.
+ */
+ override Expr getOutputArg() { result = signatureOperationOutputArg(this) }
+}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/HashOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/HashOperation.qll
deleted file mode 100644
index 1878bfbe09f2..000000000000
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/HashOperation.qll
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
- */
-
-private import experimental.quantum.Language
-private import OpenSSLOperationBase
-private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
-
-/**
- * A call to and EVP digest initializer, such as:
- * - `EVP_DigestInit`
- * - `EVP_DigestInit_ex`
- * - `EVP_DigestInit_ex2`
- */
-class EvpDigestInitVariantCalls extends OperationStep instanceof Call {
- EvpDigestInitVariantCalls() {
- this.getTarget().getName() in ["EVP_DigestInit", "EVP_DigestInit_ex", "EVP_DigestInit_ex2"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = PrimaryAlgorithmIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and
- type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-/**
- * A call to `EVP_DigestUpdate`.
- */
-class EvpDigestUpdateCall extends OperationStep instanceof Call {
- EvpDigestUpdateCall() { this.getTarget().getName() = "EVP_DigestUpdate" }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and
- type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = UpdateStep() }
-}
-
-/**
- * A base class for final digest operations.
- */
-abstract class EvpFinalDigestOperationStep extends OperationStep {
- override OperationStepType getStepType() { result = FinalStep() }
-}
-
-/**
- * A call to `EVP_Q_digest`
- * https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
- */
-class EvpQDigestOperation extends EvpFinalDigestOperationStep instanceof Call {
- EvpQDigestOperation() { this.getTarget().getName() = "EVP_Q_digest" }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(1) and type = PrimaryAlgorithmIO()
- or
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(3) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and
- type = ContextIO()
- or
- result.asDefiningArgument() = this.getArgument(5) and type = DigestIO()
- }
-}
-
-class EvpDigestOperation extends EvpFinalDigestOperationStep instanceof Call {
- EvpDigestOperation() { this.getTarget().getName() = "EVP_Digest" }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(4) and type = PrimaryAlgorithmIO()
- or
- result.asExpr() = this.getArgument(0) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asDefiningArgument() = this.getArgument(2) and type = DigestIO()
- }
-}
-
-/**
- * A call to EVP_DigestFinal variants
- */
-class EvpDigestFinalCall extends EvpFinalDigestOperationStep instanceof Call {
- EvpDigestFinalCall() {
- this.getTarget().getName() in ["EVP_DigestFinal", "EVP_DigestFinal_ex", "EVP_DigestFinalXOF"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and
- type = ContextIO()
- or
- result.asDefiningArgument() = this.getArgument(1) and type = DigestIO()
- }
-}
-
-/**
- * An openssl digest final hash operation instance
- */
-class EvpDigestFinalOperationInstance extends Crypto::HashOperationInstance instanceof EvpFinalDigestOperationStep
-{
- override Crypto::AlgorithmValueConsumer getAnAlgorithmValueConsumer() {
- super.getPrimaryAlgorithmValueConsumer() = result
- }
-
- override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
- super.getOutputStepFlowingToStep(DigestIO()).getOutput(DigestIO()) = result
- }
-
- override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
- super.getDominatingInitializersToStep(PlaintextIO()).getInput(PlaintextIO()) = result
- }
-}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/KeyGenOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/KeyGenOperation.qll
deleted file mode 100644
index 2c146aec97f5..000000000000
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/KeyGenOperation.qll
+++ /dev/null
@@ -1,204 +0,0 @@
-private import experimental.quantum.Language
-private import OpenSSLOperationBase
-private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
-
-/**
- * A call to EC_KEY_generate_key, which is used to generate an EC key pair.
- * Note: this is an operation, though the input parameter is a "EC_KEY*".
- * EC_KEY is really an empty context for a key that hasn't been generated, hence
- * we consider this an operation generating a key and not accepting a key input.
- */
-class ECKeyGen extends OperationStep instanceof Call {
- //, Crypto::KeyGenerationOperationInstance {
- ECKeyGen() { this.(Call).getTarget().getName() = "EC_KEY_generate_key" }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.(Call).getArgument(0) and type = ContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) { result.asExpr() = this and type = KeyIO() }
-
- override OperationStepType getStepType() { result = ContextCreationStep() }
-}
-
-/**
- * A call to EVP_PKEY_keygen_init or EVP_PKEY_paramgen_init.
- */
-class EvpKeyGenInitialize extends OperationStep {
- EvpKeyGenInitialize() {
- this.getTarget().getName() in [
- "EVP_PKEY_keygen_init",
- "EVP_PKEY_paramgen_init"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-abstract class KeyGenFinalOperationStep extends OperationStep {
- override OperationStepType getStepType() { result = FinalStep() }
-}
-
-/**
- * A call to `EVP_PKEY_Q_keygen`
- */
-class EvpPKeyQKeyGen extends KeyGenFinalOperationStep instanceof Call {
- EvpPKeyQKeyGen() { this.getTarget().getName() = "EVP_PKEY_Q_keygen" }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this and type = KeyIO()
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- // When arg 3 is a derived type, it is a curve name, otherwise it is a key size for RSA if provided
- // and arg 2 is the algorithm type
- this.getArgument(3).getType().getUnderlyingType() instanceof DerivedType and
- result.asExpr() = this.getArgument(3) and
- type = PrimaryAlgorithmIO()
- or
- not this.getArgument(3).getType().getUnderlyingType() instanceof DerivedType and
- result.asExpr() = this.getArgument(2) and
- type = PrimaryAlgorithmIO()
- or
- not this.getArgument(3).getType().getUnderlyingType() instanceof DerivedType and
- result.asExpr() = this.getArgument(3) and
- type = KeySizeIO()
- }
-}
-
-/**
- * A call to `EVP_RSA_gen`
- */
-class EvpRsaGen extends KeyGenFinalOperationStep instanceof Call {
- EvpRsaGen() { this.getTarget().getName() = "EVP_RSA_gen" }
-
- override DataFlow::Node getOutput(IOType type) { result.asExpr() = this and type = KeyIO() }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = KeySizeIO()
- }
-}
-
-/**
- * A call to RSA_generate_key
- */
-class RsaGenerateKey extends KeyGenFinalOperationStep instanceof Call {
- RsaGenerateKey() { this.getTarget().getName() = "RSA_generate_key" }
-
- override DataFlow::Node getOutput(IOType type) { result.asExpr() = this and type = KeyIO() }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = KeySizeIO()
- }
-}
-
-/**
- * A call to RSA_generate_key_ex
- */
-class RsaGenerateKeyEx extends KeyGenFinalOperationStep instanceof Call {
- RsaGenerateKeyEx() { this.getTarget().getName() = "RSA_generate_key_ex" }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asDefiningArgument() = this.getArgument(0) and type = KeyIO()
- }
-
- override DataFlow::Node getInput(IOType type) {
- // arg 0 comes in as a blank RSA key, which we consider a context,
- // on output it is considered a key
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-}
-
-/**
- * A call to `EVP_PKEY_generate` or `EVP_PKEY_keygen`.
- */
-class EvpPkeyGen extends KeyGenFinalOperationStep instanceof Call {
- EvpPkeyGen() { this.getTarget().getName() in ["EVP_PKEY_generate", "EVP_PKEY_keygen"] }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asDefiningArgument() = this.getArgument(1) and type = KeyIO()
- or
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-}
-
-/**
- * A call to `EVP_PKEY_new_mac_key` that creates a new generic MAC key.
- * - EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen);
- */
-class EvpNewMacKey extends KeyGenFinalOperationStep {
- EvpNewMacKey() { this.getTarget().getName() = "EVP_PKEY_new_mac_key" }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- // the raw key that is configured into the output key
- result.asExpr() = this.getArgument(2) and type = KeyIO()
- or
- result.asExpr() = this.getArgument(3) and type = KeySizeIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this and type = KeyIO()
- or
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-}
-
-/// TODO: https://docs.openssl.org/3.0/man3/EVP_PKEY_new/#synopsis
-/**
- * An `KeyGenerationOperationInstance` for the for all key gen final operation steps.
- */
-class KeyGenOperationInstance extends Crypto::KeyGenerationOperationInstance instanceof KeyGenFinalOperationStep
-{
- override Crypto::AlgorithmValueConsumer getAnAlgorithmValueConsumer() {
- super.getPrimaryAlgorithmValueConsumer() = result
- }
-
- override Crypto::KeyArtifactType getOutputKeyType() { result = Crypto::TAsymmetricKeyType() }
-
- override Crypto::ArtifactOutputDataFlowNode getOutputKeyArtifact() {
- super.getOutputStepFlowingToStep(KeyIO()).getOutput(KeyIO()) = result
- }
-
- override predicate hasKeyValueConsumer() {
- exists(OperationStep s | s.flowsToOperationStep(this) and s.setsValue(KeyIO()))
- }
-
- override Crypto::ConsumerInputDataFlowNode getKeySizeConsumer() {
- super.getDominatingInitializersToStep(KeySizeIO()).getInput(KeySizeIO()) = result
- }
-
- override int getKeySizeFixed() {
- none()
- // TODO: marked as none as the operation itself has no key size, it
- // comes from the algorithm source, but note we could grab the
- // algorithm source and get the key size (see below).
- // We may need to reconsider what is the best approach here.
- // result =
- // this.getAnAlgorithmValueConsumer()
- // .getAKnownAlgorithmSource()
- // .(Crypto::EllipticCurveInstance)
- // .getKeySize()
- }
-
- override Crypto::ConsumerInputDataFlowNode getKeyValueConsumer() {
- super.getDominatingInitializersToStep(KeyIO()).getInput(KeyIO()) = result
- }
-}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperationBase.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperationBase.qll
index f1ab394ad787..34d7f6acec8c 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperationBase.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperationBase.qll
@@ -1,523 +1,316 @@
private import experimental.quantum.Language
+private import experimental.quantum.OpenSSL.AvcFlow
+private import experimental.quantum.OpenSSL.CtxFlow
+private import experimental.quantum.OpenSSL.KeyFlow
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
-import semmle.code.cpp.dataflow.new.DataFlow
// Importing these intializers here to ensure the are part of any model that is
// using OpenSslOperationBase. This further ensures that initializers are tied to opeartions
// even if only importing the operation by itself.
import EVPPKeyCtxInitializer
-/**
- * An openSSL CTX type, which is type for which the stripped underlying type
- * matches the pattern 'evp_%ctx_%st'.
- * This includes types like:
- * - EVP_CIPHER_CTX
- * - EVP_MD_CTX
- * - EVP_PKEY_CTX
- */
-class CtxType extends Type {
- CtxType() {
- // It is possible for users to use the underlying type of the CTX variables
- // these have a name matching 'evp_%ctx_%st
- this.getUnspecifiedType().stripType().getName().matches("evp_%ctx_%st")
- or
- // In principal the above check should be sufficient, but in case of build mode none issues
- // i.e., if a typedef cannot be resolved,
- // or issues with properly stubbing test cases, we also explicitly check for the wrapping type defs
- // i.e., patterns matching 'EVP_%_CTX'
- exists(Type base | base = this or base = this.(DerivedType).getBaseType() |
- base.getName().matches("EVP_%_CTX")
- )
- }
-}
+module EncValToInitEncArgConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { source.asExpr().getValue().toInt() in [0, 1] }
-/**
- * A pointer to a CtxType
- */
-class CtxPointerExpr extends Expr {
- CtxPointerExpr() {
- this.getType() instanceof CtxType and
- this.getType() instanceof PointerType
+ predicate isSink(DataFlow::Node sink) {
+ exists(EvpKeyOperationSubtypeInitializer initCall |
+ sink.asExpr() = initCall.getKeyOperationSubtypeArg()
+ )
}
}
-/**
- * A call argument of type CtxPointerExpr.
- */
-class CtxPointerArgument extends CtxPointerExpr {
- CtxPointerArgument() { exists(Call c | c.getAnArgument() = this) }
-
- Call getCall() { result.getAnArgument() = this }
-}
+module EncValToInitEncArgFlow = DataFlow::Global;
-/**
- * The type of inputs and ouputs for an `OperationStep`.
- */
-newtype TIOType =
- CiphertextIO() or
- // Used for typical CTX types, but not for OSSL_PARAM or OSSL_LIB_CTX
- // For OSSL_PARAM and OSSL_LIB_CTX use of OsslParamIO and OsslLibContextIO
- ContextIO() or
- DigestIO() or
- HashAlgorithmIO() or
- IVorNonceIO() or
- KeyIO() or
- KeyOperationSubtypeIO() or
- KeySizeIO() or
- // Used for OSSL_LIB_CTX
- OsslLibContextIO() or
- // Used for OSSL_PARAM
- OsslParamIO() or
- MacIO() or
- PaddingAlgorithmIO() or
- // Plaintext also includes a message for digest, signature, verification, and mac generation
- PlaintextIO() or
- PrimaryAlgorithmIO() or
- RandomSourceIO() or
- SaltLengthIO() or
- SeedIO() or
- SignatureIO()
-
-private string ioTypeToString(TIOType t) {
- t = CiphertextIO() and result = "CiphertextIO"
- or
- t = ContextIO() and result = "ContextIO"
+private predicate argToAvc(Expr arg, Crypto::AlgorithmValueConsumer avc) {
+ // NOTE: because we trace through keys to their sources we must consider that the arg is an avc
+ // Consider this example:
+ // EVP_PKEY *pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, key, key_len);
+ // The key may trace into a signing operation. Tracing through the key we will get the arg taking `EVP_PKEY_HMAC`
+ // as the algorithm value consumer (the input node of the AVC). The output node of this AVC
+ // is the call return of `EVP_PKEY_new_mac_key`. If we trace from the AVC result to
+ // the input argument this will not be possible (from the return to the call argument is a backwards flow).
+ // Therefore, we must consider the input node of the AVC as the argument.
+ // This should only occur due to tracing through keys to find configuration data.
+ avc.getInputNode().asExpr() = arg
or
- t = DigestIO() and result = "DigestIO"
- or
- t = HashAlgorithmIO() and result = "HashAlgorithmIO"
- or
- t = IVorNonceIO() and result = "IVorNonceIO"
- or
- t = KeyIO() and result = "KeyIO"
- or
- t = KeyOperationSubtypeIO() and result = "KeyOperationSubtypeIO"
- or
- t = KeySizeIO() and result = "KeySizeIO"
- or
- t = OsslLibContextIO() and result = "OsslLibContextIO"
- or
- t = OsslParamIO() and result = "OsslParamIO"
- or
- t = MacIO() and result = "MacIO"
- or
- t = PaddingAlgorithmIO() and result = "PaddingAlgorithmIO"
- or
- t = PlaintextIO() and result = "PlaintextIO"
- or
- t = PrimaryAlgorithmIO() and result = "PrimaryAlgorithmIO"
- or
- t = RandomSourceIO() and result = "RandomSourceIO"
- or
- t = SaltLengthIO() and result = "SaltLengthIO"
- or
- t = SeedIO() and result = "SeedIO"
- or
- t = SignatureIO() and result = "SignatureIO"
-}
-
-class IOType extends TIOType {
- string toString() {
- result = ioTypeToString(this)
- or
- not exists(ioTypeToString(this)) and result = "UnknownIOType"
- }
+ AvcToCallArgFlow::flow(avc.(OpenSslAlgorithmValueConsumer).getResultNode(),
+ DataFlow::exprNode(arg))
}
-//TODO: add more initializers as needed
/**
- * The type of step in an `OperationStep`.
- * - `ContextCreationStep`: the creation of a context from an algorithm or key.
- * for example `EVP_MD_CTX_create(EVP_sha256())` or `EVP_PKEY_CTX_new(pkey, NULL)`
- * - `InitializerStep`: the initialization of an operation through some sort of shared/accumulated context
- * for example `EVP_DigestInit_ex(ctx, EVP_sha256(), NULL)`
- * - `UpdateStep`: any operation that has and update/final paradigm, the update represents an intermediate step in an operation,
- * such as `EVP_DigestUpdate(ctx, data, len)`
- * - `FinalStep`: an ultimate operation step. This may be an explicit 'final' in an update/final paradigm, but not necessarily.
- * Any operation that does nto operate through an update/final paradigm is considered a final step.
+ * A class for all OpenSsl operations.
*/
-newtype OperationStepType =
- // Context creation captures cases where a context is created from an algorithm or key
- //
- ContextCreationStep() or
- InitializerStep() or
- UpdateStep() or
- FinalStep()
-
-/**
- * A step in configuring an operation.
- * Captures creation of contexts from algorithms or keys,
- * initalization of configurations on contexts,
- * update operations (intermediate steps in an operation)
- * and the operation itself.
- *
- * NOTE: if an operation is configured through a means other than a call
- * e.g., a pattern like ctx->alg = EVP_sha256()
- * then this class will need to be modified to account for that paradigm.
- * Currently, this is not a known pattern in OpenSSL.
- */
-abstract class OperationStep extends Call {
- /**
- * Gets the output nodes from the given operation step.
- * These are the nodes that flow connecting this step
- * to any other step in the operation should follow.
- */
- abstract DataFlow::Node getOutput(IOType type);
-
- /**
- * Gets any output node from the given operation step.
- */
- final DataFlow::Node getAnOutput() { result = this.getOutput(_) }
-
+abstract class OpenSslOperation extends Crypto::OperationInstance instanceof Call {
/**
- * Gets the input nodes for the given operation step.
+ * Gets the argument that specifies the algorithm for the operation.
+ * This argument might not be immediately present at the specified operation.
+ * For example, it might be set in an initialization call.
+ * Modelers of the operation are resonsible for linking the operation to any
+ * initialization calls, and providing that argument as a returned value here.
*/
- abstract DataFlow::Node getInput(IOType type);
-
- /**
- * Gets any input node for the given operation step.
- */
- final DataFlow::Node getAnInput() { result = this.getInput(_) }
-
- /**
- * Gets the type of the step, e.g., ContextCreationStep, InitializerStep, UpdateStep, FinalStep.
- */
- abstract OperationStepType getStepType();
-
- /**
- * Holds if this operation step flows to the given `OperationStep` `sink`.
- * If `sink` is `this`, then this holds true.
- */
- predicate flowsToOperationStep(OperationStep sink) {
- sink = this or
- OperationStepFlow::flow(this.getAnOutput(), sink.getAnInput())
- }
+ abstract Expr getAlgorithmArg();
/**
- * Holds if this operation step flows from the given `OperationStep` (`source`).
- * If `source` is `this`, then this holds true.
+ * Algorithm is specified in initialization call or is implicitly established by the key.
*/
- predicate flowsFromOperationStep(OperationStep source) {
- source = this or
- OperationStepFlow::flow(source.getAnOutput(), this.getAnInput())
+ override Crypto::AlgorithmValueConsumer getAnAlgorithmValueConsumer() {
+ argToAvc(this.getAlgorithmArg(), result)
}
+}
+/**
+ * A Call to an initialization function for an operation.
+ * These are not operations in the sense of Crypto::OperationInstance,
+ * but they are used to initialize the context for the operation.
+ * There may be multiple initialization calls for the same operation.
+ * Intended for use with EvPOperation.
+ */
+abstract class EvpInitializer extends Call {
/**
- * Holds if this operation step sets a value of the given `IOType`.
+ * Gets the context argument or return that ties together initialization, updates and/or final calls.
+ * The context is the context coming into the initializer and is the output as well.
+ * This is assumed to be the same argument.
*/
- predicate setsValue(IOType type) { exists(this.getInput(type)) }
+ abstract CtxPointerSource getContext();
+}
- /**
- * Gets operation steps that flow to `this` and set the given `IOType`.
- * This checks for the last initializers that flow to the `this`,
- * i.e., if a value is set then re-set, the last set operation step is returned,
- * not both.
- * Note: Any 'update' that sets a value is not considered to be 'resetting' an input.
- * I.e., there is a difference between changing a configuration before use and
- * the operation allows for multiple inputs (like plaintext for cipher update calls before final).
- */
- OperationStep getDominatingInitializersToStep(IOType type) {
- result.flowsToOperationStep(this) and
- result.setsValue(type) and
- (
- // Do not consider a 'reset' to occur on updates
- result.getStepType() = UpdateStep()
- or
- not exists(OperationStep reset |
- result != reset and
- reset.setsValue(type) and
- reset.flowsToOperationStep(this) and
- result.flowsToOperationStep(reset)
- )
- )
- }
+/**
+ * A call to initialize a key size.
+ */
+abstract class EvpKeySizeInitializer extends EvpInitializer {
+ abstract Expr getKeySizeArg();
+}
- /**
- * Gets all output of `type` that flow to `this`
- * if `this` is a final step and the output is not from
- * a separate final step.
- */
- OperationStep getOutputStepFlowingToStep(IOType type) {
- this.getStepType() = FinalStep() and
- result.flowsToOperationStep(this) and
- exists(result.getOutput(type)) and
- (result = this or result.getStepType() != FinalStep())
- }
+/**
+ * A call to initialize a key operation subtype.
+ */
+abstract class EvpKeyOperationSubtypeInitializer extends EvpInitializer {
+ abstract Expr getKeyOperationSubtypeArg();
- /**
- * Gets an AVC for the primary algorithm for this operation.
- * A primary algorithm is an AVC that flows to a ctx input directly or
- * an AVC that flows to a primary algorithm input directly.
- * See `AvcContextCreationStep` for details about resetting scenarios.
- * Gets the first OperationStep an AVC flows to. If a context input,
- * the AVC is considered primary.
- * If a primary algorithm input, then get the last set primary algorithm
- * operation step (dominating operation step, see `getDominatingInitializersToStep`).
- */
- Crypto::AlgorithmValueConsumer getPrimaryAlgorithmValueConsumer() {
- exists(DataFlow::Node src, DataFlow::Node sink, IOType t, OperationStep avcSucc |
- (t = PrimaryAlgorithmIO() or t = ContextIO()) and
- avcSucc.flowsToOperationStep(this) and
- src.asExpr() = result and
- sink = avcSucc.getInput(t) and
- AvcToOperationStepFlow::flow(src, sink) and
- (
- // Case 1: the avcSucc step is a dominating initialization step
- t = PrimaryAlgorithmIO() and
- avcSucc = this.getDominatingInitializersToStep(PrimaryAlgorithmIO())
- or
- // Case 2: the succ is a context input (any avcSucc is valid)
- t = ContextIO()
- )
- )
+ private Crypto::KeyOperationSubtype intToCipherOperationSubtype(int i) {
+ i = 0 and
+ result instanceof Crypto::TEncryptMode
+ or
+ i = 1 and result instanceof Crypto::TDecryptMode
}
- /**
- * Gets the algorithm value consumer for an input to `this` operation step
- * of the given `type`.
- * TODO: generalize to use this for `getPrimaryAlgorithmValueConsumer`
- */
- Crypto::AlgorithmValueConsumer getAlgorithmValueConsumerForInput(IOType type) {
- exists(DataFlow::Node src, DataFlow::Node sink |
- AvcToOperationStepFlow::flow(src, sink) and
- src.asExpr() = result and
- sink = this.getInput(type)
+ Crypto::KeyOperationSubtype getKeyOperationSubtype() {
+ exists(DataFlow::Node a, DataFlow::Node b |
+ EncValToInitEncArgFlow::flow(a, b) and
+ b.asExpr() = this.getKeyOperationSubtypeArg() and
+ result = this.intToCipherOperationSubtype(a.asExpr().getValue().toInt())
)
+ or
+ // Infer the subtype from the initialization call, and ignore the argument
+ this.(Call).getTarget().getName().toLowerCase().matches("%encrypt%") and
+ result instanceof Crypto::TEncryptMode
+ or
+ this.(Call).getTarget().getName().toLowerCase().matches("%decrypt%") and
+ result instanceof Crypto::TDecryptMode
}
}
/**
- * An AVC is considered to output a 'context type', however,
- * each AVC has it's own output types in practice.
- * Some output algorithm containers (`EVP_get_cipherbyname`)
- * some output explicit contexts (`EVP_PKEY_CTX_new_from_name`).
- * The output of an AVC cannot be determined to be a primary algorithm (PrimaryAlgorithmIO), that depends
- * on the use of the AVC output.
- * The use is assumed to be of two forms:
- * - The AVC output flows to a known input that accepts an algorithm
- * e.g., `EVP_DigestInit(ctx, type)` the `type` parameter is known to be the primary algorithm.
- * `EVP_SignInit(ctx, type)` the `type` parameter is known to be a digest algorithm for the signature.
- * - The AVC output flows to a context initialization step
- * e.g., `pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, name, propquery)` this is an AVC call, but the
- * API says the output is a context. It is consumed typically by something like:
- * `ctx = EVP_PKEY_keygen_init(pkey_ctx)`, but note I cannot consider the `pkey_ctx` parameter to always be a primary algorithm,
- * a key gen can be inited by a prior key as well, e.g., `ctx = EVP_PKEY_CTX_new(pkey, NULL)`.
- * Hence, these initialization steps take in a context that may have come from an AVC or something else,
- * and therefore cannot be considered a primary algorithm.
- * Assumption: The first operation step an AVC flows to will be of the above two forms.
- * Resetting Algorithm Concerns and Assumptions:
- * What if a user resets the algorithm through another AVC call?
- * How would we detect that and only look at the 'dominating' (last set) AVC?
- * From an AVC, always assess the first operation step it flows to.
- * If the first step is to a context input, then we assume that reset is not possible in the same path.
- * I.e., a user cannot reset the algorithm without starting an entirely new operation step chain.
- * See the use patterns for `pkey_ctx = EVP_PKEY_CTX_new_from_name(...)` mentioned above. A user cannot
- * reset the algorithm without calling a new `ctx = EVP_PKEY_keygen_init(pkey_ctx)`,
- * i.e., subsequent flow follows the `ctx` output.
- * If the first step is to any other input, then we use the `getDominatingInitializersToStep`
- * to find the last AVC that set the algorithm for the operation step.
- * Domination checks must occur at an operation step (e.g., at a final operation).
- * This operation step does not find the dominating AVC.
- * If a primary algorithm is explicitly set and and AVC is set through a context input,
- * we will use both cases as primary inputs.
+ * An primary algorithm initializer initializes the primary algorithm for a given operation.
+ * For example, for a signing operation, the algorithm initializer may initialize algorithms
+ * like RSA. Other algorithsm may be initialized on an operation, as part of a larger
+ * operation/protocol. For example, hashing operations on signing operations; however,
+ * these are not the primary algorithm. Any other algorithms initialized on an operation
+ * require a specialized initializer, such as EvpHashAlgorithmInitializer.
*/
-class AvcContextCreationStep extends OperationStep instanceof OpenSslAlgorithmValueConsumer {
- override DataFlow::Node getOutput(IOType type) {
- type = ContextIO() and result = super.getResultNode()
- }
-
- override DataFlow::Node getInput(IOType type) { none() }
-
- override OperationStepType getStepType() { result = ContextCreationStep() }
-}
-
-abstract private class CtxPassThroughCall extends Call {
- abstract DataFlow::Node getNode1();
+abstract class EvpPrimaryAlgorithmInitializer extends EvpInitializer {
+ abstract Expr getAlgorithmArg();
- abstract DataFlow::Node getNode2();
+ Crypto::AlgorithmValueConsumer getAlgorithmValueConsumer() {
+ argToAvc(this.getAlgorithmArg(), result)
+ }
}
/**
- * A call whose target contains 'free' or 'reset' and has an argument of type
- * CtxPointerArgument.
+ * A call to initialize a key.
*/
-private class CtxClearCall extends Call {
- CtxClearCall() {
- this.getTarget().getName().toLowerCase().matches(["%free%", "%reset%"]) and
- this.getAnArgument() instanceof CtxPointerArgument
- }
+abstract class EvpKeyInitializer extends EvpInitializer {
+ abstract Expr getKeyArg();
}
/**
- * A call whose target contains 'copy' and has an argument of type
- * CtxPointerArgument.
+ * A key initializer may initialize the algorithm and the key size through
+ * the key. Extend any instance of key initializer provide initialization
+ * of the algorithm and key size from the key.
*/
-private class CtxCopyOutArgCall extends CtxPassThroughCall {
- DataFlow::Node n1;
- DataFlow::Node n2;
-
- CtxCopyOutArgCall() {
- this.getTarget().getName().toLowerCase().matches("%copy%") and
- n1.asExpr() = this.getAnArgument() and
- n1.getType() instanceof CtxType and
- n2.asDefiningArgument() = this.getAnArgument() and
- n2.getType() instanceof CtxType and
- n1.asDefiningArgument() != n2.asExpr()
+class EvpInitializerThroughKey extends EvpPrimaryAlgorithmInitializer, EvpKeySizeInitializer,
+ EvpKeyInitializer
+{
+ Expr arg;
+ CtxPointerSource context;
+
+ EvpInitializerThroughKey() {
+ exists(EvpKeyInitializer keyInit |
+ arg = keyInit.getKeyArg() and this = keyInit and context = keyInit.getContext()
+ )
}
- override DataFlow::Node getNode1() { result = n1 }
-
- override DataFlow::Node getNode2() { result = n2 }
-}
-
-/**
- * A call whose target contains 'dup' and has an argument of type
- * CtxPointerArgument.
- */
-private class CtxCopyReturnCall extends CtxPassThroughCall, CtxPointerExpr {
- DataFlow::Node n1;
+ override CtxPointerSource getContext() { result = context }
- CtxCopyReturnCall() {
- this.getTarget().getName().toLowerCase().matches("%dup%") and
- n1.asExpr() = this.getAnArgument() and
- n1.getType() instanceof CtxType
+ override Expr getAlgorithmArg() {
+ result =
+ getSourceKeyCreationInstanceFromArg(this.getKeyArg()).(OpenSslOperation).getAlgorithmArg()
}
- override DataFlow::Node getNode1() { result = n1 }
+ override Expr getKeySizeArg() {
+ result = getSourceKeyCreationInstanceFromArg(this.getKeyArg()).getKeySizeConsumer().asExpr()
+ }
- override DataFlow::Node getNode2() { result.asExpr() = this }
+ override Expr getKeyArg() { result = arg }
}
-// TODO: is this still needed?
/**
- * A call to `EVP_PKEY_paramgen` acts as a kind of pass through.
- * It's output pkey is eventually used in a new operation generating
- * a fresh context pointer (e.g., `EVP_PKEY_CTX_new`).
- * It is easier to model this as a pass through
- * than to model the flow from the paramgen to the new key generation.
+ * A default initializer for any key operation that accepts a key as input.
+ * A key initializer allows for a mechanic to go backwards to the key creation operation
+ * and find the algorithm and key size.
+ * If a user were to stipualte a key consumer for an operation but fail to indicate it as an
+ * initializer, automatic tracing to the creation operation would not occur.
+ * USERS SHOULD NOT NEED TO USE OR EXTEND THIS CLASS DIRECTLY.
+ *
+ * TODO: re-evaluate this approach
*/
-private class CtxParamGenCall extends CtxPassThroughCall {
- DataFlow::Node n1;
- DataFlow::Node n2;
-
- CtxParamGenCall() {
- this.getTarget().getName() = "EVP_PKEY_paramgen" and
- n1.asExpr() = this.getArgument(0) and
- (
- n2.asExpr() = this.getArgument(1)
- or
- n2.asDefiningArgument() = this.getArgument(1)
+class DefaultKeyInitializer extends EvpKeyInitializer instanceof Crypto::KeyOperationInstance {
+ Expr arg;
+
+ DefaultKeyInitializer() {
+ exists(Call c |
+ c.getAChild*() = arg and
+ arg = this.(Crypto::KeyOperationInstance).getKeyConsumer().asExpr() and
+ c = this
)
}
- override DataFlow::Node getNode1() { result = n1 }
+ override Expr getKeyArg() { result = arg }
- override DataFlow::Node getNode2() { result = n2 }
+ override CtxPointerSource getContext() { result = this.(EvpOperation).getContext() }
+}
+
+abstract class EvpIVInitializer extends EvpInitializer {
+ abstract Expr getIVArg();
}
-//TODO: I am not sure CallArgToCtxRet is needed anymore
/**
- * If the current node is an argument to a function
- * that returns a pointer type, immediately flow through.
- * NOTE: this passthrough is required if we allow
- * intermediate steps to go into variables that are not a CTX type.
- * See for example `CtxParamGenCall`.
+ * A call to initialize padding.
*/
-private class CallArgToCtxRet extends CtxPassThroughCall, CtxPointerExpr {
- DataFlow::Node n1;
- DataFlow::Node n2;
-
- CallArgToCtxRet() {
- this.getAnArgument() = n1.asExpr() and
- n2.asExpr() = this
- }
-
- override DataFlow::Node getNode1() { result = n1 }
+abstract class EvpPaddingInitializer extends EvpInitializer {
+ /**
+ * Gets the padding mode argument.
+ * e.g., `EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING)` argument 1 (0-based)
+ */
+ abstract Expr getPaddingArg();
+}
- override DataFlow::Node getNode2() { result = n2 }
+/**
+ * A call to initialize a salt length.
+ */
+abstract class EvpSaltLengthInitializer extends EvpInitializer {
+ /**
+ * Gets the salt length argument.
+ * e.g., `EVP_PKEY_CTX_set_scrypt_salt_len(ctx, 16)` argument 1 (0-based)
+ */
+ abstract Expr getSaltLengthArg();
}
/**
- * A flow configuration from any non-final `OperationStep` to any other `OperationStep`.
+ * A call to initialize a hash algorithm.
*/
-module OperationStepFlowConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node source) {
- exists(OperationStep s |
- s.getAnOutput() = source or
- s.getAnInput() = source
- )
- }
+abstract class EvpHashAlgorithmInitializer extends EvpInitializer {
+ abstract Expr getHashAlgorithmArg();
- predicate isSink(DataFlow::Node sink) {
- exists(OperationStep s |
- s.getAnInput() = sink or
- s.getAnOutput() = sink
- )
+ Crypto::AlgorithmValueConsumer getHashAlgorithmValueConsumer() {
+ argToAvc(this.getHashAlgorithmArg(), result)
}
+}
- predicate isBarrier(DataFlow::Node node) {
- exists(CtxClearCall c | c.getAnArgument() = node.asExpr())
- }
+/**
+ * A Call to an "update" function.
+ * These are not operations in the sense of Crypto::OperationInstance,
+ * but produce intermediate results for the operation that are later finalized
+ * (see EvpFinal).
+ * Intended for use with EvPOperation.
+ */
+abstract class EvpUpdate extends Call {
+ /**
+ * Gets the context argument that ties together initialization, updates and/or final calls.
+ */
+ abstract CtxPointerSource getContext();
- predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
- exists(CtxPassThroughCall c | c.getNode1() = node1 and c.getNode2() = node2)
- or
- // Flow out through all outputs from an operation step if more than one output
- // is defined.
- exists(OperationStep s | s.getAnInput() = node1 and s.getAnOutput() = node2)
- // TODO: consideration for additional alises defined as follows:
- // if an output from an operation step itself flows from the output of another operation step
- // then the source of that flow's outputs (all of them) are potential aliases
- }
-}
+ /**
+ * Update calls always have some input data like plaintext or message digest.
+ */
+ abstract Expr getInputArg();
-module OperationStepFlow = DataFlow::Global;
+ /**
+ * Update calls sometimes have some output data like a plaintext.
+ */
+ Expr getOutputArg() { none() }
+}
/**
- * A flow from AVC to the first `OperationStep` the AVC reaches as an input.
+ * The base class for all operations of the EVP API.
+ * This captures one-shot APIs (with and without an initilizer call) and final calls.
+ * Provides some default methods for Crypto::KeyOperationInstance class.
*/
-module AvcToOperationStepFlowConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node source) {
- exists(AvcContextCreationStep s | s.getAnOutput() = source)
- }
+abstract class EvpOperation extends OpenSslOperation {
+ /**
+ * Gets the context argument that ties together initialization, updates and/or final calls.
+ */
+ abstract CtxPointerSource getContext();
- predicate isSink(DataFlow::Node sink) { exists(OperationStep s | s.getAnInput() = sink) }
+ /**
+ * Some input data like plaintext or message digest.
+ * Either argument provided direcly in the call or all arguments that were provided in update calls.
+ */
+ abstract Expr getInputArg();
- predicate isBarrier(DataFlow::Node node) {
- exists(CtxClearCall c | c.getAnArgument() = node.asExpr())
- }
+ /**
+ * Some output data like ciphertext or signature.
+ */
+ abstract Expr getOutputArg();
/**
- * Only get the first operation step encountered.
+ * Finds the initialization call, may be none.
*/
- predicate isBarrierOut(DataFlow::Node node) { isSink(node) }
+ EvpInitializer getInitCall() { ctxSrcToSrcFlow(result.getContext(), this.getContext()) }
- predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
- exists(CtxPassThroughCall c | c.getNode1() = node1 and c.getNode2() = node2)
+ Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
+ result = DataFlow::exprNode(this.getOutputArg())
}
-}
-
-module AvcToOperationStepFlow = DataFlow::Global;
-
-module EncValToInitEncArgConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node source) { source.asExpr().getValue().toInt() in [0, 1] }
- predicate isSink(DataFlow::Node sink) {
- exists(OperationStep s | sink = s.getInput(KeyOperationSubtypeIO()))
+ /**
+ * Input consumer is the input argument of the call.
+ */
+ Crypto::ConsumerInputDataFlowNode getInputConsumer() {
+ result = DataFlow::exprNode(this.getInputArg())
}
}
-module EncValToInitEncArgFlow = DataFlow::Global;
+/**
+ * An EVP final call,
+ * which is typicall used in an update/final pattern.
+ * Final operations are typically identified by "final" in the name,
+ * e.g., "EVP_DigestFinal", "EVP_EncryptFinal", etc.
+ * however, this is not a strict rule.
+ */
+abstract class EvpFinal extends EvpOperation {
+ /**
+ * All update calls that were executed before this final call.
+ */
+ EvpUpdate getUpdateCalls() { ctxSrcToSrcFlow(result.getContext(), this.getContext()) }
-private Crypto::KeyOperationSubtype intToCipherOperationSubtype(int i) {
- i = 0 and
- result instanceof Crypto::TEncryptMode
- or
- i = 1 and result instanceof Crypto::TDecryptMode
-}
+ /**
+ * Gets the input data provided to all update calls.
+ * If more input data was provided in the final call, override the method.
+ */
+ override Expr getInputArg() { result = this.getUpdateCalls().getInputArg() }
-Crypto::KeyOperationSubtype resolveKeyOperationSubTypeOperationStep(OperationStep s) {
- exists(DataFlow::Node src |
- EncValToInitEncArgFlow::flow(src, s.getInput(KeyOperationSubtypeIO())) and
- result = intToCipherOperationSubtype(src.asExpr().getValue().toInt())
- )
+ /**
+ * Gets the output data provided to all update calls.
+ * If more output data was provided in the final call, override the method.
+ */
+ override Expr getOutputArg() { result = this.getUpdateCalls().getOutputArg() }
}
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperations.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperations.qll
index be65ef3e1c05..78b8f8ce080d 100644
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperations.qll
+++ b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperations.qll
@@ -1,5 +1,6 @@
import OpenSSLOperationBase
-import CipherOperation
-import HashOperation
-import SignatureOperation
-import KeyGenOperation
+import EVPCipherOperation
+import EVPHashOperation
+import ECKeyGenOperation
+import EVPSignatureOperation
+import EVPKeyGenOperation
diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/SignatureOperation.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/SignatureOperation.qll
deleted file mode 100644
index b9b498ee8df3..000000000000
--- a/cpp/ql/lib/experimental/quantum/OpenSSL/Operations/SignatureOperation.qll
+++ /dev/null
@@ -1,260 +0,0 @@
-/**
- * Provides classes for modeling OpenSSL's EVP signature operations
- */
-
-private import experimental.quantum.Language
-private import experimental.quantum.OpenSSL.AvcFlow
-private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumers
-private import experimental.quantum.OpenSSL.Operations.OpenSSLOperations
-
-// TODO: verification functions
-/**
- * A base class for final signature operations.
- */
-abstract class EvpSignatureFinalOperation extends OperationStep {
- override OperationStepType getStepType() { result = FinalStep() }
-}
-
-/**
- * A call to EVP_DigestSignInit or EVP_DigestSignInit_ex.
- */
-class EvpSignatureDigestInitializer extends OperationStep {
- EvpSignatureDigestInitializer() {
- this.getTarget().getName() in ["EVP_DigestSignInit_ex", "EVP_DigestSignInit"]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- this.getTarget().getName() = "EVP_DigestSignInit_ex" and
- result.asExpr() = this.getArgument(3) and
- type = OsslLibContextIO()
- or
- result.asExpr() = this.getArgument(2) and type = HashAlgorithmIO()
- or
- this.getTarget().getName() = "EVP_DigestSignInit" and
- result.asExpr() = this.getArgument(4) and
- type = KeyIO()
- or
- this.getTarget().getName() = "EVP_DigestSignInit_ex" and
- result.asExpr() = this.getArgument(5) and
- type = KeyIO()
- or
- this.getTarget().getName() = "EVP_DigestSignInit_ex" and
- result.asExpr() = this.getArgument(6) and
- type = OsslParamIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- // EVP_PKEY_CTX
- result.asExpr() = this.getArgument(1) and type = ContextIO()
- or
- this.getTarget().getName() = "EVP_DigestSignInit_ex" and
- result.asExpr() = this.getArgument(6) and
- type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-/**
- * A call to EVP_SignInit or EVP_SignInit_ex.
- */
-class EvpSignInit extends OperationStep {
- EvpSignInit() { this.getTarget().getName() in ["EVP_SignInit", "EVP_SignInit_ex"] }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = HashAlgorithmIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-/**
- * A call to:
- * - EVP_PKEY_sign_init_ex
- * - EVP_PKEY_sign_init_ex2
- * - EVP_PKEY_sign_init
- * - EVP_PKEY_sign_message_init
- */
-class EvpPkeySignInit extends OperationStep {
- EvpPkeySignInit() {
- this.getTarget().getName() in [
- "EVP_PKEY_sign_init_ex", "EVP_PKEY_sign_init_ex2", "EVP_PKEY_sign_init",
- "EVP_PKEY_sign_message_init"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- this.getTarget().getName() in ["EVP_PKEY_sign_init_ex2", "EVP_PKEY_sign_message_init"] and
- result.asExpr() = this.getArgument(1) and
- type = PrimaryAlgorithmIO()
- or
- this.getTarget().getName() = "EVP_PKEY_sign_init_ex" and
- result.asExpr() = this.getArgument(1) and
- type = OsslParamIO()
- or
- // Argument 2 (0 based) only exists for EVP_PKEY_sign_init_ex2 and EVP_PKEY_sign_message_init
- result.asExpr() = this.getArgument(2) and type = OsslParamIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = InitializerStep() }
-}
-
-/**
- * A call to EVP_DIgestSignUpdate, EVP_SignUpdate or EVP_PKEY_sign_message_update.
- */
-class EvpSignatureUpdateCall extends OperationStep {
- EvpSignatureUpdateCall() {
- this.getTarget().getName() in [
- "EVP_DigestSignUpdate", "EVP_SignUpdate", "EVP_PKEY_sign_message_update"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override OperationStepType getStepType() { result = UpdateStep() }
-}
-
-/**
- * A call to EVP_SignFinal or EVP_SignFinal_ex.
- */
-class EvpSignFinal extends EvpSignatureFinalOperation {
- EvpSignFinal() { this.getTarget().getName() in ["EVP_SignFinal_ex", "EVP_SignFinal"] }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(3) and type = KeyIO()
- or
- // params above 3 (0-based) only exist for EVP_SignFinal_ex
- result.asExpr() = this.getArgument(4) and
- type = OsslLibContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = SignatureIO()
- }
-}
-
-/**
- * A call to EVP_DigestSign or EVP_PKEY_sign.
- */
-class EvpDigestSign extends EvpSignatureFinalOperation {
- EvpDigestSign() { this.getTarget().getName() in ["EVP_DigestSign", "EVP_PKEY_sign"] }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(3) and type = PlaintextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = SignatureIO()
- }
-}
-
-/**
- * A call to EVP_DigestSignFinal or EVP_PKEY_sign_message_final.
- */
-class EvpDigestAndPkeySignFinal extends EvpSignatureFinalOperation {
- EvpDigestAndPkeySignFinal() {
- this.getTarget().getName() in [
- "EVP_DigestSignFinal",
- "EVP_PKEY_sign_message_final"
- ]
- }
-
- override DataFlow::Node getInput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- }
-
- override DataFlow::Node getOutput(IOType type) {
- result.asExpr() = this.getArgument(0) and type = ContextIO()
- or
- result.asExpr() = this.getArgument(1) and type = SignatureIO()
- }
-
- override OperationStepType getStepType() { result = FinalStep() }
-}
-
-/**
- * An EVP signature operation instance.
- */
-class EvpSignatureOperationInstance extends Crypto::SignatureOperationInstance instanceof EvpSignatureFinalOperation
-{
- override Crypto::AlgorithmValueConsumer getAnAlgorithmValueConsumer() {
- super.getPrimaryAlgorithmValueConsumer() = result
- }
-
- /**
- * Signing, verification or unknown.
- */
- override Crypto::KeyOperationSubtype getKeyOperationSubtype() {
- // TODO: if this KeyOperationSubtype does not match initialization call's KeyOperationSubtype then we found a bug
- if super.getTarget().getName().toLowerCase().matches("%sign%")
- then result instanceof Crypto::TSignMode
- else
- if super.getTarget().getName().toLowerCase().matches("%verify%")
- then result instanceof Crypto::TVerifyMode
- else result instanceof Crypto::TUnknownKeyOperationMode
- }
-
- override Crypto::ConsumerInputDataFlowNode getNonceConsumer() {
- // TODO: some signing operations may have explicit nonce generators
- none()
- }
-
- /**
- * Keys provided in the initialization call or in a context are found by this method.
- * Keys in explicit arguments are found by overridden methods in extending classes.
- */
- override Crypto::ConsumerInputDataFlowNode getKeyConsumer() {
- super.getDominatingInitializersToStep(KeyIO()).getInput(KeyIO()) = result
- }
-
- override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
- super.getOutputStepFlowingToStep(SignatureIO()).getOutput(SignatureIO()) = result
- }
-
- override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
- super.getDominatingInitializersToStep(PlaintextIO()).getInput(PlaintextIO()) = result
- }
-
- /**
- * TODO: only signing operations for now, change when verificaiton is added
- */
- override Crypto::ConsumerInputDataFlowNode getSignatureConsumer() { none() }
-
- override Crypto::AlgorithmValueConsumer getHashAlgorithmValueConsumer() {
- super
- .getDominatingInitializersToStep(HashAlgorithmIO())
- .getAlgorithmValueConsumerForInput(HashAlgorithmIO()) = result
- }
-}
diff --git a/cpp/ql/lib/ext/Oracle.oci.model.yml b/cpp/ql/lib/ext/Oracle.oci.model.yml
deleted file mode 100644
index eb172fcdb59a..000000000000
--- a/cpp/ql/lib/ext/Oracle.oci.model.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# partial model of the Oracle Call Interface (OCI) library
-extensions:
- - addsTo:
- pack: codeql/cpp-all
- extensible: sinkModel
- data: # namespace, type, subtypes, name, signature, ext, input, kind, provenance
- - ["", "", False, "OCIStmtPrepare", "", "", "Argument[*2]", "sql-injection", "manual"]
- - ["", "", False, "OCIStmtPrepare2", "", "", "Argument[*3]", "sql-injection", "manual"]
diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml
index e826864ae644..7dc5feb8d2f9 100644
--- a/cpp/ql/lib/qlpack.yml
+++ b/cpp/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/cpp-all
-version: 5.2.1-dev
+version: 5.2.0
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp
@@ -15,6 +15,7 @@ dependencies:
codeql/tutorial: ${workspace}
codeql/util: ${workspace}
codeql/xml: ${workspace}
+ codeql/global-controlflow: ${workspace}
dataExtensions:
- ext/*.model.yml
- ext/generated/**/*.model.yml
diff --git a/cpp/ql/lib/semmle/code/cpp/Function.qll b/cpp/ql/lib/semmle/code/cpp/Function.qll
index a4d0cff2c379..cb3b00b64ade 100644
--- a/cpp/ql/lib/semmle/code/cpp/Function.qll
+++ b/cpp/ql/lib/semmle/code/cpp/Function.qll
@@ -901,7 +901,7 @@ class BuiltInFunction extends Function {
/** Gets a dummy location for the built-in function. */
override Location getLocation() {
suppressUnusedThis(this) and
- result instanceof UnknownLocation
+ result instanceof UnknownDefaultLocation
}
}
diff --git a/cpp/ql/lib/semmle/code/cpp/Location.qll b/cpp/ql/lib/semmle/code/cpp/Location.qll
index 8b0a78f91aa8..c7579f5710a7 100644
--- a/cpp/ql/lib/semmle/code/cpp/Location.qll
+++ b/cpp/ql/lib/semmle/code/cpp/Location.qll
@@ -8,7 +8,7 @@ import semmle.code.cpp.File
/**
* A location of a C/C++ artifact.
*/
-class Location extends @location_default {
+class Location extends @location {
/** Gets the container corresponding to this location. */
pragma[nomagic]
Container getContainer() { this.fullLocationInfo(result, _, _, _, _) }
@@ -53,7 +53,9 @@ class Location extends @location_default {
predicate fullLocationInfo(
Container container, int startline, int startcolumn, int endline, int endcolumn
) {
- locations_default(this, unresolveElement(container), startline, startcolumn, endline, endcolumn)
+ locations_default(this, unresolveElement(container), startline, startcolumn, endline, endcolumn) or
+ locations_expr(this, unresolveElement(container), startline, startcolumn, endline, endcolumn) or
+ locations_stmt(this, unresolveElement(container), startline, startcolumn, endline, endcolumn)
}
/**
@@ -144,32 +146,30 @@ class Locatable extends Element { }
* expressions, one for statements and one for other program elements.
*/
class UnknownLocation extends Location {
- UnknownLocation() {
- this.getFile().getAbsolutePath() = "" and locations_default(this, _, 0, 0, 0, 0)
- }
+ UnknownLocation() { this.getFile().getAbsolutePath() = "" }
}
/**
* A dummy location which is used when something doesn't have a location in
* the source code but needs to have a `Location` associated with it.
- *
- * DEPRECATED: use `UnknownLocation`
*/
-deprecated class UnknownDefaultLocation extends UnknownLocation { }
+class UnknownDefaultLocation extends UnknownLocation {
+ UnknownDefaultLocation() { locations_default(this, _, 0, 0, 0, 0) }
+}
/**
* A dummy location which is used when an expression doesn't have a
* location in the source code but needs to have a `Location` associated
* with it.
- *
- * DEPRECATED: use `UnknownLocation`
*/
-deprecated class UnknownExprLocation extends UnknownLocation { }
+class UnknownExprLocation extends UnknownLocation {
+ UnknownExprLocation() { locations_expr(this, _, 0, 0, 0, 0) }
+}
/**
* A dummy location which is used when a statement doesn't have a location
* in the source code but needs to have a `Location` associated with it.
- *
- * DEPRECATED: use `UnknownLocation`
*/
-deprecated class UnknownStmtLocation extends UnknownLocation { }
+class UnknownStmtLocation extends UnknownLocation {
+ UnknownStmtLocation() { locations_stmt(this, _, 0, 0, 0, 0) }
+}
diff --git a/cpp/ql/lib/semmle/code/cpp/Macro.qll b/cpp/ql/lib/semmle/code/cpp/Macro.qll
index cbffc90d17c1..bd916d4bc4e8 100644
--- a/cpp/ql/lib/semmle/code/cpp/Macro.qll
+++ b/cpp/ql/lib/semmle/code/cpp/Macro.qll
@@ -154,9 +154,8 @@ class MacroInvocation extends MacroAccess {
* well.
*/
Locatable getAnAffectedElement() {
- inmacroexpansion(unresolveElement(result), underlyingElement(this))
- or
- macrolocationbind(underlyingElement(this), result.getLocation()) and this != result
+ inmacroexpansion(unresolveElement(result), underlyingElement(this)) or
+ macrolocationbind(underlyingElement(this), result.getLocation())
}
/**
@@ -260,8 +259,7 @@ predicate inMacroExpansion(Locatable element) {
inmacroexpansion(unresolveElement(element), _)
or
macroLocation(element.getLocation()) and
- not topLevelMacroAccess(element) and
- not element.getLocation() instanceof UnknownLocation
+ not topLevelMacroAccess(element)
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/Namespace.qll b/cpp/ql/lib/semmle/code/cpp/Namespace.qll
index b545f9381974..b63beef3f4a0 100644
--- a/cpp/ql/lib/semmle/code/cpp/Namespace.qll
+++ b/cpp/ql/lib/semmle/code/cpp/Namespace.qll
@@ -40,7 +40,7 @@ class Namespace extends NameQualifyingElement, @namespace {
override Location getLocation() {
if strictcount(this.getADeclarationEntry()) = 1
then result = this.getADeclarationEntry().getLocation()
- else result instanceof UnknownLocation
+ else result instanceof UnknownDefaultLocation
}
/** Gets the simple name of this namespace. */
diff --git a/cpp/ql/lib/semmle/code/cpp/Specifier.qll b/cpp/ql/lib/semmle/code/cpp/Specifier.qll
index f7af9501fb26..28ba21956561 100644
--- a/cpp/ql/lib/semmle/code/cpp/Specifier.qll
+++ b/cpp/ql/lib/semmle/code/cpp/Specifier.qll
@@ -13,7 +13,7 @@ class Specifier extends Element, @specifier {
/** Gets a dummy location for the specifier. */
override Location getLocation() {
exists(this) and
- result instanceof UnknownLocation
+ result instanceof UnknownDefaultLocation
}
override string getAPrimaryQlClass() { result = "Specifier" }
diff --git a/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll b/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll
index 6ece9cb82a46..e4efb4e4636b 100644
--- a/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll
+++ b/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll
@@ -105,7 +105,7 @@ class AutoType extends TypeTemplateParameter {
override string getAPrimaryQlClass() { result = "AutoType" }
- override Location getLocation() { result instanceof UnknownLocation }
+ override Location getLocation() { result instanceof UnknownDefaultLocation }
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll
index 35b56882d7be..f866d9f77e22 100644
--- a/cpp/ql/lib/semmle/code/cpp/Type.qll
+++ b/cpp/ql/lib/semmle/code/cpp/Type.qll
@@ -290,7 +290,7 @@ class Type extends Locatable, @type {
*/
Type stripType() { result = this }
- override Location getLocation() { result instanceof UnknownLocation }
+ override Location getLocation() { result instanceof UnknownDefaultLocation }
}
/**
@@ -858,15 +858,6 @@ private predicate floatingPointTypeMapping(
or
// __mfp8
kind = 62 and base = 2 and domain = TRealDomain() and realKind = 62 and extended = false
- or
- // _Complex __fp16
- kind = 64 and base = 2 and domain = TComplexDomain() and realKind = 54 and extended = false
- or
- // _Complex __bf16
- kind = 65 and base = 2 and domain = TComplexDomain() and realKind = 55 and extended = false
- or
- // _Complex std::float16_t
- kind = 66 and base = 2 and domain = TComplexDomain() and realKind = 56 and extended = false
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
index b279c4965f33..456768081a11 100644
--- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
+++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
@@ -229,49 +229,6 @@ private predicate summaryModel0(
)
}
-/**
- * Holds if the given extension tuple `madId` should pretty-print as `model`.
- *
- * This predicate should only be used in tests.
- */
-predicate interpretModelForTest(QlBuiltins::ExtensionId madId, string model) {
- exists(
- string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string output, string kind, string provenance
- |
- Extensions::sourceModel(namespace, type, subtypes, name, signature, ext, output, kind,
- provenance, madId)
- |
- model =
- "Source: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; "
- + ext + "; " + output + "; " + kind + "; " + provenance
- )
- or
- exists(
- string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string input, string kind, string provenance
- |
- Extensions::sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance,
- madId)
- |
- model =
- "Sink: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; " +
- ext + "; " + input + "; " + kind + "; " + provenance
- )
- or
- exists(
- string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string input, string output, string kind, string provenance
- |
- Extensions::summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind,
- provenance, madId)
- |
- model =
- "Summary: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " + signature +
- "; " + ext + "; " + input + "; " + output + "; " + kind + "; " + provenance
- )
-}
-
/**
* Holds if `input` is `input0`, but with all occurrences of `@` replaced
* by `n` repetitions of `*` (and similarly for `output` and `output0`).
diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/Call.qll b/cpp/ql/lib/semmle/code/cpp/exprs/Call.qll
index 24ae703697cf..03c3e8a33714 100644
--- a/cpp/ql/lib/semmle/code/cpp/exprs/Call.qll
+++ b/cpp/ql/lib/semmle/code/cpp/exprs/Call.qll
@@ -504,8 +504,6 @@ class VacuousDestructorCall extends Expr, @vacuous_destructor_call {
*/
class ConstructorInit extends Expr, @ctorinit {
override string getAPrimaryQlClass() { result = "ConstructorInit" }
-
- override string toString() { result = "constructor init" }
}
/**
@@ -514,8 +512,6 @@ class ConstructorInit extends Expr, @ctorinit {
*/
class ConstructorBaseInit extends ConstructorInit, ConstructorCall {
override string getAPrimaryQlClass() { result = "ConstructorBaseInit" }
-
- override string toString() { result = "call to " + this.getTarget().getName() }
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll
index 60e2635f338a..2b9fb2649d51 100644
--- a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll
+++ b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll
@@ -91,13 +91,13 @@ class Expr extends StmtParent, @expr {
*/
private Location getExprLocationOverride() {
// Base case: the parent has a better location than `this`.
- this.getDbLocation() instanceof UnknownLocation and
+ this.getDbLocation() instanceof UnknownExprLocation and
result = this.getParent().(Expr).getDbLocation() and
not result instanceof UnknownLocation
or
// Recursive case: the parent has a location override that's better than
// what `this` has.
- this.getDbLocation() instanceof UnknownLocation and
+ this.getDbLocation() instanceof UnknownExprLocation and
result = this.getParent().(Expr).getExprLocationOverride() and
not result instanceof UnknownLocation
}
diff --git a/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/ControlFlow.qll b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/ControlFlow.qll
new file mode 100644
index 000000000000..cd7dfea33110
--- /dev/null
+++ b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/ControlFlow.qll
@@ -0,0 +1,11 @@
+import cpp
+
+/**
+ * Provides classes for performing global (inter-procedural) control flow analyses.
+ */
+module ControlFlow {
+ private import internal.ControlFlowSpecific
+ private import codeql.globalcontrolflow.ControlFlow
+ import ControlFlowMake
+ import Public
+}
diff --git a/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowPrivate.qll
new file mode 100644
index 000000000000..c772e1d67a84
--- /dev/null
+++ b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowPrivate.qll
@@ -0,0 +1,41 @@
+private import semmle.code.cpp.ir.IR
+private import cpp as Cpp
+private import ControlFlowPublic
+private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate as DataFlowPrivate
+private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon
+
+predicate edge(Node n1, Node n2) { n1.asInstruction().getASuccessor() = n2.asInstruction() }
+
+predicate callTarget(CallNode call, Callable target) {
+ exists(DataFlowPrivate::DataFlowCall dfCall | dfCall.asCallInstruction() = call.asInstruction() |
+ DataFlowImplCommon::viableCallableCached(dfCall).asSourceCallable() = target
+ or
+ DataFlowImplCommon::viableCallableLambda(dfCall, _).asSourceCallable() = target
+ )
+}
+
+predicate flowEntry(Callable c, Node entry) {
+ entry.asInstruction().(EnterFunctionInstruction).getEnclosingFunction() = c
+}
+
+predicate flowExit(Callable c, Node exitNode) {
+ exitNode.asInstruction().(ExitFunctionInstruction).getEnclosingFunction() = c
+}
+
+Callable getEnclosingCallable(Node n) { n.getEnclosingFunction() = result }
+
+predicate hiddenNode(Node n) { n.asInstruction() instanceof PhiInstruction }
+
+private newtype TSplit = TNone() { none() }
+
+class Split extends TSplit {
+ abstract string toString();
+
+ abstract Cpp::Location getLocation();
+
+ abstract predicate entry(Node n1, Node n2);
+
+ abstract predicate exit(Node n1, Node n2);
+
+ abstract predicate blocked(Node n1, Node n2);
+}
diff --git a/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowPublic.qll b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowPublic.qll
new file mode 100644
index 000000000000..8a843a1de640
--- /dev/null
+++ b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowPublic.qll
@@ -0,0 +1,79 @@
+private import semmle.code.cpp.ir.IR
+private import cpp
+
+private newtype TNode = TInstructionNode(Instruction i)
+
+abstract private class NodeImpl extends TNode {
+ /** Gets the `Instruction` associated with this node, if any. */
+ Instruction asInstruction() { result = this.(InstructionNode).getInstruction() }
+
+ /** Gets the `Expr` associated with this node, if any. */
+ Expr asExpr() { result = this.(ExprNode).getExpr() }
+
+ /** Gets the `Parameter` associated with this node, if any. */
+ Parameter asParameter() { result = this.(ParameterNode).getParameter() }
+
+ /** Gets the location of this node. */
+ Location getLocation() { none() }
+
+ /**
+ * Holds if this element is at the specified location.
+ * The location spans column `startcolumn` of line `startline` to
+ * column `endcolumn` of line `endline` in file `filepath`.
+ * For more information, see
+ * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
+ */
+ final predicate hasLocationInfo(
+ string filepath, int startline, int startcolumn, int endline, int endcolumn
+ ) {
+ this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
+ }
+
+ /** Gets a textual representation of this node. */
+ abstract string toString();
+
+ /** Gets the enclosing callable of this node. */
+ abstract Callable getEnclosingFunction();
+}
+
+final class Node = NodeImpl;
+
+private class InstructionNode extends NodeImpl {
+ Instruction instr;
+
+ InstructionNode() { this = TInstructionNode(instr) }
+
+ /** Gets the `Instruction` associated with this node. */
+ Instruction getInstruction() { result = instr }
+
+ final override Location getLocation() { result = instr.getLocation() }
+
+ final override string toString() { result = instr.getAst().toString() }
+
+ final override Callable getEnclosingFunction() { result = instr.getEnclosingFunction() }
+}
+
+private class ExprNode extends InstructionNode {
+ Expr e;
+
+ ExprNode() { e = this.getInstruction().getConvertedResultExpression() }
+
+ /** Gets the `Expr` associated with this node. */
+ Expr getExpr() { result = e }
+}
+
+private class ParameterNode extends InstructionNode {
+ override InitializeParameterInstruction instr;
+ Parameter p;
+
+ ParameterNode() { p = instr.getParameter() }
+
+ /** Gets the `Parameter` associated with this node. */
+ Parameter getParameter() { result = p }
+}
+
+class CallNode extends InstructionNode {
+ override CallInstruction instr;
+}
+
+class Callable = Function;
diff --git a/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowSpecific.qll b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowSpecific.qll
new file mode 100644
index 000000000000..8f946fd38aff
--- /dev/null
+++ b/cpp/ql/lib/semmle/code/cpp/interproccontrolflow/internal/ControlFlowSpecific.qll
@@ -0,0 +1,19 @@
+/**
+ * Provides IR-specific definitions for use in the data flow library.
+ */
+
+private import cpp
+private import codeql.globalcontrolflow.ControlFlow
+
+module Private {
+ import ControlFlowPrivate
+}
+
+module Public {
+ import ControlFlowPublic
+}
+
+module CppControlFlow implements InputSig {
+ import Private
+ import Public
+}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
index d776985720af..39cc58d54b0e 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
@@ -182,7 +182,7 @@ abstract class InstructionNode0 extends Node0Impl {
override Location getLocationImpl() {
if exists(instr.getAst().getLocation())
then result = instr.getAst().getLocation()
- else result instanceof UnknownLocation
+ else result instanceof UnknownDefaultLocation
}
final override predicate isGLValue() { exists(getInstructionType(instr, true)) }
@@ -227,7 +227,7 @@ abstract class OperandNode0 extends Node0Impl {
override Location getLocationImpl() {
if exists(op.getDef().getAst().getLocation())
then result = op.getDef().getAst().getLocation()
- else result instanceof UnknownLocation
+ else result instanceof UnknownDefaultLocation
}
final override predicate isGLValue() { exists(getOperandType(op, true)) }
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
index c72614ac5c32..ab6a9da6d85d 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
@@ -847,7 +847,7 @@ class BodyLessParameterNodeImpl extends Node, TBodyLessParameterNodeImpl {
result = unique( | | p.getLocation())
or
count(p.getLocation()) != 1 and
- result instanceof UnknownLocation
+ result instanceof UnknownDefaultLocation
}
final override string toStringImpl() {
@@ -1115,7 +1115,7 @@ private module RawIndirectNodes {
final override Location getLocationImpl() {
if exists(this.getOperand().getLocation())
then result = this.getOperand().getLocation()
- else result instanceof UnknownLocation
+ else result instanceof UnknownDefaultLocation
}
override string toStringImpl() {
@@ -1161,7 +1161,7 @@ private module RawIndirectNodes {
final override Location getLocationImpl() {
if exists(this.getInstruction().getLocation())
then result = this.getInstruction().getLocation()
- else result instanceof UnknownLocation
+ else result instanceof UnknownDefaultLocation
}
override string toStringImpl() {
@@ -1257,7 +1257,7 @@ class FinalParameterNode extends Node, TFinalParameterNode {
result = unique( | | p.getLocation())
or
not exists(unique( | | p.getLocation())) and
- result instanceof UnknownLocation
+ result instanceof UnknownDefaultLocation
}
override string toStringImpl() { result = stars(this) + p.toString() }
@@ -1629,7 +1629,7 @@ class VariableNode extends Node, TGlobalLikeVariableNode {
result = unique( | | v.getLocation())
or
not exists(unique( | | v.getLocation())) and
- result instanceof UnknownLocation
+ result instanceof UnknownDefaultLocation
}
override string toStringImpl() { result = stars(this) + v.toString() }
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll
index e804957190a0..354b453afdb7 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll
@@ -16,7 +16,6 @@ import semmle.code.cpp.dataflow.new.DataFlow
private import DataFlowPrivate
private import DataFlowUtil
private import DataFlowImplCommon
-private import DataFlowImplSpecific
private import codeql.util.Unit
/**
@@ -96,7 +95,10 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
- default int fieldFlowBranchLimit1() { result = CppDataFlow::defaultFieldFlowBranchLimit() }
+ default int fieldFlowBranchLimit1() {
+ // NOTE: This should be synchronized with the default value in the shared dataflow library
+ result = 2
+ }
/**
* Gets the virtual dispatch branching limit when calculating field flow in the second
@@ -105,7 +107,10 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
- default int fieldFlowBranchLimit2() { result = CppDataFlow::defaultFieldFlowBranchLimit() }
+ default int fieldFlowBranchLimit2() {
+ // NOTE: This should be synchronized with the default value in the shared dataflow library
+ result = 2
+ }
}
/**
@@ -299,7 +304,10 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
- default int fieldFlowBranchLimit1() { result = CppDataFlow::defaultFieldFlowBranchLimit() }
+ default int fieldFlowBranchLimit1() {
+ // NOTE: This should be synchronized with the default value in the shared dataflow library
+ result = 2
+ }
/**
* Gets the virtual dispatch branching limit when calculating field flow in the second
@@ -308,7 +316,10 @@ module ProductFlow {
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
- default int fieldFlowBranchLimit2() { result = CppDataFlow::defaultFieldFlowBranchLimit() }
+ default int fieldFlowBranchLimit2() {
+ // NOTE: This should be synchronized with the default value in the shared dataflow library
+ result = 2
+ }
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
index 863825b375e3..7799081eae34 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
@@ -516,7 +516,7 @@ class FinalParameterUse extends UseImpl, TFinalParameterUse {
result = unique( | | p.getLocation())
or
not exists(unique( | | p.getLocation())) and
- result instanceof UnknownLocation
+ result instanceof UnknownDefaultLocation
}
override BaseIRVariable getBaseSourceVariable() { result.getIRVariable().getAst() = p }
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll
index c29d743dadbf..67a6965ae9bb 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll
@@ -45,7 +45,7 @@ module InstructionConsistency {
private class MissingIRFunction extends OptionalIRFunction, TMissingIRFunction {
override string toString() { result = "" }
- override Language::Location getLocation() { result instanceof Language::UnknownLocation }
+ override Language::Location getLocation() { result instanceof Language::UnknownDefaultLocation }
}
private OptionalIRFunction getInstructionIRFunction(Instruction instr) {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll
index b436bc8ccf11..279b43a1ca8b 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll
@@ -26,7 +26,7 @@ class ValueNumber extends TValueNumber {
l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(),
l.getEndColumn()
)
- else result instanceof Language::UnknownLocation
+ else result instanceof Language::UnknownDefaultLocation
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll
index c29d743dadbf..67a6965ae9bb 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll
@@ -45,7 +45,7 @@ module InstructionConsistency {
private class MissingIRFunction extends OptionalIRFunction, TMissingIRFunction {
override string toString() { result = "" }
- override Language::Location getLocation() { result instanceof Language::UnknownLocation }
+ override Language::Location getLocation() { result instanceof Language::UnknownDefaultLocation }
}
private OptionalIRFunction getInstructionIRFunction(Instruction instr) {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll
index b436bc8ccf11..279b43a1ca8b 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll
@@ -26,7 +26,7 @@ class ValueNumber extends TValueNumber {
l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(),
l.getEndColumn()
)
- else result instanceof Language::UnknownLocation
+ else result instanceof Language::UnknownDefaultLocation
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll
index c29d743dadbf..67a6965ae9bb 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll
@@ -45,7 +45,7 @@ module InstructionConsistency {
private class MissingIRFunction extends OptionalIRFunction, TMissingIRFunction {
override string toString() { result = "" }
- override Language::Location getLocation() { result instanceof Language::UnknownLocation }
+ override Language::Location getLocation() { result instanceof Language::UnknownDefaultLocation }
}
private OptionalIRFunction getInstructionIRFunction(Instruction instr) {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll
index b436bc8ccf11..279b43a1ca8b 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll
@@ -26,7 +26,7 @@ class ValueNumber extends TValueNumber {
l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(),
l.getEndColumn()
)
- else result instanceof Language::UnknownLocation
+ else result instanceof Language::UnknownDefaultLocation
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/internal/ASTValueNumbering.qll b/cpp/ql/lib/semmle/code/cpp/ir/internal/ASTValueNumbering.qll
index 4a40c90a1dd9..2dd51d391512 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/internal/ASTValueNumbering.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/internal/ASTValueNumbering.qll
@@ -76,7 +76,7 @@ class GVN extends TValueNumber {
l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(),
l.getEndColumn()
)
- else result instanceof UnknownLocation
+ else result instanceof UnknownDefaultLocation
}
final string getKind() {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/internal/IRCppLanguage.qll b/cpp/ql/lib/semmle/code/cpp/ir/internal/IRCppLanguage.qll
index a0e74f785e5e..28bbd40f8bf5 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/internal/IRCppLanguage.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/internal/IRCppLanguage.qll
@@ -22,6 +22,8 @@ class Location = Cpp::Location;
class UnknownLocation = Cpp::UnknownLocation;
+class UnknownDefaultLocation = Cpp::UnknownDefaultLocation;
+
class File = Cpp::File;
class AST = Cpp::Locatable;
diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll
index 3a93188e9ca6..d6abbf771114 100644
--- a/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll
+++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll
@@ -26,6 +26,14 @@ private class IteratorTraits extends Class {
}
Type getIteratorType() { result = this.getTemplateArgument(0) }
+
+ Type getValueType() {
+ exists(TypedefType t |
+ this.getAMember() = t and
+ t.getName() = "value_type" and
+ result = t.getUnderlyingType()
+ )
+ }
}
/**
@@ -34,16 +42,13 @@ private class IteratorTraits extends Class {
*/
private class IteratorByTraits extends Iterator {
IteratorTraits trait;
+ IteratorByTraits() {
+ trait.getIteratorType() = this and
+ not trait.getValueType() = this
+ }
- IteratorByTraits() { trait.getIteratorType() = this }
+ override Type getValueType() { result = trait.getValueType() }
- override Type getValueType() {
- exists(TypedefType t |
- trait.getAMember() = t and
- t.getName() = "value_type" and
- result = t.getUnderlyingType()
- )
- }
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/RangeAnalysis.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/RangeAnalysis.qll
index 845a71b2a502..6bd7615d37b7 100644
--- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/RangeAnalysis.qll
+++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/RangeAnalysis.qll
@@ -89,7 +89,7 @@ class ZeroBound extends Bound instanceof IRBound::ZeroBound {
result = super.getInstruction(delta).getUnconvertedResultExpression()
}
- override Location getLocation() { result instanceof UnknownLocation }
+ override Location getLocation() { result instanceof UnknownDefaultLocation }
}
/**
diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/Bound.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/Bound.qll
index 4d873e8e3b3e..27883aedf3e7 100644
--- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/Bound.qll
+++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/Bound.qll
@@ -61,7 +61,7 @@ class ZeroBound extends Bound, TBoundZero {
result.(ConstantValueInstruction).getValue().toInt() = delta
}
- override Location getLocation() { result instanceof UnknownLocation }
+ override Location getLocation() { result instanceof UnknownDefaultLocation }
}
/**
diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme
index 5491582ac851..e38346051783 100644
--- a/cpp/ql/lib/semmlecode.cpp.dbscheme
+++ b/cpp/ql/lib/semmlecode.cpp.dbscheme
@@ -1,4 +1,3 @@
-/*- Compilations -*/
/**
* An invocation of the compiler. Note that more than one file may be
@@ -139,7 +138,6 @@ compilation_finished(
float elapsed_seconds : float ref
);
-/*- External data -*/
/**
* External data, loaded from CSV files during snapshot creation. See
@@ -147,87 +145,167 @@ compilation_finished(
* for more information.
*/
externalData(
- int id : @externalDataElement,
- string path : string ref,
- int column: int ref,
- string value : string ref
+ int id : @externalDataElement,
+ string path : string ref,
+ int column: int ref,
+ string value : string ref
);
-/*- Source location prefix -*/
-
/**
* The source location of the snapshot.
*/
sourceLocationPrefix(string prefix : string ref);
-/*- Files and folders -*/
+/**
+ * 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
+);
/**
- * The location of an element.
+ * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
+ /** 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
);
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string 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
);
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container 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
);
-/*- Lines of code -*/
+/** 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
+ int element_id: @sourceline ref,
+ int num_lines: int ref,
+ int num_code: int ref,
+ int num_comment: int ref
);
-/*- Diagnostic messages -*/
-
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
+ 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
);
-/*- C++ dbscheme -*/
+files(
+ unique int id: @file,
+ string name: string ref
+);
-/*
- * C++ dbscheme
- */
+folders(
+ unique int id: @folder,
+ string name: string ref
+);
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
+@container = @folder | @file
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
+containerparent(
+ int parent: @container ref,
+ unique int child: @container ref
+);
fileannotations(
int id: @file ref,
@@ -269,7 +347,7 @@ macroparent(
// to which a macro invocation is bound
macrolocationbind(
int id: @macroinvocation ref,
- int location: @location_default ref
+ int location: @location ref
);
#keyset[invocation, argument_index]
@@ -615,9 +693,6 @@ case @builtintype.kind of
| 61 = @complex_std_float128 // _Complex _Float128
| 62 = @mfp8 // __mfp8
| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
;
builtintypes(
@@ -845,7 +920,7 @@ is_proxy_class_for(
type_mentions(
unique int id: @type_mention,
int type_id: @type ref,
- int location: @location_default ref,
+ int location: @location ref,
// a_symbol_reference_kind from the frontend.
int kind: int ref
);
@@ -1594,7 +1669,7 @@ initialisers(
unique int init: @initialiser,
int var: @accessible ref,
unique int expr: @expr ref,
- int location: @location_default ref
+ int location: @location_expr ref
);
braced_initialisers(
@@ -1613,7 +1688,7 @@ expr_ancestor(
exprs(
unique int id: @expr,
int kind: int ref,
- int location: @location_default ref
+ int location: @location_expr ref
);
expr_reuse(
@@ -2115,7 +2190,7 @@ fold(
stmts(
unique int id: @stmt,
int kind: int ref,
- int location: @location_default ref
+ int location: @location_stmt ref
);
case @stmt.kind of
@@ -2356,73 +2431,76 @@ link_parent(
int link_target : @link_target ref
);
-/*- XML Files -*/
+/* XML Files */
-xmlEncoding(
- unique int id: @file ref,
- string encoding: string ref
-);
+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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ int xmlElement: @xmllocatable ref,
+ int location: @location_default ref
);
-@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace;
+@xmllocatable = @xmlcharacters
+ | @xmlelement
+ | @xmlcomment
+ | @xmlattribute
+ | @xmldtd
+ | @file
+ | @xmlnamespace;
diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats
index e563fba8ab34..dc51cf5b2186 100644
--- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats
+++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats
@@ -2,31 +2,47 @@
@compilation
- 12647
+ 14471
@externalDataElement
65
- @file
- 65232
+ @external_package
+ 4
- @folder
- 12393
+ @svnentry
+ 575525
+
+
+ @location_default
+ 36187310
+
+
+ @location_stmt
+ 5217100
+
+
+ @location_expr
+ 18007923
@diagnostic
- 1483
+ 1484
- @location_default
- 46965948
+ @file
+ 74641
+
+
+ @folder
+ 14181
@macro_expansion
- 40257335
+ 39310599
@other_macro_reference
@@ -34,31 +50,31 @@
@function
- 4053072
+ 4010790
@fun_decl
- 4206779
+ 4149709
@var_decl
- 9391616
+ 9262608
@type_decl
- 1634964
+ 1687349
@namespace_decl
- 407321
+ 430963
@using_declaration
- 267955
+ 306677
@using_directive
- 6472
+ 6474
@using_enum_declaration
@@ -66,27 +82,27 @@
@static_assert
- 173266
+ 183514
@parameter
- 7026200
+ 6957575
@membervariable
- 1496815
+ 1493401
@globalvariable
- 488591
+ 488090
@localvariable
- 726278
+ 726100
@enumconstant
- 345733
+ 344765
@errortype
@@ -320,41 +336,29 @@
@scalable_vector_count
124
-
- @complex_fp16
- 124
-
-
- @complex_std_bfloat16
- 124
-
-
- @complex_std_float16
- 124
-
@pointer
- 452880
+ 455609
@type_with_specifiers
- 693867
+ 695720
@array
- 90401
+ 98317
@routineptr
- 684076
+ 684232
@reference
- 968192
+ 969435
@gnu_vector
- 676
+ 773
@routinereference
@@ -362,7 +366,7 @@
@rvalue_reference
- 291306
+ 291455
@block
@@ -374,7 +378,7 @@
@type_operator
- 7953
+ 7960
@decltype
@@ -382,31 +386,31 @@
@usertype
- 4151861
+ 4458594
@mangledname
- 6370041
+ 6330564
@type_mention
- 5902899
+ 5828707
@concept_template
- 3611
+ 3614
@routinetype
- 604289
+ 604428
@ptrtomember
- 9730
+ 11025
@specifier
- 7741
+ 7745
@gnuattribute
@@ -414,11 +418,11 @@
@stdattribute
- 353114
+ 350171
@declspec
- 330047
+ 329730
@msattribute
@@ -430,15 +434,15 @@
@attribute_arg_token
- 16693
+ 16696
@attribute_arg_constant_expr
- 71994
+ 82124
@attribute_arg_expr
- 1405
+ 1607
@attribute_arg_empty
@@ -454,19 +458,19 @@
@derivation
- 476877
+ 476986
@frienddecl
- 700420
+ 700589
@comment
- 11241970
+ 11220843
@namespace
- 8653
+ 9901
@specialnamequalifyingelement
@@ -474,15 +478,15 @@
@namequalifier
- 3038986
+ 3041775
@value
- 13474612
+ 13474605
@initialiser
- 2251036
+ 2340631
@address_of
@@ -490,15 +494,15 @@
@indirect
- 404154
+ 404153
@array_to_pointer
- 1953752
+ 1953751
@parexpr
- 4915210
+ 4915208
@arithnegexpr
@@ -518,7 +522,7 @@
@postincrexpr
- 84581
+ 84597
@postdecrexpr
@@ -550,11 +554,11 @@
@divexpr
- 52393
+ 54088
@remexpr
- 16011
+ 16015
@paddexpr
@@ -562,11 +566,11 @@
@psubexpr
- 68024
+ 68037
@pdiffexpr
- 43951
+ 43849
@lshiftexpr
@@ -574,7 +578,7 @@
@rshiftexpr
- 200555
+ 200554
@andexpr
@@ -586,7 +590,7 @@
@xorexpr
- 73961
+ 73975
@eqexpr
@@ -606,7 +610,7 @@
@geexpr
- 81368
+ 81384
@leexpr
@@ -614,7 +618,7 @@
@assignexpr
- 1281145
+ 1281144
@assignaddexpr
@@ -626,11 +630,11 @@
@assignmulexpr
- 11189
+ 12609
@assigndivexpr
- 6807
+ 6809
@assignremexpr
@@ -638,7 +642,7 @@
@assignlshiftexpr
- 3703
+ 3704
@assignrshiftexpr
@@ -674,19 +678,19 @@
@commaexpr
- 168441
+ 168901
@subscriptexpr
- 435143
+ 435142
@callexpr
- 239767
+ 261438
@vastartexpr
- 4979
+ 5085
@vaargexpr
@@ -702,7 +706,7 @@
@varaccess
- 8254635
+ 8254631
@runtime_sizeof
@@ -710,7 +714,7 @@
@runtime_alignof
- 49874
+ 49886
@expr_stmt
@@ -718,11 +722,11 @@
@routineexpr
- 5726803
+ 5732059
@type_operand
- 1405364
+ 1405363
@offsetofexpr
@@ -734,7 +738,7 @@
@literal
- 7967517
+ 7967633
@aggregateliteral
@@ -742,43 +746,43 @@
@c_style_cast
- 6026988
+ 6026987
@temp_init
- 992325
+ 992341
@errorexpr
- 45684
+ 45695
@reference_to
- 1902638
+ 1902670
@ref_indirect
- 2107213
+ 2107696
@vacuous_destructor_call
- 7835
+ 7837
@assume
- 4151
+ 4394
@conjugation
- 10
+ 12
@realpartexpr
- 73
+ 84
@imagpartexpr
- 73
+ 84
@jmulexpr
@@ -818,15 +822,15 @@
@thisaccess
- 1558310
+ 1518626
@new_expr
- 46195
+ 46206
@delete_expr
- 11480
+ 11483
@throw_expr
@@ -834,15 +838,15 @@
@condition_decl
- 408518
+ 408893
@braced_init_list
- 2151
+ 2152
@type_id
- 47898
+ 47909
@sizeof_pack
@@ -894,11 +898,11 @@
@isbaseofexpr
- 257
+ 259
@isclassexpr
- 2388
+ 2538
@isconvtoexpr
@@ -906,15 +910,15 @@
@isemptyexpr
- 8865
+ 8869
@isenumexpr
- 2996
+ 2998
@ispodexpr
- 834
+ 955
@ispolyexpr
@@ -930,83 +934,83 @@
@hastrivialdestructor
- 2793
+ 2794
@uuidof
- 26588
+ 28060
@delete_array_expr
- 1246
+ 1426
@new_array_expr
- 6653
+ 6933
@foldexpr
- 1246
+ 1247
@ctordirectinit
- 112831
+ 112823
@ctorvirtualinit
- 4019
+ 4020
@ctorfieldinit
- 206399
+ 206504
@ctordelegatinginit
- 3621
+ 3622
@dtordirectdestruct
- 39450
+ 39425
@dtorvirtualdestruct
- 3985
+ 3986
@dtorfielddestruct
- 39824
+ 39834
@static_cast
- 348369
+ 389023
@reinterpret_cast
- 40089
+ 41840
@const_cast
- 24460
+ 24466
@dynamic_cast
- 792
+ 906
@lambdaexpr
- 19057
+ 16482
@param_ref
- 164014
+ 164017
@noopexpr
- 48
+ 51
@istriviallyconstructibleexpr
- 3745
+ 3747
@isdestructibleexpr
@@ -1018,15 +1022,15 @@
@istriviallydestructibleexpr
- 998
+ 999
@istriviallyassignableexpr
- 3745
+ 3747
@isnothrowassignableexpr
- 5119
+ 5122
@istrivialexpr
@@ -1038,7 +1042,7 @@
@istriviallycopyableexpr
- 1373
+ 1226
@isliteraltypeexpr
@@ -1058,11 +1062,11 @@
@isconstructibleexpr
- 3621
+ 3622
@isnothrowconstructibleexpr
- 20727
+ 20737
@hasfinalizerexpr
@@ -1098,7 +1102,7 @@
@isfinalexpr
- 9402
+ 9404
@noexceptexpr
@@ -1114,7 +1118,7 @@
@builtinaddressof
- 15483
+ 15490
@vec_fill
@@ -1130,7 +1134,7 @@
@spaceshipexpr
- 1311
+ 1312
@co_await
@@ -1150,7 +1154,7 @@
@hasuniqueobjectrepresentations
- 42
+ 43
@builtinbitcast
@@ -1158,7 +1162,7 @@
@builtinshuffle
- 612
+ 701
@blockassignexpr
@@ -1166,7 +1170,7 @@
@issame
- 4535
+ 4539
@isfunction
@@ -1274,7 +1278,7 @@
@reuseexpr
- 846206
+ 846982
@istriviallycopyassignable
@@ -1330,7 +1334,7 @@
@referenceconstructsfromtemporary
- 42
+ 43
@referenceconvertsfromtemporary
@@ -1338,7 +1342,7 @@
@isconvertible
- 128
+ 129
@isvalidwinrttype
@@ -1374,51 +1378,51 @@
@requires_expr
- 16486
+ 16502
@nested_requirement
- 687
+ 688
@compound_requirement
- 10941
+ 10951
@concept_id
- 90344
+ 90427
@lambdacapture
- 31966
+ 28526
@stmt_expr
- 2031615
+ 2031614
@stmt_if
- 990215
+ 990214
@stmt_while
- 39648
+ 39647
@stmt_goto
- 157956
+ 151588
@stmt_label
- 78048
+ 72706
@stmt_return
- 1241843
+ 1255290
@stmt_block
- 1729360
+ 1844676
@stmt_end_test_while
@@ -1430,11 +1434,11 @@
@stmt_switch_case
- 835329
+ 836096
@stmt_switch
- 411463
+ 411840
@stmt_asm
@@ -1442,11 +1446,11 @@
@stmt_decl
- 772441
+ 769069
@stmt_empty
- 428982
+ 429375
@stmt_continue
@@ -1454,7 +1458,7 @@
@stmt_break
- 137937
+ 140293
@stmt_try_block
@@ -1462,7 +1466,7 @@
@stmt_microsoft_try
- 211
+ 224
@stmt_set_vla_size
@@ -1482,11 +1486,11 @@
@stmt_handler
- 43746
+ 43747
@stmt_constexpr_if
- 106134
+ 103814
@stmt_co_return
@@ -1506,7 +1510,7 @@
@ppd_if
- 591478
+ 588907
@ppd_ifdef
@@ -1514,35 +1518,35 @@
@ppd_ifndef
- 158651
+ 158246
@ppd_elif
- 21923
+ 25085
@ppd_else
- 235118
+ 236237
@ppd_endif
- 889778
+ 885609
@ppd_plain_include
- 318660
+ 364623
@ppd_define
- 2752618
+ 2746401
@ppd_undef
- 100515
+ 100941
@ppd_pragma
- 406555
+ 406763
@ppd_include_next
@@ -1550,7 +1554,7 @@
@ppd_line
- 18828
+ 18829
@ppd_error
@@ -1578,7 +1582,7 @@
@link_target
- 816
+ 846
@xmldtd
@@ -1608,15 +1612,15 @@
compilations
- 12647
+ 14471
id
- 12647
+ 14471
cwd
- 10
+ 12
@@ -1630,7 +1634,7 @@
1
2
- 12647
+ 14471
@@ -1646,7 +1650,7 @@
1197
1198
- 10
+ 12
@@ -1656,19 +1660,19 @@
compilation_args
- 1012517
+ 1158561
id
- 12647
+ 14471
num
- 1468
+ 1680
arg
- 29277
+ 33500
@@ -1682,77 +1686,77 @@
36
42
- 1003
+ 1148
42
43
- 1098
+ 1257
43
44
- 718
+ 822
44
45
- 507
+ 580
45
51
- 950
+ 1088
51
70
- 486
+ 556
71
72
- 707
+ 810
72
90
- 898
+ 1027
94
96
- 390
+ 447
98
99
- 1341
+ 1535
100
102
- 95
+ 108
103
104
- 1996
+ 2284
104
119
- 1067
+ 1221
120
138
- 929
+ 1063
139
140
- 454
+ 519
@@ -1768,72 +1772,72 @@
34
38
- 591
+ 677
38
39
- 1500
+ 1716
39
40
- 982
+ 1124
40
42
- 1088
+ 1245
42
53
- 602
+ 689
53
54
- 707
+ 810
54
63
- 898
+ 1027
64
67
- 401
+ 459
67
68
- 1405
+ 1607
68
70
- 972
+ 1112
70
71
- 1405
+ 1607
73
79
- 950
+ 1088
79
89
- 1130
+ 1293
89
90
- 10
+ 12
@@ -1849,57 +1853,57 @@
43
90
- 63
+ 72
90
108
- 116
+ 132
108
183
- 105
+ 120
198
422
- 116
+ 132
422
595
- 126
+ 145
595
605
- 126
+ 145
605
749
- 116
+ 132
750
778
- 116
+ 132
781
883
- 116
+ 132
930
1190
- 84
+ 96
1197
1198
- 380
+ 435
@@ -1915,72 +1919,72 @@
1
5
- 126
+ 145
5
7
- 116
+ 132
9
12
- 73
+ 84
12
15
- 116
+ 132
15
18
- 95
+ 108
18
22
- 116
+ 132
22
27
- 126
+ 145
27
29
- 84
+ 96
29
34
- 116
+ 132
34
44
- 126
+ 145
45
63
- 116
+ 132
67
94
- 116
+ 132
94
164
- 116
+ 132
171
199
- 21
+ 24
@@ -1996,22 +2000,22 @@
1
2
- 13407
+ 15341
2
3
- 12689
+ 14519
3
103
- 2197
+ 2514
104
1198
- 982
+ 1124
@@ -2027,17 +2031,17 @@
1
2
- 19387
+ 22184
2
3
- 8727
+ 9986
3
62
- 1162
+ 1329
@@ -2047,15 +2051,15 @@
compilation_build_mode
- 12647
+ 14471
id
- 12647
+ 14471
mode
- 10
+ 12
@@ -2069,7 +2073,7 @@
1
2
- 12647
+ 14471
@@ -2085,7 +2089,7 @@
1197
1198
- 10
+ 12
@@ -2095,7 +2099,7 @@
compilation_compiling_files
- 15739
+ 15742
id
@@ -2103,11 +2107,11 @@
num
- 4520
+ 4521
file
- 13670
+ 13672
@@ -2295,7 +2299,7 @@
1
2
- 12308
+ 12311
2
@@ -2321,7 +2325,7 @@
1
2
- 12526
+ 12528
2
@@ -2341,7 +2345,7 @@
compilation_time
- 62959
+ 62971
id
@@ -2349,7 +2353,7 @@
num
- 4520
+ 4521
kind
@@ -2357,7 +2361,7 @@
seconds
- 13234
+ 13999
@@ -2438,12 +2442,12 @@
3
4
- 653
+ 762
4
5
- 708
+ 599
6
@@ -2452,7 +2456,7 @@
8
- 9
+ 10
163
@@ -2477,12 +2481,12 @@
20
- 43
+ 45
217
- 47
- 92
+ 54
+ 94
108
@@ -2535,7 +2539,7 @@
4
5
- 4520
+ 4521
@@ -2551,17 +2555,17 @@
3
4
- 1361
+ 1307
4
5
- 1034
+ 1143
5
6
- 326
+ 217
6
@@ -2571,7 +2575,7 @@
7
8
- 163
+ 217
8
@@ -2585,12 +2589,12 @@
23
- 48
+ 51
381
- 91
- 92
+ 89
+ 90
54
@@ -2647,13 +2651,13 @@
54
- 136
- 137
+ 139
+ 140
54
- 150
- 151
+ 157
+ 158
54
@@ -2670,17 +2674,17 @@
1
2
- 6862
+ 7353
2
3
- 2886
+ 3322
3
4
- 1906
+ 1852
4
@@ -2689,8 +2693,8 @@
6
- 47
- 381
+ 46
+ 272
@@ -2706,32 +2710,32 @@
1
2
- 6099
+ 6700
2
3
- 2723
+ 2887
3
4
- 1797
+ 1906
4
5
- 925
+ 1252
5
- 7
+ 11
1089
- 7
+ 38
75
- 599
+ 163
@@ -2747,12 +2751,12 @@
1
2
- 10511
+ 11493
2
3
- 2723
+ 2505
@@ -2762,15 +2766,15 @@
diagnostic_for
- 4148
+ 4152
diagnostic
- 1483
+ 1484
compilation
- 1354
+ 1355
file_number
@@ -2792,12 +2796,12 @@
1
2
- 1440
+ 1441
63
64
- 42
+ 43
@@ -2813,7 +2817,7 @@
1
2
- 1483
+ 1484
@@ -2829,7 +2833,7 @@
1
2
- 1483
+ 1484
@@ -2845,12 +2849,12 @@
3
4
- 1311
+ 1312
5
6
- 42
+ 43
@@ -2866,7 +2870,7 @@
1
2
- 1354
+ 1355
@@ -2882,12 +2886,12 @@
3
4
- 1311
+ 1312
5
6
- 42
+ 43
@@ -2951,12 +2955,12 @@
1
2
- 42
+ 43
2
3
- 42
+ 43
63
@@ -2977,7 +2981,7 @@
2
3
- 42
+ 43
63
@@ -3008,19 +3012,19 @@
compilation_finished
- 12647
+ 14471
id
- 12647
+ 14471
cpu_seconds
- 9625
+ 10844
elapsed_seconds
- 221
+ 217
@@ -3034,7 +3038,7 @@
1
2
- 12647
+ 14471
@@ -3050,7 +3054,7 @@
1
2
- 12647
+ 14471
@@ -3066,17 +3070,17 @@
1
2
- 8262
+ 9151
2
3
- 919
+ 1172
3
- 34
- 443
+ 26
+ 519
@@ -3092,12 +3096,12 @@
1
2
- 9023
+ 10227
2
3
- 602
+ 616
@@ -3113,67 +3117,72 @@
1
2
- 63
+ 12
2
3
- 21
+ 48
- 7
- 8
- 21
+ 3
+ 4
+ 12
- 10
- 11
- 21
+ 6
+ 7
+ 12
+
+
+ 9
+ 10
+ 12
11
12
- 10
+ 24
- 16
- 17
- 10
+ 12
+ 13
+ 12
- 21
- 22
- 10
+ 18
+ 19
+ 12
- 28
- 29
- 10
+ 37
+ 38
+ 12
- 56
- 57
- 10
+ 64
+ 65
+ 12
- 153
- 154
- 10
+ 152
+ 153
+ 12
- 248
- 249
- 10
+ 247
+ 248
+ 12
- 297
- 298
- 10
+ 300
+ 301
+ 12
- 323
- 324
- 10
+ 318
+ 319
+ 12
@@ -3189,67 +3198,77 @@
1
2
- 63
+ 12
2
3
- 21
+ 48
- 7
- 8
- 21
+ 3
+ 4
+ 12
+
+
+ 6
+ 7
+ 12
+
+
+ 9
+ 10
+ 12
10
11
- 21
+ 12
11
12
- 10
+ 12
- 16
- 17
- 10
+ 12
+ 13
+ 12
- 21
- 22
- 10
+ 18
+ 19
+ 12
- 27
- 28
- 10
+ 37
+ 38
+ 12
- 54
- 55
- 10
+ 60
+ 61
+ 12
- 152
- 153
- 10
+ 139
+ 140
+ 12
- 163
- 164
- 10
+ 162
+ 163
+ 12
- 229
- 230
- 10
+ 228
+ 229
+ 12
- 251
- 252
- 10
+ 244
+ 245
+ 12
@@ -3485,38 +3504,238 @@
- locations_default
- 46965948
+ external_packages
+ 4
id
- 46965948
+ 4
- file
- 40955
+ namespace
+ 1
- beginLine
- 7507424
+ package_name
+ 4
- beginColumn
- 21975
+ version
+ 4
+
+
+
+ id
+ namespace
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ id
+ package_name
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ id
+ version
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ namespace
+ id
+
+
+ 12
+
+
+ 4
+ 5
+ 1
+
+
+
+
+
+
+ namespace
+ package_name
+
+
+ 12
+
+
+ 4
+ 5
+ 1
+
+
+
+
+
+
+ namespace
+ version
+
+
+ 12
+
+
+ 4
+ 5
+ 1
+
+
+
+
+
+
+ package_name
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ package_name
+ namespace
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ package_name
+ version
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ version
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ version
+ namespace
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+ version
+ package_name
+
+
+ 12
+
+
+ 1
+ 2
+ 4
+
+
+
+
+
+
+
+
+ header_to_external_package
+ 92
+
- endLine
- 7508548
+ fileid
+ 92
- endColumn
- 53441
+ package
+ 4
- id
- file
+ fileid
+ package
12
@@ -3524,15 +3743,74 @@
1
2
- 46965948
+ 92
+
+
+
+
+
+
+ package
+ fileid
+
+
+ 12
+
+
+ 1
+ 2
+ 1
+
+
+ 5
+ 6
+ 1
+
+
+ 6
+ 7
+ 1
+
+
+ 80
+ 81
+ 1
+
+
+
+ svnentries
+ 575525
+
+
+ id
+ 575525
+
+
+ revision
+ 575525
+
+
+ author
+ 19539
+
+
+ revisionDate
+ 547759
+
+
+ changeSize
+ 1
+
+
+
id
- beginLine
+ revision
12
@@ -3540,7 +3818,7 @@
1
2
- 46965948
+ 575525
@@ -3548,7 +3826,7 @@
id
- beginColumn
+ author
12
@@ -3556,7 +3834,4792 @@
1
2
- 46965948
+ 575525
+
+
+
+
+
+
+ id
+ revisionDate
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ id
+ changeSize
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ revision
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ revision
+ author
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ revision
+ revisionDate
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ revision
+ changeSize
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ author
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 7913
+
+
+ 2
+ 3
+ 2531
+
+
+ 3
+ 4
+ 1388
+
+
+ 4
+ 6
+ 1523
+
+
+ 6
+ 10
+ 1529
+
+
+ 10
+ 20
+ 1509
+
+
+ 20
+ 52
+ 1488
+
+
+ 52
+ 568
+ 1466
+
+
+ 569
+ 16582
+ 192
+
+
+
+
+
+
+ author
+ revision
+
+
+ 12
+
+
+ 1
+ 2
+ 7913
+
+
+ 2
+ 3
+ 2531
+
+
+ 3
+ 4
+ 1388
+
+
+ 4
+ 6
+ 1523
+
+
+ 6
+ 10
+ 1529
+
+
+ 10
+ 20
+ 1509
+
+
+ 20
+ 52
+ 1488
+
+
+ 52
+ 568
+ 1466
+
+
+ 569
+ 16582
+ 192
+
+
+
+
+
+
+ author
+ revisionDate
+
+
+ 12
+
+
+ 1
+ 2
+ 7996
+
+
+ 2
+ 3
+ 2509
+
+
+ 3
+ 4
+ 1379
+
+
+ 4
+ 6
+ 1520
+
+
+ 6
+ 10
+ 1529
+
+
+ 10
+ 20
+ 1507
+
+
+ 20
+ 52
+ 1474
+
+
+ 52
+ 662
+ 1466
+
+
+ 663
+ 16573
+ 159
+
+
+
+
+
+
+ author
+ changeSize
+
+
+ 12
+
+
+ 1
+ 2
+ 19539
+
+
+
+
+
+
+ revisionDate
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 531878
+
+
+ 2
+ 100
+ 15881
+
+
+
+
+
+
+ revisionDate
+ revision
+
+
+ 12
+
+
+ 1
+ 2
+ 531878
+
+
+ 2
+ 100
+ 15881
+
+
+
+
+
+
+ revisionDate
+ author
+
+
+ 12
+
+
+ 1
+ 2
+ 542505
+
+
+ 2
+ 17
+ 5254
+
+
+
+
+
+
+ revisionDate
+ changeSize
+
+
+ 12
+
+
+ 1
+ 2
+ 547759
+
+
+
+
+
+
+ changeSize
+ id
+
+
+ 12
+
+
+ 575525
+ 575526
+ 1
+
+
+
+
+
+
+ changeSize
+ revision
+
+
+ 12
+
+
+ 575525
+ 575526
+ 1
+
+
+
+
+
+
+ changeSize
+ author
+
+
+ 12
+
+
+ 19539
+ 19540
+ 1
+
+
+
+
+
+
+ changeSize
+ revisionDate
+
+
+ 12
+
+
+ 547759
+ 547760
+ 1
+
+
+
+
+
+
+
+
+ svnaffectedfiles
+ 1314068
+
+
+ id
+ 531628
+
+
+ file
+ 90924
+
+
+ action
+ 1
+
+
+
+
+ id
+ file
+
+
+ 12
+
+
+ 1
+ 2
+ 337698
+
+
+ 2
+ 3
+ 77525
+
+
+ 3
+ 4
+ 43024
+
+
+ 4
+ 7
+ 46689
+
+
+ 7
+ 16635
+ 26692
+
+
+
+
+
+
+ id
+ action
+
+
+ 12
+
+
+ 1
+ 2
+ 531628
+
+
+
+
+
+
+ file
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 11819
+
+
+ 2
+ 3
+ 18230
+
+
+ 3
+ 4
+ 9501
+
+
+ 4
+ 5
+ 6656
+
+
+ 5
+ 6
+ 5012
+
+
+ 6
+ 8
+ 7103
+
+
+ 8
+ 11
+ 6788
+
+
+ 11
+ 16
+ 6996
+
+
+ 16
+ 26
+ 7180
+
+
+ 26
+ 54
+ 6824
+
+
+ 54
+ 3572
+ 4815
+
+
+
+
+
+
+ file
+ action
+
+
+ 12
+
+
+ 1
+ 2
+ 90924
+
+
+
+
+
+
+ action
+ id
+
+
+ 12
+
+
+ 531628
+ 531629
+ 1
+
+
+
+
+
+
+ action
+ file
+
+
+ 12
+
+
+ 90924
+ 90925
+ 1
+
+
+
+
+
+
+
+
+ svnentrymsg
+ 575525
+
+
+ id
+ 575525
+
+
+ message
+ 568305
+
+
+
+
+ id
+ message
+
+
+ 12
+
+
+ 1
+ 2
+ 575525
+
+
+
+
+
+
+ message
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 565381
+
+
+ 2
+ 142
+ 2924
+
+
+
+
+
+
+
+
+ svnchurn
+ 46790
+
+
+ commit
+ 22361
+
+
+ file
+ 16124
+
+
+ addedLines
+ 910
+
+
+ deletedLines
+ 787
+
+
+
+
+ commit
+ file
+
+
+ 12
+
+
+ 1
+ 2
+ 15208
+
+
+ 2
+ 3
+ 3101
+
+
+ 3
+ 4
+ 1746
+
+
+ 4
+ 8
+ 1774
+
+
+ 8
+ 246
+ 532
+
+
+
+
+
+
+ commit
+ addedLines
+
+
+ 12
+
+
+ 1
+ 2
+ 16074
+
+
+ 2
+ 3
+ 3323
+
+
+ 3
+ 4
+ 1561
+
+
+ 4
+ 118
+ 1403
+
+
+
+
+
+
+ commit
+ deletedLines
+
+
+ 12
+
+
+ 1
+ 2
+ 16799
+
+
+ 2
+ 3
+ 3286
+
+
+ 3
+ 5
+ 1763
+
+
+ 5
+ 113
+ 513
+
+
+
+
+
+
+ file
+ commit
+
+
+ 12
+
+
+ 1
+ 2
+ 8618
+
+
+ 2
+ 3
+ 2956
+
+
+ 3
+ 4
+ 1426
+
+
+ 4
+ 6
+ 1364
+
+
+ 6
+ 12
+ 1210
+
+
+ 12
+ 448
+ 550
+
+
+
+
+
+
+ file
+ addedLines
+
+
+ 12
+
+
+ 1
+ 2
+ 9240
+
+
+ 2
+ 3
+ 3129
+
+
+ 3
+ 4
+ 1393
+
+
+ 4
+ 6
+ 1239
+
+
+ 6
+ 59
+ 1123
+
+
+
+
+
+
+ file
+ deletedLines
+
+
+ 12
+
+
+ 1
+ 2
+ 9525
+
+
+ 2
+ 3
+ 3192
+
+
+ 3
+ 4
+ 1401
+
+
+ 4
+ 7
+ 1387
+
+
+ 7
+ 70
+ 619
+
+
+
+
+
+
+ addedLines
+ commit
+
+
+ 12
+
+
+ 1
+ 2
+ 446
+
+
+ 2
+ 3
+ 133
+
+
+ 3
+ 4
+ 70
+
+
+ 4
+ 6
+ 68
+
+
+ 6
+ 12
+ 70
+
+
+ 12
+ 57
+ 69
+
+
+ 57
+ 6874
+ 54
+
+
+
+
+
+
+ addedLines
+ file
+
+
+ 12
+
+
+ 1
+ 2
+ 445
+
+
+ 2
+ 3
+ 132
+
+
+ 3
+ 4
+ 69
+
+
+ 4
+ 6
+ 68
+
+
+ 6
+ 12
+ 73
+
+
+ 12
+ 58
+ 69
+
+
+ 58
+ 6663
+ 54
+
+
+
+
+
+
+ addedLines
+ deletedLines
+
+
+ 12
+
+
+ 1
+ 2
+ 621
+
+
+ 2
+ 3
+ 96
+
+
+ 3
+ 7
+ 81
+
+
+ 7
+ 34
+ 70
+
+
+ 34
+ 727
+ 42
+
+
+
+
+
+
+ deletedLines
+ commit
+
+
+ 12
+
+
+ 1
+ 2
+ 439
+
+
+ 2
+ 3
+ 116
+
+
+ 3
+ 4
+ 48
+
+
+ 4
+ 8
+ 67
+
+
+ 8
+ 28
+ 60
+
+
+ 28
+ 6794
+ 57
+
+
+
+
+
+
+ deletedLines
+ file
+
+
+ 12
+
+
+ 1
+ 2
+ 437
+
+
+ 2
+ 3
+ 113
+
+
+ 3
+ 4
+ 49
+
+
+ 4
+ 7
+ 61
+
+
+ 7
+ 19
+ 60
+
+
+ 19
+ 770
+ 60
+
+
+ 985
+ 7318
+ 7
+
+
+
+
+
+
+ deletedLines
+ addedLines
+
+
+ 12
+
+
+ 1
+ 2
+ 545
+
+
+ 2
+ 3
+ 72
+
+
+ 3
+ 7
+ 69
+
+
+ 7
+ 30
+ 60
+
+
+ 30
+ 871
+ 41
+
+
+
+
+
+
+
+
+ extractor_version
+ 124
+
+
+ codeql_version
+ 124
+
+
+ frontend_version
+ 124
+
+
+
+
+ codeql_version
+ frontend_version
+
+
+ 12
+
+
+ 1
+ 2
+ 124
+
+
+
+
+
+
+ frontend_version
+ codeql_version
+
+
+ 12
+
+
+ 1
+ 2
+ 124
+
+
+
+
+
+
+
+
+ locations_default
+ 36187310
+
+
+ id
+ 36187310
+
+
+ container
+ 40976
+
+
+ startLine
+ 7487141
+
+
+ startColumn
+ 21237
+
+
+ endLine
+ 7489140
+
+
+ endColumn
+ 53468
+
+
+
+
+ id
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 36187310
+
+
+
+
+
+
+ id
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 36187310
+
+
+
+
+
+
+ id
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 36187310
+
+
+
+
+
+
+ id
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 36187310
+
+
+
+
+
+
+ id
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 36187310
+
+
+
+
+
+
+ container
+ id
+
+
+ 12
+
+
+ 1
+ 15
+ 3123
+
+
+ 15
+ 41
+ 3123
+
+
+ 42
+ 66
+ 3373
+
+
+ 67
+ 95
+ 3123
+
+
+ 98
+ 124
+ 3248
+
+
+ 124
+ 174
+ 3373
+
+
+ 175
+ 228
+ 3123
+
+
+ 230
+ 303
+ 3123
+
+
+ 305
+ 406
+ 3123
+
+
+ 408
+ 596
+ 3248
+
+
+ 598
+ 943
+ 3123
+
+
+ 986
+ 2568
+ 3123
+
+
+ 2587
+ 57658
+ 2748
+
+
+
+
+
+
+ container
+ startLine
+
+
+ 12
+
+
+ 1
+ 13
+ 3497
+
+
+ 13
+ 29
+ 3248
+
+
+ 29
+ 42
+ 3123
+
+
+ 42
+ 58
+ 3373
+
+
+ 58
+ 76
+ 3123
+
+
+ 77
+ 102
+ 3248
+
+
+ 102
+ 134
+ 3123
+
+
+ 134
+ 173
+ 3123
+
+
+ 173
+ 242
+ 3123
+
+
+ 243
+ 348
+ 3123
+
+
+ 348
+ 489
+ 3123
+
+
+ 493
+ 1269
+ 3123
+
+
+ 1337
+ 57597
+ 2623
+
+
+
+
+
+
+ container
+ startColumn
+
+
+ 12
+
+
+ 1
+ 4
+ 2248
+
+
+ 4
+ 7
+ 3123
+
+
+ 7
+ 12
+ 3497
+
+
+ 12
+ 16
+ 3123
+
+
+ 16
+ 22
+ 3373
+
+
+ 22
+ 28
+ 3123
+
+
+ 28
+ 33
+ 3248
+
+
+ 33
+ 39
+ 3373
+
+
+ 39
+ 48
+ 3373
+
+
+ 48
+ 60
+ 3373
+
+
+ 60
+ 82
+ 3373
+
+
+ 83
+ 98
+ 3248
+
+
+ 98
+ 141
+ 2498
+
+
+
+
+
+
+ container
+ endLine
+
+
+ 12
+
+
+ 1
+ 13
+ 3497
+
+
+ 13
+ 29
+ 3248
+
+
+ 29
+ 42
+ 3123
+
+
+ 42
+ 58
+ 3373
+
+
+ 58
+ 76
+ 3123
+
+
+ 77
+ 102
+ 3248
+
+
+ 102
+ 134
+ 3123
+
+
+ 134
+ 173
+ 3248
+
+
+ 174
+ 244
+ 3123
+
+
+ 246
+ 348
+ 3123
+
+
+ 348
+ 494
+ 3123
+
+
+ 513
+ 1349
+ 3123
+
+
+ 1407
+ 57597
+ 2498
+
+
+
+
+
+
+ container
+ endColumn
+
+
+ 12
+
+
+ 1
+ 12
+ 3373
+
+
+ 13
+ 24
+ 3248
+
+
+ 25
+ 33
+ 3248
+
+
+ 33
+ 39
+ 3373
+
+
+ 39
+ 45
+ 3622
+
+
+ 45
+ 54
+ 3123
+
+
+ 54
+ 62
+ 3622
+
+
+ 62
+ 71
+ 3373
+
+
+ 71
+ 83
+ 3497
+
+
+ 83
+ 99
+ 3123
+
+
+ 99
+ 114
+ 3123
+
+
+ 114
+ 143
+ 3123
+
+
+ 147
+ 363
+ 1124
+
+
+
+
+
+
+ startLine
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 4954615
+
+
+ 2
+ 3
+ 799784
+
+
+ 3
+ 4
+ 565670
+
+
+ 4
+ 12
+ 592405
+
+
+ 12
+ 210
+ 561673
+
+
+ 210
+ 534
+ 12992
+
+
+
+
+
+
+ startLine
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 5012832
+
+
+ 2
+ 3
+ 1233157
+
+
+ 3
+ 6
+ 663363
+
+
+ 6
+ 106
+ 561673
+
+
+ 107
+ 329
+ 16115
+
+
+
+
+
+
+ startLine
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 5648961
+
+
+ 2
+ 3
+ 532065
+
+
+ 3
+ 7
+ 578663
+
+
+ 7
+ 24
+ 570792
+
+
+ 24
+ 72
+ 156658
+
+
+
+
+
+
+ startLine
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 7312493
+
+
+ 2
+ 81
+ 174648
+
+
+
+
+
+
+ startLine
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 5021452
+
+
+ 2
+ 3
+ 766678
+
+
+ 3
+ 4
+ 559174
+
+
+ 4
+ 12
+ 603648
+
+
+ 12
+ 235
+ 536187
+
+
+
+
+
+
+ startColumn
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 1499
+
+
+ 2
+ 4
+ 1873
+
+
+ 4
+ 9
+ 1624
+
+
+ 9
+ 19
+ 1748
+
+
+ 20
+ 74
+ 1624
+
+
+ 81
+ 173
+ 1624
+
+
+ 173
+ 435
+ 1624
+
+
+ 468
+ 904
+ 1624
+
+
+ 945
+ 1309
+ 1624
+
+
+ 1328
+ 1510
+ 1624
+
+
+ 1531
+ 1774
+ 1624
+
+
+ 1834
+ 2887
+ 1624
+
+
+ 3491
+ 119749
+ 1499
+
+
+
+
+
+
+ startColumn
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 1873
+
+
+ 2
+ 4
+ 1748
+
+
+ 4
+ 6
+ 1499
+
+
+ 6
+ 11
+ 1748
+
+
+ 11
+ 33
+ 1624
+
+
+ 34
+ 45
+ 1624
+
+
+ 50
+ 75
+ 1748
+
+
+ 78
+ 98
+ 1748
+
+
+ 101
+ 131
+ 1624
+
+
+ 131
+ 147
+ 1873
+
+
+ 149
+ 161
+ 1624
+
+
+ 162
+ 198
+ 1624
+
+
+ 202
+ 329
+ 874
+
+
+
+
+
+
+ startColumn
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 1624
+
+
+ 2
+ 4
+ 1873
+
+
+ 4
+ 9
+ 1624
+
+
+ 9
+ 19
+ 1748
+
+
+ 20
+ 74
+ 1624
+
+
+ 80
+ 169
+ 1624
+
+
+ 171
+ 432
+ 1624
+
+
+ 467
+ 822
+ 1624
+
+
+ 861
+ 1001
+ 1624
+
+
+ 1002
+ 1190
+ 1624
+
+
+ 1201
+ 1338
+ 1624
+
+
+ 1347
+ 1920
+ 1624
+
+
+ 2210
+ 59360
+ 1374
+
+
+
+
+
+
+ startColumn
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 1624
+
+
+ 2
+ 4
+ 1873
+
+
+ 4
+ 9
+ 1624
+
+
+ 9
+ 19
+ 1748
+
+
+ 20
+ 74
+ 1624
+
+
+ 80
+ 169
+ 1624
+
+
+ 171
+ 432
+ 1624
+
+
+ 467
+ 822
+ 1624
+
+
+ 861
+ 1003
+ 1624
+
+
+ 1003
+ 1198
+ 1624
+
+
+ 1201
+ 1338
+ 1624
+
+
+ 1347
+ 1920
+ 1624
+
+
+ 2220
+ 59375
+ 1374
+
+
+
+
+
+
+ startColumn
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 1873
+
+
+ 2
+ 4
+ 1748
+
+
+ 4
+ 7
+ 1873
+
+
+ 7
+ 13
+ 1748
+
+
+ 13
+ 21
+ 1748
+
+
+ 21
+ 29
+ 1624
+
+
+ 29
+ 37
+ 1499
+
+
+ 37
+ 50
+ 1624
+
+
+ 50
+ 58
+ 1624
+
+
+ 61
+ 67
+ 1748
+
+
+ 67
+ 76
+ 1624
+
+
+ 76
+ 137
+ 1624
+
+
+ 139
+ 299
+ 874
+
+
+
+
+
+
+ endLine
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 4954241
+
+
+ 2
+ 3
+ 807030
+
+
+ 3
+ 4
+ 560798
+
+
+ 4
+ 12
+ 592779
+
+
+ 12
+ 214
+ 561797
+
+
+ 214
+ 530
+ 12492
+
+
+
+
+
+
+ endLine
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 5011332
+
+
+ 2
+ 3
+ 1236280
+
+
+ 3
+ 6
+ 663738
+
+
+ 6
+ 107
+ 561797
+
+
+ 107
+ 329
+ 15990
+
+
+
+
+
+
+ endLine
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 7307996
+
+
+ 2
+ 7
+ 181144
+
+
+
+
+
+
+ endLine
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 5651585
+
+
+ 2
+ 3
+ 530691
+
+
+ 3
+ 7
+ 579537
+
+
+ 7
+ 24
+ 570417
+
+
+ 24
+ 72
+ 156908
+
+
+
+
+
+
+ endLine
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 5021327
+
+
+ 2
+ 3
+ 773299
+
+
+ 3
+ 4
+ 554552
+
+
+ 4
+ 12
+ 604648
+
+
+ 12
+ 235
+ 535313
+
+
+
+
+
+
+ endColumn
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 15740
+
+
+ 2
+ 3
+ 5621
+
+
+ 3
+ 7
+ 4497
+
+
+ 7
+ 17
+ 4122
+
+
+ 17
+ 32
+ 4247
+
+
+ 35
+ 103
+ 4122
+
+
+ 147
+ 635
+ 4122
+
+
+ 651
+ 2069
+ 4122
+
+
+ 2137
+ 3404
+ 4122
+
+
+ 3430
+ 33692
+ 2748
+
+
+
+
+
+
+ endColumn
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 18614
+
+
+ 2
+ 3
+ 5621
+
+
+ 3
+ 5
+ 4247
+
+
+ 5
+ 7
+ 3373
+
+
+ 7
+ 15
+ 4622
+
+
+ 15
+ 78
+ 4122
+
+
+ 78
+ 143
+ 4247
+
+
+ 150
+ 202
+ 4122
+
+
+ 203
+ 263
+ 4122
+
+
+ 266
+ 329
+ 374
+
+
+
+
+
+
+ endColumn
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 15990
+
+
+ 2
+ 3
+ 5996
+
+
+ 3
+ 7
+ 4122
+
+
+ 7
+ 17
+ 4247
+
+
+ 17
+ 35
+ 4122
+
+
+ 35
+ 140
+ 4122
+
+
+ 157
+ 601
+ 4122
+
+
+ 610
+ 1714
+ 4122
+
+
+ 1749
+ 2382
+ 4122
+
+
+ 2421
+ 30689
+ 2498
+
+
+
+
+
+
+ endColumn
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 17364
+
+
+ 2
+ 3
+ 6371
+
+
+ 3
+ 4
+ 3123
+
+
+ 4
+ 6
+ 3872
+
+
+ 6
+ 11
+ 4622
+
+
+ 11
+ 22
+ 4122
+
+
+ 22
+ 40
+ 4247
+
+
+ 42
+ 60
+ 4872
+
+
+ 60
+ 68
+ 4122
+
+
+ 68
+ 73
+ 749
+
+
+
+
+
+
+ endColumn
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 15990
+
+
+ 2
+ 3
+ 5996
+
+
+ 3
+ 7
+ 4122
+
+
+ 7
+ 17
+ 4372
+
+
+ 17
+ 36
+ 4247
+
+
+ 36
+ 170
+ 4122
+
+
+ 173
+ 620
+ 4122
+
+
+ 622
+ 1824
+ 4122
+
+
+ 1843
+ 2449
+ 4122
+
+
+ 2460
+ 30688
+ 2248
+
+
+
+
+
+
+
+
+ locations_stmt
+ 5217100
+
+
+ id
+ 5217100
+
+
+ container
+ 4164
+
+
+ startLine
+ 273596
+
+
+ startColumn
+ 2560
+
+
+ endLine
+ 265745
+
+
+ endColumn
+ 3235
+
+
+
+
+ id
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 5217100
+
+
+
+
+
+
+ id
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 5217100
+
+
+
+
+
+
+ id
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 5217100
+
+
+
+
+
+
+ id
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 5217100
+
+
+
+
+
+
+ id
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 5217100
+
+
+
+
+
+
+ container
+ id
+
+
+ 12
+
+
+ 1
+ 18
+ 337
+
+
+ 18
+ 60
+ 337
+
+
+ 61
+ 180
+ 337
+
+
+ 190
+ 450
+ 337
+
+
+ 454
+ 628
+ 337
+
+
+ 653
+ 883
+ 337
+
+
+ 906
+ 1161
+ 337
+
+
+ 1167
+ 1466
+ 337
+
+
+ 1508
+ 1785
+ 337
+
+
+ 1858
+ 2296
+ 337
+
+
+ 2347
+ 2833
+ 337
+
+
+ 2871
+ 4105
+ 337
+
+
+ 4275
+ 4993
+ 112
+
+
+
+
+
+
+ container
+ startLine
+
+
+ 12
+
+
+ 1
+ 18
+ 337
+
+
+ 18
+ 49
+ 337
+
+
+ 59
+ 170
+ 337
+
+
+ 170
+ 394
+ 337
+
+
+ 434
+ 603
+ 337
+
+
+ 610
+ 846
+ 337
+
+
+ 880
+ 1132
+ 337
+
+
+ 1135
+ 1395
+ 337
+
+
+ 1409
+ 1727
+ 337
+
+
+ 1761
+ 2226
+ 337
+
+
+ 2250
+ 2778
+ 337
+
+
+ 2800
+ 3886
+ 337
+
+
+ 3965
+ 4846
+ 112
+
+
+
+
+
+
+ container
+ startColumn
+
+
+ 12
+
+
+ 1
+ 3
+ 281
+
+
+ 3
+ 7
+ 309
+
+
+ 7
+ 9
+ 309
+
+
+ 9
+ 11
+ 337
+
+
+ 11
+ 13
+ 309
+
+
+ 13
+ 14
+ 309
+
+
+ 14
+ 16
+ 337
+
+
+ 16
+ 17
+ 225
+
+
+ 17
+ 19
+ 281
+
+
+ 19
+ 21
+ 253
+
+
+ 21
+ 23
+ 337
+
+
+ 23
+ 29
+ 337
+
+
+ 29
+ 43
+ 337
+
+
+ 48
+ 60
+ 196
+
+
+
+
+
+
+ container
+ endLine
+
+
+ 12
+
+
+ 1
+ 15
+ 337
+
+
+ 15
+ 44
+ 337
+
+
+ 47
+ 137
+ 337
+
+
+ 141
+ 314
+ 337
+
+
+ 328
+ 472
+ 337
+
+
+ 488
+ 643
+ 337
+
+
+ 675
+ 858
+ 365
+
+
+ 865
+ 1107
+ 337
+
+
+ 1178
+ 1343
+ 337
+
+
+ 1401
+ 1768
+ 337
+
+
+ 1782
+ 2165
+ 337
+
+
+ 2254
+ 3130
+ 337
+
+
+ 3343
+ 3873
+ 84
+
+
+
+
+
+
+ container
+ endColumn
+
+
+ 12
+
+
+ 1
+ 7
+ 337
+
+
+ 8
+ 26
+ 365
+
+
+ 26
+ 47
+ 365
+
+
+ 47
+ 59
+ 337
+
+
+ 59
+ 64
+ 309
+
+
+ 64
+ 67
+ 281
+
+
+ 67
+ 69
+ 337
+
+
+ 69
+ 71
+ 309
+
+
+ 71
+ 72
+ 337
+
+
+ 72
+ 74
+ 337
+
+
+ 74
+ 76
+ 337
+
+
+ 76
+ 80
+ 337
+
+
+ 81
+ 96
+ 168
+
+
+
+
+
+
+ startLine
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 29489
+
+
+ 2
+ 3
+ 20935
+
+
+ 3
+ 4
+ 17080
+
+
+ 4
+ 6
+ 19781
+
+
+ 6
+ 8
+ 17136
+
+
+ 8
+ 11
+ 22877
+
+
+ 11
+ 16
+ 23636
+
+
+ 16
+ 22
+ 20991
+
+
+ 22
+ 29
+ 23299
+
+
+ 29
+ 37
+ 23749
+
+
+ 37
+ 45
+ 20682
+
+
+ 45
+ 56
+ 22201
+
+
+ 56
+ 73
+ 11734
+
+
+
+
+
+
+ startLine
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 30530
+
+
+ 2
+ 3
+ 21526
+
+
+ 3
+ 4
+ 17361
+
+
+ 4
+ 6
+ 19697
+
+
+ 6
+ 8
+ 17418
+
+
+ 8
+ 11
+ 24058
+
+
+ 11
+ 16
+ 22398
+
+
+ 16
+ 22
+ 22201
+
+
+ 22
+ 29
+ 23214
+
+
+ 29
+ 36
+ 21920
+
+
+ 36
+ 44
+ 22370
+
+
+ 44
+ 54
+ 21723
+
+
+ 54
+ 68
+ 9173
+
+
+
+
+
+
+ startLine
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 36721
+
+
+ 2
+ 3
+ 28533
+
+
+ 3
+ 4
+ 23017
+
+
+ 4
+ 5
+ 22032
+
+
+ 5
+ 6
+ 23861
+
+
+ 6
+ 7
+ 27182
+
+
+ 7
+ 8
+ 31149
+
+
+ 8
+ 9
+ 27970
+
+
+ 9
+ 10
+ 20485
+
+
+ 10
+ 12
+ 22764
+
+
+ 12
+ 18
+ 9876
+
+
+
+
+
+
+ startLine
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 47358
+
+
+ 2
+ 3
+ 35314
+
+
+ 3
+ 4
+ 25240
+
+
+ 4
+ 5
+ 22173
+
+
+ 5
+ 6
+ 17502
+
+
+ 6
+ 7
+ 16517
+
+
+ 7
+ 8
+ 13956
+
+
+ 8
+ 9
+ 15110
+
+
+ 9
+ 10
+ 14773
+
+
+ 10
+ 11
+ 14435
+
+
+ 11
+ 12
+ 13900
+
+
+ 12
+ 14
+ 21638
+
+
+ 14
+ 24
+ 15673
+
+
+
+
+
+
+ startLine
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 30305
+
+
+ 2
+ 3
+ 22173
+
+
+ 3
+ 4
+ 17727
+
+
+ 4
+ 6
+ 22004
+
+
+ 6
+ 8
+ 20119
+
+
+ 8
+ 10
+ 18065
+
+
+ 10
+ 14
+ 25015
+
+
+ 14
+ 18
+ 23299
+
+
+ 18
+ 22
+ 24143
+
+
+ 22
+ 26
+ 25297
+
+
+ 26
+ 30
+ 22595
+
+
+ 30
+ 36
+ 20738
+
+
+ 36
+ 42
+ 2110
+
+
+
+
+
+
+ startColumn
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 309
+
+
+ 2
+ 3
+ 196
+
+
+ 3
+ 7
+ 225
+
+
+ 7
+ 12
+ 196
+
+
+ 12
+ 20
+ 225
+
+
+ 21
+ 53
+ 196
+
+
+ 54
+ 74
+ 196
+
+
+ 78
+ 92
+ 196
+
+
+ 92
+ 134
+ 196
+
+
+ 134
+ 228
+ 196
+
+
+ 228
+ 2062
+ 196
+
+
+ 3248
+ 40806
+ 196
+
+
+ 53241
+ 53242
+ 28
+
+
+
+
+
+
+ startColumn
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 393
+
+
+ 2
+ 3
+ 140
+
+
+ 3
+ 5
+ 225
+
+
+ 5
+ 8
+ 225
+
+
+ 8
+ 13
+ 196
+
+
+ 13
+ 18
+ 196
+
+
+ 18
+ 22
+ 196
+
+
+ 22
+ 24
+ 196
+
+
+ 24
+ 29
+ 196
+
+
+ 33
+ 42
+ 196
+
+
+ 47
+ 110
+ 196
+
+
+ 116
+ 148
+ 196
+
+
+
+
+
+
+ startColumn
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 309
+
+
+ 2
+ 3
+ 196
+
+
+ 3
+ 7
+ 225
+
+
+ 7
+ 12
+ 196
+
+
+ 12
+ 20
+ 225
+
+
+ 21
+ 53
+ 196
+
+
+ 54
+ 74
+ 196
+
+
+ 77
+ 88
+ 196
+
+
+ 90
+ 131
+ 196
+
+
+ 134
+ 224
+ 196
+
+
+ 226
+ 1699
+ 196
+
+
+ 2432
+ 7900
+ 196
+
+
+ 8302
+ 8303
+ 28
+
+
+
+
+
+
+ startColumn
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 309
+
+
+ 2
+ 3
+ 196
+
+
+ 3
+ 7
+ 225
+
+
+ 7
+ 12
+ 196
+
+
+ 12
+ 20
+ 225
+
+
+ 21
+ 53
+ 196
+
+
+ 54
+ 74
+ 196
+
+
+ 77
+ 88
+ 196
+
+
+ 90
+ 130
+ 196
+
+
+ 134
+ 221
+ 196
+
+
+ 226
+ 1414
+ 196
+
+
+ 2291
+ 7741
+ 196
+
+
+ 8096
+ 8097
+ 28
+
+
+
+
+
+
+ startColumn
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 393
+
+
+ 2
+ 3
+ 196
+
+
+ 3
+ 4
+ 112
+
+
+ 4
+ 5
+ 225
+
+
+ 5
+ 8
+ 225
+
+
+ 8
+ 11
+ 196
+
+
+ 11
+ 15
+ 225
+
+
+ 15
+ 19
+ 196
+
+
+ 19
+ 26
+ 196
+
+
+ 28
+ 35
+ 196
+
+
+ 41
+ 69
+ 196
+
+
+ 70
+ 104
+ 196
+
+
+
+
+
+
+ endLine
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 23833
+
+
+ 2
+ 3
+ 19725
+
+
+ 3
+ 4
+ 15729
+
+
+ 4
+ 6
+ 21357
+
+
+ 6
+ 8
+ 17108
+
+
+ 8
+ 11
+ 21160
+
+
+ 11
+ 15
+ 20063
+
+
+ 15
+ 21
+ 22004
+
+
+ 21
+ 27
+ 21132
+
+
+ 27
+ 34
+ 20428
+
+
+ 34
+ 42
+ 21610
+
+
+ 42
+ 51
+ 19978
+
+
+ 51
+ 68
+ 20316
+
+
+ 68
+ 130
+ 1294
+
+
+
+
+
+
+ endLine
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 34160
+
+
+ 2
+ 3
+ 22089
+
+
+ 3
+ 4
+ 17474
+
+
+ 4
+ 6
+ 21441
+
+
+ 6
+ 8
+ 20541
+
+
+ 8
+ 11
+ 21751
+
+
+ 11
+ 16
+ 23861
+
+
+ 16
+ 20
+ 19978
+
+
+ 20
+ 26
+ 23496
+
+
+ 26
+ 32
+ 22286
+
+
+ 32
+ 39
+ 20513
+
+
+ 39
+ 58
+ 18149
+
+
+
+
+
+
+ endLine
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 44459
+
+
+ 2
+ 3
+ 32500
+
+
+ 3
+ 4
+ 25268
+
+
+ 4
+ 5
+ 20851
+
+
+ 5
+ 6
+ 18909
+
+
+ 6
+ 7
+ 15898
+
+
+ 7
+ 8
+ 16292
+
+
+ 8
+ 9
+ 14969
+
+
+ 9
+ 10
+ 13956
+
+
+ 10
+ 12
+ 24509
+
+
+ 12
+ 15
+ 24255
+
+
+ 15
+ 100
+ 13872
+
+
+
+
+
+
+ endLine
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 34160
+
+
+ 2
+ 3
+ 27913
+
+
+ 3
+ 4
+ 23045
+
+
+ 4
+ 5
+ 24396
+
+
+ 5
+ 6
+ 25409
+
+
+ 6
+ 7
+ 28026
+
+
+ 7
+ 8
+ 30699
+
+
+ 8
+ 9
+ 25662
+
+
+ 9
+ 10
+ 17671
+
+
+ 10
+ 12
+ 20513
+
+
+ 12
+ 18
+ 8244
+
+
+
+
+
+
+ endLine
+ endColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 33823
+
+
+ 2
+ 3
+ 22764
+
+
+ 3
+ 4
+ 17164
+
+
+ 4
+ 6
+ 24396
+
+
+ 6
+ 8
+ 20991
+
+
+ 8
+ 10
+ 17530
+
+
+ 10
+ 13
+ 19753
+
+
+ 13
+ 16
+ 20569
+
+
+ 16
+ 19
+ 20119
+
+
+ 19
+ 22
+ 19022
+
+
+ 22
+ 26
+ 23749
+
+
+ 26
+ 31
+ 21019
+
+
+ 31
+ 39
+ 4839
+
+
+
+
+
+
+ endColumn
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 253
+
+
+ 2
+ 4
+ 253
+
+
+ 4
+ 7
+ 225
+
+
+ 7
+ 16
+ 253
+
+
+ 23
+ 131
+ 253
+
+
+ 149
+ 388
+ 253
+
+
+ 392
+ 675
+ 253
+
+
+ 710
+ 1137
+ 253
+
+
+ 1139
+ 1672
+ 253
+
+
+ 1883
+ 2794
+ 253
+
+
+ 2937
+ 4095
+ 253
+
+
+ 4146
+ 4771
+ 253
+
+
+ 5032
+ 15404
+ 225
+
+
+
+
+
+
+ endColumn
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 281
+
+
+ 2
+ 3
+ 253
+
+
+ 3
+ 6
+ 253
+
+
+ 6
+ 21
+ 253
+
+
+ 31
+ 67
+ 253
+
+
+ 68
+ 93
+ 253
+
+
+ 94
+ 106
+ 253
+
+
+ 107
+ 112
+ 253
+
+
+ 112
+ 118
+ 253
+
+
+ 118
+ 122
+ 196
+
+
+ 122
+ 123
+ 140
+
+
+ 123
+ 124
+ 225
+
+
+ 124
+ 127
+ 253
+
+
+ 127
+ 147
+ 112
+
+
+
+
+
+
+ endColumn
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 253
+
+
+ 2
+ 4
+ 253
+
+
+ 4
+ 7
+ 225
+
+
+ 7
+ 15
+ 253
+
+
+ 22
+ 129
+ 253
+
+
+ 143
+ 374
+ 253
+
+
+ 379
+ 646
+ 253
+
+
+ 666
+ 963
+ 253
+
+
+ 1000
+ 1430
+ 253
+
+
+ 1586
+ 2172
+ 253
+
+
+ 2265
+ 2916
+ 253
+
+
+ 2948
+ 3215
+ 253
+
+
+ 3417
+ 5821
+ 225
+
+
+
+
+
+
+ endColumn
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 281
+
+
+ 2
+ 3
+ 225
+
+
+ 3
+ 5
+ 281
+
+
+ 5
+ 8
+ 253
+
+
+ 8
+ 12
+ 253
+
+
+ 12
+ 14
+ 168
+
+
+ 14
+ 16
+ 253
+
+
+ 16
+ 19
+ 168
+
+
+ 19
+ 21
+ 225
+
+
+ 21
+ 23
+ 253
+
+
+ 23
+ 25
+ 253
+
+
+ 25
+ 28
+ 253
+
+
+ 28
+ 33
+ 281
+
+
+ 45
+ 57
+ 84
+
+
+
+
+
+
+ endColumn
+ endLine
+
+
+ 12
+
+
+ 1
+ 2
+ 281
+
+
+ 2
+ 4
+ 225
+
+
+ 4
+ 7
+ 281
+
+
+ 7
+ 27
+ 253
+
+
+ 42
+ 130
+ 253
+
+
+ 139
+ 325
+ 253
+
+
+ 364
+ 584
+ 253
+
+
+ 610
+ 967
+ 253
+
+
+ 1056
+ 1409
+ 253
+
+
+ 1420
+ 2038
+ 253
+
+
+ 2065
+ 2627
+ 253
+
+
+ 2651
+ 3073
+ 253
+
+
+ 3086
+ 4516
+ 168
+
+
+
+
+
+
+
+
+ locations_expr
+ 18007923
+
+
+ id
+ 18007923
+
+
+ container
+ 6359
+
+
+ startLine
+ 262734
+
+
+ startColumn
+ 3376
+
+
+ endLine
+ 262706
+
+
+ endColumn
+ 3826
+
+
+
+
+ id
+ container
+
+
+ 12
+
+
+ 1
+ 2
+ 18007923
+
+
+
+
+
+
+ id
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 18007923
+
+
+
+
+
+
+ id
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 18007923
@@ -3572,7 +8635,7 @@
1
2
- 46965948
+ 18007923
@@ -3588,172 +8651,415 @@
1
2
- 46965948
+ 18007923
+
+
+
+
+
+
+ container
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 562
+
+
+ 2
+ 6
+ 478
+
+
+ 6
+ 11
+ 478
+
+
+ 12
+ 26
+ 506
+
+
+ 27
+ 87
+ 478
+
+
+ 95
+ 514
+ 478
+
+
+ 525
+ 1401
+ 478
+
+
+ 1526
+ 2343
+ 478
+
+
+ 2404
+ 3615
+ 478
+
+
+ 3668
+ 5162
+ 478
+
+
+ 5341
+ 7345
+ 478
+
+
+ 7399
+ 9307
+ 478
+
+
+ 9382
+ 16759
+ 478
+
+
+ 18811
+ 18812
+ 28
+
+
+
+
+
+
+ container
+ startLine
+
+
+ 12
+
+
+ 1
+ 2
+ 675
+
+
+ 2
+ 4
+ 478
+
+
+ 4
+ 10
+ 534
+
+
+ 10
+ 20
+ 506
+
+
+ 20
+ 66
+ 478
+
+
+ 67
+ 162
+ 478
+
+
+ 166
+ 362
+ 478
+
+
+ 376
+ 591
+ 478
+
+
+ 593
+ 929
+ 478
+
+
+ 960
+ 1269
+ 478
+
+
+ 1291
+ 1782
+ 478
+
+
+ 1851
+ 2492
+ 478
+
+
+ 2594
+ 4241
+ 337
+
+
+
+
+
+
+ container
+ startColumn
+
+
+ 12
+
+
+ 1
+ 2
+ 675
+
+
+ 2
+ 4
+ 506
+
+
+ 4
+ 7
+ 534
+
+
+ 7
+ 16
+ 478
+
+
+ 16
+ 34
+ 506
+
+
+ 36
+ 59
+ 478
+
+
+ 59
+ 66
+ 506
+
+
+ 66
+ 68
+ 365
+
+
+ 68
+ 69
+ 281
+
+
+ 69
+ 70
+ 422
+
+
+ 70
+ 71
+ 253
+
+
+ 71
+ 72
+ 422
+
+
+ 72
+ 74
+ 365
+
+
+ 74
+ 92
+ 506
+
+
+ 94
+ 109
+ 56
- file
- id
+ container
+ endLine
12
1
- 15
- 3121
-
-
- 15
- 41
- 3121
+ 2
+ 675
- 42
- 72
- 3121
+ 2
+ 4
+ 478
- 72
- 114
- 3371
+ 4
+ 10
+ 534
- 114
- 142
- 3121
+ 10
+ 20
+ 506
- 143
- 211
- 3121
+ 20
+ 68
+ 478
- 213
- 307
- 3121
+ 68
+ 163
+ 478
- 310
- 430
- 3121
+ 166
+ 362
+ 478
- 437
- 596
- 3121
+ 376
+ 592
+ 478
- 607
- 827
- 3121
+ 593
+ 931
+ 478
- 839
- 1298
- 3121
+ 960
+ 1273
+ 478
- 1300
- 2722
- 3121
+ 1292
+ 1786
+ 478
- 3114
- 30788
- 3121
+ 1855
+ 2501
+ 478
- 57880
- 57881
- 124
+ 2593
+ 4416
+ 337
- file
- beginLine
+ container
+ endColumn
12
1
- 13
- 3371
+ 2
+ 619
- 13
- 31
- 3371
+ 2
+ 4
+ 478
- 31
- 47
- 3121
+ 4
+ 7
+ 506
- 47
- 64
- 3121
+ 7
+ 15
+ 478
- 64
- 84
- 3121
+ 15
+ 36
+ 478
- 85
- 115
- 3121
+ 36
+ 62
+ 478
- 116
- 160
- 3246
+ 62
+ 71
+ 534
- 160
- 206
- 3121
+ 71
+ 73
+ 281
- 206
- 291
- 3121
+ 73
+ 75
+ 450
- 298
- 388
- 3121
+ 75
+ 76
+ 168
- 395
- 527
- 3121
+ 76
+ 77
+ 562
+
+
+ 77
+ 79
+ 478
- 561
- 1339
- 3121
+ 79
+ 84
+ 478
- 1375
- 57764
- 2871
+ 84
+ 116
+ 365
- file
- beginColumn
+ startLine
+ id
12
@@ -3761,227 +9067,217 @@
1
5
- 3745
+ 22061
5
9
- 3121
+ 22567
9
15
- 3246
+ 21948
15
- 20
- 3246
+ 23
+ 20682
- 20
- 28
- 3246
+ 23
+ 32
+ 20738
- 28
- 36
- 3246
+ 32
+ 44
+ 20541
- 36
- 42
- 3121
+ 44
+ 60
+ 20203
- 42
- 53
- 3371
+ 60
+ 80
+ 20344
- 53
- 62
- 3246
+ 80
+ 103
+ 20006
- 62
- 81
- 3121
+ 103
+ 130
+ 20147
- 81
- 95
- 3121
+ 130
+ 159
+ 19950
- 95
- 111
- 3121
+ 159
+ 194
+ 20006
- 112
- 156
- 1997
+ 194
+ 297
+ 13534
- file
- endLine
+ startLine
+ container
12
1
- 13
- 3371
-
-
- 13
- 31
- 3371
+ 2
+ 32191
- 31
- 46
- 3121
+ 2
+ 3
+ 21385
- 46
- 63
- 3121
+ 3
+ 4
+ 15532
- 63
- 84
- 3121
+ 4
+ 6
+ 22398
- 84
- 114
- 3121
+ 6
+ 8
+ 18656
- 118
- 160
- 3246
+ 8
+ 11
+ 22483
- 160
- 206
- 3121
+ 11
+ 16
+ 23749
- 207
- 291
- 3121
+ 16
+ 21
+ 22567
- 300
- 390
- 3121
+ 21
+ 28
+ 22736
- 395
- 562
- 3121
+ 28
+ 35
+ 21695
- 564
- 1350
- 3121
+ 35
+ 43
+ 21835
- 1420
- 57764
- 2871
+ 43
+ 61
+ 17502
- file
- endColumn
+ startLine
+ startColumn
12
1
- 12
- 3371
-
-
- 13
- 26
- 3496
+ 4
+ 21864
- 26
- 34
- 3246
+ 4
+ 7
+ 24002
- 34
- 42
- 3246
+ 7
+ 11
+ 22848
- 42
- 50
- 3246
+ 11
+ 16
+ 23833
- 50
- 61
- 3121
+ 16
+ 21
+ 23974
- 61
- 67
- 3246
+ 21
+ 26
+ 20625
- 67
- 76
- 3496
+ 26
+ 31
+ 22145
- 76
- 88
- 3246
+ 31
+ 36
+ 24171
- 89
- 102
- 3121
+ 36
+ 40
+ 21526
- 102
- 116
- 3496
+ 40
+ 44
+ 22680
- 116
- 133
- 3121
+ 44
+ 49
+ 22820
- 136
- 363
- 1498
+ 49
+ 63
+ 12240
- beginLine
- id
+ startLine
+ endLine
12
@@ -3989,133 +9285,111 @@
1
2
- 4961954
+ 139344
2
3
- 779773
+ 61286
3
4
- 544405
+ 37790
4
- 12
- 570876
-
-
- 12
- 97
- 563134
+ 6
+ 20035
- 97
- 637
- 87279
+ 6
+ 23
+ 4277
- beginLine
- file
+ startLine
+ endColumn
12
1
- 2
- 5024012
+ 4
+ 23214
- 2
- 3
- 1222414
+ 4
+ 7
+ 22792
- 3
- 6
- 640550
+ 7
+ 11
+ 22483
- 6
- 57
- 563509
+ 11
+ 16
+ 22201
- 57
- 329
- 56937
+ 16
+ 21
+ 22511
-
-
-
-
-
- beginLine
- beginColumn
-
-
- 12
-
- 1
- 2
- 5646457
+ 21
+ 27
+ 22933
- 2
- 3
- 483596
+ 27
+ 33
+ 22539
- 3
- 7
- 582613
+ 33
+ 38
+ 19809
- 7
- 25
- 566256
+ 38
+ 43
+ 21357
- 25
- 94
- 228500
+ 43
+ 47
+ 20006
-
-
-
-
-
- beginLine
- endLine
-
-
- 12
-
- 1
- 2
- 7041183
+ 47
+ 52
+ 23102
- 2
- 85
- 466240
+ 52
+ 66
+ 19725
+
+
+ 68
+ 69
+ 56
- beginLine
- endColumn
+ startColumn
+ id
12
@@ -4123,40 +9397,75 @@
1
2
- 5031004
+ 422
2
- 3
- 740066
-
-
- 3
4
- 540284
+ 253
4
- 12
- 587483
+ 8
+ 281
- 12
- 72
- 565257
+ 8
+ 26
+ 281
- 72
- 250
- 43327
+ 43
+ 253
+ 253
+
+
+ 278
+ 844
+ 253
+
+
+ 949
+ 1891
+ 253
+
+
+ 2093
+ 4169
+ 253
+
+
+ 4251
+ 7004
+ 253
+
+
+ 7173
+ 11370
+ 253
+
+
+ 12331
+ 15107
+ 253
+
+
+ 15374
+ 30162
+ 253
+
+
+ 30211
+ 49563
+ 112
- beginColumn
- id
+ startColumn
+ container
12
@@ -4164,75 +9473,75 @@
1
2
- 1748
+ 450
2
- 6
- 1997
+ 3
+ 168
- 6
- 12
- 1872
+ 3
+ 4
+ 196
- 12
- 40
- 1748
+ 4
+ 6
+ 253
- 49
- 128
- 1748
+ 7
+ 32
+ 253
- 129
- 253
- 1748
+ 43
+ 99
+ 253
- 316
- 707
- 1748
+ 101
+ 121
+ 253
- 791
- 1267
- 1748
+ 121
+ 130
+ 253
- 1281
- 1943
- 1748
+ 130
+ 138
+ 253
- 2017
- 2398
- 1748
+ 138
+ 142
+ 281
- 2491
- 3203
- 1748
+ 142
+ 144
+ 225
- 3252
- 7915
- 1748
+ 144
+ 150
+ 281
- 10983
- 121029
- 624
+ 151
+ 158
+ 253
- beginColumn
- file
+ startColumn
+ startLine
12
@@ -4240,75 +9549,75 @@
1
2
- 1997
+ 422
2
4
- 1748
+ 253
4
7
- 1748
+ 253
7
- 18
- 1872
+ 19
+ 253
- 19
- 43
- 1748
+ 20
+ 152
+ 253
- 44
- 60
- 1748
+ 199
+ 588
+ 253
- 66
- 93
- 1748
+ 633
+ 1287
+ 253
- 96
- 117
- 1748
+ 1365
+ 2343
+ 253
- 117
- 150
- 1748
+ 2576
+ 3504
+ 253
- 150
- 169
- 1748
+ 3522
+ 4709
+ 253
- 169
- 181
- 1748
+ 4736
+ 5298
+ 253
- 182
- 217
- 1872
+ 5332
+ 5999
+ 253
- 243
- 329
- 499
+ 6157
+ 6996
+ 168
- beginColumn
- beginLine
+ startColumn
+ endLine
12
@@ -4316,75 +9625,75 @@
1
2
- 1872
+ 422
2
- 5
- 1872
+ 4
+ 253
- 5
- 11
- 1748
+ 4
+ 7
+ 253
- 11
- 36
- 1748
+ 7
+ 19
+ 253
- 36
- 101
- 1748
+ 20
+ 152
+ 253
- 108
- 217
- 1748
+ 199
+ 588
+ 253
- 226
- 543
- 1748
+ 648
+ 1289
+ 253
- 633
- 1057
- 1748
+ 1365
+ 2347
+ 253
- 1072
- 1409
- 1748
+ 2579
+ 3510
+ 253
- 1416
- 1614
- 1748
+ 3529
+ 4710
+ 253
- 1615
- 1810
- 1748
+ 4739
+ 5323
+ 253
- 1826
- 3777
- 1748
+ 5346
+ 6023
+ 253
- 3834
- 59554
- 749
+ 6201
+ 7039
+ 168
- beginColumn
- endLine
+ startColumn
+ endColumn
12
@@ -4392,143 +9701,143 @@
1
2
- 1872
+ 450
2
- 5
- 1872
+ 3
+ 168
- 5
- 11
- 1748
+ 3
+ 5
+ 253
- 11
- 36
- 1748
+ 5
+ 9
+ 253
- 36
- 102
- 1748
+ 9
+ 13
+ 253
- 109
- 218
- 1748
+ 13
+ 20
+ 253
- 225
- 545
- 1748
+ 20
+ 30
+ 253
-
- 631
- 1055
- 1748
+
+ 30
+ 42
+ 253
- 1074
- 1407
- 1748
+ 44
+ 60
+ 281
- 1425
- 1611
- 1748
+ 60
+ 69
+ 253
- 1614
- 1807
- 1748
+ 69
+ 74
+ 253
- 1827
- 3760
- 1748
+ 74
+ 84
+ 309
- 3827
- 59562
- 749
+ 84
+ 96
+ 140
- beginColumn
- endColumn
+ endLine
+ id
12
1
- 2
- 2122
-
-
- 2
5
- 1498
+ 22089
5
- 8
- 1623
+ 9
+ 22567
- 8
- 13
- 1748
+ 9
+ 15
+ 21638
- 13
+ 15
23
- 1997
+ 20654
23
- 33
- 1872
+ 32
+ 21413
- 34
+ 32
44
- 1748
+ 20175
- 45
- 57
- 1748
+ 44
+ 60
+ 19838
- 58
- 74
- 1997
+ 60
+ 80
+ 20935
- 77
- 86
- 1872
+ 80
+ 103
+ 19866
- 86
- 98
- 1748
+ 103
+ 130
+ 20063
- 98
- 160
- 1748
+ 130
+ 159
+ 20006
- 258
- 299
- 249
+ 159
+ 193
+ 19725
+
+
+ 193
+ 296
+ 13731
@@ -4536,7 +9845,7 @@
endLine
- id
+ container
12
@@ -4544,89 +9853,67 @@
1
2
- 4959832
+ 32191
2
3
- 782270
+ 21301
3
4
- 545279
+ 15532
4
- 12
- 568379
+ 6
+ 21976
- 12
- 96
- 564758
+ 6
+ 8
+ 18459
- 96
- 620
- 88028
+ 8
+ 11
+ 22567
-
-
-
-
-
- endLine
- file
-
-
- 12
-
- 1
- 2
- 5021140
+ 11
+ 15
+ 19838
- 2
- 3
- 1224912
+ 15
+ 20
+ 22877
- 3
- 6
- 633932
+ 20
+ 26
+ 20513
- 6
- 52
- 564633
+ 26
+ 33
+ 21976
- 52
- 329
- 63930
+ 33
+ 40
+ 19950
-
-
-
-
-
- endLine
- beginLine
-
-
- 12
-
- 1
- 2
- 7057915
+ 40
+ 49
+ 20091
- 2
- 18
- 450632
+ 49
+ 61
+ 5430
@@ -4634,7 +9921,7 @@
endLine
- beginColumn
+ startLine
12
@@ -4642,27 +9929,27 @@
1
2
- 5645583
+ 130621
2
3
- 480974
+ 68406
3
- 7
- 587608
+ 4
+ 40267
- 7
- 25
- 569752
+ 4
+ 6
+ 21441
- 25
- 89
- 224629
+ 6
+ 11
+ 1969
@@ -4670,101 +9957,141 @@
endLine
- endColumn
+ startColumn
12
1
- 2
- 5029631
+ 4
+ 21667
- 2
- 3
- 744436
+ 4
+ 7
+ 23890
- 3
- 4
- 540035
+ 7
+ 11
+ 22567
- 4
- 12
- 588107
+ 11
+ 16
+ 23749
- 12
- 72
- 563509
+ 16
+ 21
+ 23693
- 72
- 250
- 42828
+ 21
+ 26
+ 20738
+
+
+ 26
+ 31
+ 22342
+
+
+ 31
+ 36
+ 24143
+
+
+ 36
+ 40
+ 20935
+
+
+ 40
+ 44
+ 22651
+
+
+ 44
+ 49
+ 23214
+
+
+ 49
+ 63
+ 13112
- endColumn
- id
+ endLine
+ endColumn
12
1
- 2
- 15732
-
-
- 2
- 3
- 5618
+ 4
+ 23524
- 3
+ 4
7
- 4245
+ 22989
7
- 17
- 4120
+ 11
+ 22483
- 17
- 33
- 4120
+ 11
+ 16
+ 23102
- 33
- 106
- 4120
+ 16
+ 21
+ 21920
- 114
- 689
- 4120
+ 21
+ 26
+ 19866
- 721
- 2458
- 4120
+ 26
+ 32
+ 22117
- 2593
- 4731
- 4120
+ 32
+ 38
+ 23946
+
+
+ 38
+ 43
+ 22173
+
+
+ 43
+ 47
+ 19838
+
+
+ 47
+ 52
+ 22820
- 4759
- 33780
- 3121
+ 52
+ 69
+ 17924
@@ -4772,7 +10099,7 @@
endColumn
- file
+ id
12
@@ -4780,52 +10107,67 @@
1
2
- 18604
+ 309
2
- 3
- 5618
-
-
- 3
- 5
- 3621
+ 4
+ 309
- 5
- 7
- 3745
+ 4
+ 10
+ 281
- 7
+ 10
16
- 4370
+ 337
16
- 80
- 4120
+ 51
+ 309
- 81
- 152
- 4245
+ 56
+ 618
+ 309
- 158
- 212
- 4245
+ 841
+ 2290
+ 309
- 212
- 265
- 4120
+ 2328
+ 4142
+ 309
- 265
- 329
- 749
+ 4177
+ 7140
+ 309
+
+
+ 8235
+ 11725
+ 309
+
+
+ 12344
+ 15458
+ 309
+
+
+ 15684
+ 18219
+ 309
+
+
+ 18696
+ 19124
+ 112
@@ -4833,7 +10175,7 @@
endColumn
- beginLine
+ container
12
@@ -4841,52 +10183,67 @@
1
2
- 15982
+ 450
2
- 3
- 5993
+ 4
+ 281
- 3
- 8
- 4245
+ 4
+ 6
+ 281
- 8
- 18
- 4370
+ 6
+ 12
+ 309
- 18
- 42
- 4120
+ 12
+ 41
+ 309
- 43
- 218
- 4120
+ 50
+ 114
+ 309
- 235
- 759
- 4120
+ 115
+ 128
+ 309
+
+
+ 128
+ 137
+ 281
+
+
+ 137
+ 142
+ 337
+
+
+ 142
+ 146
+ 281
- 768
- 2177
- 4120
+ 146
+ 148
+ 281
- 2209
- 2884
- 4120
+ 148
+ 152
+ 309
- 2885
- 30763
- 2247
+ 152
+ 163
+ 84
@@ -4894,7 +10251,7 @@
endColumn
- beginColumn
+ startLine
12
@@ -4902,52 +10259,67 @@
1
2
- 17231
+ 422
2
- 3
- 6243
-
-
- 3
4
- 3246
+ 225
4
- 7
- 4245
+ 8
+ 337
- 7
- 14
- 4245
+ 8
+ 15
+ 309
- 14
- 28
- 4120
+ 18
+ 54
+ 309
- 28
- 45
- 4245
+ 74
+ 489
+ 309
- 45
- 69
- 4120
+ 511
+ 1338
+ 309
- 69
- 81
- 4245
+ 1390
+ 2420
+ 309
- 81
- 117
- 1498
+ 2767
+ 3740
+ 309
+
+
+ 3802
+ 4530
+ 309
+
+
+ 4643
+ 5303
+ 309
+
+
+ 5379
+ 5736
+ 309
+
+
+ 5747
+ 5806
+ 56
@@ -4955,7 +10327,7 @@
endColumn
- endLine
+ startColumn
12
@@ -4963,124 +10335,70 @@
1
2
- 15982
+ 365
2
- 3
- 5993
+ 4
+ 281
- 3
- 8
- 4245
+ 4
+ 9
+ 337
- 8
- 18
- 4370
+ 9
+ 14
+ 337
- 18
- 41
- 4120
+ 14
+ 22
+ 337
- 43
- 217
- 4120
+ 23
+ 28
+ 309
- 233
- 756
- 4120
+ 28
+ 36
+ 309
- 768
- 2177
- 4120
+ 36
+ 41
+ 309
- 2208
- 2858
- 4120
+ 41
+ 47
+ 309
- 2868
- 30757
- 2247
+ 47
+ 56
+ 309
-
-
-
-
-
-
-
- files
- 65232
-
-
- id
- 65232
-
-
- name
- 65232
-
-
-
-
- id
- name
-
-
- 12
-
- 1
- 2
- 65232
+ 56
+ 64
+ 309
-
-
-
-
-
- name
- id
-
-
- 12
-
- 1
- 2
- 65232
+ 64
+ 72
+ 309
-
-
-
- folders
- 12393
-
-
- id
- 12393
-
-
- name
- 12393
-
-
-
- id
- name
+ endColumn
+ endLine
12
@@ -5088,106 +10406,67 @@
1
2
- 12393
+ 422
-
-
-
-
-
- name
- id
-
-
- 12
-
- 1
- 2
- 12393
+ 2
+ 4
+ 225
-
-
-
-
-
-
-
- containerparent
- 77604
-
-
- parent
- 12393
-
-
- child
- 77604
-
-
-
-
- parent
- child
-
-
- 12
-
- 1
- 2
- 6032
+ 4
+ 8
+ 337
- 2
- 3
- 1521
+ 8
+ 15
+ 309
- 3
- 4
- 665
+ 17
+ 54
+ 309
- 4
- 6
- 1003
+ 74
+ 471
+ 309
- 6
- 10
- 972
+ 500
+ 1307
+ 309
- 10
- 16
- 1003
+ 1356
+ 2389
+ 309
- 16
- 44
- 929
+ 2629
+ 3660
+ 309
- 44
- 151
- 264
+ 3731
+ 4490
+ 309
-
-
-
-
-
- child
- parent
-
-
- 12
-
- 1
- 2
- 77604
+ 4640
+ 5281
+ 309
+
+
+ 5368
+ 5729
+ 309
+
+
+ 5734
+ 5796
+ 56
@@ -5197,23 +10476,23 @@
numlines
- 808616
+ 808529
element_id
- 807492
+ 807405
num_lines
- 39456
+ 39477
num_code
- 34087
+ 33980
num_comment
- 18230
+ 18364
@@ -5227,12 +10506,12 @@
1
2
- 806369
+ 806280
2
3
- 1123
+ 1124
@@ -5248,12 +10527,12 @@
1
2
- 806369
+ 806280
2
3
- 1123
+ 1124
@@ -5269,7 +10548,7 @@
1
2
- 807243
+ 807155
2
@@ -5290,27 +10569,27 @@
1
2
- 26720
+ 26734
2
3
- 3745
+ 3747
3
5
- 3371
+ 3373
5
- 35
- 2996
+ 37
+ 3123
- 39
- 1983
- 2622
+ 41
+ 1978
+ 2498
@@ -5326,27 +10605,27 @@
1
2
- 27220
+ 27234
2
3
- 4120
+ 4122
3
4
- 2497
+ 2498
4
7
- 3496
+ 3497
7
12
- 2122
+ 2123
@@ -5362,27 +10641,27 @@
1
2
- 26845
+ 26859
2
3
- 4120
+ 4122
3
4
- 2372
+ 2498
4
6
- 3246
+ 3123
6
- 10
- 2871
+ 11
+ 2873
@@ -5398,31 +10677,31 @@
1
2
- 21851
+ 21612
2
3
- 3621
+ 3747
3
4
- 2372
+ 2373
4
13
- 2871
+ 2873
14
- 198
- 2622
+ 197
+ 2623
- 204
- 2092
+ 205
+ 2101
749
@@ -5439,32 +10718,32 @@
1
2
- 22225
+ 21987
2
3
- 3621
+ 3747
3
4
- 2122
+ 2123
4
6
- 1872
+ 1873
6
9
- 2746
+ 2748
9
13
- 1498
+ 1499
@@ -5480,27 +10759,27 @@
1
2
- 21975
+ 21737
2
3
- 4245
+ 4372
3
5
- 2871
+ 2873
5
8
- 3121
+ 3123
8
12
- 1872
+ 1873
@@ -5516,32 +10795,32 @@
1
2
- 11112
+ 11368
2
3
- 2122
+ 1748
3
4
- 1123
+ 1499
4
7
- 1498
+ 1374
8
- 21
- 1373
+ 22
+ 1499
- 21
- 3651
- 998
+ 42
+ 3650
+ 874
@@ -5557,32 +10836,32 @@
1
2
- 11112
+ 11368
2
3
- 2122
+ 1748
3
4
- 1123
+ 1499
4
7
- 1623
+ 1499
8
- 21
- 1373
+ 27
+ 1499
- 26
+ 30
48
- 874
+ 749
@@ -5598,32 +10877,32 @@
1
2
- 11112
+ 11368
2
3
- 2122
+ 1748
3
4
- 1373
+ 1748
4
- 7
- 1373
+ 9
+ 1499
- 7
- 21
- 1373
+ 10
+ 36
+ 1624
- 23
- 42
- 874
+ 36
+ 43
+ 374
@@ -5633,11 +10912,11 @@
diagnostics
- 1483
+ 1484
id
- 1483
+ 1484
severity
@@ -5645,7 +10924,7 @@
error_tag
- 42
+ 43
error_message
@@ -5671,7 +10950,7 @@
1
2
- 1483
+ 1484
@@ -5687,7 +10966,7 @@
1
2
- 1483
+ 1484
@@ -5703,7 +10982,7 @@
1
2
- 1483
+ 1484
@@ -5719,7 +10998,7 @@
1
2
- 1483
+ 1484
@@ -5735,7 +11014,7 @@
1
2
- 1483
+ 1484
@@ -5852,7 +11131,7 @@
1
2
- 42
+ 43
@@ -5931,7 +11210,7 @@
1
2
- 128
+ 129
63
@@ -6016,7 +11295,7 @@
1
2
- 128
+ 129
63
@@ -6101,7 +11380,7 @@
3
4
- 42
+ 43
63
@@ -6159,7 +11438,7 @@
3
4
- 42
+ 43
@@ -6180,7 +11459,7 @@
3
4
- 42
+ 43
@@ -6189,22 +11468,22 @@
- extractor_version
- 124
+ files
+ 74641
- codeql_version
- 124
+ id
+ 74641
- frontend_version
- 124
+ name
+ 74641
- codeql_version
- frontend_version
+ id
+ name
12
@@ -6212,15 +11491,15 @@
1
2
- 124
+ 74641
- frontend_version
- codeql_version
+ name
+ id
12
@@ -6228,7 +11507,138 @@
1
2
- 124
+ 74641
+
+
+
+
+
+
+
+
+ folders
+ 14181
+
+
+ id
+ 14181
+
+
+ name
+ 14181
+
+
+
+
+ id
+ name
+
+
+ 12
+
+
+ 1
+ 2
+ 14181
+
+
+
+
+
+
+ name
+ id
+
+
+ 12
+
+
+ 1
+ 2
+ 14181
+
+
+
+
+
+
+
+
+ containerparent
+ 88798
+
+
+ parent
+ 14181
+
+
+ child
+ 88798
+
+
+
+
+ parent
+ child
+
+
+ 12
+
+
+ 1
+ 2
+ 6903
+
+
+ 2
+ 3
+ 1740
+
+
+ 3
+ 4
+ 761
+
+
+ 4
+ 6
+ 1148
+
+
+ 6
+ 10
+ 1112
+
+
+ 10
+ 16
+ 1148
+
+
+ 16
+ 44
+ 1063
+
+
+ 44
+ 151
+ 302
+
+
+
+
+
+
+ child
+ parent
+
+
+ 12
+
+
+ 1
+ 2
+ 88798
@@ -6238,23 +11648,23 @@
fileannotations
- 4201815
+ 4807876
id
- 5768
+ 6600
kind
- 21
+ 24
name
- 58734
+ 67206
value
- 39526
+ 45227
@@ -6268,12 +11678,12 @@
1
2
- 200
+ 229
2
3
- 5568
+ 6371
@@ -6289,62 +11699,62 @@
1
86
- 433
+ 495
88
206
- 433
+ 495
212
291
- 443
+ 507
291
359
- 433
+ 495
362
401
- 433
+ 495
402
479
- 433
+ 495
480
549
- 253
+ 290
550
551
- 1331
+ 1523
553
628
- 433
+ 495
631
753
- 454
+ 519
753
1231
- 443
+ 507
1234
2155
- 243
+ 278
@@ -6360,67 +11770,67 @@
1
98
- 433
+ 495
102
244
- 433
+ 495
244
351
- 433
+ 495
352
434
- 443
+ 507
434
490
- 443
+ 507
490
628
- 433
+ 495
632
702
- 63
+ 72
706
707
- 1331
+ 1523
710
939
- 433
+ 495
939
1038
- 433
+ 495
1066
1853
- 433
+ 495
1853
3292
- 433
+ 495
3423
3742
- 21
+ 24
@@ -6436,12 +11846,12 @@
527
528
- 10
+ 12
546
547
- 10
+ 12
@@ -6457,12 +11867,12 @@
2
3
- 10
+ 12
5557
5558
- 10
+ 12
@@ -6478,12 +11888,12 @@
1
2
- 10
+ 12
3741
3742
- 10
+ 12
@@ -6499,62 +11909,62 @@
1
2
- 11030
+ 12621
2
3
- 4363
+ 4993
3
5
- 5060
+ 5790
5
7
- 4099
+ 4690
7
9
- 4596
+ 5258
9
16
- 4331
+ 4956
16
19
- 4891
+ 5597
19
27
- 4257
+ 4872
27
47
- 4839
+ 5537
47
128
- 4923
+ 5633
128
459
- 4627
+ 5295
459
546
- 1711
+ 1958
@@ -6570,7 +11980,7 @@
1
2
- 58734
+ 67206
@@ -6586,57 +11996,57 @@
1
2
- 11590
+ 13262
2
3
- 7691
+ 8801
3
4
- 4099
+ 4690
4
6
- 4067
+ 4654
6
8
- 3423
+ 3917
8
11
- 4743
+ 5428
11
17
- 5399
+ 6177
17
23
- 4701
+ 5379
23
41
- 4680
+ 5355
41
95
- 4469
+ 5113
95
1726
- 3867
+ 4424
@@ -6652,72 +12062,72 @@
1
2
- 3359
+ 3844
2
4
- 1637
+ 1873
4
5
- 3190
+ 3651
5
8
- 2461
+ 2816
8
14
- 2968
+ 3397
14
17
- 1933
+ 2212
17
24
- 3042
+ 3481
24
51
- 3539
+ 4050
51
58
- 3032
+ 3469
58
80
- 2979
+ 3409
81
151
- 3085
+ 3530
151
334
- 2979
+ 3409
334
473
- 3000
+ 3433
473
547
- 2313
+ 2647
@@ -6733,12 +12143,12 @@
1
2
- 39515
+ 45215
2
3
- 10
+ 12
@@ -6754,72 +12164,72 @@
1
2
- 3402
+ 3892
2
4
- 1912
+ 2188
4
5
- 3053
+ 3493
5
8
- 2482
+ 2841
8
14
- 3486
+ 3989
14
18
- 3454
+ 3953
18
28
- 3201
+ 3663
28
34
- 3148
+ 3602
34
41
- 3201
+ 3663
41
66
- 2990
+ 3421
66
92
- 3074
+ 3518
92
113
- 2990
+ 3421
113
145
- 3032
+ 3469
145
172
- 95
+ 108
@@ -6829,15 +12239,15 @@
inmacroexpansion
- 149996022
+ 149995966
id
- 24670888
+ 24670876
inv
- 3705273
+ 3705264
@@ -6851,7 +12261,7 @@
1
3
- 2209400
+ 2209396
3
@@ -6861,27 +12271,27 @@
5
6
- 1620370
+ 1620369
6
7
- 6582548
+ 6582546
7
8
- 8719004
+ 8719001
8
9
- 3557050
+ 3557049
9
22
- 507535
+ 507534
@@ -6897,7 +12307,7 @@
1
2
- 531662
+ 531654
2
@@ -6957,15 +12367,15 @@
affectedbymacroexpansion
- 48735860
+ 48735844
id
- 7044743
+ 7044741
inv
- 3803123
+ 3803122
@@ -6979,7 +12389,7 @@
1
2
- 3846711
+ 3846709
2
@@ -6989,7 +12399,7 @@
3
4
- 361842
+ 361841
4
@@ -7040,7 +12450,7 @@
9
12
- 342939
+ 342938
12
@@ -7065,7 +12475,7 @@
16
17
- 377678
+ 377677
17
@@ -7095,19 +12505,19 @@
macroinvocations
- 40338485
+ 39390675
id
- 40338485
+ 39390675
macro_id
- 182070
+ 181997
location
- 5912757
+ 5904643
kind
@@ -7125,7 +12535,7 @@
1
2
- 40338485
+ 39390675
@@ -7141,7 +12551,7 @@
1
2
- 40338485
+ 39390675
@@ -7157,7 +12567,7 @@
1
2
- 40338485
+ 39390675
@@ -7173,47 +12583,47 @@
1
2
- 60781
+ 60738
2
3
- 27558
+ 27781
3
4
- 17972
+ 17921
4
5
- 10021
+ 9805
5
7
- 13779
+ 14272
7
13
- 14705
+ 14381
13
33
- 13779
+ 13890
33
- 180
- 13670
+ 185
+ 13672
- 181
- 72144
- 9803
+ 190
+ 70079
+ 9532
@@ -7229,42 +12639,42 @@
1
2
- 77283
+ 77243
2
3
- 30553
+ 30559
3
4
- 14323
+ 14326
4
5
- 10293
+ 10350
5
8
- 14106
+ 14054
8
18
- 14160
+ 14108
18
88
- 13670
+ 13672
- 89
- 12189
- 7679
+ 88
+ 12162
+ 7680
@@ -7280,12 +12690,12 @@
1
2
- 177496
+ 177475
2
3
- 4574
+ 4521
@@ -7301,17 +12711,17 @@
1
2
- 5255929
+ 5248396
2
- 4
- 422363
+ 3
+ 248074
- 4
- 72144
- 234464
+ 3
+ 70079
+ 408172
@@ -7327,12 +12737,12 @@
1
2
- 5890590
+ 5882472
2
37
- 22166
+ 22170
@@ -7348,7 +12758,7 @@
1
2
- 5912757
+ 5904643
@@ -7362,13 +12772,13 @@
12
- 1490
- 1491
+ 1470
+ 1471
54
- 739164
- 739165
+ 721641
+ 721642
54
@@ -7383,13 +12793,13 @@
12
- 282
- 283
+ 281
+ 282
54
- 3145
- 3146
+ 3143
+ 3144
54
@@ -7404,13 +12814,13 @@
12
- 1069
- 1070
+ 1060
+ 1061
54
- 107495
- 107496
+ 107334
+ 107335
54
@@ -7421,15 +12831,15 @@
macroparent
- 33655998
+ 32844710
id
- 33655998
+ 32844710
parent_id
- 15926385
+ 15561449
@@ -7443,7 +12853,7 @@
1
2
- 33655998
+ 32844710
@@ -7459,27 +12869,27 @@
1
2
- 7806501
+ 7669107
2
3
- 1595448
+ 1551198
3
4
- 4702908
+ 4552710
4
5
- 1295464
+ 1263086
5
205
- 526061
+ 525346
@@ -7489,15 +12899,15 @@
macrolocationbind
- 6058841
+ 6883157
id
- 4241799
+ 4222542
location
- 2277063
+ 2746954
@@ -7511,27 +12921,27 @@
1
2
- 3316469
+ 2460116
2
3
- 490781
+ 1326251
3
4
- 7888
+ 8261
4
5
- 413483
+ 413540
5
17
- 13176
+ 14372
@@ -7547,27 +12957,27 @@
1
2
- 1335697
+ 1393959
2
3
- 481667
+ 907138
3
4
- 7802
+ 8735
4
5
- 427799
+ 410829
5
522
- 24096
+ 26291
@@ -7577,19 +12987,19 @@
macro_argument_unexpanded
- 82524830
+ 94276712
invocation
- 26294983
+ 30002299
argument_index
- 697
+ 797
text
- 343373
+ 392900
@@ -7603,22 +13013,22 @@
1
2
- 9687115
+ 11044782
2
3
- 9773574
+ 11156139
3
4
- 5003770
+ 5707682
4
67
- 1830521
+ 2093693
@@ -7634,22 +13044,22 @@
1
2
- 9869806
+ 11253824
2
3
- 9791124
+ 11175326
3
4
- 4847060
+ 5529264
4
67
- 1786991
+ 2043884
@@ -7665,17 +13075,17 @@
46457
46458
- 612
+ 701
46659
- 173253
- 52
+ 173182
+ 60
- 646840
- 2488722
- 31
+ 645295
+ 2481657
+ 36
@@ -7691,17 +13101,17 @@
2
3
- 612
+ 701
13
1115
- 52
+ 60
7702
22873
- 31
+ 36
@@ -7717,57 +13127,57 @@
1
2
- 39716
+ 46351
2
3
- 62347
+ 71401
3
4
- 21036
+ 26476
4
5
- 34591
+ 39714
5
6
- 39261
+ 44779
6
9
- 30883
+ 32714
9
15
- 28992
+ 32847
15
- 26
- 25896
+ 27
+ 29933
- 26
+ 27
57
- 27153
+ 30441
57
517
- 26002
+ 29680
518
- 486610
- 7491
+ 485092
+ 8559
@@ -7783,17 +13193,17 @@
1
2
- 243253
+ 278339
2
3
- 89903
+ 102870
3
9
- 10216
+ 11690
@@ -7803,19 +13213,19 @@
macro_argument_expanded
- 82524830
+ 94276712
invocation
- 26294983
+ 30002299
argument_index
- 697
+ 797
text
- 207995
+ 237996
@@ -7829,22 +13239,22 @@
1
2
- 9687115
+ 11044782
2
3
- 9773574
+ 11156139
3
4
- 5003770
+ 5707682
4
67
- 1830521
+ 2093693
@@ -7860,22 +13270,22 @@
1
2
- 12646684
+ 14421415
2
3
- 8431006
+ 9625327
3
4
- 4226602
+ 4822818
4
9
- 990689
+ 1132737
@@ -7891,17 +13301,17 @@
46457
46458
- 612
+ 701
46659
- 173253
- 52
+ 173182
+ 60
- 646840
- 2488722
- 31
+ 645295
+ 2481657
+ 36
@@ -7917,17 +13327,17 @@
1
2
- 602
+ 689
2
96
- 52
+ 60
950
16176
- 42
+ 48
@@ -7943,57 +13353,57 @@
1
2
- 21839
+ 25243
2
3
- 26868
+ 31324
3
4
- 43509
+ 52203
4
5
- 15911
+ 18400
5
6
- 3264
+ 3542
6
7
- 18405
+ 20842
7
10
- 18975
+ 19355
10
19
- 18331
+ 20576
19
51
- 15785
+ 17856
51
- 252
- 15605
+ 253
+ 17989
- 252
- 1169625
- 9498
+ 254
+ 1166783
+ 10663
@@ -8009,17 +13419,17 @@
1
2
- 105117
+ 120279
2
3
- 88941
+ 101770
3
66
- 13936
+ 15946
@@ -8029,19 +13439,19 @@
functions
- 4053072
+ 4010790
id
- 4053072
+ 4010790
name
- 1694898
+ 1648540
kind
- 998
+ 999
@@ -8055,7 +13465,7 @@
1
2
- 4053072
+ 4010790
@@ -8071,7 +13481,7 @@
1
2
- 4053072
+ 4010790
@@ -8087,17 +13497,17 @@
1
2
- 1448542
+ 1402308
2
4
- 139098
+ 139168
4
3162
- 107257
+ 107062
@@ -8113,12 +13523,12 @@
1
2
- 1692026
+ 1645667
2
3
- 2871
+ 2873
@@ -8152,13 +13562,13 @@
124
- 691
- 692
+ 690
+ 691
124
- 4453
- 4454
+ 4450
+ 4451
124
@@ -8167,8 +13577,8 @@
124
- 21935
- 21936
+ 21584
+ 21585
124
@@ -8218,8 +13628,8 @@
124
- 12674
- 12675
+ 12296
+ 12297
124
@@ -8230,15 +13640,15 @@
function_entry_point
- 1141500
+ 1141046
id
- 1137753
+ 1137298
entry_point
- 1141500
+ 1141046
@@ -8252,12 +13662,12 @@
1
2
- 1134551
+ 1134095
2
17
- 3202
+ 3203
@@ -8273,7 +13683,7 @@
1
2
- 1141500
+ 1141046
@@ -8283,15 +13693,15 @@
function_return_type
- 4070553
+ 4028280
id
- 4053072
+ 4010790
return_type
- 619822
+ 622887
@@ -8305,12 +13715,12 @@
1
2
- 4035591
+ 3993300
2
3
- 17480
+ 17489
@@ -8326,27 +13736,27 @@
1
2
- 310161
+ 312942
2
3
- 213891
+ 213500
3
5
- 48072
+ 48471
5
- 365
- 46574
+ 354
+ 46722
- 432
- 9944
- 1123
+ 358
+ 9897
+ 1249
@@ -8626,59 +14036,59 @@
purefunctions
- 131414
+ 138721
id
- 131414
+ 138721
function_deleted
- 88001
+ 88082
id
- 88001
+ 88082
function_defaulted
- 51631
+ 51679
id
- 51631
+ 51679
function_prototyped
- 4051574
+ 4009291
id
- 4051574
+ 4009291
deduction_guide_for_class
- 5868
+ 5871
id
- 5868
+ 5871
class_template
- 2247
+ 2248
@@ -8692,7 +14102,7 @@
1
2
- 5868
+ 5871
@@ -8708,7 +14118,7 @@
1
2
- 1123
+ 1124
2
@@ -8743,15 +14153,15 @@
member_function_this_type
- 674762
+ 676231
id
- 674762
+ 676231
this_type
- 176182
+ 177646
@@ -8765,7 +14175,7 @@
1
2
- 674762
+ 676231
@@ -8781,37 +14191,37 @@
1
2
- 47198
+ 48721
2
3
- 36959
+ 36853
3
4
- 32714
+ 32855
4
5
- 20103
+ 19988
5
6
- 12860
+ 12867
6
10
- 14484
+ 14491
10
65
- 11862
+ 11868
@@ -8821,27 +14231,27 @@
fun_decls
- 4212773
+ 4155705
id
- 4206779
+ 4149709
function
- 4028474
+ 3986304
type_id
- 611831
+ 614892
name
- 1693400
+ 1647041
location
- 2815799
+ 2769887
@@ -8855,7 +14265,7 @@
1
2
- 4206779
+ 4149709
@@ -8871,12 +14281,12 @@
1
2
- 4200786
+ 4143712
2
3
- 5993
+ 5996
@@ -8892,7 +14302,7 @@
1
2
- 4206779
+ 4149709
@@ -8908,7 +14318,7 @@
1
2
- 4206779
+ 4149709
@@ -8924,12 +14334,12 @@
1
2
- 3864778
+ 3836266
2
- 5
- 163696
+ 4
+ 150037
@@ -8945,12 +14355,12 @@
1
2
- 4009994
+ 3967815
2
3
- 18479
+ 18489
@@ -8966,7 +14376,7 @@
1
2
- 4028474
+ 3986304
@@ -8982,12 +14392,12 @@
1
2
- 3885256
+ 3843012
2
4
- 143218
+ 143291
@@ -9003,27 +14413,27 @@
1
2
- 295427
+ 298201
2
3
- 220758
+ 220371
3
5
- 48447
+ 48846
5
- 364
- 45949
+ 354
+ 46223
- 364
- 10292
- 1248
+ 358
+ 10246
+ 1249
@@ -9039,26 +14449,26 @@
1
2
- 305541
+ 308320
2
3
- 212018
+ 211626
3
5
- 48072
+ 48471
5
- 1163
- 45949
+ 1033
+ 46223
1483
- 9893
+ 9847
249
@@ -9075,22 +14485,22 @@
1
2
- 491962
+ 494587
2
3
- 52942
+ 52719
3
7
- 50195
+ 51095
7
- 2238
- 16731
+ 2211
+ 16490
@@ -9106,22 +14516,22 @@
1
2
- 455377
+ 457983
2
3
- 69549
+ 69459
3
6
- 56063
+ 55842
6
- 4756
- 30841
+ 4728
+ 31606
@@ -9137,22 +14547,22 @@
1
2
- 1332544
+ 1297744
2
3
- 194662
+ 183892
3
- 11
- 129608
+ 10
+ 125551
- 11
+ 10
3169
- 36585
+ 39851
@@ -9168,17 +14578,17 @@
1
2
- 1448043
+ 1401809
2
4
- 139597
+ 139543
4
3162
- 105759
+ 105688
@@ -9194,12 +14604,12 @@
1
2
- 1603498
+ 1556968
2
1596
- 89901
+ 90072
@@ -9215,17 +14625,17 @@
1
2
- 1368505
+ 1322105
2
3
- 208522
+ 208503
3
1592
- 116372
+ 116432
@@ -9241,17 +14651,17 @@
1
2
- 2422478
+ 2390108
2
3
- 251725
+ 237736
3
211
- 141595
+ 142042
@@ -9267,17 +14677,17 @@
1
2
- 2441208
+ 2393856
2
3
- 233494
+ 234488
3
211
- 141095
+ 141542
@@ -9293,12 +14703,12 @@
1
2
- 2701299
+ 2654579
2
211
- 114499
+ 115307
@@ -9314,12 +14724,12 @@
1
2
- 2776592
+ 2730660
2
8
- 39207
+ 39227
@@ -9329,22 +14739,22 @@
fun_def
- 1423570
+ 1413177
id
- 1423570
+ 1413177
fun_specialized
- 7936
+ 8435
id
- 7936
+ 8435
@@ -9362,15 +14772,15 @@
fun_decl_specifiers
- 4283570
+ 4102237
id
- 1749838
+ 1688267
name
- 1373
+ 1374
@@ -9384,22 +14794,22 @@
1
2
- 363228
+ 361539
2
3
- 262463
+ 262472
3
4
- 1101172
+ 1041268
4
5
- 22974
+ 22986
@@ -9433,8 +14843,8 @@
124
- 561
- 562
+ 546
+ 547
124
@@ -9448,23 +14858,23 @@
124
- 1093
- 1094
+ 1089
+ 1090
124
- 8148
- 8149
+ 7668
+ 7669
124
- 11028
- 11029
+ 10543
+ 10544
124
- 11099
- 11100
+ 10614
+ 10615
124
@@ -9596,26 +15006,26 @@
fun_decl_empty_throws
- 420457
+ 437033
fun_decl
- 420457
+ 437033
fun_decl_noexcept
- 141823
+ 141855
fun_decl
- 141823
+ 141855
constant
- 141346
+ 141378
@@ -9629,7 +15039,7 @@
1
2
- 141823
+ 141855
@@ -9645,7 +15055,7 @@
1
2
- 140903
+ 140935
2
@@ -9660,11 +15070,11 @@
fun_decl_empty_noexcept
- 1164727
+ 1163822
fun_decl
- 1164727
+ 1163822
@@ -9769,19 +15179,19 @@
fun_requires
- 29083
+ 29109
id
- 10102
+ 10112
kind
- 42
+ 43
constraint
- 28846
+ 28873
@@ -9795,7 +15205,7 @@
1
2
- 10038
+ 10047
2
@@ -9816,7 +15226,7 @@
1
2
- 7265
+ 7272
2
@@ -9826,7 +15236,7 @@
3
6
- 859
+ 860
6
@@ -9836,7 +15246,7 @@
13
14
- 1139
+ 1140
19
@@ -9899,7 +15309,7 @@
1
2
- 28610
+ 28636
2
@@ -9920,7 +15330,7 @@
1
2
- 28846
+ 28873
@@ -9930,19 +15340,19 @@
param_decl_bind
- 7317007
+ 7189939
id
- 7317007
+ 7189939
index
- 7991
+ 7995
fun_decl
- 3534888
+ 3478100
@@ -9956,7 +15366,7 @@
1
2
- 7317007
+ 7189939
@@ -9972,7 +15382,7 @@
1
2
- 7317007
+ 7189939
@@ -9988,12 +15398,12 @@
2
3
- 3995
+ 3997
6
7
- 1997
+ 1998
16
@@ -10002,17 +15412,17 @@
25
- 147
+ 143
624
- 343
- 16215
+ 332
+ 15841
624
- 28310
- 28311
+ 27841
+ 27842
124
@@ -10029,12 +15439,12 @@
2
3
- 3995
+ 3997
6
7
- 1997
+ 1998
16
@@ -10043,17 +15453,17 @@
25
- 147
+ 143
624
- 343
- 16215
+ 332
+ 15841
624
- 28310
- 28311
+ 27841
+ 27842
124
@@ -10070,27 +15480,27 @@
1
2
- 1510350
+ 1499252
2
3
- 977182
+ 956818
3
4
- 602591
+ 579912
4
5
- 290932
+ 283085
5
65
- 153831
+ 159032
@@ -10106,27 +15516,27 @@
1
2
- 1510350
+ 1499252
2
3
- 977182
+ 956818
3
4
- 602591
+ 579912
4
5
- 290932
+ 283085
5
65
- 153831
+ 159032
@@ -10136,27 +15546,27 @@
var_decls
- 9398483
+ 9269479
id
- 9391616
+ 9262608
variable
- 9042872
+ 8972402
type_id
- 1457782
+ 1462398
name
- 853317
+ 852378
location
- 6280264
+ 6204513
@@ -10170,7 +15580,7 @@
1
2
- 9391616
+ 9262608
@@ -10186,12 +15596,12 @@
1
2
- 9384748
+ 9255737
2
3
- 6867
+ 6871
@@ -10207,7 +15617,7 @@
1
2
- 9391616
+ 9262608
@@ -10223,7 +15633,7 @@
1
2
- 9391616
+ 9262608
@@ -10239,12 +15649,12 @@
1
2
- 8711609
+ 8695188
2
- 5
- 331263
+ 4
+ 277213
@@ -10260,12 +15670,12 @@
1
2
- 8989305
+ 8933674
2
3
- 53566
+ 38727
@@ -10281,12 +15691,12 @@
1
2
- 8937362
+ 8866713
2
4
- 105509
+ 105688
@@ -10302,12 +15712,12 @@
1
2
- 8791022
+ 8720548
2
4
- 251849
+ 251853
@@ -10323,27 +15733,27 @@
1
2
- 850695
+ 854752
2
3
- 284314
+ 284959
3
5
- 127485
+ 128050
5
11
- 113251
+ 112934
11
2944
- 82035
+ 81702
@@ -10359,27 +15769,27 @@
1
2
- 871547
+ 875115
2
3
- 269330
+ 270467
3
5
- 122865
+ 123428
5
11
- 113126
+ 112934
11
- 2860
- 80911
+ 2859
+ 80453
@@ -10395,22 +15805,22 @@
1
2
- 1120526
+ 1124970
2
3
- 192789
+ 193137
3
7
- 115373
+ 115182
7
1038
- 29093
+ 29108
@@ -10426,27 +15836,27 @@
1
2
- 986297
+ 990923
2
3
- 219260
+ 219122
3
6
- 133728
+ 134046
6
95
- 109380
+ 109811
97
- 2622
- 9115
+ 2570
+ 8495
@@ -10462,32 +15872,32 @@
1
2
- 466365
+ 465853
2
3
- 165943
+ 165778
3
4
- 59684
+ 60090
4
7
- 65927
+ 65961
7
- 25
- 64179
+ 26
+ 64337
- 25
- 27139
- 31215
+ 26
+ 26622
+ 30357
@@ -10503,32 +15913,32 @@
1
2
- 479351
+ 478721
2
3
- 165194
+ 165028
3
4
- 54690
+ 54968
4
8
- 71671
+ 71833
8
- 45
- 64304
+ 46
+ 63962
- 45
- 26704
- 18105
+ 46
+ 26187
+ 17864
@@ -10544,22 +15954,22 @@
1
2
- 655284
+ 654868
2
3
- 110878
+ 110435
3
11
- 65553
+ 65336
11
- 3463
- 21601
+ 3460
+ 21737
@@ -10575,27 +15985,27 @@
1
2
- 494210
+ 493087
2
3
- 183424
+ 183268
3
4
- 51693
+ 52344
4
8
- 65053
+ 65212
8
- 22619
- 58935
+ 22104
+ 58465
@@ -10611,17 +16021,12 @@
1
2
- 5780061
+ 5756898
2
- 21
- 472733
-
-
- 21
2943
- 27469
+ 447614
@@ -10637,12 +16042,12 @@
1
2
- 5860972
+ 5780884
2
2935
- 419291
+ 423628
@@ -10658,12 +16063,12 @@
1
2
- 5981466
+ 5920553
2
2555
- 298798
+ 283959
@@ -10679,12 +16084,12 @@
1
2
- 6267903
+ 6192020
2
5
- 12361
+ 12492
@@ -10694,33 +16099,33 @@
var_def
- 3770381
+ 3731827
id
- 3770381
+ 3731827
var_specialized
- 644
+ 645
id
- 644
+ 645
var_decl_specifiers
- 490339
+ 488965
id
- 490339
+ 488965
name
@@ -10738,7 +16143,7 @@
1
2
- 490339
+ 488965
@@ -10762,13 +16167,13 @@
124
- 653
- 654
+ 651
+ 652
124
- 3181
- 3182
+ 3170
+ 3171
124
@@ -10779,18 +16184,18 @@
is_structured_binding
- 945
+ 946
id
- 945
+ 946
var_requires
- 386
+ 387
id
@@ -10798,7 +16203,7 @@
constraint
- 386
+ 387
@@ -10838,7 +16243,7 @@
1
2
- 386
+ 387
@@ -10848,19 +16253,19 @@
type_decls
- 1634964
+ 1687349
id
- 1634964
+ 1687349
type_id
- 1615984
+ 1650403
location
- 1548808
+ 1325700
@@ -10874,7 +16279,7 @@
1
2
- 1634964
+ 1687349
@@ -10890,7 +16295,7 @@
1
2
- 1634964
+ 1687349
@@ -10906,12 +16311,12 @@
1
2
- 1599627
+ 1623818
2
- 10
- 16357
+ 24
+ 26585
@@ -10927,12 +16332,12 @@
1
2
- 1599752
+ 1625003
2
- 10
- 16232
+ 24
+ 25400
@@ -10948,12 +16353,12 @@
1
2
- 1526707
+ 1257405
2
- 64
- 22100
+ 651
+ 68294
@@ -10969,12 +16374,12 @@
1
2
- 1526832
+ 1258602
2
- 64
- 21975
+ 651
+ 67097
@@ -10984,37 +16389,37 @@
type_def
- 1096552
+ 1157787
id
- 1096552
+ 1157787
type_decl_top
- 673602
+ 672534
type_decl
- 673602
+ 672534
type_requires
- 7673
+ 7680
id
- 2042
+ 2043
constraint
- 7652
+ 7659
@@ -11028,7 +16433,7 @@
1
2
- 1010
+ 1011
2
@@ -11038,12 +16443,12 @@
5
6
- 601
+ 602
6
13
- 171
+ 172
13
@@ -11064,7 +16469,7 @@
1
2
- 7630
+ 7637
2
@@ -11079,23 +16484,23 @@
namespace_decls
- 407321
+ 430963
id
- 407321
+ 430963
namespace_id
- 1844
+ 1959
location
- 407321
+ 430963
bodylocation
- 407321
+ 430963
@@ -11109,7 +16514,7 @@
1
2
- 407321
+ 430963
@@ -11125,7 +16530,7 @@
1
2
- 407321
+ 430963
@@ -11141,7 +16546,7 @@
1
2
- 407321
+ 430963
@@ -11157,57 +16562,57 @@
1
2
- 389
+ 414
2
3
- 203
+ 215
3
6
- 170
+ 181
6
15
- 154
+ 164
15
34
- 146
+ 155
35
62
- 154
+ 164
63
87
- 146
+ 155
90
- 144
- 154
+ 142
+ 155
- 146
- 264
- 146
+ 143
+ 219
+ 155
- 268
- 1868
- 146
+ 263
+ 1505
+ 155
- 2205
- 12449
- 32
+ 1854
+ 12392
+ 43
@@ -11223,57 +16628,57 @@
1
2
- 389
+ 414
2
3
- 203
+ 215
3
6
- 170
+ 181
6
15
- 154
+ 164
15
34
- 146
+ 155
35
62
- 154
+ 164
63
87
- 146
+ 155
90
- 144
- 154
+ 142
+ 155
- 146
- 264
- 146
+ 143
+ 219
+ 155
- 268
- 1868
- 146
+ 263
+ 1505
+ 155
- 2205
- 12449
- 32
+ 1854
+ 12392
+ 43
@@ -11289,57 +16694,57 @@
1
2
- 389
+ 414
2
3
- 203
+ 215
3
6
- 170
+ 181
6
15
- 154
+ 164
15
34
- 146
+ 155
35
62
- 154
+ 164
63
87
- 146
+ 155
90
- 144
- 154
+ 142
+ 155
- 146
- 264
- 146
+ 143
+ 219
+ 155
- 268
- 1868
- 146
+ 263
+ 1505
+ 155
- 2205
- 12449
- 32
+ 1854
+ 12392
+ 43
@@ -11355,7 +16760,7 @@
1
2
- 407321
+ 430963
@@ -11371,7 +16776,7 @@
1
2
- 407321
+ 430963
@@ -11387,7 +16792,7 @@
1
2
- 407321
+ 430963
@@ -11403,7 +16808,7 @@
1
2
- 407321
+ 430963
@@ -11419,7 +16824,7 @@
1
2
- 407321
+ 430963
@@ -11435,7 +16840,7 @@
1
2
- 407321
+ 430963
@@ -11445,23 +16850,23 @@
usings
- 272108
+ 311428
id
- 272108
+ 311428
element_id
- 59009
+ 67593
location
- 26857
+ 30731
kind
- 21
+ 24
@@ -11475,7 +16880,7 @@
1
2
- 272108
+ 311428
@@ -11491,7 +16896,7 @@
1
2
- 272108
+ 311428
@@ -11507,7 +16912,7 @@
1
2
- 272108
+ 311428
@@ -11523,17 +16928,17 @@
1
2
- 51275
+ 58743
2
5
- 5388
+ 6165
5
134
- 2345
+ 2683
@@ -11549,17 +16954,17 @@
1
2
- 51275
+ 58743
2
5
- 5388
+ 6165
5
134
- 2345
+ 2683
@@ -11575,7 +16980,7 @@
1
2
- 59009
+ 67593
@@ -11591,22 +16996,22 @@
1
2
- 21184
+ 24239
2
4
- 2303
+ 2635
4
132
- 1944
+ 2224
145
- 365
- 1426
+ 367
+ 1632
@@ -11622,22 +17027,22 @@
1
2
- 21184
+ 24239
2
4
- 2303
+ 2635
4
132
- 1944
+ 2224
145
- 365
- 1426
+ 367
+ 1632
@@ -11653,7 +17058,7 @@
1
2
- 26857
+ 30731
@@ -11669,12 +17074,12 @@
393
394
- 10
+ 12
- 25361
- 25362
- 10
+ 25367
+ 25368
+ 12
@@ -11690,12 +17095,12 @@
214
215
- 10
+ 12
- 5371
- 5372
- 10
+ 5377
+ 5378
+ 12
@@ -11711,12 +17116,12 @@
356
357
- 10
+ 12
2186
2187
- 10
+ 12
@@ -11726,15 +17131,15 @@
using_container
- 580276
+ 662620
parent
- 21892
+ 24275
child
- 272108
+ 311428
@@ -11748,42 +17153,42 @@
1
2
- 10375
+ 11231
2
3
- 1616
+ 1789
3
6
- 1859
+ 2055
6
7
- 2282
+ 2623
7
- 28
- 1669
+ 27
+ 1849
- 28
+ 27
136
- 781
+ 942
145
146
- 2620
+ 2998
146
437
- 686
+ 785
@@ -11799,27 +17204,27 @@
1
2
- 96570
+ 111176
2
3
- 120321
+ 137664
3
4
- 20106
+ 22522
4
5
- 26720
+ 30550
5
65
- 8389
+ 9514
@@ -11829,27 +17234,27 @@
static_asserts
- 173266
+ 183514
id
- 173266
+ 183514
condition
- 173266
+ 183514
message
- 38765
+ 41097
location
- 22648
+ 23924
enclosing
- 6807
+ 6648
@@ -11863,7 +17268,7 @@
1
2
- 173266
+ 183514
@@ -11879,7 +17284,7 @@
1
2
- 173266
+ 183514
@@ -11895,7 +17300,7 @@
1
2
- 173266
+ 183514
@@ -11911,7 +17316,7 @@
1
2
- 173266
+ 183514
@@ -11927,7 +17332,7 @@
1
2
- 173266
+ 183514
@@ -11943,7 +17348,7 @@
1
2
- 173266
+ 183514
@@ -11959,7 +17364,7 @@
1
2
- 173266
+ 183514
@@ -11975,7 +17380,7 @@
1
2
- 173266
+ 183514
@@ -11991,32 +17396,32 @@
1
2
- 28505
+ 30236
2
3
- 641
+ 673
3
4
- 3623
+ 3876
4
12
- 2087
+ 2184
12
17
- 3135
+ 3315
17
513
- 771
+ 811
@@ -12032,32 +17437,32 @@
1
2
- 28505
+ 30236
2
3
- 641
+ 673
3
4
- 3623
+ 3876
4
12
- 2087
+ 2184
12
17
- 3135
+ 3315
17
513
- 771
+ 811
@@ -12073,12 +17478,12 @@
1
2
- 35922
+ 38084
2
33
- 2843
+ 3013
@@ -12094,27 +17499,27 @@
1
2
- 30316
+ 32170
2
3
- 349
+ 353
3
4
- 3387
+ 3626
4
12
- 1909
+ 1985
12
43
- 2802
+ 2961
@@ -12130,52 +17535,52 @@
1
2
- 4281
+ 4489
2
3
- 3728
+ 3893
3
4
- 1738
+ 1873
4
5
- 121
+ 112
5
6
- 4736
+ 5024
6
13
- 430
+ 457
14
15
- 2648
+ 2814
16
17
- 64
+ 60
17
18
- 4394
+ 4670
19
52
- 503
+ 526
@@ -12191,52 +17596,52 @@
1
2
- 4281
+ 4489
2
3
- 3728
+ 3893
3
4
- 1738
+ 1873
4
5
- 121
+ 112
5
6
- 4736
+ 5024
6
13
- 430
+ 457
14
15
- 2648
+ 2814
16
17
- 64
+ 60
17
18
- 4394
+ 4670
19
52
- 503
+ 526
@@ -12252,22 +17657,22 @@
1
2
- 6953
+ 7243
2
3
- 7676
+ 8159
3
4
- 7782
+ 8271
4
7
- 235
+ 250
@@ -12283,37 +17688,37 @@
1
2
- 5069
+ 5327
2
3
- 8099
+ 8538
3
4
- 1478
+ 1597
4
5
- 4760
+ 5042
5
13
- 495
+ 518
13
14
- 2648
+ 2814
16
43
- 97
+ 86
@@ -12329,22 +17734,22 @@
1
2
- 5702
+ 5482
2
3
- 528
+ 561
3
- 228
- 528
+ 210
+ 500
- 229
+ 223
11052
- 48
+ 103
@@ -12360,22 +17765,22 @@
1
2
- 5702
+ 5482
2
3
- 528
+ 561
3
- 228
- 528
+ 210
+ 500
- 229
+ 223
11052
- 48
+ 103
@@ -12391,17 +17796,17 @@
1
2
- 5857
+ 5646
2
3
- 519
+ 552
3
2936
- 430
+ 448
@@ -12417,17 +17822,17 @@
1
2
- 5840
+ 5629
2
3
- 536
+ 569
3
1929
- 430
+ 448
@@ -12437,23 +17842,23 @@
params
- 7067155
+ 6984184
id
- 7026200
+ 6957575
function
- 3408027
+ 3365915
index
- 7991
+ 7995
type_id
- 1221415
+ 1225411
@@ -12467,7 +17872,7 @@
1
2
- 7026200
+ 6957575
@@ -12483,7 +17888,7 @@
1
2
- 7026200
+ 6957575
@@ -12499,12 +17904,12 @@
1
2
- 6985244
+ 6930965
2
3
- 40955
+ 26609
@@ -12520,27 +17925,27 @@
1
2
- 1474514
+ 1462898
2
3
- 927112
+ 908721
3
4
- 579242
+ 561173
4
5
- 281067
+ 277338
5
65
- 146090
+ 155784
@@ -12556,27 +17961,27 @@
1
2
- 1474514
+ 1462898
2
3
- 927112
+ 908721
3
4
- 579242
+ 561173
4
5
- 281067
+ 277338
5
65
- 146090
+ 155784
@@ -12592,22 +17997,22 @@
1
2
- 1783302
+ 1763473
2
3
- 1031623
+ 1008413
3
4
- 437896
+ 436995
4
11
- 155205
+ 157033
@@ -12623,12 +18028,12 @@
2
3
- 3995
+ 3997
6
7
- 1997
+ 1998
14
@@ -12641,13 +18046,13 @@
624
- 320
- 15486
+ 323
+ 15234
624
- 27294
- 27295
+ 26943
+ 26944
124
@@ -12664,12 +18069,12 @@
2
3
- 3995
+ 3997
6
7
- 1997
+ 1998
14
@@ -12682,13 +18087,13 @@
624
- 320
- 15486
+ 323
+ 15234
624
- 27294
- 27295
+ 26943
+ 26944
124
@@ -12705,12 +18110,12 @@
1
2
- 3995
+ 3997
2
3
- 1997
+ 1998
4
@@ -12719,17 +18124,17 @@
9
- 55
+ 54
624
- 116
- 2703
+ 115
+ 2700
624
- 7497
- 7498
+ 7528
+ 7529
124
@@ -12746,27 +18151,27 @@
1
2
- 738193
+ 740818
2
3
- 240612
+ 241984
3
5
- 93273
+ 93820
5
13
- 93897
+ 93695
13
- 2574
- 55439
+ 2570
+ 55092
@@ -12782,27 +18187,27 @@
1
2
- 820353
+ 823145
2
3
- 179803
+ 181144
3
6
- 106258
+ 106562
6
27
- 92274
+ 92446
27
- 2562
- 22725
+ 2558
+ 22112
@@ -12818,17 +18223,17 @@
1
2
- 996037
+ 1000042
2
3
- 166942
+ 167027
3
65
- 58436
+ 58341
@@ -12838,15 +18243,15 @@
overrides
- 159781
+ 169821
new
- 151073
+ 160565
old
- 17993
+ 19124
@@ -12860,12 +18265,12 @@
1
2
- 142372
+ 151318
2
4
- 8700
+ 9246
@@ -12881,32 +18286,32 @@
1
2
- 9845
+ 10464
2
3
- 2437
+ 2590
3
4
- 1632
+ 1735
4
6
- 1486
+ 1580
6
18
- 1356
+ 1441
18
230
- 1234
+ 1312
@@ -12916,19 +18321,19 @@
membervariables
- 1499266
+ 1495853
id
- 1496815
+ 1493401
type_id
- 456075
+ 455129
name
- 641686
+ 640722
@@ -12942,12 +18347,12 @@
1
2
- 1494473
+ 1491059
2
4
- 2341
+ 2342
@@ -12963,7 +18368,7 @@
1
2
- 1496815
+ 1493401
@@ -12979,22 +18384,22 @@
1
2
- 338326
+ 337738
2
3
- 72218
+ 72123
3
10
- 35401
+ 35135
10
- 4444
- 10130
+ 4422
+ 10132
@@ -13010,22 +18415,22 @@
1
2
- 355917
+ 355278
2
3
- 64321
+ 64115
3
49
- 34311
+ 34209
56
- 2185
- 1524
+ 2175
+ 1525
@@ -13041,22 +18446,22 @@
1
2
- 421164
+ 420974
2
3
- 122542
+ 122130
3
5
- 57785
+ 57469
5
- 656
- 40193
+ 654
+ 40147
@@ -13072,17 +18477,17 @@
1
2
- 524318
+ 523712
2
3
- 72817
+ 72504
3
- 660
- 44551
+ 658
+ 44505
@@ -13092,19 +18497,19 @@
globalvariables
- 488591
+ 488090
id
- 488591
+ 488090
type_id
- 10363
+ 10368
name
- 112626
+ 112434
@@ -13118,7 +18523,7 @@
1
2
- 488591
+ 488090
@@ -13134,7 +18539,7 @@
1
2
- 488591
+ 488090
@@ -13150,7 +18555,7 @@
1
2
- 6992
+ 6995
2
@@ -13174,7 +18579,7 @@
152
- 2216
+ 2214
499
@@ -13191,7 +18596,7 @@
1
2
- 7117
+ 7120
2
@@ -13214,8 +18619,8 @@
874
- 125
- 228
+ 124
+ 226
499
@@ -13232,17 +18637,17 @@
1
2
- 95395
+ 95319
2
7
- 8865
+ 8744
7
604
- 8365
+ 8370
@@ -13258,12 +18663,12 @@
1
2
- 97019
+ 96943
2
3
- 15358
+ 15241
3
@@ -13278,19 +18683,19 @@
localvariables
- 726278
+ 726100
id
- 726278
+ 726100
type_id
- 53441
+ 53424
name
- 101531
+ 101537
@@ -13304,7 +18709,7 @@
1
2
- 726278
+ 726100
@@ -13320,7 +18725,7 @@
1
2
- 726278
+ 726100
@@ -13336,37 +18741,37 @@
1
2
- 28885
+ 28887
2
3
- 7838
+ 7826
3
4
- 4029
+ 4025
4
6
- 4053
+ 4049
6
12
- 4145
+ 4149
12
- 165
+ 166
4009
- 165
- 19323
- 480
+ 168
+ 19320
+ 476
@@ -13382,17 +18787,17 @@
1
2
- 38385
+ 38367
2
3
- 6700
+ 6701
3
5
- 4465
+ 4466
5
@@ -13413,32 +18818,32 @@
1
2
- 62453
+ 62468
2
3
- 16032
+ 16045
3
4
- 6524
+ 6532
4
8
- 8146
+ 8130
8
- 132
- 7617
+ 135
+ 7618
- 132
- 7547
- 756
+ 135
+ 7544
+ 741
@@ -13454,17 +18859,17 @@
1
2
- 84485
+ 84490
2
3
- 8414
+ 8419
3
15
- 7677
+ 7674
15
@@ -13479,11 +18884,11 @@
autoderivation
- 229374
+ 229241
var
- 229374
+ 229241
derivation_type
@@ -13501,7 +18906,7 @@
1
2
- 229374
+ 229241
@@ -13535,8 +18940,8 @@
124
- 736
- 737
+ 734
+ 735
124
@@ -13547,15 +18952,15 @@
orphaned_variables
- 44321
+ 44332
var
- 44321
+ 44332
function
- 41051
+ 41060
@@ -13569,7 +18974,7 @@
1
2
- 44321
+ 44332
@@ -13585,7 +18990,7 @@
1
2
- 40199
+ 40208
2
@@ -13600,19 +19005,19 @@
enumconstants
- 345733
+ 344765
id
- 345733
+ 344765
parent
- 41337
+ 41291
index
- 13942
+ 13945
type_id
@@ -13620,11 +19025,11 @@
name
- 345351
+ 344383
location
- 318338
+ 317364
@@ -13638,7 +19043,7 @@
1
2
- 345733
+ 344765
@@ -13654,7 +19059,7 @@
1
2
- 345733
+ 344765
@@ -13670,7 +19075,7 @@
1
2
- 345733
+ 344765
@@ -13686,7 +19091,7 @@
1
2
- 345733
+ 344765
@@ -13702,7 +19107,7 @@
1
2
- 345733
+ 344765
@@ -13718,57 +19123,57 @@
1
2
- 1524
+ 1525
2
3
- 5773
+ 5719
3
4
- 8714
+ 8715
4
5
- 5500
+ 5501
5
6
- 4574
+ 4630
6
7
- 2559
+ 2669
7
8
- 1960
+ 1961
8
- 10
- 2941
+ 11
+ 3813
- 10
- 15
- 3322
+ 11
+ 17
+ 3159
- 15
- 32
- 3104
+ 17
+ 64
+ 3105
- 32
+ 79
257
- 1361
+ 490
@@ -13784,57 +19189,57 @@
1
2
- 1524
+ 1525
2
3
- 5773
+ 5719
3
4
- 8714
+ 8715
4
5
- 5500
+ 5501
5
6
- 4574
+ 4630
6
7
- 2559
+ 2669
7
8
- 1960
+ 1961
8
- 10
- 2941
+ 11
+ 3813
- 10
- 15
- 3322
+ 11
+ 17
+ 3159
- 15
- 32
- 3104
+ 17
+ 64
+ 3105
- 32
+ 79
257
- 1361
+ 490
@@ -13850,7 +19255,7 @@
1
2
- 41337
+ 41291
@@ -13866,57 +19271,57 @@
1
2
- 1524
+ 1525
2
3
- 5773
+ 5719
3
4
- 8714
+ 8715
4
5
- 5500
+ 5501
5
6
- 4574
+ 4630
6
7
- 2559
+ 2669
7
8
- 1960
+ 1961
8
- 10
- 2941
+ 11
+ 3813
- 10
- 15
- 3322
+ 11
+ 17
+ 3159
- 15
- 32
- 3104
+ 17
+ 64
+ 3105
- 32
+ 79
257
- 1361
+ 490
@@ -13937,52 +19342,47 @@
2
3
- 5990
+ 5937
3
4
- 8768
+ 8770
4
5
- 5446
+ 5447
5
6
- 4574
+ 4630
6
7
- 2505
+ 2614
7
8
- 1851
+ 1852
8
11
- 3757
+ 3704
11
- 17
- 3104
-
-
- 17
- 123
- 3104
+ 18
+ 3105
- 164
+ 18
257
- 108
+ 3105
@@ -13998,12 +19398,12 @@
1
2
- 2777
+ 2778
2
3
- 2232
+ 2233
3
@@ -14013,12 +19413,12 @@
4
5
- 1198
+ 1252
5
9
- 1143
+ 1089
9
@@ -14027,18 +19427,18 @@
12
- 20
- 1143
+ 19
+ 1089
- 20
- 59
+ 19
+ 55
1089
- 64
- 760
- 980
+ 58
+ 759
+ 1035
@@ -14054,12 +19454,12 @@
1
2
- 2777
+ 2778
2
3
- 2232
+ 2233
3
@@ -14069,12 +19469,12 @@
4
5
- 1198
+ 1252
5
9
- 1143
+ 1089
9
@@ -14083,18 +19483,18 @@
12
- 20
- 1143
+ 19
+ 1089
- 20
- 59
+ 19
+ 55
1089
- 64
- 760
- 980
+ 58
+ 759
+ 1035
@@ -14110,7 +19510,7 @@
1
2
- 13942
+ 13945
@@ -14126,12 +19526,12 @@
1
2
- 2777
+ 2778
2
3
- 2232
+ 2233
3
@@ -14141,12 +19541,12 @@
4
5
- 1198
+ 1252
5
9
- 1143
+ 1089
9
@@ -14155,18 +19555,18 @@
12
- 20
- 1143
+ 19
+ 1089
- 20
- 59
+ 19
+ 55
1089
- 64
- 757
- 980
+ 58
+ 756
+ 1035
@@ -14182,12 +19582,12 @@
1
2
- 2777
+ 2778
2
3
- 2232
+ 2233
3
@@ -14197,12 +19597,12 @@
4
5
- 1198
+ 1252
5
9
- 1143
+ 1089
9
@@ -14211,18 +19611,18 @@
12
- 20
- 1143
+ 19
+ 1089
- 20
- 59
+ 19
+ 55
1089
- 64
- 760
- 980
+ 58
+ 759
+ 1035
@@ -14236,8 +19636,8 @@
12
- 6348
- 6349
+ 6329
+ 6330
54
@@ -14252,8 +19652,8 @@
12
- 759
- 760
+ 758
+ 759
54
@@ -14284,8 +19684,8 @@
12
- 6341
- 6342
+ 6322
+ 6323
54
@@ -14300,8 +19700,8 @@
12
- 5845
- 5846
+ 5826
+ 5827
54
@@ -14318,7 +19718,7 @@
1
2
- 344970
+ 344002
2
@@ -14339,7 +19739,7 @@
1
2
- 344970
+ 344002
2
@@ -14360,7 +19760,7 @@
1
2
- 345351
+ 344383
@@ -14376,7 +19776,7 @@
1
2
- 345351
+ 344383
@@ -14392,7 +19792,7 @@
1
2
- 344970
+ 344002
2
@@ -14413,12 +19813,12 @@
1
2
- 317303
+ 316329
2
205
- 1034
+ 1035
@@ -14434,7 +19834,7 @@
1
2
- 318338
+ 317364
@@ -14450,12 +19850,12 @@
1
2
- 317303
+ 316329
2
205
- 1034
+ 1035
@@ -14471,7 +19871,7 @@
1
2
- 318338
+ 317364
@@ -14487,12 +19887,12 @@
1
2
- 317303
+ 316329
2
205
- 1034
+ 1035
@@ -14502,19 +19902,19 @@
builtintypes
- 7616
+ 7245
id
- 7616
+ 7245
name
- 7616
+ 7245
kind
- 7616
+ 7245
size
@@ -14540,7 +19940,7 @@
1
2
- 7616
+ 7245
@@ -14556,7 +19956,7 @@
1
2
- 7616
+ 7245
@@ -14572,7 +19972,7 @@
1
2
- 7616
+ 7245
@@ -14588,7 +19988,7 @@
1
2
- 7616
+ 7245
@@ -14604,7 +20004,7 @@
1
2
- 7616
+ 7245
@@ -14620,7 +20020,7 @@
1
2
- 7616
+ 7245
@@ -14636,7 +20036,7 @@
1
2
- 7616
+ 7245
@@ -14652,7 +20052,7 @@
1
2
- 7616
+ 7245
@@ -14668,7 +20068,7 @@
1
2
- 7616
+ 7245
@@ -14684,7 +20084,7 @@
1
2
- 7616
+ 7245
@@ -14700,7 +20100,7 @@
1
2
- 7616
+ 7245
@@ -14716,7 +20116,7 @@
1
2
- 7616
+ 7245
@@ -14732,7 +20132,7 @@
1
2
- 7616
+ 7245
@@ -14748,7 +20148,7 @@
1
2
- 7616
+ 7245
@@ -14764,7 +20164,7 @@
1
2
- 7616
+ 7245
@@ -14798,44 +20198,8 @@
124
- 14
- 15
- 124
-
-
- 15
- 16
- 124
-
-
-
-
-
-
- size
- name
-
-
- 12
-
-
- 2
- 3
- 249
-
-
- 8
- 9
- 124
-
-
- 9
- 10
- 124
-
-
- 11
- 12
+ 12
+ 13
124
@@ -14843,18 +20207,13 @@
15
124
-
- 15
- 16
- 124
-
size
- kind
+ name
12
@@ -14879,14 +20238,55 @@
12
124
+
+ 12
+ 13
+ 124
+
14
15
124
+
+
+
+
+
+ size
+ kind
+
+
+ 12
+
- 15
- 16
+ 2
+ 3
+ 249
+
+
+ 8
+ 9
+ 124
+
+
+ 9
+ 10
+ 124
+
+
+ 11
+ 12
+ 124
+
+
+ 12
+ 13
+ 124
+
+
+ 14
+ 15
124
@@ -14953,8 +20353,8 @@
124
- 43
- 44
+ 40
+ 41
124
@@ -14979,8 +20379,8 @@
124
- 43
- 44
+ 40
+ 41
124
@@ -15005,8 +20405,8 @@
124
- 43
- 44
+ 40
+ 41
124
@@ -15065,12 +20465,12 @@
10
11
- 124
+ 249
13
14
- 249
+ 124
17
@@ -15096,12 +20496,12 @@
10
11
- 124
+ 249
13
14
- 249
+ 124
17
@@ -15127,12 +20527,12 @@
10
11
- 124
+ 249
13
14
- 249
+ 124
17
@@ -15179,15 +20579,15 @@
derivedtypes
- 3033686
+ 3044352
id
- 3033686
+ 3044352
name
- 1461903
+ 1474266
kind
@@ -15195,7 +20595,7 @@
type_id
- 1948496
+ 1947741
@@ -15209,7 +20609,7 @@
1
2
- 3033686
+ 3044352
@@ -15225,7 +20625,7 @@
1
2
- 3033686
+ 3044352
@@ -15241,7 +20641,7 @@
1
2
- 3033686
+ 3044352
@@ -15257,17 +20657,17 @@
1
2
- 1345280
+ 1357334
2
- 28
- 110004
+ 30
+ 110810
- 29
- 4302
- 6617
+ 30
+ 4274
+ 6121
@@ -15283,7 +20683,7 @@
1
2
- 1461903
+ 1474266
@@ -15299,17 +20699,17 @@
1
2
- 1345405
+ 1357459
2
- 28
- 109879
+ 30
+ 110685
- 29
- 4302
- 6617
+ 30
+ 4274
+ 6121
@@ -15323,8 +20723,8 @@
12
- 724
- 725
+ 787
+ 788
124
@@ -15333,23 +20733,23 @@
124
- 3627
- 3628
+ 3647
+ 3648
124
- 4301
- 4302
+ 4273
+ 4274
124
- 5557
- 5558
+ 5569
+ 5570
124
- 7754
- 7755
+ 7760
+ 7761
124
@@ -15369,8 +20769,8 @@
124
- 671
- 672
+ 733
+ 734
124
@@ -15379,18 +20779,18 @@
124
- 2429
- 2430
+ 2433
+ 2434
124
- 2654
- 2655
+ 2678
+ 2679
124
- 4340
- 4341
+ 4343
+ 4344
124
@@ -15405,8 +20805,8 @@
12
- 207
- 208
+ 208
+ 209
124
@@ -15415,23 +20815,23 @@
124
- 3623
- 3624
+ 3643
+ 3644
124
- 4301
- 4302
+ 4273
+ 4274
124
- 5492
- 5493
+ 5502
+ 5503
124
- 7754
- 7755
+ 7760
+ 7761
124
@@ -15448,22 +20848,22 @@
1
2
- 1318684
+ 1315609
2
3
- 376214
+ 378154
3
4
- 123365
+ 122803
4
- 137
- 130232
+ 135
+ 131173
@@ -15479,22 +20879,22 @@
1
2
- 1320182
+ 1317108
2
3
- 376214
+ 378154
3
4
- 121866
+ 121304
4
- 137
- 130232
+ 135
+ 131173
@@ -15510,22 +20910,22 @@
1
2
- 1320557
+ 1317483
2
3
- 376838
+ 379029
3
4
- 123614
+ 122803
4
6
- 127485
+ 128425
@@ -15535,11 +20935,11 @@
pointerishsize
- 2249417
+ 2250315
id
- 2249417
+ 2250315
size
@@ -15561,7 +20961,7 @@
1
2
- 2249417
+ 2250315
@@ -15577,7 +20977,7 @@
1
2
- 2249417
+ 2250315
@@ -15596,8 +20996,8 @@
124
- 18012
- 18013
+ 18010
+ 18011
124
@@ -15633,8 +21033,8 @@
124
- 18012
- 18013
+ 18010
+ 18011
124
@@ -15661,19 +21061,19 @@
arraysizes
- 80661
+ 88573
id
- 80661
+ 88573
num_elements
- 17855
+ 18489
bytesize
- 20227
+ 22861
alignment
@@ -15691,7 +21091,7 @@
1
2
- 80661
+ 88573
@@ -15707,7 +21107,7 @@
1
2
- 80661
+ 88573
@@ -15723,7 +21123,7 @@
1
2
- 80661
+ 88573
@@ -15744,7 +21144,7 @@
2
3
- 10863
+ 8869
3
@@ -15754,22 +21154,22 @@
4
5
- 3496
+ 5621
- 5
- 9
- 1498
+ 6
+ 7
+ 1624
- 9
- 42
- 1373
+ 8
+ 27
+ 1499
- 56
+ 34
57
- 124
+ 374
@@ -15785,22 +21185,22 @@
1
2
- 11737
+ 9494
2
3
- 3995
+ 6621
3
5
- 998
+ 1249
5
11
- 1123
+ 1124
@@ -15816,22 +21216,22 @@
1
2
- 11737
+ 9494
2
3
- 3995
+ 6621
3
4
- 749
+ 999
4
6
- 1373
+ 1374
@@ -15852,32 +21252,32 @@
2
3
- 12736
+ 14741
3
4
- 499
+ 374
4
5
- 2746
+ 3248
5
7
- 1498
+ 1499
7
17
- 1623
+ 1748
- 24
+ 17
45
- 499
+ 624
@@ -15893,22 +21293,22 @@
1
2
- 14609
+ 16490
2
3
- 3621
+ 3997
3
- 6
- 1872
+ 5
+ 1748
- 6
+ 5
7
- 124
+ 624
@@ -15924,17 +21324,17 @@
1
2
- 14858
+ 16615
2
3
- 3371
+ 3997
3
5
- 1623
+ 1873
5
@@ -15968,13 +21368,13 @@
124
- 121
- 122
+ 187
+ 188
124
- 338
- 339
+ 335
+ 336
124
@@ -15999,13 +21399,13 @@
249
- 48
- 49
+ 80
+ 81
124
- 139
- 140
+ 137
+ 138
124
@@ -16035,13 +21435,13 @@
124
- 48
- 49
+ 80
+ 81
124
- 140
- 141
+ 138
+ 139
124
@@ -16100,15 +21500,15 @@
typedefbase
- 1762320
+ 1828181
id
- 1762320
+ 1828181
type_id
- 838043
+ 885722
@@ -16122,7 +21522,7 @@
1
2
- 1762320
+ 1828181
@@ -16138,22 +21538,22 @@
1
2
- 662586
+ 706481
2
3
- 80931
+ 83914
3
- 6
- 64157
+ 7
+ 74580
- 6
- 4526
- 30367
+ 7
+ 4525
+ 20745
@@ -16163,7 +21563,7 @@
decltypes
- 814476
+ 814475
id
@@ -16171,7 +21571,7 @@
expr
- 814476
+ 814475
kind
@@ -16301,7 +21701,7 @@
1
2
- 814476
+ 814475
@@ -16317,7 +21717,7 @@
1
2
- 814476
+ 814475
@@ -16333,7 +21733,7 @@
1
2
- 814476
+ 814475
@@ -16349,7 +21749,7 @@
1
2
- 814476
+ 814475
@@ -16611,23 +22011,23 @@
type_operators
- 7953
+ 7960
id
- 7953
+ 7960
arg_type
- 7179
+ 7186
kind
- 85
+ 86
base_type
- 5244
+ 5249
@@ -16641,7 +22041,7 @@
1
2
- 7953
+ 7960
@@ -16657,7 +22057,7 @@
1
2
- 7953
+ 7960
@@ -16673,7 +22073,7 @@
1
2
- 7953
+ 7960
@@ -16689,12 +22089,12 @@
1
2
- 6405
+ 6411
2
3
- 773
+ 774
@@ -16710,12 +22110,12 @@
1
2
- 6405
+ 6411
2
3
- 773
+ 774
@@ -16731,7 +22131,7 @@
1
2
- 7157
+ 7164
2
@@ -16845,17 +22245,17 @@
1
2
- 3632
+ 3636
2
3
- 902
+ 903
3
4
- 343
+ 344
4
@@ -16876,12 +22276,12 @@
1
2
- 3783
+ 3786
2
3
- 988
+ 989
3
@@ -16907,12 +22307,12 @@
1
2
- 4084
+ 4087
2
3
- 1139
+ 1140
3
@@ -16927,19 +22327,19 @@
usertypes
- 4151861
+ 4458594
id
- 4151861
+ 4458594
name
- 918789
+ 963652
kind
- 126
+ 145
@@ -16953,7 +22353,7 @@
1
2
- 4151861
+ 4458594
@@ -16969,7 +22369,7 @@
1
2
- 4151861
+ 4458594
@@ -16985,22 +22385,22 @@
1
2
- 654542
+ 667093
2
3
- 158590
+ 176423
3
- 8
- 70610
+ 7
+ 76769
- 8
- 32669
- 35046
+ 7
+ 30282
+ 43365
@@ -17016,12 +22416,12 @@
1
2
- 867028
+ 904425
2
10
- 51761
+ 59227
@@ -17037,62 +22437,62 @@
28
29
- 10
+ 12
64
65
- 10
+ 12
579
580
- 10
+ 12
- 1052
- 1053
- 10
+ 1042
+ 1043
+ 12
- 1594
- 1595
- 10
+ 1563
+ 1564
+ 12
1874
1875
- 10
+ 12
4586
4587
- 10
+ 12
- 20078
- 20079
- 10
+ 19666
+ 19667
+ 12
- 21485
- 21486
- 10
+ 20075
+ 20076
+ 12
82092
82093
- 10
+ 12
- 92762
- 92763
- 10
+ 86007
+ 86008
+ 12
- 166764
- 166765
- 10
+ 151219
+ 151220
+ 12
@@ -17108,62 +22508,62 @@
19
20
- 10
+ 12
47
48
- 10
+ 12
50
51
- 10
+ 12
153
154
- 10
+ 12
417
418
- 10
+ 12
771
772
- 10
+ 12
1565
1566
- 10
+ 12
3066
3067
- 10
+ 12
- 5589
- 5590
- 10
+ 5585
+ 5586
+ 12
- 10903
- 10904
- 10
+ 10838
+ 10839
+ 12
- 12187
- 12188
- 10
+ 10903
+ 10904
+ 12
- 57608
- 57609
- 10
+ 51707
+ 51708
+ 12
@@ -17173,19 +22573,19 @@
usertypesize
- 1364111
+ 1462784
id
- 1364111
+ 1462784
size
- 1479
+ 1692
alignment
- 84
+ 96
@@ -17199,7 +22599,7 @@
1
2
- 1364111
+ 1462784
@@ -17215,7 +22615,7 @@
1
2
- 1364111
+ 1462784
@@ -17231,52 +22631,52 @@
1
2
- 464
+ 531
2
3
- 190
+ 229
3
4
- 95
+ 96
4
6
- 95
+ 108
6
- 9
- 116
+ 8
+ 132
- 9
- 19
- 116
+ 8
+ 14
+ 132
- 19
- 30
- 116
+ 14
+ 26
+ 132
- 30
- 115
- 116
+ 26
+ 86
+ 132
- 118
- 1731
- 116
+ 96
+ 1592
+ 132
- 1839
- 99773
- 52
+ 1733
+ 93158
+ 60
@@ -17292,17 +22692,17 @@
1
2
- 1204
+ 1390
2
3
- 179
+ 193
3
6
- 95
+ 108
@@ -17318,42 +22718,42 @@
1
2
- 10
+ 12
3
4
- 10
+ 12
7
8
- 10
+ 12
54
55
- 10
+ 12
56
57
- 10
+ 12
- 2079
- 2080
- 10
+ 2046
+ 2047
+ 12
- 11940
- 11941
- 10
+ 10484
+ 10485
+ 12
- 114968
- 114969
- 10
+ 108344
+ 108345
+ 12
@@ -17369,37 +22769,37 @@
1
2
- 21
+ 24
3
4
- 10
+ 12
11
12
- 10
+ 12
12
13
- 10
+ 12
17
18
- 10
+ 12
27
28
- 10
+ 12
- 111
- 112
- 10
+ 110
+ 111
+ 12
@@ -17409,26 +22809,26 @@
usertype_final
- 11487
+ 11493
id
- 11487
+ 11493
usertype_uuid
- 47628
+ 50413
id
- 47628
+ 50413
uuid
- 47148
+ 49904
@@ -17442,7 +22842,7 @@
1
2
- 47628
+ 50413
@@ -17458,12 +22858,12 @@
1
2
- 46669
+ 49394
2
3
- 479
+ 509
@@ -17473,15 +22873,15 @@
usertype_alias_kind
- 1762320
+ 1828181
id
- 1762320
+ 1828181
alias_kind
- 21
+ 24
@@ -17495,7 +22895,7 @@
1
2
- 1762320
+ 1828181
@@ -17509,14 +22909,14 @@
12
- 36900
- 36901
- 10
+ 36597
+ 36598
+ 12
- 129944
- 129945
- 10
+ 114622
+ 114623
+ 12
@@ -17526,26 +22926,26 @@
nontype_template_parameters
- 766246
+ 766422
id
- 766246
+ 766422
type_template_type_constraint
- 27127
+ 27151
id
- 13370
+ 13382
constraint
- 25987
+ 26011
@@ -17559,22 +22959,22 @@
1
2
- 10210
+ 10219
2
3
- 902
+ 903
3
5
- 1031
+ 1032
5
14
- 1117
+ 1118
14
@@ -17595,12 +22995,12 @@
1
2
- 24848
+ 24871
2
3
- 1139
+ 1140
@@ -17610,15 +23010,15 @@
mangled_name
- 7859539
+ 7826069
id
- 7859539
+ 7826069
mangled_name
- 6370041
+ 6330564
is_complete
@@ -17636,7 +23036,7 @@
1
2
- 7859539
+ 7826069
@@ -17652,7 +23052,7 @@
1
2
- 7859539
+ 7826069
@@ -17668,12 +23068,12 @@
1
2
- 6041650
+ 6001006
2
- 1120
- 328391
+ 1127
+ 329558
@@ -17689,7 +23089,7 @@
1
2
- 6370041
+ 6330564
@@ -17708,8 +23108,8 @@
124
- 62939
- 62940
+ 62639
+ 62640
124
@@ -17729,8 +23129,8 @@
124
- 51010
- 51011
+ 50668
+ 50669
124
@@ -17741,59 +23141,59 @@
is_pod_class
- 593728
+ 593865
id
- 593728
+ 593865
is_standard_layout_class
- 1124682
+ 1205360
id
- 1124682
+ 1205360
is_complete
- 1346593
+ 1443114
id
- 1346593
+ 1443114
is_class_template
- 232233
+ 260749
id
- 232233
+ 260749
class_instantiation
- 1126267
+ 1189945
to
- 1123214
+ 1186464
from
- 71825
+ 81870
@@ -17807,12 +23207,12 @@
1
2
- 1121069
+ 1184021
2
8
- 2144
+ 2442
@@ -17828,47 +23228,47 @@
1
2
- 20497
+ 23792
2
3
- 12890
+ 14809
3
4
- 7110
+ 8100
4
5
- 4659
+ 5355
5
7
- 6064
+ 6903
7
10
- 5737
+ 6262
10
17
- 5916
+ 6625
17
- 51
- 5388
+ 53
+ 6201
- 51
- 4223
- 3560
+ 53
+ 4219
+ 3820
@@ -17878,19 +23278,19 @@
class_template_argument
- 2899301
+ 3135288
type_id
- 1367407
+ 1461382
index
- 1183
+ 1354
arg_type
- 822314
+ 925001
@@ -17904,27 +23304,27 @@
1
2
- 579515
+ 608192
2
3
- 410328
+ 439349
3
4
- 251124
+ 276876
4
7
- 103120
+ 110765
7
113
- 23318
+ 26198
@@ -17940,22 +23340,22 @@
1
2
- 608064
+ 639589
2
3
- 424338
+ 452563
3
4
- 251959
+ 275075
4
113
- 83046
+ 94154
@@ -17971,37 +23371,37 @@
2
3
- 10
+ 12
4
5
- 750
+ 858
5
30
- 95
+ 108
33
90
- 95
+ 108
95
453
- 95
+ 108
643
- 7127
- 95
+ 6819
+ 108
- 11967
- 129418
- 42
+ 11329
+ 120877
+ 48
@@ -18017,37 +23417,37 @@
2
3
- 10
+ 12
4
5
- 750
+ 858
5
16
- 105
+ 120
16
35
- 95
+ 108
37
155
- 95
+ 108
196
- 3263
- 95
+ 3251
+ 108
- 10413
- 44531
- 31
+ 10075
+ 43772
+ 36
@@ -18063,27 +23463,27 @@
1
2
- 513871
+ 580362
2
3
- 167677
+ 189734
3
- 5
- 75111
+ 4
+ 55563
- 5
- 47
- 61745
+ 4
+ 11
+ 70373
- 47
- 12616
- 3909
+ 11
+ 11634
+ 28966
@@ -18099,17 +23499,17 @@
1
2
- 724001
+ 815421
2
3
- 79939
+ 88822
3
22
- 18373
+ 20757
@@ -18119,11 +23519,11 @@
class_template_argument_value
- 510059
+ 510176
type_id
- 205801
+ 205849
index
@@ -18131,7 +23531,7 @@
arg_value
- 509922
+ 510039
@@ -18145,17 +23545,17 @@
1
2
- 155790
+ 155826
2
3
- 43367
+ 43377
3
8
- 6643
+ 6644
@@ -18171,22 +23571,22 @@
1
2
- 147921
+ 147955
2
3
- 40472
+ 40481
3
45
- 15534
+ 15538
45
154
- 1873
+ 1874
@@ -18314,7 +23714,7 @@
1
2
- 509786
+ 509903
2
@@ -18335,7 +23735,7 @@
1
2
- 509922
+ 510039
@@ -18345,15 +23745,15 @@
is_proxy_class_for
- 48454
+ 55443
id
- 48454
+ 55443
templ_param_id
- 45781
+ 52384
@@ -18367,7 +23767,7 @@
1
2
- 48454
+ 55443
@@ -18383,12 +23783,12 @@
1
2
- 45062
+ 51562
2
79
- 718
+ 822
@@ -18398,19 +23798,19 @@
type_mentions
- 5902899
+ 5828707
id
- 5902899
+ 5828707
type_id
- 276673
+ 276019
location
- 5846584
+ 5783003
kind
@@ -18428,7 +23828,7 @@
1
2
- 5902899
+ 5828707
@@ -18444,7 +23844,7 @@
1
2
- 5902899
+ 5828707
@@ -18460,7 +23860,7 @@
1
2
- 5902899
+ 5828707
@@ -18476,42 +23876,42 @@
1
2
- 136594
+ 136511
2
3
- 31153
+ 30995
3
4
- 11273
+ 11167
4
5
- 14922
+ 14707
5
7
- 19988
+ 19991
7
12
- 21785
+ 21844
12
28
- 21077
+ 21081
28
- 8940
- 19879
+ 8907
+ 19719
@@ -18527,42 +23927,42 @@
1
2
- 136594
+ 136511
2
3
- 31153
+ 30995
3
4
- 11273
+ 11167
4
5
- 14922
+ 14707
5
7
- 19988
+ 19991
7
12
- 21785
+ 21844
12
28
- 21077
+ 21081
28
- 8940
- 19879
+ 8907
+ 19719
@@ -18578,7 +23978,7 @@
1
2
- 276673
+ 276019
@@ -18594,12 +23994,12 @@
1
2
- 5800889
+ 5737300
2
- 4
- 45694
+ 3
+ 45703
@@ -18615,12 +24015,12 @@
1
2
- 5800889
+ 5737300
2
- 4
- 45694
+ 3
+ 45703
@@ -18636,7 +24036,7 @@
1
2
- 5846584
+ 5783003
@@ -18650,8 +24050,8 @@
12
- 108383
- 108384
+ 107000
+ 107001
54
@@ -18666,8 +24066,8 @@
12
- 5080
- 5081
+ 5067
+ 5068
54
@@ -18682,8 +24082,8 @@
12
- 107349
- 107350
+ 106161
+ 106162
54
@@ -18694,26 +24094,26 @@
is_function_template
- 1332544
+ 1335972
id
- 1332544
+ 1335972
function_instantiation
- 973581
+ 973157
to
- 973581
+ 973157
from
- 182636
+ 182575
@@ -18727,7 +24127,7 @@
1
2
- 973581
+ 973157
@@ -18743,27 +24143,27 @@
1
2
- 110583
+ 111051
2
3
- 42788
+ 42253
3
9
- 14376
+ 14379
9
- 104
- 13729
+ 103
+ 13698
- 119
+ 103
1532
- 1158
+ 1192
@@ -18773,19 +24173,19 @@
function_template_argument
- 2484681
+ 2485251
function_id
- 1453218
+ 1453551
index
- 476
+ 477
arg_type
- 297988
+ 298057
@@ -18799,22 +24199,22 @@
1
2
- 782974
+ 783153
2
3
- 413136
+ 413231
3
4
- 171802
+ 171841
4
15
- 85305
+ 85324
@@ -18830,22 +24230,22 @@
1
2
- 802120
+ 802303
2
3
- 411229
+ 411323
3
4
- 169622
+ 169661
4
9
- 70247
+ 70263
@@ -18983,37 +24383,37 @@
1
2
- 174766
+ 174806
2
3
- 26334
+ 26340
3
4
- 19997
+ 20002
4
6
- 22654
+ 22660
6
11
- 23234
+ 23239
11
76
- 23370
+ 23375
79
2452
- 7631
+ 7632
@@ -19029,17 +24429,17 @@
1
2
- 256801
+ 256859
2
3
- 32125
+ 32133
3
15
- 9061
+ 9064
@@ -19049,19 +24449,19 @@
function_template_argument_value
- 452757
+ 452861
function_id
- 196774
+ 196819
index
- 476
+ 477
arg_value
- 450066
+ 450169
@@ -19075,17 +24475,17 @@
1
2
- 151396
+ 151430
2
3
- 42891
+ 42900
3
8
- 2486
+ 2487
@@ -19101,17 +24501,17 @@
1
2
- 144480
+ 144513
2
3
- 36690
+ 36699
3
54
- 14853
+ 14856
54
@@ -19254,7 +24654,7 @@
1
2
- 447374
+ 447477
2
@@ -19275,7 +24675,7 @@
1
2
- 450066
+ 450169
@@ -19285,26 +24685,26 @@
is_variable_template
- 58685
+ 58715
id
- 58685
+ 58715
variable_instantiation
- 423162
+ 421504
to
- 423162
+ 421504
from
- 35336
+ 35104
@@ -19318,7 +24718,7 @@
1
2
- 423162
+ 421504
@@ -19334,42 +24734,47 @@
1
2
- 15233
+ 15116
2
3
- 3870
+ 3997
3
4
- 2372
+ 2248
4
6
- 2996
+ 2873
6
8
- 2247
+ 2248
8
- 12
- 3121
+ 11
+ 2748
- 12
- 31
- 2746
+ 11
+ 30
+ 2748
- 32
+ 30
+ 105
+ 2748
+
+
+ 180
546
- 2746
+ 374
@@ -19379,19 +24784,19 @@
variable_template_argument
- 769159
+ 768927
variable_id
- 401311
+ 400766
index
- 1997
+ 1998
arg_type
- 256344
+ 256850
@@ -19405,22 +24810,22 @@
1
2
- 156703
+ 155909
2
3
- 189917
+ 190139
3
4
- 36460
+ 36478
4
17
- 18230
+ 18239
@@ -19436,22 +24841,22 @@
1
2
- 171562
+ 170900
2
3
- 180178
+ 180270
3
4
- 33713
+ 33730
4
17
- 15857
+ 15865
@@ -19495,13 +24900,13 @@
124
- 1959
- 1960
+ 1960
+ 1961
124
- 3214
- 3215
+ 3208
+ 3209
124
@@ -19546,13 +24951,13 @@
124
- 745
- 746
+ 748
+ 749
124
- 1325
- 1326
+ 1326
+ 1327
124
@@ -19569,22 +24974,22 @@
1
2
- 175558
+ 176022
2
3
- 44701
+ 44723
3
6
- 21601
+ 21737
6
206
- 14484
+ 14366
@@ -19600,17 +25005,17 @@
1
2
- 228000
+ 228367
2
3
- 24722
+ 24860
3
7
- 3621
+ 3622
@@ -19620,11 +25025,11 @@
variable_template_argument_value
- 19978
+ 19988
variable_id
- 14858
+ 14866
index
@@ -19632,7 +25037,7 @@
arg_value
- 19978
+ 19988
@@ -19646,12 +25051,12 @@
1
2
- 13360
+ 13367
2
3
- 1498
+ 1499
@@ -19667,12 +25072,12 @@
1
2
- 10488
+ 10493
2
3
- 3995
+ 3997
4
@@ -19755,7 +25160,7 @@
1
2
- 19978
+ 19988
@@ -19771,7 +25176,7 @@
1
2
- 19978
+ 19988
@@ -19781,15 +25186,15 @@
template_template_instantiation
- 6368
+ 6637
to
- 4994
+ 6226
from
- 1123
+ 4400
@@ -19803,12 +25208,12 @@
1
2
- 3621
+ 6093
2
- 3
- 1373
+ 15
+ 132
@@ -19824,22 +25229,17 @@
1
2
- 749
+ 2877
2
3
- 124
+ 1366
- 16
- 17
- 124
-
-
- 27
- 28
- 124
+ 3
+ 20
+ 157
@@ -19849,19 +25249,19 @@
template_template_argument
- 9678
+ 11074
type_id
- 6117
+ 6999
index
- 105
+ 120
arg_type
- 9086
+ 10397
@@ -19875,22 +25275,22 @@
1
2
- 5018
+ 5742
2
3
- 422
+ 483
3
8
- 507
+ 580
8
11
- 169
+ 193
@@ -19906,22 +25306,22 @@
1
2
- 5039
+ 5766
2
4
- 559
+ 640
4
10
- 464
+ 531
10
11
- 52
+ 60
@@ -19937,52 +25337,52 @@
6
7
- 10
+ 12
11
12
- 10
+ 12
16
17
- 10
+ 12
21
22
- 10
+ 12
27
28
- 10
+ 12
38
39
- 10
+ 12
50
51
- 10
+ 12
64
65
- 10
+ 12
104
105
- 10
+ 12
579
580
- 10
+ 12
@@ -19998,52 +25398,52 @@
6
7
- 10
+ 12
11
12
- 10
+ 12
16
17
- 10
+ 12
21
22
- 10
+ 12
27
28
- 10
+ 12
38
39
- 10
+ 12
50
51
- 10
+ 12
64
65
- 10
+ 12
99
100
- 10
+ 12
538
539
- 10
+ 12
@@ -20059,12 +25459,12 @@
1
2
- 9054
+ 10360
3
43
- 31
+ 36
@@ -20080,12 +25480,12 @@
1
2
- 9065
+ 10372
2
11
- 21
+ 24
@@ -20095,19 +25495,19 @@
template_template_argument_value
- 623
+ 713
type_id
- 528
+ 604
index
- 21
+ 24
arg_value
- 623
+ 713
@@ -20121,7 +25521,7 @@
1
2
- 528
+ 604
@@ -20137,17 +25537,17 @@
1
2
- 454
+ 519
2
3
- 52
+ 60
3
4
- 21
+ 24
@@ -20163,12 +25563,12 @@
8
9
- 10
+ 12
42
43
- 10
+ 12
@@ -20184,12 +25584,12 @@
17
18
- 10
+ 12
42
43
- 10
+ 12
@@ -20205,7 +25605,7 @@
1
2
- 623
+ 713
@@ -20221,7 +25621,7 @@
1
2
- 623
+ 713
@@ -20231,19 +25631,19 @@
concept_templates
- 3611
+ 3614
concept_id
- 3611
+ 3614
name
- 3611
+ 3614
location
- 3611
+ 3614
@@ -20257,7 +25657,7 @@
1
2
- 3611
+ 3614
@@ -20273,7 +25673,7 @@
1
2
- 3611
+ 3614
@@ -20289,7 +25689,7 @@
1
2
- 3611
+ 3614
@@ -20305,7 +25705,7 @@
1
2
- 3611
+ 3614
@@ -20321,7 +25721,7 @@
1
2
- 3611
+ 3614
@@ -20337,7 +25737,7 @@
1
2
- 3611
+ 3614
@@ -20347,15 +25747,15 @@
concept_instantiation
- 90344
+ 90427
to
- 90344
+ 90427
from
- 3439
+ 3442
@@ -20369,7 +25769,7 @@
1
2
- 90344
+ 90427
@@ -20400,12 +25800,12 @@
4
5
- 128
+ 129
5
6
- 300
+ 301
6
@@ -20425,37 +25825,37 @@
12
15
- 214
+ 215
15
19
- 214
+ 215
19
25
- 257
+ 258
25
37
- 257
+ 258
38
49
- 257
+ 258
50
72
- 257
+ 258
78
387
- 214
+ 215
@@ -20465,30 +25865,30 @@
is_type_constraint
- 36864
+ 36898
concept_id
- 36864
+ 36898
concept_template_argument
- 112936
+ 113040
concept_id
- 76308
+ 76378
index
- 128
+ 129
arg_type
- 21409
+ 21428
@@ -20502,17 +25902,17 @@
1
2
- 46429
+ 46472
2
3
- 24655
+ 24677
3
7
- 5223
+ 5228
@@ -20528,17 +25928,17 @@
1
2
- 50041
+ 50087
2
3
- 22355
+ 22375
3
7
- 3912
+ 3915
@@ -20636,42 +26036,42 @@
1
2
- 10382
+ 10391
2
3
- 2966
+ 2969
3
4
- 1053
+ 1054
4
5
- 1354
+ 1355
5
6
- 1160
+ 1161
6
9
- 1612
+ 1613
9
14
- 1977
+ 1979
14
259
- 902
+ 903
@@ -20687,17 +26087,17 @@
1
2
- 18013
+ 18029
2
3
- 3267
+ 3270
3
4
- 128
+ 129
@@ -20838,15 +26238,15 @@
routinetypes
- 604289
+ 604428
id
- 604289
+ 604428
return_type
- 283850
+ 283915
@@ -20860,7 +26260,7 @@
1
2
- 604289
+ 604428
@@ -20876,17 +26276,17 @@
1
2
- 234214
+ 234267
2
3
- 35089
+ 35097
3
4676
- 14546
+ 14550
@@ -20896,11 +26296,11 @@
routinetypeargs
- 1176789
+ 1169173
routine
- 415119
+ 413238
index
@@ -20908,7 +26308,7 @@
type_id
- 111595
+ 111399
@@ -20922,32 +26322,32 @@
1
2
- 82511
+ 82364
2
3
- 126028
+ 125834
3
4
- 107456
+ 107150
4
5
- 49289
+ 48754
5
7
- 33168
+ 32575
7
19
- 16665
+ 16560
@@ -20963,27 +26363,27 @@
1
2
- 88502
+ 88356
2
3
- 138663
+ 138418
3
4
- 114209
+ 113850
4
5
- 40738
+ 40256
5
10
- 32895
+ 32248
10
@@ -21047,38 +26447,38 @@
54
- 306
- 307
+ 304
+ 305
54
- 584
- 585
+ 576
+ 577
54
- 915
- 916
+ 902
+ 903
54
- 1820
- 1821
+ 1797
+ 1798
54
- 3793
- 3794
+ 3764
+ 3765
54
- 6107
- 6108
+ 6074
+ 6075
54
- 7622
- 7623
+ 7586
+ 7587
54
@@ -21133,38 +26533,38 @@
54
- 97
- 98
+ 96
+ 97
54
- 127
- 128
+ 126
+ 127
54
- 192
- 193
+ 191
+ 192
54
- 314
- 315
+ 313
+ 314
54
- 510
- 511
+ 509
+ 510
54
- 787
- 788
+ 786
+ 787
54
- 1174
- 1175
+ 1172
+ 1173
54
@@ -21181,47 +26581,47 @@
1
2
- 33222
+ 33283
2
3
- 15195
+ 15034
3
4
- 13234
+ 13237
4
5
- 9803
+ 9859
5
6
- 6372
+ 6373
6
8
- 9476
+ 9532
8
13
- 9531
+ 9478
13
26
- 8659
+ 8770
26
- 918
- 6099
+ 916
+ 5828
@@ -21237,22 +26637,22 @@
1
2
- 78917
+ 78714
2
3
- 17537
+ 17595
3
5
- 9476
+ 9478
5
17
- 5664
+ 5610
@@ -21262,19 +26662,19 @@
ptrtomembers
- 9730
+ 11025
id
- 9730
+ 11025
type_id
- 7977
+ 9067
class_id
- 4870
+ 5464
@@ -21288,7 +26688,7 @@
1
2
- 9730
+ 11025
@@ -21304,7 +26704,7 @@
1
2
- 9730
+ 11025
@@ -21320,12 +26720,12 @@
1
2
- 7755
+ 8813
2
84
- 221
+ 253
@@ -21341,12 +26741,12 @@
1
2
- 7755
+ 8813
2
84
- 221
+ 253
@@ -21362,22 +26762,22 @@
1
2
- 3898
+ 4352
2
3
- 528
+ 604
8
9
- 401
+ 459
10
65
- 42
+ 48
@@ -21393,22 +26793,22 @@
1
2
- 3898
+ 4352
2
3
- 528
+ 604
8
9
- 401
+ 459
10
65
- 42
+ 48
@@ -21418,15 +26818,15 @@
specifiers
- 7741
+ 7745
id
- 7741
+ 7745
str
- 7741
+ 7745
@@ -21440,7 +26840,7 @@
1
2
- 7741
+ 7745
@@ -21456,7 +26856,7 @@
1
2
- 7741
+ 7745
@@ -21466,15 +26866,15 @@
typespecifiers
- 854941
+ 888515
type_id
- 847449
+ 882627
spec_id
- 1623
+ 108
@@ -21488,12 +26888,12 @@
1
2
- 839957
+ 876739
2
3
- 7491
+ 5887
@@ -21507,69 +26907,49 @@
12
- 1
- 2
- 124
-
-
- 2
- 3
- 124
-
-
- 16
- 17
- 124
-
-
- 17
- 18
- 124
-
-
- 24
- 25
- 124
+ 164
+ 165
+ 12
- 44
- 45
- 124
+ 215
+ 216
+ 12
- 49
- 50
- 124
+ 224
+ 225
+ 12
- 51
- 52
- 124
+ 532
+ 533
+ 12
- 112
- 113
- 124
+ 821
+ 822
+ 12
- 199
- 200
- 124
+ 1568
+ 1569
+ 12
- 325
- 326
- 124
+ 4150
+ 4151
+ 12
- 545
- 546
- 124
+ 17496
+ 17497
+ 12
- 5462
- 5463
- 124
+ 48324
+ 48325
+ 12
@@ -21579,15 +26959,15 @@
funspecifiers
- 9723254
+ 9688610
func_id
- 4012492
+ 3970813
spec_id
- 2372
+ 2373
@@ -21601,27 +26981,27 @@
1
2
- 1528455
+ 1484261
2
3
- 506696
+ 506954
3
4
- 1037866
+ 1037645
4
5
- 693492
+ 696219
5
8
- 245981
+ 245731
@@ -21655,8 +27035,8 @@
124
- 216
- 217
+ 206
+ 207
124
@@ -21665,8 +27045,8 @@
124
- 355
- 356
+ 354
+ 355
124
@@ -21675,8 +27055,8 @@
124
- 767
- 768
+ 766
+ 767
124
@@ -21685,48 +27065,48 @@
124
- 1095
- 1096
+ 1075
+ 1076
124
- 1261
- 1262
+ 1258
+ 1259
124
- 1663
- 1664
+ 1662
+ 1663
124
- 3301
- 3302
+ 3340
+ 3341
124
- 3355
- 3356
+ 3351
+ 3352
124
- 6170
- 6171
+ 6166
+ 6167
124
- 15121
- 15122
+ 15136
+ 15137
124
- 19840
- 19841
+ 19863
+ 19864
124
- 22777
- 22778
+ 22427
+ 22428
124
@@ -21737,15 +27117,15 @@
varspecifiers
- 3078137
+ 3073086
var_id
- 2316969
+ 2315027
spec_id
- 1123
+ 1124
@@ -21759,17 +27139,17 @@
1
2
- 1659562
+ 1659658
2
3
- 554144
+ 553177
3
5
- 103262
+ 102190
@@ -21798,33 +27178,33 @@
124
- 1332
- 1333
+ 1325
+ 1326
124
- 2238
- 2239
+ 2236
+ 2237
124
- 2773
- 2774
+ 2761
+ 2762
124
- 3449
- 3450
+ 3436
+ 3437
124
- 4939
- 4940
+ 4931
+ 4932
124
- 8493
- 8494
+ 8482
+ 8483
124
@@ -21835,15 +27215,15 @@
explicit_specifier_exprs
- 41329
+ 41350
func_id
- 41329
+ 41350
constant
- 41329
+ 41350
@@ -21857,7 +27237,7 @@
1
2
- 41329
+ 41350
@@ -21873,7 +27253,7 @@
1
2
- 41329
+ 41350
@@ -21883,11 +27263,11 @@
attributes
- 654410
+ 651120
id
- 654410
+ 651120
kind
@@ -21895,7 +27275,7 @@
name
- 2122
+ 2123
name_space
@@ -21903,7 +27283,7 @@
location
- 648291
+ 644999
@@ -21917,7 +27297,7 @@
1
2
- 654410
+ 651120
@@ -21933,7 +27313,7 @@
1
2
- 654410
+ 651120
@@ -21949,7 +27329,7 @@
1
2
- 654410
+ 651120
@@ -21965,7 +27345,7 @@
1
2
- 654410
+ 651120
@@ -21984,13 +27364,13 @@
124
- 2406
- 2407
+ 2402
+ 2403
124
- 2828
- 2829
+ 2803
+ 2804
124
@@ -22057,13 +27437,13 @@
124
- 2360
- 2361
+ 2356
+ 2357
124
- 2828
- 2829
+ 2803
+ 2804
124
@@ -22095,7 +27475,12 @@
7
8
- 249
+ 124
+
+
+ 8
+ 9
+ 124
10
@@ -22118,8 +27503,8 @@
124
- 59
- 60
+ 55
+ 56
124
@@ -22133,8 +27518,8 @@
124
- 341
- 342
+ 340
+ 341
124
@@ -22143,8 +27528,8 @@
124
- 2629
- 2630
+ 2604
+ 2605
124
@@ -22161,7 +27546,7 @@
1
2
- 1872
+ 1873
2
@@ -22182,7 +27567,7 @@
1
2
- 2122
+ 2123
@@ -22216,8 +27601,8 @@
124
- 7
- 8
+ 8
+ 9
124
@@ -22241,8 +27626,8 @@
124
- 59
- 60
+ 55
+ 56
124
@@ -22256,8 +27641,8 @@
124
- 336
- 337
+ 335
+ 336
124
@@ -22266,8 +27651,8 @@
124
- 2629
- 2630
+ 2604
+ 2605
124
@@ -22287,8 +27672,8 @@
124
- 5230
- 5231
+ 5201
+ 5202
124
@@ -22350,8 +27735,8 @@
124
- 5181
- 5182
+ 5152
+ 5153
124
@@ -22368,12 +27753,12 @@
1
2
- 642423
+ 639127
2
5
- 5868
+ 5871
@@ -22389,7 +27774,7 @@
1
2
- 648291
+ 644999
@@ -22405,12 +27790,12 @@
1
2
- 643172
+ 639877
2
3
- 5119
+ 5122
@@ -22426,7 +27811,7 @@
1
2
- 648291
+ 644999
@@ -22436,27 +27821,27 @@
attribute_args
- 82562
+ 90623
id
- 82562
+ 90623
kind
- 17
+ 48
attribute
- 71259
+ 78510
index
- 40
+ 60
location
- 57184
+ 84409
@@ -22470,7 +27855,7 @@
1
2
- 82562
+ 90623
@@ -22486,7 +27871,7 @@
1
2
- 82562
+ 90623
@@ -22502,7 +27887,7 @@
1
2
- 82562
+ 90623
@@ -22518,7 +27903,7 @@
1
2
- 82562
+ 90623
@@ -22532,19 +27917,24 @@
12
- 100
- 101
- 5
+ 10
+ 11
+ 12
- 2252
- 2253
- 5
+ 133
+ 134
+ 12
- 11914
- 11915
- 5
+ 560
+ 561
+ 12
+
+
+ 6793
+ 6794
+ 12
@@ -22558,19 +27948,24 @@
12
- 100
- 101
- 5
+ 10
+ 11
+ 12
- 1892
- 1893
- 5
+ 133
+ 134
+ 12
- 10583
- 10584
- 5
+ 156
+ 157
+ 12
+
+
+ 6365
+ 6366
+ 12
@@ -22586,17 +27981,17 @@
1
2
- 5
+ 24
4
5
- 5
+ 12
- 7
- 8
- 5
+ 5
+ 6
+ 12
@@ -22610,19 +28005,24 @@
12
- 15
- 16
- 5
+ 8
+ 9
+ 12
- 2183
- 2184
- 5
+ 18
+ 19
+ 12
- 9330
- 9331
- 5
+ 535
+ 536
+ 12
+
+
+ 6437
+ 6438
+ 12
@@ -22638,17 +28038,17 @@
1
2
- 65790
+ 71425
2
- 7
- 5347
+ 5
+ 5899
- 7
- 25
- 121
+ 5
+ 18
+ 1184
@@ -22664,12 +28064,12 @@
1
2
- 69743
+ 76454
2
3
- 1516
+ 2055
@@ -22685,12 +28085,12 @@
1
2
- 68215
+ 72900
2
- 8
- 3044
+ 6
+ 5609
@@ -22706,12 +28106,12 @@
1
2
- 68747
+ 74339
2
6
- 2511
+ 4170
@@ -22725,39 +28125,29 @@
12
- 2
- 3
- 5
-
-
- 9
- 10
- 5
-
-
- 82
- 83
- 5
+ 94
+ 95
+ 12
- 83
- 84
- 5
+ 96
+ 97
+ 12
- 271
- 272
- 5
+ 166
+ 167
+ 12
- 526
- 527
- 5
+ 464
+ 465
+ 12
- 13293
- 13294
- 5
+ 6676
+ 6677
+ 12
@@ -22773,17 +28163,17 @@
1
2
- 17
+ 12
2
3
- 17
+ 36
- 3
- 4
- 5
+ 4
+ 5
+ 12
@@ -22797,39 +28187,29 @@
12
- 2
- 3
- 5
-
-
- 9
- 10
- 5
-
-
- 82
- 83
- 5
+ 94
+ 95
+ 12
- 83
- 84
- 5
+ 96
+ 97
+ 12
- 271
- 272
- 5
+ 166
+ 167
+ 12
- 526
- 527
- 5
+ 464
+ 465
+ 12
- 12313
- 12314
- 5
+ 6494
+ 6495
+ 12
@@ -22843,39 +28223,29 @@
12
- 2
- 3
- 5
-
-
- 9
- 10
- 5
-
-
- 82
- 83
- 5
+ 94
+ 95
+ 12
- 83
- 84
- 5
+ 96
+ 97
+ 12
- 271
- 272
- 5
+ 166
+ 167
+ 12
- 441
- 442
- 5
+ 349
+ 350
+ 12
- 9074
- 9075
- 5
+ 6318
+ 6319
+ 12
@@ -22891,17 +28261,12 @@
1
2
- 41506
+ 82269
2
- 3
- 11858
-
-
- 3
- 25
- 3819
+ 23
+ 2139
@@ -22917,12 +28282,12 @@
1
2
- 47653
+ 84216
2
3
- 9531
+ 193
@@ -22938,17 +28303,12 @@
1
2
- 42861
+ 84047
2
- 3
- 12298
-
-
- 3
- 11
- 2025
+ 18
+ 362
@@ -22964,12 +28324,12 @@
1
2
- 56935
+ 83914
2
- 8
- 248
+ 3
+ 495
@@ -22979,11 +28339,11 @@
attribute_arg_value
- 16693
+ 16696
arg
- 16693
+ 16696
value
@@ -23001,7 +28361,7 @@
1
2
- 16693
+ 16696
@@ -23135,15 +28495,15 @@
attribute_arg_constant
- 71994
+ 82124
arg
- 71994
+ 82124
constant
- 71994
+ 82124
@@ -23157,7 +28517,7 @@
1
2
- 71994
+ 82124
@@ -23173,7 +28533,7 @@
1
2
- 71994
+ 82124
@@ -23183,15 +28543,15 @@
attribute_arg_expr
- 1405
+ 1607
arg
- 1405
+ 1607
expr
- 1405
+ 1607
@@ -23205,7 +28565,7 @@
1
2
- 1405
+ 1607
@@ -23221,7 +28581,7 @@
1
2
- 1405
+ 1607
@@ -23284,15 +28644,15 @@
typeattributes
- 96394
+ 92196
type_id
- 94646
+ 90572
spec_id
- 32464
+ 29232
@@ -23306,12 +28666,12 @@
1
2
- 92898
+ 88948
2
3
- 1748
+ 1624
@@ -23327,17 +28687,17 @@
1
2
- 27969
+ 24735
2
- 9
- 2497
+ 7
+ 2248
- 11
+ 7
58
- 1997
+ 2248
@@ -23347,15 +28707,15 @@
funcattributes
- 844327
+ 844883
func_id
- 799751
+ 800034
spec_id
- 617325
+ 617140
@@ -23369,12 +28729,12 @@
1
2
- 759670
+ 759682
2
7
- 40081
+ 40351
@@ -23390,12 +28750,12 @@
1
2
- 572249
+ 571417
2
213
- 45075
+ 45723
@@ -23468,7 +28828,7 @@
namespaceattributes
- 5995
+ 5997
namespace_id
@@ -23476,7 +28836,7 @@
spec_id
- 5995
+ 5997
@@ -23516,7 +28876,7 @@
1
2
- 5995
+ 5997
@@ -23526,15 +28886,15 @@
stmtattributes
- 2214
+ 2216
stmt_id
- 2214
+ 2216
spec_id
- 558
+ 559
@@ -23548,7 +28908,7 @@
1
2
- 2214
+ 2216
@@ -23564,7 +28924,7 @@
1
2
- 214
+ 215
2
@@ -23574,7 +28934,7 @@
3
4
- 42
+ 43
9
@@ -23584,7 +28944,7 @@
13
16
- 42
+ 43
@@ -23594,15 +28954,15 @@
unspecifiedtype
- 7179407
+ 7467739
type_id
- 7179407
+ 7467739
unspecified_type_id
- 3965917
+ 4300051
@@ -23616,7 +28976,7 @@
1
2
- 7179407
+ 7467739
@@ -23632,22 +28992,17 @@
1
2
- 2482788
+ 2870392
2
3
- 1117779
+ 1169405
3
- 7
- 302919
-
-
- 7
- 537
- 62431
+ 6277
+ 260253
@@ -23657,19 +29012,19 @@
member
- 4193419
+ 4200804
parent
- 543781
+ 544558
index
- 29717
+ 29732
child
- 4188799
+ 4195557
@@ -23683,57 +29038,57 @@
1
2
- 129108
+ 129174
2
3
- 83408
+ 83451
3
4
- 32464
+ 32606
4
5
- 44950
+ 44848
5
6
- 42453
+ 42475
6
7
- 33962
+ 34979
7
9
- 42328
+ 41725
9
13
- 41204
+ 41600
13
18
- 41329
+ 41101
18
42
- 40830
+ 40851
42
239
- 11737
+ 11743
@@ -23749,57 +29104,57 @@
1
2
- 128859
+ 128924
2
3
- 83533
+ 83576
3
4
- 32214
+ 32356
4
5
- 45075
+ 44973
5
6
- 42578
+ 42600
6
7
- 32839
+ 33980
7
9
- 42703
+ 42225
9
13
- 41579
+ 41725
13
18
- 41454
+ 41226
18
42
- 40955
+ 40976
42
265
- 11986
+ 11993
@@ -23815,57 +29170,57 @@
1
2
- 6492
+ 6496
2
3
- 2622
+ 2623
3
8
- 1872
+ 1873
9
10
- 2871
+ 2873
10
- 19
- 2247
+ 20
+ 2373
- 19
- 26
- 2247
+ 20
+ 27
+ 2248
- 26
+ 27
36
- 2497
+ 2373
36
50
- 2247
+ 2248
54
141
- 2247
+ 2248
150
- 468
- 2247
+ 467
+ 2248
480
- 4310
- 2122
+ 4314
+ 2123
@@ -23881,57 +29236,57 @@
1
2
- 5493
+ 5496
2
3
- 3621
+ 3622
3
9
- 1872
+ 1873
9
10
- 2871
+ 2873
10
20
- 2372
+ 2248
20
28
- 2372
+ 2373
28
37
- 2372
+ 2498
37
56
- 2372
+ 2373
58
156
- 2247
+ 2248
163
- 527
- 2247
+ 528
+ 2248
547
- 4330
- 1872
+ 4334
+ 1873
@@ -23947,7 +29302,7 @@
1
2
- 4188799
+ 4195557
@@ -23963,12 +29318,12 @@
1
2
- 4184179
+ 4190310
2
3
- 4619
+ 5246
@@ -23978,15 +29333,15 @@
enclosingfunction
- 114807
+ 114833
child
- 114807
+ 114833
parent
- 71337
+ 71353
@@ -24000,7 +29355,7 @@
1
2
- 114807
+ 114833
@@ -24016,22 +29371,22 @@
1
2
- 49329
+ 49341
2
3
- 4633
+ 4634
3
4
- 15364
+ 15367
4
37
- 2009
+ 2010
@@ -24041,15 +29396,15 @@
derivations
- 476877
+ 476986
derivation
- 476877
+ 476986
sub
- 455142
+ 455246
index
@@ -24057,11 +29412,11 @@
super
- 235542
+ 235596
location
- 35396
+ 35404
@@ -24075,7 +29430,7 @@
1
2
- 476877
+ 476986
@@ -24091,7 +29446,7 @@
1
2
- 476877
+ 476986
@@ -24107,7 +29462,7 @@
1
2
- 476877
+ 476986
@@ -24123,7 +29478,7 @@
1
2
- 476877
+ 476986
@@ -24139,12 +29494,12 @@
1
2
- 438619
+ 438720
2
9
- 16522
+ 16526
@@ -24160,12 +29515,12 @@
1
2
- 438619
+ 438720
2
8
- 16522
+ 16526
@@ -24181,12 +29536,12 @@
1
2
- 438619
+ 438720
2
9
- 16522
+ 16526
@@ -24202,12 +29557,12 @@
1
2
- 438619
+ 438720
2
8
- 16522
+ 16526
@@ -24362,12 +29717,12 @@
1
2
- 225731
+ 225783
2
1655
- 9811
+ 9813
@@ -24383,12 +29738,12 @@
1
2
- 225731
+ 225783
2
1655
- 9811
+ 9813
@@ -24404,7 +29759,7 @@
1
2
- 235100
+ 235153
2
@@ -24425,12 +29780,12 @@
1
2
- 230194
+ 230247
2
81
- 5348
+ 5349
@@ -24446,7 +29801,7 @@
1
2
- 26504
+ 26510
2
@@ -24456,7 +29811,7 @@
5
22
- 2759
+ 2760
22
@@ -24482,7 +29837,7 @@
1
2
- 26504
+ 26510
2
@@ -24492,7 +29847,7 @@
5
22
- 2759
+ 2760
22
@@ -24518,7 +29873,7 @@
1
2
- 35396
+ 35404
@@ -24534,7 +29889,7 @@
1
2
- 28718
+ 28725
2
@@ -24544,7 +29899,7 @@
4
26
- 2827
+ 2828
26
@@ -24559,11 +29914,11 @@
derspecifiers
- 478648
+ 478758
der_id
- 476434
+ 476543
spec_id
@@ -24581,7 +29936,7 @@
1
2
- 474220
+ 474328
2
@@ -24627,11 +29982,11 @@
direct_base_offsets
- 449963
+ 450067
der_id
- 449963
+ 450067
offset
@@ -24649,7 +30004,7 @@
1
2
- 449963
+ 450067
@@ -24710,11 +30065,11 @@
virtual_base_offsets
- 5825
+ 5826
sub
- 5825
+ 5826
super
@@ -24736,7 +30091,7 @@
1
2
- 5825
+ 5826
@@ -24752,7 +30107,7 @@
1
2
- 5825
+ 5826
@@ -24846,23 +30201,23 @@
frienddecls
- 700420
+ 700589
id
- 700420
+ 700589
type_id
- 42413
+ 42423
decl_id
- 77741
+ 77759
location
- 6098
+ 6099
@@ -24876,7 +30231,7 @@
1
2
- 700420
+ 700589
@@ -24892,7 +30247,7 @@
1
2
- 700420
+ 700589
@@ -24908,7 +30263,7 @@
1
2
- 700420
+ 700589
@@ -24924,12 +30279,12 @@
1
2
- 6166
+ 6167
2
3
- 13967
+ 13970
3
@@ -24939,27 +30294,27 @@
7
12
- 3440
+ 3441
12
20
- 3645
+ 3646
20
32
- 3304
+ 3305
33
50
- 3781
+ 3782
50
80
- 3781
+ 3782
101
@@ -24980,12 +30335,12 @@
1
2
- 6166
+ 6167
2
3
- 13967
+ 13970
3
@@ -24995,27 +30350,27 @@
7
12
- 3440
+ 3441
12
20
- 3645
+ 3646
20
32
- 3304
+ 3305
33
50
- 3781
+ 3782
50
80
- 3781
+ 3782
101
@@ -25036,12 +30391,12 @@
1
2
- 41050
+ 41060
2
13
- 1362
+ 1363
@@ -25057,32 +30412,32 @@
1
2
- 47864
+ 47875
2
3
- 6063
+ 6065
3
8
- 5995
+ 5997
8
15
- 6063
+ 6065
15
40
- 6063
+ 6065
40
164
- 5689
+ 5690
@@ -25098,32 +30453,32 @@
1
2
- 47864
+ 47875
2
3
- 6063
+ 6065
3
8
- 5995
+ 5997
8
15
- 6063
+ 6065
15
40
- 6063
+ 6065
40
164
- 5689
+ 5690
@@ -25139,7 +30494,7 @@
1
2
- 77059
+ 77078
2
@@ -25160,7 +30515,7 @@
1
2
- 5723
+ 5724
2
@@ -25181,7 +30536,7 @@
1
2
- 5961
+ 5963
2
@@ -25202,7 +30557,7 @@
1
2
- 5757
+ 5758
2
@@ -25217,19 +30572,19 @@
comments
- 11241970
+ 11220843
id
- 11241970
+ 11220843
contents
- 4306670
+ 4291377
location
- 11241970
+ 11220843
@@ -25243,7 +30598,7 @@
1
2
- 11241970
+ 11220843
@@ -25259,7 +30614,7 @@
1
2
- 11241970
+ 11220843
@@ -25275,17 +30630,17 @@
1
2
- 3932329
+ 3917344
2
- 7
- 330014
+ 6
+ 321937
- 7
- 34447
- 44326
+ 6
+ 34359
+ 52094
@@ -25301,17 +30656,17 @@
1
2
- 3932329
+ 3917344
2
- 7
- 330014
+ 6
+ 321937
- 7
- 34447
- 44326
+ 6
+ 34359
+ 52094
@@ -25327,7 +30682,7 @@
1
2
- 11241970
+ 11220843
@@ -25343,7 +30698,7 @@
1
2
- 11241970
+ 11220843
@@ -25353,15 +30708,15 @@
commentbinding
- 3916721
+ 3838390
id
- 3352213
+ 3351549
element
- 3751027
+ 3672362
@@ -25375,12 +30730,12 @@
1
2
- 3290530
+ 3295331
2
1706
- 61682
+ 56217
@@ -25396,12 +30751,12 @@
1
2
- 3585333
+ 3506333
2
3
- 165694
+ 166028
@@ -25411,15 +30766,15 @@
exprconv
- 9633092
+ 9633089
converted
- 9632986
+ 9632983
conversion
- 9633092
+ 9633089
@@ -25433,7 +30788,7 @@
1
2
- 9632881
+ 9632878
2
@@ -25454,7 +30809,7 @@
1
2
- 9633092
+ 9633089
@@ -25464,30 +30819,30 @@
compgenerated
- 9891533
+ 9891516
id
- 9891533
+ 9891516
synthetic_destructor_call
- 1670057
+ 1671589
element
- 1243740
+ 1244881
i
- 386
+ 387
destructor_call
- 1670057
+ 1671589
@@ -25501,17 +30856,17 @@
1
2
- 827870
+ 828630
2
3
- 409077
+ 409452
3
19
- 6792
+ 6798
@@ -25527,17 +30882,17 @@
1
2
- 827870
+ 828630
2
3
- 409077
+ 409452
3
19
- 6792
+ 6798
@@ -25553,17 +30908,17 @@
1
2
- 42
+ 43
2
3
- 85
+ 86
3
4
- 85
+ 86
13
@@ -25619,17 +30974,17 @@
1
2
- 42
+ 43
2
3
- 85
+ 86
3
4
- 85
+ 86
13
@@ -25685,7 +31040,7 @@
1
2
- 1670057
+ 1671589
@@ -25701,7 +31056,7 @@
1
2
- 1670057
+ 1671589
@@ -25711,15 +31066,15 @@
namespaces
- 8653
+ 9901
id
- 8653
+ 9901
name
- 4574
+ 5234
@@ -25733,7 +31088,7 @@
1
2
- 8653
+ 9901
@@ -25749,17 +31104,17 @@
1
2
- 3740
+ 4279
2
3
- 528
+ 604
3
149
- 306
+ 350
@@ -25780,15 +31135,15 @@
namespacembrs
- 2039522
+ 2042061
parentid
- 3995
+ 3997
memberid
- 2039522
+ 2042061
@@ -25860,8 +31215,8 @@
249
- 15606
- 15607
+ 15618
+ 15619
124
@@ -25878,7 +31233,7 @@
1
2
- 2039522
+ 2042061
@@ -25888,11 +31243,11 @@
exprparents
- 19454225
+ 19454216
expr_id
- 19454225
+ 19454216
child_index
@@ -25900,7 +31255,7 @@
parent_id
- 12939994
+ 12939987
@@ -25914,7 +31269,7 @@
1
2
- 19454225
+ 19454216
@@ -25930,7 +31285,7 @@
1
2
- 19454225
+ 19454216
@@ -26048,12 +31403,12 @@
1
2
- 7394760
+ 7394757
2
3
- 5082682
+ 5082680
3
@@ -26074,12 +31429,12 @@
1
2
- 7394760
+ 7394757
2
3
- 5082682
+ 5082680
3
@@ -26094,22 +31449,22 @@
expr_isload
- 6909477
+ 6853135
expr_id
- 6909477
+ 6853135
conversionkinds
- 6050435
+ 6050434
expr_id
- 6050435
+ 6050434
kind
@@ -26127,7 +31482,7 @@
1
2
- 6050435
+ 6050434
@@ -26171,8 +31526,8 @@
1
- 5831536
- 5831537
+ 5831535
+ 5831536
1
@@ -26183,11 +31538,11 @@
iscall
- 5797114
+ 5802435
caller
- 5797114
+ 5802435
kind
@@ -26205,7 +31560,7 @@
1
2
- 5797114
+ 5802435
@@ -26241,11 +31596,11 @@
numtemplatearguments
- 627939
+ 625760
expr_id
- 627939
+ 625760
num
@@ -26263,7 +31618,7 @@
1
2
- 627939
+ 625760
@@ -26282,13 +31637,13 @@
124
- 1263
- 1264
+ 1264
+ 1265
124
- 3759
- 3760
+ 3738
+ 3739
124
@@ -26347,23 +31702,23 @@
namequalifiers
- 3038986
+ 3041775
id
- 3038986
+ 3041775
qualifiableelement
- 3038986
+ 3041775
qualifyingelement
- 47440
+ 47483
location
- 551913
+ 552420
@@ -26377,7 +31732,7 @@
1
2
- 3038986
+ 3041775
@@ -26393,7 +31748,7 @@
1
2
- 3038986
+ 3041775
@@ -26409,7 +31764,7 @@
1
2
- 3038986
+ 3041775
@@ -26425,7 +31780,7 @@
1
2
- 3038986
+ 3041775
@@ -26441,7 +31796,7 @@
1
2
- 3038986
+ 3041775
@@ -26457,7 +31812,7 @@
1
2
- 3038986
+ 3041775
@@ -26473,27 +31828,27 @@
1
2
- 31512
+ 31541
2
3
- 8168
+ 8175
3
5
- 4105
+ 4109
5
6811
- 3568
+ 3571
19018
41956
- 85
+ 86
@@ -26509,27 +31864,27 @@
1
2
- 31512
+ 31541
2
3
- 8168
+ 8175
3
5
- 4105
+ 4109
5
6811
- 3568
+ 3571
19018
41956
- 85
+ 86
@@ -26545,22 +31900,22 @@
1
2
- 34371
+ 34402
2
3
- 7351
+ 7358
3
6
- 3568
+ 3571
6
20057
- 2149
+ 2151
@@ -26576,22 +31931,22 @@
1
2
- 79059
+ 79132
2
6
- 38068
+ 38103
6
7
- 398609
+ 398974
7
192
- 36176
+ 36209
@@ -26607,22 +31962,22 @@
1
2
- 79059
+ 79132
2
6
- 38068
+ 38103
6
7
- 398609
+ 398974
7
192
- 36176
+ 36209
@@ -26638,22 +31993,22 @@
1
2
- 111431
+ 111533
2
4
- 13284
+ 13296
4
5
- 414902
+ 415283
5
33
- 12295
+ 12306
@@ -26663,11 +32018,11 @@
varbind
- 8254635
+ 8254631
expr
- 8254635
+ 8254631
var
@@ -26685,7 +32040,7 @@
1
2
- 8254635
+ 8254631
@@ -26701,7 +32056,7 @@
1
2
- 171536
+ 171535
2
@@ -26711,7 +32066,7 @@
3
4
- 145648
+ 145647
4
@@ -26756,15 +32111,15 @@
funbind
- 5806808
+ 5812138
expr
- 5804336
+ 5809664
fun
- 275677
+ 275930
@@ -26778,12 +32133,12 @@
1
2
- 5801865
+ 5807189
2
3
- 2471
+ 2474
@@ -26799,27 +32154,27 @@
1
2
- 181269
+ 181436
2
3
- 38799
+ 38834
3
4
- 17174
+ 17190
4
8
- 22720
+ 22741
8
37798
- 15713
+ 15727
@@ -26829,11 +32184,11 @@
expr_allocator
- 45241
+ 45252
expr
- 45241
+ 45252
func
@@ -26855,7 +32210,7 @@
1
2
- 45241
+ 45252
@@ -26871,7 +32226,7 @@
1
2
- 45241
+ 45252
@@ -26955,11 +32310,11 @@
expr_deallocator
- 53826
+ 53839
expr
- 53826
+ 53839
func
@@ -26981,7 +32336,7 @@
1
2
- 53826
+ 53839
@@ -26997,7 +32352,7 @@
1
2
- 53826
+ 53839
@@ -27246,11 +32601,11 @@
values
- 13474612
+ 13474605
id
- 13474612
+ 13474605
str
@@ -27268,7 +32623,7 @@
1
2
- 13474612
+ 13474605
@@ -27314,11 +32669,11 @@
valuetext
- 6647584
+ 6647456
id
- 6647584
+ 6647456
text
@@ -27336,7 +32691,7 @@
1
2
- 6647584
+ 6647456
@@ -27366,7 +32721,7 @@
7
- 593553
+ 593555
27950
@@ -27377,15 +32732,15 @@
valuebind
- 13583194
+ 13583188
val
- 13474612
+ 13474605
expr
- 13583194
+ 13583188
@@ -27399,7 +32754,7 @@
1
2
- 13384057
+ 13384050
2
@@ -27420,7 +32775,7 @@
1
2
- 13583194
+ 13583188
@@ -27430,15 +32785,15 @@
fieldoffsets
- 1496815
+ 1493401
id
- 1496815
+ 1493401
byteoffset
- 31370
+ 31376
bitoffset
@@ -27456,7 +32811,7 @@
1
2
- 1496815
+ 1493401
@@ -27472,7 +32827,7 @@
1
2
- 1496815
+ 1493401
@@ -27488,17 +32843,17 @@
1
2
- 17700
+ 17704
2
3
- 2450
+ 2451
3
5
- 2668
+ 2669
5
@@ -27507,18 +32862,18 @@
12
- 35
- 2450
+ 34
+ 2396
- 35
- 211
+ 34
+ 198
2396
- 250
- 5947
- 1089
+ 209
+ 5931
+ 1143
@@ -27534,7 +32889,7 @@
1
2
- 30390
+ 30396
2
@@ -27563,8 +32918,8 @@
54
- 44
- 45
+ 43
+ 44
54
@@ -27578,18 +32933,18 @@
54
- 64
- 65
+ 63
+ 64
54
- 81
- 82
+ 79
+ 80
54
- 27127
- 27128
+ 27063
+ 27064
54
@@ -27631,19 +32986,19 @@
bitfield
- 30341
+ 30357
id
- 30341
+ 30357
bits
- 3496
+ 3497
declared_bits
- 3496
+ 3497
@@ -27657,7 +33012,7 @@
1
2
- 30341
+ 30357
@@ -27673,7 +33028,7 @@
1
2
- 30341
+ 30357
@@ -27689,7 +33044,7 @@
1
2
- 998
+ 999
2
@@ -27740,7 +33095,7 @@
1
2
- 3496
+ 3497
@@ -27756,7 +33111,7 @@
1
2
- 998
+ 999
2
@@ -27807,7 +33162,7 @@
1
2
- 3496
+ 3497
@@ -27817,23 +33172,23 @@
initialisers
- 2251036
+ 2340631
init
- 2251036
+ 2340631
var
- 980972
+ 991152
expr
- 2251036
+ 2340631
location
- 516371
+ 539242
@@ -27847,7 +33202,7 @@
1
2
- 2251036
+ 2340631
@@ -27863,7 +33218,7 @@
1
2
- 2251036
+ 2340631
@@ -27879,7 +33234,7 @@
1
2
- 2251036
+ 2340631
@@ -27895,17 +33250,17 @@
1
2
- 870557
+ 874093
2
15
- 37441
+ 39500
16
25
- 72973
+ 77558
@@ -27921,17 +33276,17 @@
1
2
- 870557
+ 874093
2
15
- 37441
+ 39500
16
25
- 72973
+ 77558
@@ -27947,7 +33302,7 @@
1
2
- 980964
+ 991143
2
@@ -27968,7 +33323,7 @@
1
2
- 2251036
+ 2340631
@@ -27984,7 +33339,7 @@
1
2
- 2251036
+ 2340631
@@ -28000,7 +33355,7 @@
1
2
- 2251036
+ 2340631
@@ -28016,22 +33371,22 @@
1
2
- 414356
+ 439287
2
3
- 33607
+ 33068
3
- 13
- 42250
+ 15
+ 42211
- 13
- 111911
- 26157
+ 15
+ 111796
+ 24675
@@ -28047,17 +33402,17 @@
1
2
- 443658
+ 470421
2
- 3
- 34516
+ 4
+ 49610
- 3
- 12237
- 38196
+ 4
+ 12163
+ 19210
@@ -28073,22 +33428,22 @@
1
2
- 414356
+ 439287
2
3
- 33607
+ 33068
3
- 13
- 42250
+ 15
+ 42211
- 13
- 111911
- 26157
+ 15
+ 111796
+ 24675
@@ -28098,26 +33453,26 @@
braced_initialisers
- 68468
+ 68469
init
- 68468
+ 68469
expr_ancestor
- 1676032
+ 1677570
exp
- 1676032
+ 1677570
ancestor
- 838833
+ 839603
@@ -28131,7 +33486,7 @@
1
2
- 1676032
+ 1677570
@@ -28147,17 +33502,17 @@
1
2
- 17067
+ 17082
2
3
- 811706
+ 812451
3
19
- 10059
+ 10069
@@ -28167,11 +33522,11 @@
exprs
- 25210587
+ 25210575
id
- 25210587
+ 25210575
kind
@@ -28179,7 +33534,7 @@
location
- 10582675
+ 10582670
@@ -28193,7 +33548,7 @@
1
2
- 25210587
+ 25210575
@@ -28209,7 +33564,7 @@
1
2
- 25210587
+ 25210575
@@ -28387,12 +33742,12 @@
1
2
- 8900705
+ 8900701
2
3
- 820609
+ 820608
3
@@ -28418,7 +33773,7 @@
1
2
- 9040107
+ 9040103
2
@@ -28438,19 +33793,19 @@
expr_reuse
- 846206
+ 846982
reuse
- 846206
+ 846982
original
- 846206
+ 846982
value_category
- 42
+ 43
@@ -28464,7 +33819,7 @@
1
2
- 846206
+ 846982
@@ -28480,7 +33835,7 @@
1
2
- 846206
+ 846982
@@ -28496,7 +33851,7 @@
1
2
- 846206
+ 846982
@@ -28512,7 +33867,7 @@
1
2
- 846206
+ 846982
@@ -28564,11 +33919,11 @@
expr_types
- 25210587
+ 25210575
id
- 25210587
+ 25210575
typeid
@@ -28590,7 +33945,7 @@
1
2
- 25210587
+ 25210575
@@ -28606,7 +33961,7 @@
1
2
- 25210587
+ 25210575
@@ -28751,15 +34106,15 @@
new_allocated_type
- 46195
+ 46206
expr
- 46195
+ 46206
type_id
- 27390
+ 27396
@@ -28773,7 +34128,7 @@
1
2
- 46195
+ 46206
@@ -28789,17 +34144,17 @@
1
2
- 11514
+ 11517
2
3
- 14478
+ 14482
3
19
- 1396
+ 1397
@@ -28809,15 +34164,15 @@
new_array_allocated_type
- 6653
+ 6933
expr
- 6653
+ 6933
type_id
- 2843
+ 2978
@@ -28831,7 +34186,7 @@
1
2
- 6653
+ 6933
@@ -28847,22 +34202,22 @@
1
2
- 40
+ 43
2
3
- 2510
+ 2633
3
5
- 219
+ 224
6
15
- 73
+ 77
@@ -28872,7 +34227,7 @@
aggregate_field_init
- 5717382
+ 5717380
aggregate
@@ -28880,7 +34235,7 @@
initializer
- 5717204
+ 5717202
field
@@ -29080,7 +34435,7 @@
1
2
- 5717204
+ 5717202
@@ -29096,7 +34451,7 @@
1
2
- 5717026
+ 5717024
2
@@ -29117,7 +34472,7 @@
1
2
- 5717204
+ 5717202
@@ -29133,7 +34488,7 @@
1
2
- 5717204
+ 5717202
@@ -30208,15 +35563,15 @@
condition_decl_bind
- 408518
+ 408893
expr
- 408518
+ 408893
decl
- 408518
+ 408893
@@ -30230,7 +35585,7 @@
1
2
- 408518
+ 408893
@@ -30246,7 +35601,7 @@
1
2
- 408518
+ 408893
@@ -30256,15 +35611,15 @@
typeid_bind
- 47898
+ 47909
expr
- 47898
+ 47909
type_id
- 15943
+ 15947
@@ -30278,7 +35633,7 @@
1
2
- 47898
+ 47909
@@ -30294,12 +35649,12 @@
1
2
- 2963
+ 2964
2
3
- 12570
+ 12573
3
@@ -30314,15 +35669,15 @@
uuidof_bind
- 26588
+ 28060
expr
- 26588
+ 28060
type_id
- 26336
+ 27792
@@ -30336,7 +35691,7 @@
1
2
- 26588
+ 28060
@@ -30352,12 +35707,12 @@
1
2
- 26125
+ 27568
2
4
- 211
+ 224
@@ -30498,23 +35853,23 @@
lambdas
- 19057
+ 16482
expr
- 19057
+ 16482
default_capture
- 24
+ 25
has_explicit_return_type
- 16
+ 17
has_explicit_parameter_list
- 16
+ 17
@@ -30528,7 +35883,7 @@
1
2
- 19057
+ 16482
@@ -30544,7 +35899,7 @@
1
2
- 19057
+ 16482
@@ -30560,7 +35915,7 @@
1
2
- 19057
+ 16482
@@ -30574,18 +35929,18 @@
12
- 306
- 307
+ 276
+ 277
8
- 719
- 720
+ 697
+ 698
8
- 1321
- 1322
+ 936
+ 937
8
@@ -30602,7 +35957,7 @@
2
3
- 24
+ 25
@@ -30618,7 +35973,7 @@
2
3
- 24
+ 25
@@ -30637,8 +35992,8 @@
8
- 1533
- 1534
+ 1096
+ 1097
8
@@ -30655,7 +36010,7 @@
3
4
- 16
+ 17
@@ -30695,8 +36050,8 @@
8
- 2312
- 2313
+ 1875
+ 1876
8
@@ -30713,7 +36068,7 @@
3
4
- 16
+ 17
@@ -30744,35 +36099,35 @@
lambda_capture
- 31966
+ 28526
id
- 31966
+ 28526
lambda
- 15491
+ 13296
index
- 138
+ 146
field
- 31966
+ 28526
captured_by_reference
- 16
+ 17
is_implicit
- 16
+ 17
location
- 17944
+ 18398
@@ -30786,7 +36141,7 @@
1
2
- 31966
+ 28526
@@ -30802,7 +36157,7 @@
1
2
- 31966
+ 28526
@@ -30818,7 +36173,7 @@
1
2
- 31966
+ 28526
@@ -30834,7 +36189,7 @@
1
2
- 31966
+ 28526
@@ -30850,7 +36205,7 @@
1
2
- 31966
+ 28526
@@ -30866,7 +36221,7 @@
1
2
- 31966
+ 28526
@@ -30882,27 +36237,27 @@
1
2
- 8212
+ 6674
2
3
- 3541
+ 3082
3
4
- 1657
+ 1614
4
6
- 1259
+ 1226
6
18
- 820
+ 699
@@ -30918,27 +36273,27 @@
1
2
- 8212
+ 6674
2
3
- 3541
+ 3082
3
4
- 1657
+ 1614
4
6
- 1259
+ 1226
6
18
- 820
+ 699
@@ -30954,27 +36309,27 @@
1
2
- 8212
+ 6674
2
3
- 3541
+ 3082
3
4
- 1657
+ 1614
4
6
- 1259
+ 1226
6
18
- 820
+ 699
@@ -30990,12 +36345,12 @@
1
2
- 14248
+ 12726
2
3
- 1242
+ 569
@@ -31011,12 +36366,12 @@
1
2
- 15369
+ 13270
2
3
- 121
+ 25
@@ -31032,27 +36387,27 @@
1
2
- 8805
+ 7304
2
3
- 3696
+ 3246
3
4
- 1389
+ 1329
4
7
- 1291
+ 1087
7
18
- 308
+ 328
@@ -31121,33 +36476,33 @@
8
- 101
- 102
+ 81
+ 82
8
- 171
- 172
+ 139
+ 140
8
- 256
- 257
+ 223
+ 224
8
- 460
- 461
+ 410
+ 411
8
- 896
- 897
+ 767
+ 768
8
- 1907
- 1908
+ 1540
+ 1541
8
@@ -31217,33 +36572,33 @@
8
- 101
- 102
+ 81
+ 82
8
- 171
- 172
+ 139
+ 140
8
- 256
- 257
+ 223
+ 224
8
- 460
- 461
+ 410
+ 411
8
- 896
- 897
+ 767
+ 768
8
- 1907
- 1908
+ 1540
+ 1541
8
@@ -31313,33 +36668,33 @@
8
- 101
- 102
+ 81
+ 82
8
- 171
- 172
+ 139
+ 140
8
- 256
- 257
+ 223
+ 224
8
- 460
- 461
+ 410
+ 411
8
- 896
- 897
+ 767
+ 768
8
- 1907
- 1908
+ 1540
+ 1541
8
@@ -31356,12 +36711,12 @@
1
2
- 32
+ 34
2
3
- 105
+ 112
@@ -31377,12 +36732,12 @@
1
2
- 81
+ 86
2
3
- 56
+ 60
@@ -31451,33 +36806,33 @@
8
- 66
- 67
+ 65
+ 66
8
- 100
- 101
+ 98
+ 99
8
- 182
- 183
+ 179
+ 180
8
- 354
- 355
+ 347
+ 348
8
- 604
- 605
+ 585
+ 586
8
- 979
- 980
+ 933
+ 934
8
@@ -31494,7 +36849,7 @@
1
2
- 31966
+ 28526
@@ -31510,7 +36865,7 @@
1
2
- 31966
+ 28526
@@ -31526,7 +36881,7 @@
1
2
- 31966
+ 28526
@@ -31542,7 +36897,7 @@
1
2
- 31966
+ 28526
@@ -31558,7 +36913,7 @@
1
2
- 31966
+ 28526
@@ -31574,7 +36929,7 @@
1
2
- 31966
+ 28526
@@ -31588,13 +36943,13 @@
12
- 1457
- 1458
+ 1180
+ 1181
8
- 2478
- 2479
+ 2124
+ 2125
8
@@ -31609,13 +36964,13 @@
12
- 819
- 820
+ 590
+ 591
8
- 1241
- 1242
+ 1016
+ 1017
8
@@ -31651,13 +37006,13 @@
12
- 1457
- 1458
+ 1180
+ 1181
8
- 2478
- 2479
+ 2124
+ 2125
8
@@ -31674,7 +37029,7 @@
2
3
- 16
+ 17
@@ -31688,13 +37043,13 @@
12
- 573
- 574
+ 545
+ 546
8
- 1639
- 1640
+ 1589
+ 1590
8
@@ -31709,13 +37064,13 @@
12
- 1351
- 1352
+ 827
+ 828
8
- 2584
- 2585
+ 2477
+ 2478
8
@@ -31730,13 +37085,13 @@
12
- 955
- 956
+ 620
+ 621
8
- 967
- 968
+ 923
+ 924
8
@@ -31772,13 +37127,13 @@
12
- 1351
- 1352
+ 827
+ 828
8
- 2584
- 2585
+ 2477
+ 2478
8
@@ -31795,7 +37150,7 @@
2
3
- 16
+ 17
@@ -31809,13 +37164,13 @@
12
- 377
- 378
+ 328
+ 329
8
- 1832
- 1833
+ 1803
+ 1804
8
@@ -31832,17 +37187,17 @@
1
2
- 15694
+ 16568
2
6
- 1437
+ 1398
6
68
- 812
+ 431
@@ -31858,17 +37213,12 @@
1
2
- 16271
+ 17181
2
- 13
- 1470
-
-
- 13
68
- 203
+ 1217
@@ -31884,12 +37234,12 @@
1
2
- 17254
+ 17665
2
8
- 690
+ 733
@@ -31905,17 +37255,17 @@
1
2
- 15694
+ 16568
2
6
- 1437
+ 1398
6
68
- 812
+ 431
@@ -31931,12 +37281,12 @@
1
2
- 17920
+ 18373
2
3
- 24
+ 25
@@ -31952,7 +37302,7 @@
1
2
- 17944
+ 18398
@@ -31962,15 +37312,15 @@
fold
- 1246
+ 1247
expr
- 1246
+ 1247
operator
- 85
+ 86
is_left_fold
@@ -31988,7 +37338,7 @@
1
2
- 1246
+ 1247
@@ -32004,7 +37354,7 @@
1
2
- 1246
+ 1247
@@ -32020,7 +37370,7 @@
1
2
- 42
+ 43
2
@@ -32046,7 +37396,7 @@
1
2
- 85
+ 86
@@ -32088,19 +37438,19 @@
stmts
- 6368971
+ 6259661
id
- 6368971
+ 6259661
kind
- 162
+ 172
location
- 2684539
+ 2755017
@@ -32114,7 +37464,7 @@
1
2
- 6368971
+ 6259661
@@ -32130,7 +37480,7 @@
1
2
- 6368971
+ 6259661
@@ -32154,93 +37504,93 @@
8
- 430
- 431
+ 418
+ 419
8
- 595
- 596
+ 546
+ 547
8
- 1066
- 1067
+ 827
+ 828
8
- 1635
- 1636
+ 1470
+ 1471
8
- 1818
- 1819
+ 1577
+ 1578
8
- 2311
- 2312
+ 1802
+ 1803
8
- 2807
- 2808
+ 2462
+ 2463
8
- 3233
- 3234
+ 3217
+ 3218
8
- 3809
- 3810
+ 3610
+ 3611
8
- 5052
- 5053
+ 4863
+ 4864
8
- 16980
- 16981
+ 16249
+ 16250
8
- 18543
- 18544
+ 16732
+ 16733
8
- 22520
- 22521
+ 21439
+ 21440
8
- 74878
- 74879
+ 68795
+ 68796
8
- 95087
- 95088
+ 89075
+ 89076
8
- 119871
- 119872
+ 112007
+ 112008
8
- 200105
- 200106
+ 185649
+ 185650
8
- 213249
- 213250
+ 194240
+ 194241
8
@@ -32265,93 +37615,93 @@
8
- 111
- 112
+ 109
+ 110
8
- 436
- 437
+ 419
+ 420
8
- 945
- 946
+ 778
+ 779
8
- 1155
- 1156
+ 1079
+ 1080
8
- 1353
- 1354
+ 1311
+ 1312
8
- 1388
- 1389
+ 1347
+ 1348
8
- 1394
- 1395
+ 1388
+ 1389
8
- 2197
- 2198
+ 2061
+ 2062
8
- 2362
- 2363
+ 2309
+ 2310
8
- 2509
- 2510
+ 2476
+ 2477
8
- 7327
- 7328
+ 7043
+ 7044
8
- 8943
- 8944
+ 8622
+ 8623
8
- 11676
- 11677
+ 11206
+ 11207
8
- 37583
- 37584
+ 36340
+ 36341
8
- 44536
- 44537
+ 43405
+ 43406
8
- 49039
- 49040
+ 47752
+ 47753
8
- 86405
- 86406
+ 83834
+ 83835
8
- 101101
- 101102
+ 97372
+ 97373
8
@@ -32368,22 +37718,17 @@
1
2
- 2225040
+ 2353184
2
- 3
- 182234
-
-
- 3
- 10
- 202178
+ 4
+ 239108
- 10
- 1789
- 75085
+ 4
+ 1581
+ 162724
@@ -32399,12 +37744,12 @@
1
2
- 2601582
+ 2668298
2
10
- 82957
+ 86719
@@ -32569,15 +37914,15 @@
if_then
- 990215
+ 990214
if_stmt
- 990215
+ 990214
then_id
- 990215
+ 990214
@@ -32591,7 +37936,7 @@
1
2
- 990215
+ 990214
@@ -32607,7 +37952,7 @@
1
2
- 990215
+ 990214
@@ -32617,15 +37962,15 @@
if_else
- 436677
+ 437078
if_stmt
- 436677
+ 437078
else_id
- 436677
+ 437078
@@ -32639,7 +37984,7 @@
1
2
- 436677
+ 437078
@@ -32655,7 +38000,7 @@
1
2
- 436677
+ 437078
@@ -32713,15 +38058,15 @@
constexpr_if_then
- 106134
+ 103814
constexpr_if_stmt
- 106134
+ 103814
then_id
- 106134
+ 103814
@@ -32735,7 +38080,7 @@
1
2
- 106134
+ 103814
@@ -32751,7 +38096,7 @@
1
2
- 106134
+ 103814
@@ -32761,15 +38106,15 @@
constexpr_if_else
- 76166
+ 73956
constexpr_if_stmt
- 76166
+ 73956
else_id
- 76166
+ 73956
@@ -32783,7 +38128,7 @@
1
2
- 76166
+ 73956
@@ -32799,7 +38144,7 @@
1
2
- 76166
+ 73956
@@ -32905,15 +38250,15 @@
while_body
- 39648
+ 39647
while_stmt
- 39648
+ 39647
body_id
- 39648
+ 39647
@@ -32927,7 +38272,7 @@
1
2
- 39648
+ 39647
@@ -32943,7 +38288,7 @@
1
2
- 39648
+ 39647
@@ -33049,19 +38394,19 @@
switch_case
- 835329
+ 836096
switch_stmt
- 411463
+ 411840
index
- 386
+ 387
case_id
- 835329
+ 836096
@@ -33080,12 +38425,12 @@
2
3
- 408582
+ 408957
3
19
- 2858
+ 2861
@@ -33106,12 +38451,12 @@
2
3
- 408582
+ 408957
3
19
- 2858
+ 2861
@@ -33269,7 +38614,7 @@
1
2
- 835329
+ 836096
@@ -33285,7 +38630,7 @@
1
2
- 835329
+ 836096
@@ -33295,15 +38640,15 @@
switch_body
- 411463
+ 411840
switch_stmt
- 411463
+ 411840
body_id
- 411463
+ 411840
@@ -33317,7 +38662,7 @@
1
2
- 411463
+ 411840
@@ -33333,7 +38678,7 @@
1
2
- 411463
+ 411840
@@ -33535,19 +38880,19 @@
stmtparents
- 5628382
+ 5524463
id
- 5628382
+ 5524463
index
- 15775
+ 16767
parent
- 2381491
+ 2342634
@@ -33561,7 +38906,7 @@
1
2
- 5628382
+ 5524463
@@ -33577,7 +38922,7 @@
1
2
- 5628382
+ 5524463
@@ -33593,52 +38938,52 @@
1
2
- 5182
+ 5508
2
3
- 1291
+ 1372
3
4
- 284
+ 302
4
5
- 2006
+ 2132
7
8
- 1316
+ 1398
8
12
- 1023
+ 1087
12
29
- 1389
+ 1476
29
- 39
- 1186
+ 38
+ 1260
- 42
- 78
- 1194
+ 41
+ 77
+ 1269
- 78
- 209668
- 901
+ 77
+ 195079
+ 958
@@ -33654,52 +38999,52 @@
1
2
- 5182
+ 5508
2
3
- 1291
+ 1372
3
4
- 284
+ 302
4
5
- 2006
+ 2132
7
8
- 1316
+ 1398
8
12
- 1023
+ 1087
12
29
- 1389
+ 1476
29
- 39
- 1186
+ 38
+ 1260
- 42
- 78
- 1194
+ 41
+ 77
+ 1269
- 78
- 209668
- 901
+ 77
+ 195079
+ 958
@@ -33715,32 +39060,32 @@
1
2
- 1359016
+ 1344600
2
3
- 517378
+ 507832
3
4
- 151519
+ 144135
4
6
- 155727
+ 151439
6
16
- 178871
+ 175795
16
1943
- 18976
+ 18830
@@ -33756,32 +39101,32 @@
1
2
- 1359016
+ 1344600
2
3
- 517378
+ 507832
3
4
- 151519
+ 144135
4
6
- 155727
+ 151439
6
16
- 178871
+ 175795
16
1943
- 18976
+ 18830
@@ -33791,30 +39136,30 @@
ishandler
- 43746
+ 43747
block
- 43746
+ 43747
stmt_decl_bind
- 725885
+ 721594
stmt
- 715316
+ 681632
num
- 73
+ 124
decl
- 725885
+ 721526
@@ -33828,12 +39173,12 @@
1
2
- 707851
+ 659683
2
- 10
- 7465
+ 32
+ 21949
@@ -33849,12 +39194,12 @@
1
2
- 707851
+ 659683
2
- 10
- 7465
+ 32
+ 21949
@@ -33868,48 +39213,53 @@
12
- 14
- 15
+ 1
+ 2
+ 52
+
+
+ 2
+ 3
8
- 15
- 16
+ 3
+ 5
8
- 18
- 19
+ 7
+ 11
8
- 21
- 22
+ 11
+ 15
8
- 25
- 26
+ 21
+ 45
8
- 60
- 61
+ 86
+ 121
8
- 229
- 230
+ 204
+ 356
8
- 919
- 920
+ 1063
+ 2539
8
- 88055
- 88056
+ 5480
+ 170179
8
@@ -33924,48 +39274,53 @@
12
- 14
- 15
+ 1
+ 2
+ 52
+
+
+ 2
+ 3
8
- 15
- 16
+ 3
+ 5
8
- 18
- 19
+ 7
+ 11
8
- 21
- 22
+ 11
+ 15
8
- 25
- 26
+ 21
+ 45
8
- 60
- 61
+ 86
+ 121
8
- 229
- 230
+ 204
+ 356
8
- 919
- 920
+ 1063
+ 2539
8
- 88055
- 88056
+ 5480
+ 170162
8
@@ -33982,7 +39337,12 @@
1
2
- 725885
+ 721502
+
+
+ 2
+ 8
+ 24
@@ -33998,7 +39358,7 @@
1
2
- 725885
+ 721526
@@ -34008,19 +39368,19 @@
stmt_decl_entry_bind
- 725885
+ 721594
stmt
- 715316
+ 681632
num
- 73
+ 124
decl_entry
- 725885
+ 721594
@@ -34034,12 +39394,12 @@
1
2
- 707851
+ 659683
2
- 10
- 7465
+ 32
+ 21949
@@ -34055,12 +39415,12 @@
1
2
- 707851
+ 659683
2
- 10
- 7465
+ 32
+ 21949
@@ -34074,48 +39434,53 @@
12
- 14
- 15
+ 1
+ 2
+ 52
+
+
+ 2
+ 3
8
- 15
- 16
+ 3
+ 5
8
- 18
- 19
+ 7
+ 11
8
- 21
- 22
+ 11
+ 15
8
- 25
- 26
+ 21
+ 45
8
- 60
- 61
+ 86
+ 121
8
- 229
- 230
+ 204
+ 356
8
- 919
- 920
+ 1063
+ 2539
8
- 88055
- 88056
+ 5480
+ 170179
8
@@ -34130,48 +39495,53 @@
12
- 14
- 15
+ 1
+ 2
+ 52
+
+
+ 2
+ 3
8
- 15
- 16
+ 3
+ 5
8
- 18
- 19
+ 7
+ 11
8
- 21
- 22
+ 11
+ 15
8
- 25
- 26
+ 21
+ 45
8
- 60
- 61
+ 86
+ 121
8
- 229
- 230
+ 204
+ 356
8
- 919
- 920
+ 1063
+ 2539
8
- 88055
- 88056
+ 5480
+ 170179
8
@@ -34188,7 +39558,7 @@
1
2
- 725885
+ 721594
@@ -34204,7 +39574,7 @@
1
2
- 725885
+ 721594
@@ -34214,15 +39584,15 @@
blockscope
- 1644953
+ 1762474
block
- 1644953
+ 1762474
enclosing
- 1428065
+ 1507372
@@ -34236,7 +39606,7 @@
1
2
- 1644953
+ 1762474
@@ -34252,17 +39622,17 @@
1
2
- 1295584
+ 1336222
2
- 4
- 117122
+ 3
+ 128550
- 4
+ 3
28
- 15358
+ 42600
@@ -34272,11 +39642,11 @@
jumpinfo
- 348321
+ 348320
id
- 348321
+ 348320
str
@@ -34298,7 +39668,7 @@
1
2
- 348321
+ 348320
@@ -34314,7 +39684,7 @@
1
2
- 348321
+ 348320
@@ -34407,7 +39777,7 @@
2
3
- 36211
+ 36210
3
@@ -34453,19 +39823,19 @@
preprocdirects
- 5413336
+ 5401355
id
- 5413336
+ 5401355
kind
- 1373
+ 1374
location
- 5410090
+ 5398107
@@ -34479,7 +39849,7 @@
1
2
- 5413336
+ 5401355
@@ -34495,7 +39865,7 @@
1
2
- 5413336
+ 5401355
@@ -34514,18 +39884,18 @@
124
- 139
- 140
+ 145
+ 146
124
- 805
- 806
+ 808
+ 809
124
- 880
- 881
+ 866
+ 867
124
@@ -34539,8 +39909,8 @@
124
- 1883
- 1884
+ 1891
+ 1892
124
@@ -34549,18 +39919,18 @@
124
- 4737
- 4738
+ 4714
+ 4715
124
- 7126
- 7127
+ 7089
+ 7090
124
- 22045
- 22046
+ 21984
+ 21985
124
@@ -34580,18 +39950,18 @@
124
- 139
- 140
+ 145
+ 146
124
- 805
- 806
+ 808
+ 809
124
- 880
- 881
+ 866
+ 867
124
@@ -34605,8 +39975,8 @@
124
- 1883
- 1884
+ 1891
+ 1892
124
@@ -34615,18 +39985,18 @@
124
- 4737
- 4738
+ 4714
+ 4715
124
- 7126
- 7127
+ 7089
+ 7090
124
- 22019
- 22020
+ 21958
+ 21959
124
@@ -34643,7 +40013,7 @@
1
2
- 5409965
+ 5397982
27
@@ -34664,7 +40034,7 @@
1
2
- 5410090
+ 5398107
@@ -34674,15 +40044,15 @@
preprocpair
- 1142252
+ 1139961
begin
- 889778
+ 885609
elseelifend
- 1142252
+ 1139961
@@ -34696,17 +40066,17 @@
1
2
- 650164
+ 644874
2
3
- 230623
+ 231115
3
9
- 8990
+ 9619
@@ -34722,7 +40092,7 @@
1
2
- 1142252
+ 1139961
@@ -34732,41 +40102,41 @@
preproctrue
- 439769
+ 437245
branch
- 439769
+ 437245
preprocfalse
- 285563
+ 284334
branch
- 285563
+ 284334
preproctext
- 4356366
+ 4347469
id
- 4356366
+ 4347469
head
- 2957769
+ 2951406
body
- 1684909
+ 1679397
@@ -34780,7 +40150,7 @@
1
2
- 4356366
+ 4347469
@@ -34796,7 +40166,7 @@
1
2
- 4356366
+ 4347469
@@ -34812,12 +40182,12 @@
1
2
- 2758986
+ 2754896
2
798
- 198782
+ 196510
@@ -34833,12 +40203,12 @@
1
2
- 2876482
+ 2871828
2
5
- 81286
+ 79578
@@ -34854,17 +40224,17 @@
1
2
- 1536571
+ 1530983
2
10
- 127360
+ 127550
10
- 13606
- 20977
+ 13579
+ 20862
@@ -34880,17 +40250,17 @@
1
2
- 1540816
+ 1535231
2
12
- 126986
+ 127175
12
- 3246
- 17106
+ 3231
+ 16990
@@ -34900,15 +40270,15 @@
includes
- 318734
+ 364707
id
- 318734
+ 364707
included
- 58713
+ 67182
@@ -34922,7 +40292,7 @@
1
2
- 318734
+ 364707
@@ -34938,37 +40308,37 @@
1
2
- 29055
+ 33246
2
3
- 9445
+ 10808
3
4
- 4955
+ 5670
4
6
- 5356
+ 6129
6
11
- 4522
+ 5174
11
47
- 4405
+ 5041
47
793
- 972
+ 1112
@@ -34978,15 +40348,15 @@
link_targets
- 816
+ 846
id
- 816
+ 846
binary
- 816
+ 846
@@ -35000,7 +40370,7 @@
1
2
- 816
+ 846
@@ -35016,7 +40386,7 @@
1
2
- 816
+ 846
@@ -35026,11 +40396,11 @@
link_parent
- 30396619
+ 30397762
element
- 3865915
+ 3866154
link_target
@@ -35048,17 +40418,17 @@
1
2
- 530431
+ 530553
2
9
- 26947
+ 26953
9
10
- 3308536
+ 3308647
@@ -35077,48 +40447,48 @@
34
- 97375
- 97376
+ 97356
+ 97357
34
- 97494
- 97495
+ 97475
+ 97476
34
- 97547
- 97548
+ 97528
+ 97529
34
- 97574
- 97575
+ 97555
+ 97556
34
- 97596
- 97597
+ 97577
+ 97578
34
- 97628
- 97629
+ 97609
+ 97610
34
- 99635
- 99636
+ 99616
+ 99617
34
- 103015
- 103016
+ 102996
+ 102997
34
- 104379
- 104380
+ 104360
+ 104361
34
diff --git a/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/locations_default.ql b/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/locations_default.ql
deleted file mode 100644
index 7e17030fb6f3..000000000000
--- a/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/locations_default.ql
+++ /dev/null
@@ -1,18 +0,0 @@
-class LocationBase = @location_default or @location_stmt or @location_expr;
-
-class Location extends LocationBase {
- string toString() { none() }
-}
-
-class Container extends @container {
- string toString() { none() }
-}
-
-from Location l, Container c, int startLine, int startColumn, int endLine, int endColumn
-where
- locations_default(l, c, startLine, startColumn, endLine, endColumn)
- or
- locations_stmt(l, c, startLine, startColumn, endLine, endColumn)
- or
- locations_expr(l, c, startLine, startColumn, endLine, endColumn)
-select l, c, startLine, startColumn, endLine, endColumn
diff --git a/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme b/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme
deleted file mode 100644
index 7bc12b02a436..000000000000
--- a/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme
+++ /dev/null
@@ -1,2509 +0,0 @@
-
-/**
- * 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme
deleted file mode 100644
index e70d0b653187..000000000000
--- a/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2475 +0,0 @@
-
-/**
- * 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_default ;
-
-/**
- * The location of an element.
- * 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
-);
-
-/** 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 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 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 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 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 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 ref,
- int bodylocation: @location 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 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 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 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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 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 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 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 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 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 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 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 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 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 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 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 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/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties b/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties
deleted file mode 100644
index 347caa4decdf..000000000000
--- a/cpp/ql/lib/upgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-description: Merge location tables
-compatibility: full
-locations_default.rel: run locations_default.qlo
-locations_expr.rel: delete
-locations_stmt.rel: delete
diff --git a/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/old.dbscheme b/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/old.dbscheme
deleted file mode 100644
index 827dbc206ea5..000000000000
--- a/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/old.dbscheme
+++ /dev/null
@@ -1,2451 +0,0 @@
-/*- 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
- *
- * 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 -*/
-
-/**
- * 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
-);
-
-/*- Source location prefix -*/
-
-/**
- * The source location of the snapshot.
- */
-sourceLocationPrefix(string prefix : string ref);
-
-/*- Files and folders -*/
-
-/**
- * The location of an element.
- * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
-);
-
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string ref
-);
-
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container ref
-);
-
-/*- Lines of code -*/
-
-numlines(
- int element_id: @sourceline ref,
- int num_lines: int ref,
- int num_code: int ref,
- int num_comment: int ref
-);
-
-/*- Diagnostic messages -*/
-
-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
-);
-
-/*- C++ dbscheme -*/
-
-/**
- * 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
-);
-
-/*
- * C++ dbscheme
- */
-
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
-
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
-
-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_default 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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_default 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_default 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_default 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_default 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/827dbc206ea55377e032a8a934c8903fedc50fa0/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/semmlecode.cpp.dbscheme
deleted file mode 100644
index 5491582ac851..000000000000
--- a/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2428 +0,0 @@
-/*- 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
- *
- * 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 -*/
-
-/**
- * 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
-);
-
-/*- Source location prefix -*/
-
-/**
- * The source location of the snapshot.
- */
-sourceLocationPrefix(string prefix : string ref);
-
-/*- Files and folders -*/
-
-/**
- * The location of an element.
- * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
-);
-
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string ref
-);
-
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container ref
-);
-
-/*- Lines of code -*/
-
-numlines(
- int element_id: @sourceline ref,
- int num_lines: int ref,
- int num_code: int ref,
- int num_comment: int ref
-);
-
-/*- Diagnostic messages -*/
-
-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
-);
-
-/*- C++ dbscheme -*/
-
-/*
- * C++ dbscheme
- */
-
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
-
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
-
-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_default 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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_default 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_default 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_default 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_default 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/827dbc206ea55377e032a8a934c8903fedc50fa0/upgrade.properties b/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/upgrade.properties
deleted file mode 100644
index 495e77045ea0..000000000000
--- a/cpp/ql/lib/upgrades/827dbc206ea55377e032a8a934c8903fedc50fa0/upgrade.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-description: Remove unused external_package tables from the dbscheme
-compatibility: full
-external_packages.rel: delete
-header_to_external_package.rel: delete
diff --git a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme
deleted file mode 100644
index e38346051783..000000000000
--- a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme
+++ /dev/null
@@ -1,2506 +0,0 @@
-
-/**
- * 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
-| 63 = @scalable_vector_count // __SVCount_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme
deleted file mode 100644
index 7bc12b02a436..000000000000
--- a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2509 +0,0 @@
-
-/**
- * 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties
deleted file mode 100644
index 03985f017e32..000000000000
--- a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-description: Support more complex 16-bit floating-point types
-compatibility: full
diff --git a/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/old.dbscheme b/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/old.dbscheme
deleted file mode 100644
index e70d0b653187..000000000000
--- a/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/old.dbscheme
+++ /dev/null
@@ -1,2475 +0,0 @@
-
-/**
- * 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_default ;
-
-/**
- * The location of an element.
- * 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
-);
-
-/** 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 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 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 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 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 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 ref,
- int bodylocation: @location 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 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 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 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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 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 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 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 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 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 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 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 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 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 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 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 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/e70d0b653187b93d9688f21c9db46bb1cd46ab78/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/semmlecode.cpp.dbscheme
deleted file mode 100644
index 827dbc206ea5..000000000000
--- a/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/semmlecode.cpp.dbscheme
+++ /dev/null
@@ -1,2451 +0,0 @@
-/*- 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
- *
- * 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 -*/
-
-/**
- * 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
-);
-
-/*- Source location prefix -*/
-
-/**
- * The source location of the snapshot.
- */
-sourceLocationPrefix(string prefix : string ref);
-
-/*- Files and folders -*/
-
-/**
- * The location of an element.
- * 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(
- unique int id: @location_default,
- int file: @file ref,
- int beginLine: int ref,
- int beginColumn: int ref,
- int endLine: int ref,
- int endColumn: int ref
-);
-
-files(
- unique int id: @file,
- string name: string ref
-);
-
-folders(
- unique int id: @folder,
- string name: string ref
-);
-
-@container = @file | @folder
-
-containerparent(
- int parent: @container ref,
- unique int child: @container ref
-);
-
-/*- Lines of code -*/
-
-numlines(
- int element_id: @sourceline ref,
- int num_lines: int ref,
- int num_code: int ref,
- int num_comment: int ref
-);
-
-/*- Diagnostic messages -*/
-
-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
-);
-
-/*- C++ dbscheme -*/
-
-/**
- * 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
-);
-
-/*
- * C++ dbscheme
- */
-
-extractor_version(
- string codeql_version: string ref,
- string frontend_version: string ref
-)
-
-/** An element for which line-count information is available. */
-@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
-
-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_default 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
-| 63 = @scalable_vector_count // __SVCount_t
-| 64 = @complex_fp16 // _Complex __fp16
-| 65 = @complex_std_bfloat16 // _Complex __bf16
-| 66 = @complex_std_float16 // _Complex std::float16_t
-;
-
-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
-| 11 = @scalable_vector // Arm SVE
-;
-
-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
-);
-
-tupleelements(
- unique int id: @derivedtype ref,
- int num_elements: 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_default 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_default 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_default 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_default 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/e70d0b653187b93d9688f21c9db46bb1cd46ab78/upgrade.properties b/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/upgrade.properties
deleted file mode 100644
index 6d50eaf29c76..000000000000
--- a/cpp/ql/lib/upgrades/e70d0b653187b93d9688f21c9db46bb1cd46ab78/upgrade.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-description: sync dbscheme and delete svn tables
-compatibility: full
-svnentries.rel: delete
-svnaffectedfiles.rel: delete
-svnentrymsg.rel: delete
-svnchurn.rel: delete
diff --git a/cpp/ql/lib/utils/test/PrettyPrintModels.ql b/cpp/ql/lib/utils/test/PrettyPrintModels.ql
deleted file mode 100644
index 8cc172cfbf12..000000000000
--- a/cpp/ql/lib/utils/test/PrettyPrintModels.ql
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * @kind test-postprocess
- */
-
-import semmle.code.cpp.dataflow.ExternalFlow
-import codeql.dataflow.test.ProvenancePathGraph::TestPostProcessing::TranslateProvenanceResults
diff --git a/cpp/ql/src/Critical/GlobalUseBeforeInit.ql b/cpp/ql/src/Critical/GlobalUseBeforeInit.ql
index 946fc755a9fe..e9a637bd7d73 100644
--- a/cpp/ql/src/Critical/GlobalUseBeforeInit.ql
+++ b/cpp/ql/src/Critical/GlobalUseBeforeInit.ql
@@ -21,29 +21,13 @@ predicate initFunc(GlobalVariable v, Function f) {
)
}
-/** Holds if `v` has an initializer in function `f` that dominates `node`. */
-predicate dominatingInitInFunc(GlobalVariable v, Function f, ControlFlowNode node) {
- exists(VariableAccess initAccess |
- v.getAnAccess() = initAccess and
- initAccess.isUsedAsLValue() and
- initAccess.getEnclosingFunction() = f and
- dominates(initAccess, node)
- )
-}
-
-predicate safeAccess(VariableAccess access) {
- // it is safe if the variable access is part of a `sizeof` expression
- exists(SizeofExprOperator e | e.getAChild*() = access)
-}
-
predicate useFunc(GlobalVariable v, Function f) {
exists(VariableAccess access |
v.getAnAccess() = access and
access.isRValue() and
- access.getEnclosingFunction() = f and
- not safeAccess(access) and
- not dominatingInitInFunc(v, f, access)
- )
+ access.getEnclosingFunction() = f
+ ) and
+ not initFunc(v, f)
}
predicate uninitialisedBefore(GlobalVariable v, Function f) {
@@ -54,14 +38,12 @@ predicate uninitialisedBefore(GlobalVariable v, Function f) {
exists(Call call, Function g |
uninitialisedBefore(v, g) and
call.getEnclosingFunction() = g and
- (not functionInitialises(g, v) or locallyUninitialisedAt(v, call)) and
+ (not functionInitialises(f, v) or locallyUninitialisedAt(v, call)) and
resolvedCall(call, f)
)
}
predicate functionInitialises(Function f, GlobalVariable v) {
- initFunc(v, f)
- or
exists(Call call |
call.getEnclosingFunction() = f and
initialisedBy(v, call)
@@ -78,8 +60,7 @@ predicate locallyUninitialisedAt(GlobalVariable v, Call call) {
exists(Call mid |
locallyUninitialisedAt(v, mid) and not initialisedBy(v, mid) and callPair(mid, call)
)
- ) and
- not dominatingInitInFunc(v, call.getEnclosingFunction(), call)
+ )
}
predicate initialisedBy(GlobalVariable v, Call call) {
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.qhelp b/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.qhelp
index 186ec8079944..f0d303a05787 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.qhelp
+++ b/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.qhelp
@@ -11,7 +11,7 @@ It is not safe to assume that a year is 365 days long.
Determine whether the time span in question contains a leap day, then perform the calculation using the correct number
-of days. Alternatively, use an established library routine that already contains correct leap year logic.
+of days. Alternatively, use an established library routine that already contains correct leap year logic.
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql b/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql
index 71aa97c0ae56..341d014dae7d 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql
+++ b/cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql
@@ -4,8 +4,8 @@
* value of 365, it may be a sign that leap years are not taken
* into account.
* @kind problem
- * @problem.severity warning
- * @id cpp/leap-year/adding-365-days-per-year
+ * @problem.severity error
+ * @id cpp/microsoft/public/leap-year/adding-365-days-per-year
* @precision medium
* @tags leap-year
* correctness
@@ -13,11 +13,13 @@
import cpp
import LeapYear
+import semmle.code.cpp.dataflow.new.DataFlow
from Expr source, Expr sink
where
PossibleYearArithmeticOperationCheckFlow::flow(DataFlow::exprNode(source),
DataFlow::exprNode(sink))
select sink,
- "An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios.",
- source, source.toString()
+ "$@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios.",
+ sink.getEnclosingFunction(), sink.getEnclosingFunction().toString(), source, source.toString(),
+ sink, sink.toString()
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck.ql b/cpp/ql/src/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck.ql
new file mode 100644
index 000000000000..7a2cb9b04df4
--- /dev/null
+++ b/cpp/ql/src/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck.ql
@@ -0,0 +1,17 @@
+/**
+ * @name Leap Year Invalid Check (AntiPattern 5)
+ * @description An expression is used to check a year is presumably a leap year, but the conditions used are insufficient.
+ * @kind problem
+ * @problem.severity warning
+ * @id cpp/microsoft/public/leap-year/invalid-leap-year-check
+ * @precision medium
+ * @tags leap-year
+ * correctness
+ */
+
+import cpp
+import LeapYear
+
+from Mod4CheckedExpr exprMod4
+where not exists(ExprCheckLeapYear lyCheck | lyCheck.getAChild*() = exprMod4)
+select exprMod4, "Possible Insufficient Leap Year check (AntiPattern 5)"
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll b/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll
index 3cff86412e49..d3b53bf8ff9b 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll
+++ b/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll
@@ -3,7 +3,7 @@
*/
import cpp
-import semmle.code.cpp.ir.dataflow.TaintTracking
+import semmle.code.cpp.dataflow.new.TaintTracking
import semmle.code.cpp.commons.DateTime
/**
@@ -41,6 +41,271 @@ class CheckForLeapYearOperation extends Expr {
}
}
+bindingset[modVal]
+Expr moduloCheckEQ_0(EQExpr eq, int modVal) {
+ exists(RemExpr rem | rem = eq.getLeftOperand() |
+ result = rem.getLeftOperand() and
+ rem.getRightOperand().getValue().toInt() = modVal
+ ) and
+ eq.getRightOperand().getValue().toInt() = 0
+}
+
+bindingset[modVal]
+Expr moduloCheckNEQ_0(NEExpr neq, int modVal) {
+ exists(RemExpr rem | rem = neq.getLeftOperand() |
+ result = rem.getLeftOperand() and
+ rem.getRightOperand().getValue().toInt() = modVal
+ ) and
+ neq.getRightOperand().getValue().toInt() = 0
+}
+
+/**
+ * Returns if the two expressions resolve to the same value, albeit it is a fuzzy attempt.
+ * SSA is not fit for purpose here as calls break SSA equivalence.
+ */
+predicate exprEq_propertyPermissive(Expr e1, Expr e2) {
+ not e1 = e2 and
+ (
+ DataFlow::localFlow(DataFlow::exprNode(e1), DataFlow::exprNode(e2))
+ or
+ if e1 instanceof ThisExpr and e2 instanceof ThisExpr
+ then any()
+ else
+ /* If it's a direct Access, check that the target is the same. */
+ if e1 instanceof Access
+ then e1.(Access).getTarget() = e2.(Access).getTarget()
+ else
+ /* If it's a Call, compare qualifiers and only permit no-argument Calls. */
+ if e1 instanceof Call
+ then
+ e1.(Call).getTarget() = e2.(Call).getTarget() and
+ e1.(Call).getNumberOfArguments() = 0 and
+ e2.(Call).getNumberOfArguments() = 0 and
+ if e1.(Call).hasQualifier()
+ then exprEq_propertyPermissive(e1.(Call).getQualifier(), e2.(Call).getQualifier())
+ else any()
+ else
+ /* If it's a binaryOperation, compare op and recruse */
+ if e1 instanceof BinaryOperation
+ then
+ e1.(BinaryOperation).getOperator() = e2.(BinaryOperation).getOperator() and
+ exprEq_propertyPermissive(e1.(BinaryOperation).getLeftOperand(),
+ e2.(BinaryOperation).getLeftOperand()) and
+ exprEq_propertyPermissive(e1.(BinaryOperation).getRightOperand(),
+ e2.(BinaryOperation).getRightOperand())
+ else
+ // Otherwise fail (and permit the raising of a finding)
+ if e1 instanceof Literal
+ then e1.(Literal).getValue() = e2.(Literal).getValue()
+ else none()
+ )
+}
+
+/**
+ * An expression that is the subject of a mod-4 check.
+ * ie `expr % 4 == 0`
+ */
+class Mod4CheckedExpr extends Expr {
+ Mod4CheckedExpr() { exists(Expr e | e = moduloCheckEQ_0(this, 4)) }
+}
+
+/**
+ * Year Div of 100 not equal to 0:
+ * - `year % 100 != 0`
+ * - `!(year % 100 == 0)`
+ */
+abstract class ExprCheckCenturyComponentDiv100 extends Expr {
+ abstract Expr getYearExpr();
+}
+
+/**
+ * The normal form of the expression `year % 100 != 0`.
+ */
+final class ExprCheckCenturyComponentDiv100Normative extends ExprCheckCenturyComponentDiv100 {
+ ExprCheckCenturyComponentDiv100Normative() { exists(moduloCheckNEQ_0(this, 100)) }
+
+ override Expr getYearExpr() { result = moduloCheckNEQ_0(this, 100) }
+}
+
+/**
+ * The inverted form of the expression `year % 100 != 0`, ie `!(year % 100 == 0)`
+ */
+final class ExprCheckCenturyComponentDiv100Inverted extends ExprCheckCenturyComponentDiv100, NotExpr
+{
+ ExprCheckCenturyComponentDiv100Inverted() { exists(moduloCheckEQ_0(this.getOperand(), 100)) }
+
+ override Expr getYearExpr() { result = moduloCheckEQ_0(this.getOperand(), 100) }
+}
+
+/**
+ * A check that an expression is divisible by 400 or not
+ * - `(year % 400 == 0)`
+ * - `!(year % 400 != 0)`
+ */
+abstract class ExprCheckCenturyComponentDiv400 extends Expr {
+ abstract Expr getYearExpr();
+}
+
+/**
+ * The normative form of expression is divisible by 400:
+ * ie `year % 400 == 0`
+ */
+final class ExprCheckCenturyComponentDiv400Normative extends ExprCheckCenturyComponentDiv400 {
+ ExprCheckCenturyComponentDiv400Normative() { exists(moduloCheckEQ_0(this, 400)) }
+
+ override Expr getYearExpr() {
+ exists(Expr e |
+ e = moduloCheckEQ_0(this, 400) and
+ (
+ if e instanceof ConvertedYearByOffset
+ then result = e.(ConvertedYearByOffset).getYearOperand()
+ else result = e
+ )
+ )
+ }
+}
+
+/**
+ * An arithmetic operation that seemingly converts an operand between time formats.
+ */
+class ConvertedYearByOffset extends BinaryArithmeticOperation {
+ ConvertedYearByOffset() {
+ this.getAnOperand().getValue().toInt() instanceof TimeFormatConversionOffset
+ }
+
+ Expr getYearOperand() {
+ this.getLeftOperand().getValue().toInt() instanceof TimeFormatConversionOffset and
+ result = this.getRightOperand()
+ or
+ this.getRightOperand().getValue().toInt() instanceof TimeFormatConversionOffset and
+ result = this.getLeftOperand()
+ }
+}
+
+/**
+ * A flow configuration to track DataFlow from a `CovertedYearByOffset` to some `StructTmLeapYearFieldAccess`.
+ */
+module LocalConvertedYearByOffsetToLeapYearCheckFlowConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node n) { not n.asExpr() instanceof ConvertedYearByOffset }
+
+ predicate isSink(DataFlow::Node n) { n.asExpr() instanceof StructTmLeapYearFieldAccess }
+}
+
+module LocalConvertedYearByOffsetToLeapYearCheckFlow =
+ DataFlow::Global;
+
+/**
+ * The set of ints (or strings) which represent a value that is typically used to convert between time data types.
+ */
+final class TimeFormatConversionOffset extends int {
+ TimeFormatConversionOffset() {
+ this =
+ [
+ 1900, // tm_year represents years since 1900
+ 1970, // converting from/to Unix epoch
+ 2000, // some systems may use 2000 for 2-digit year conversions
+ ]
+ }
+}
+
+/**
+ * The inverted form of expression is divisible by 400:
+ * ie `!(year % 400 != 0)`
+ */
+final class ExprCheckCenturyComponentDiv400Inverted extends ExprCheckCenturyComponentDiv400, NotExpr
+{
+ ExprCheckCenturyComponentDiv400Inverted() { exists(moduloCheckNEQ_0(this.getOperand(), 400)) }
+
+ override Expr getYearExpr() { result = moduloCheckNEQ_0(this.getOperand(), 400) }
+}
+
+/**
+ * The Century component of a Leap-Year guard
+ */
+class ExprCheckCenturyComponent extends LogicalOrExpr {
+ ExprCheckCenturyComponent() {
+ exists(ExprCheckCenturyComponentDiv400 exprDiv400, ExprCheckCenturyComponentDiv100 exprDiv100 |
+ this.getAnOperand() = exprDiv100 and
+ this.getAnOperand() = exprDiv400 and
+ exprEq_propertyPermissive(exprDiv100.getYearExpr(), exprDiv400.getYearExpr())
+ )
+ }
+
+ Expr getYearExpr() {
+ exists(ExprCheckCenturyComponentDiv400 exprDiv400 |
+ this.getAnOperand() = exprDiv400 and
+ result = exprDiv400.getYearExpr()
+ )
+ }
+}
+
+/**
+ * A **Valid** Leap year check expression.
+ */
+abstract class ExprCheckLeapYear extends Expr { }
+
+/**
+ * A valid Leap-Year guard expression of the following form:
+ * `dt.Year % 4 == 0 && (dt.Year % 100 != 0 || dt.Year % 400 == 0)`
+ */
+final class ExprCheckLeapYearFormA extends ExprCheckLeapYear, LogicalAndExpr {
+ ExprCheckLeapYearFormA() {
+ exists(Expr e, ExprCheckCenturyComponent centuryCheck |
+ e = moduloCheckEQ_0(this.getLeftOperand(), 4) and
+ centuryCheck = this.getAnOperand().getAChild*() and
+ exprEq_propertyPermissive(e, centuryCheck.getYearExpr())
+ )
+ }
+}
+
+/**
+ * A valid Leap-Year guard expression of the following forms:
+ * `year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)`
+ * `(year + 1900) % 400 == 0 || (year % 100 != 0 && year % 4 == 0)`
+ */
+final class ExprCheckLeapYearFormB extends ExprCheckLeapYear, LogicalOrExpr {
+ ExprCheckLeapYearFormB() {
+ exists(VariableAccess va1, VariableAccess va2, VariableAccess va3 |
+ va1 = moduloCheckEQ_0(this.getAnOperand(), 400) and
+ va2 = moduloCheckNEQ_0(this.getAnOperand().(LogicalAndExpr).getAnOperand(), 100) and
+ va3 = moduloCheckEQ_0(this.getAnOperand().(LogicalAndExpr).getAnOperand(), 4) and
+ // The 400-leap year check may be offset by [1900,1970,2000].
+ exists(Expr va1_subExpr | va1_subExpr = va1.getAChild*() |
+ exprEq_propertyPermissive(va1_subExpr, va2) and
+ exprEq_propertyPermissive(va2, va3)
+ )
+ )
+ }
+}
+
+Expr leapYearOpEnclosingElement(CheckForLeapYearOperation op) { result = op.getEnclosingElement() }
+
+/**
+ * A value that resolves as a constant integer that represents some normalization or conversion between date types.
+ */
+pragma[inline]
+private predicate isNormalizationPrimitiveValue(Expr e) {
+ e.getValue().toInt() = [1900, 2000, 1980, 80]
+}
+
+/**
+ * A normalization operation is an expression that is merely attempting to convert between two different datetime schemes,
+ * and does not apply any additional mutation to the represented value.
+ */
+pragma[inline]
+predicate isNormalizationOperation(Expr e) {
+ isNormalizationPrimitiveValue([e, e.(Operation).getAChild()])
+ or
+ // Special case for transforming marshaled 2-digit year date:
+ // theTime.wYear += 100*value;
+ e.(Operation).getAChild().(MulExpr).getValue().toInt() = 100
+}
+
+/**
+ * Get the field accesses used in a `ExprCheckLeapYear` expression.
+ */
+LeapYearFieldAccess leapYearCheckFieldAccess(ExprCheckLeapYear a) { result = a.getAChild*() }
+
/**
* A `YearFieldAccess` that would represent an access to a year field on a struct and is used for arguing about leap year calculations.
*/
@@ -73,48 +338,7 @@ abstract class LeapYearFieldAccess extends YearFieldAccess {
this.isModified() and
exists(Operation op |
op.getAnOperand() = this and
- (
- op instanceof AssignArithmeticOperation and
- not (
- op.getAChild().getValue().toInt() = 1900
- or
- op.getAChild().getValue().toInt() = 2000
- or
- op.getAChild().getValue().toInt() = 1980
- or
- op.getAChild().getValue().toInt() = 80
- or
- // Special case for transforming marshaled 2-digit year date:
- // theTime.wYear += 100*value;
- exists(MulExpr mulBy100 | mulBy100 = op.getAChild() |
- mulBy100.getAChild().getValue().toInt() = 100
- )
- )
- or
- exists(BinaryArithmeticOperation bao |
- bao = op.getAnOperand() and
- // we're specifically interested in calculations that update the existing
- // value (like `x = x + 1`), so look for a child `YearFieldAccess`.
- bao.getAChild*() instanceof YearFieldAccess and
- not (
- bao.getAChild().getValue().toInt() = 1900
- or
- bao.getAChild().getValue().toInt() = 2000
- or
- bao.getAChild().getValue().toInt() = 1980
- or
- bao.getAChild().getValue().toInt() = 80
- or
- // Special case for transforming marshaled 2-digit year date:
- // theTime.wYear += 100*value;
- exists(MulExpr mulBy100 | mulBy100 = op.getAChild() |
- mulBy100.getAChild().getValue().toInt() = 100
- )
- )
- )
- or
- op instanceof CrementOperation
- )
+ not isNormalizationOperation(op)
)
}
@@ -155,9 +379,7 @@ abstract class LeapYearFieldAccess extends YearFieldAccess {
// but these centurial years are leap years if they are exactly divisible by 400
//
// https://aa.usno.navy.mil/faq/docs/calendars.php
- this.isUsedInMod4Operation() and
- this.additionalModulusCheckForLeapYear(400) and
- this.additionalModulusCheckForLeapYear(100)
+ this = leapYearCheckFieldAccess(_)
}
}
@@ -175,19 +397,9 @@ class StructTmLeapYearFieldAccess extends LeapYearFieldAccess {
StructTmLeapYearFieldAccess() { this.getTarget().getName() = "tm_year" }
override predicate isUsedInCorrectLeapYearCheck() {
- this.isUsedInMod4Operation() and
- this.additionalModulusCheckForLeapYear(400) and
- this.additionalModulusCheckForLeapYear(100) and
- // tm_year represents years since 1900
- (
- this.additionalAdditionOrSubstractionCheckForLeapYear(1900)
- or
- // some systems may use 2000 for 2-digit year conversions
- this.additionalAdditionOrSubstractionCheckForLeapYear(2000)
- or
- // converting from/to Unix epoch
- this.additionalAdditionOrSubstractionCheckForLeapYear(1970)
- )
+ this = leapYearCheckFieldAccess(_) and
+ /* There is some data flow from some conversion arithmetic to this expression. */
+ LocalConvertedYearByOffsetToLeapYearCheckFlow::flow(_, DataFlow::exprNode(this))
}
}
@@ -206,10 +418,10 @@ class ChecksForLeapYearFunctionCall extends FunctionCall {
}
/**
- * Data flow configuration for finding a variable access that would flow into
+ * A `DataFlow` configuraiton for finding a variable access that would flow into
* a function call that includes an operation to check for leap year.
*/
-private module LeapYearCheckConfig implements DataFlow::ConfigSig {
+private module LeapYearCheckFlowConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source.asExpr() instanceof VariableAccess }
predicate isSink(DataFlow::Node sink) {
@@ -217,11 +429,10 @@ private module LeapYearCheckConfig implements DataFlow::ConfigSig {
}
}
-module LeapYearCheckFlow = DataFlow::Global;
+module LeapYearCheckFlow = DataFlow::Global;
/**
- * Data flow configuration for finding an operation with hardcoded 365 that will flow into
- * a `FILEINFO` field.
+ * A `DataFlow` configuration for finding an operation with hardcoded 365 that will flow into a `_FILETIME` field.
*/
private module FiletimeYearArithmeticOperationCheckConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) {
@@ -246,46 +457,72 @@ module FiletimeYearArithmeticOperationCheckFlow =
DataFlow::Global;
/**
- * Taint configuration for finding an operation with hardcoded 365 that will flow into any known date/time field.
+ * A `DataFlow` configuration for finding an operation with hardcoded 365 that will flow into any known date/time field.
*/
private module PossibleYearArithmeticOperationCheckConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) {
- exists(Operation op | op = source.asExpr() |
- op.getAChild*().getValue().toInt() = 365 and
- (
- not op.getParent() instanceof Expr or
- op.getParent() instanceof Assignment
- )
- )
- }
-
- predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
-
- predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
- // flow from anything on the RHS of an assignment to a time/date structure to that
- // assignment.
- exists(StructLikeClass dds, FieldAccess fa, Assignment aexpr, Expr e |
- e = node1.asExpr() and
- fa = node2.asExpr()
- |
- (dds instanceof PackedTimeType or dds instanceof UnpackedTimeType) and
- fa.getQualifier().getUnderlyingType() = dds and
- aexpr.getLValue() = fa and
- aexpr.getRValue().getAChild*() = e
- )
+ // NOTE: addressing current issue with new IR dataflow, where
+ // constant folding occurs before dataflow nodes are associated
+ // with the constituent literals.
+ source.asExpr().getAChild*().getValue().toInt() = 365 and
+ not exists(DataFlow::Node parent | parent.asExpr().getAChild+() = source.asExpr())
}
predicate isSink(DataFlow::Node sink) {
exists(StructLikeClass dds, FieldAccess fa, AssignExpr aexpr |
- aexpr.getRValue() = sink.asExpr()
- |
(dds instanceof PackedTimeType or dds instanceof UnpackedTimeType) and
fa.getQualifier().getUnderlyingType() = dds and
fa.isModified() and
- aexpr.getLValue() = fa
+ aexpr.getLValue() = fa and
+ sink.asExpr() = aexpr.getRValue()
)
}
}
module PossibleYearArithmeticOperationCheckFlow =
TaintTracking::Global;
+
+/**
+ * A `YearFieldAccess` that is modifying the year by any arithmetic operation.
+ *
+ * NOTE:
+ * To change this class to work for general purpose date transformations that do not check the return value,
+ * make the following changes:
+ * - change `extends LeapYearFieldAccess` to `extends FieldAccess`.
+ * - change `this.isModifiedByArithmeticOperation()` to `this.isModified()`.
+ * Expect a lower precision for a general purpose version.
+ */
+class DateStructModifiedFieldAccess extends LeapYearFieldAccess {
+ DateStructModifiedFieldAccess() {
+ exists(Field f, StructLikeClass struct |
+ f.getAnAccess() = this and
+ struct.getAField() = f and
+ struct.getUnderlyingType() instanceof UnpackedTimeType and
+ this.isModifiedByArithmeticOperation()
+ )
+ }
+}
+
+/**
+ * This is a list of APIs that will get the system time, and therefore guarantee that the value is valid.
+ */
+class SafeTimeGatheringFunction extends Function {
+ SafeTimeGatheringFunction() {
+ this.getQualifiedName() = ["GetFileTime", "GetSystemTime", "NtQuerySystemTime"]
+ }
+}
+
+/**
+ * This list of APIs should check for the return value to detect problems during the conversion.
+ */
+class TimeConversionFunction extends Function {
+ TimeConversionFunction() {
+ this.getQualifiedName() =
+ [
+ "FileTimeToSystemTime", "SystemTimeToFileTime", "SystemTimeToTzSpecificLocalTime",
+ "SystemTimeToTzSpecificLocalTimeEx", "TzSpecificLocalTimeToSystemTime",
+ "TzSpecificLocalTimeToSystemTimeEx", "RtlLocalTimeToSystemTime",
+ "RtlTimeToSecondsSince1970", "_mkgmtime"
+ ]
+ }
+}
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.qhelp b/cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.qhelp
new file mode 100644
index 000000000000..eda98e5350fa
--- /dev/null
+++ b/cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.qhelp
@@ -0,0 +1,26 @@
+
+
+
+
+ This anti-pattern occurs when a developer uses conditional logic to execute a different path of code for a leap year than for a common year, without fully testing both code paths.
+ Though using a framework or library's leap year function is better than manually calculating the leap year (as described in anti-pattern 5), it can still be a source of errors if the result is used to execute a different code path. The bug is especially easy to be masked if the year is derived from the current time of the system clock. See Prevention Measures for techniques to avoid this bug.
+
+
+
+ - Avoid using conditional logic that creates a separate branch in your code for leap year.
+ - Ensure your code is testable, and test how it will behave when presented with leap year dates of February 29th and December 31st as inputs.
+
+
+
+Note in the following examples, that year, month, and day might instead be .wYear, .wMonth, and .wDay fields of a SYSTEMTIME structure, or might be .tm_year, .tm_mon, and .tm_mday fields of a struct tm.
+
+
+
+
+ NASA / Goddard Space Flight Center - Calendars
+ Wikipedia - Leap year bug
+ Microsoft Azure blog - Is your code ready for the leap year?
+
+
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.ql b/cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.ql
new file mode 100644
index 000000000000..43c8690c591a
--- /dev/null
+++ b/cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.ql
@@ -0,0 +1,28 @@
+/**
+ * @name Leap Year Conditional Logic (AntiPattern 7)
+ * @description Conditional logic is present for leap years and common years, potentially leading to untested code pathways.
+ * @kind problem
+ * @problem.severity warning
+ * @id cpp/microsoft/public/leap-year/conditional-logic-branches
+ * @precision medium
+ * @tags leap-year
+ * correctness
+ */
+
+import cpp
+import LeapYear
+import semmle.code.cpp.dataflow.new.DataFlow
+
+class IfStmtLeapYearCheck extends IfStmt {
+ IfStmtLeapYearCheck() {
+ this.hasElse() and
+ exists(ExprCheckLeapYear lyCheck, DataFlow::Node source, DataFlow::Node sink |
+ source.asExpr() = lyCheck and
+ sink.asExpr() = this.getCondition() and
+ DataFlow::localFlow(source, sink)
+ )
+ }
+}
+
+from IfStmtLeapYearCheck lyCheckIf
+select lyCheckIf, "Leap Year conditional statement may have untested code paths"
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.qhelp b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.qhelp
index 8fbe7933201b..b708e127767c 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.qhelp
+++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.qhelp
@@ -15,10 +15,10 @@
In this example, we are adding 1 year to the current date. This may work most of the time, but on any given February 29th, the resulting value will be invalid.
-
+
To fix this bug, check the result for leap year.
-
+
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
index 03570b3611cd..18ad003eb71f 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
+++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
@@ -1,9 +1,9 @@
/**
- * @name Year field changed using an arithmetic operation without checking for leap year
+ * @name Year field changed using an arithmetic operation without checking for leap year (AntiPattern 1)
* @description A field that represents a year is being modified by an arithmetic operation, but no proper check for leap years can be detected afterwards.
* @kind problem
* @problem.severity warning
- * @id cpp/leap-year/unchecked-after-arithmetic-year-modification
+ * @id cpp/microsoft/public/leap-year/unchecked-after-arithmetic-year-modification
* @precision medium
* @tags leap-year
* correctness
@@ -12,13 +12,16 @@
import cpp
import LeapYear
-from Variable var, LeapYearFieldAccess yfa
-where
- exists(VariableAccess va |
+/**
+ * Holds if there is no known leap-year verification for the given `YearWriteOp`.
+ * Binds the `var` argument to the qualifier of the `ywo` argument.
+ */
+bindingset[ywo]
+predicate isYearModifedWithoutExplicitLeapYearCheck(Variable var, YearWriteOp ywo) {
+ exists(VariableAccess va, YearFieldAccess yfa |
+ yfa = ywo.getYearAccess() and
yfa.getQualifier() = va and
var.getAnAccess() = va and
- // The year is modified with an arithmetic operation. Avoid values that are likely false positives
- yfa.isModifiedByArithmeticOperationNotForNormalization() and
// Avoid false positives
not (
// If there is a local check for leap year after the modification
@@ -41,8 +44,10 @@ where
LeapYearCheckFlow::flow(DataFlow::exprNode(yfacheck), DataFlow::exprNode(fc.getAnArgument()))
)
or
- // If there is a successor or predecessor that sets the month = 1
- exists(MonthFieldAccess mfa, AssignExpr ae |
+ // If there is a successor or predecessor that sets the month or day to a fixed value
+ exists(FieldAccess mfa, AssignExpr ae, int val |
+ mfa instanceof MonthFieldAccess or mfa instanceof DayFieldAccess
+ |
mfa.getQualifier() = var.getAnAccess() and
mfa.isModified() and
(
@@ -50,10 +55,87 @@ where
yfa.getBasicBlock() = mfa.getBasicBlock().getASuccessor+()
) and
ae = mfa.getEnclosingElement() and
- ae.getAnOperand().getValue().toInt() = 1
+ ae.getAnOperand().getValue().toInt() = val
)
)
)
-select yfa,
- "Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found.",
- yfa.getTarget(), yfa.getTarget().toString(), var, var.toString()
+}
+
+/**
+ * The set of all write operations to the Year field of a date struct.
+ */
+abstract class YearWriteOp extends Operation {
+ /** Extracts the access to the Year field */
+ abstract YearFieldAccess getYearAccess();
+
+ /** Get the expression which represents the new value. */
+ abstract Expr getMutationExpr();
+}
+
+/**
+ * A unary operation (Crement) performed on a Year field.
+ */
+class YearWriteOpUnary extends YearWriteOp, UnaryOperation {
+ YearWriteOpUnary() { this.getOperand() instanceof YearFieldAccess }
+
+ override YearFieldAccess getYearAccess() { result = this.getOperand() }
+
+ override Expr getMutationExpr() { result = this }
+}
+
+/**
+ * An assignment operation or mutation on the Year field of a date object.
+ */
+class YearWriteOpAssignment extends YearWriteOp, Assignment {
+ YearWriteOpAssignment() { this.getLValue() instanceof YearFieldAccess }
+
+ override YearFieldAccess getYearAccess() { result = this.getLValue() }
+
+ override Expr getMutationExpr() {
+ // Note: may need to use DF analysis to pull out the original value,
+ // if there is excessive false positives.
+ if this.getOperator() = "="
+ then
+ exists(DataFlow::Node source, DataFlow::Node sink |
+ sink.asExpr() = this.getRValue() and
+ OperationToYearAssignmentFlow::flow(source, sink) and
+ result = source.asExpr()
+ )
+ else result = this
+ }
+}
+
+/**
+ * A DataFlow configuration for identifying flows from some non trivial access or literal
+ * to the Year field of a date object.
+ */
+module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node n) {
+ not n.asExpr() instanceof Access and
+ not n.asExpr() instanceof Literal
+ }
+
+ predicate isSink(DataFlow::Node n) {
+ exists(Assignment a |
+ a.getLValue() instanceof YearFieldAccess and
+ a.getRValue() = n.asExpr()
+ )
+ }
+}
+
+module OperationToYearAssignmentFlow = DataFlow::Global;
+
+from Variable var, YearWriteOp ywo, Expr mutationExpr
+where
+ mutationExpr = ywo.getMutationExpr() and
+ isYearModifedWithoutExplicitLeapYearCheck(var, ywo) and
+ not isNormalizationOperation(mutationExpr) and
+ not ywo instanceof AddressOfExpr and
+ not exists(Call c, TimeConversionFunction f | f.getACallToThisFunction() = c |
+ c.getAnArgument().getAChild*() = var.getAnAccess() and
+ ywo.getASuccessor*() = c
+ )
+select ywo,
+ "$@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found.",
+ ywo.getEnclosingFunction(), ywo.getEnclosingFunction().toString(),
+ ywo.getYearAccess().getTarget(), ywo.getYearAccess().getTarget().toString(), var, var.toString()
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.qhelp b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.qhelp
index 6be0e091caf3..f3c4822632fb 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.qhelp
+++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.qhelp
@@ -27,10 +27,10 @@
In this example, we are adding 1 year to the current date. This may work most of the time, but on any given February 29th, the resulting value will be invalid.
-
+
To fix this bug, you must verify the return value for SystemTimeToFileTime and handle any potential error accordingly.
-
+
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql
index af02a2814a20..b223080fb6b3 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql
+++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql
@@ -1,11 +1,11 @@
/**
- * @name Unchecked return value for time conversion function
+ * @name Unchecked return value for time conversion function (AntiPattern 6)
* @description When the return value of a fallible time conversion function is
* not checked for failure, its output parameters may contain
* invalid dates.
* @kind problem
* @problem.severity warning
- * @id cpp/leap-year/unchecked-return-value-for-time-conversion-function
+ * @id cpp/microsoft/public/leap-year/unchecked-return-value-for-time-conversion-function
* @precision medium
* @tags leap-year
* correctness
@@ -14,51 +14,6 @@
import cpp
import LeapYear
-/**
- * A `YearFieldAccess` that is modifying the year by any arithmetic operation.
- *
- * NOTE:
- * To change this class to work for general purpose date transformations that do not check the return value,
- * make the following changes:
- * - change `extends LeapYearFieldAccess` to `extends FieldAccess`.
- * - change `this.isModifiedByArithmeticOperation()` to `this.isModified()`.
- * Expect a lower precision for a general purpose version.
- */
-class DateStructModifiedFieldAccess extends LeapYearFieldAccess {
- DateStructModifiedFieldAccess() {
- exists(Field f, StructLikeClass struct |
- f.getAnAccess() = this and
- struct.getAField() = f and
- struct.getUnderlyingType() instanceof UnpackedTimeType and
- this.isModifiedByArithmeticOperation()
- )
- }
-}
-
-/**
- * This is a list of APIs that will get the system time, and therefore guarantee that the value is valid.
- */
-class SafeTimeGatheringFunction extends Function {
- SafeTimeGatheringFunction() {
- this.getQualifiedName() = ["GetFileTime", "GetSystemTime", "NtQuerySystemTime"]
- }
-}
-
-/**
- * This list of APIs should check for the return value to detect problems during the conversion.
- */
-class TimeConversionFunction extends Function {
- TimeConversionFunction() {
- this.getQualifiedName() =
- [
- "FileTimeToSystemTime", "SystemTimeToFileTime", "SystemTimeToTzSpecificLocalTime",
- "SystemTimeToTzSpecificLocalTimeEx", "TzSpecificLocalTimeToSystemTime",
- "TzSpecificLocalTimeToSystemTimeEx", "RtlLocalTimeToSystemTime",
- "RtlTimeToSecondsSince1970", "_mkgmtime"
- ]
- }
-}
-
from FunctionCall fcall, TimeConversionFunction trf, Variable var
where
fcall = trf.getACallToThisFunction() and
@@ -104,5 +59,6 @@ where
)
)
select fcall,
- "Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe.",
- trf, trf.getQualifiedName().toString(), var, var.getName()
+ "$@: Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe.",
+ fcall.getEnclosingFunction(), fcall.getEnclosingFunction().toString(), trf,
+ trf.getQualifiedName().toString(), var, var.getName()
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.qhelp b/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.qhelp
index d2c0375f0afc..03a8ff6216bb 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.qhelp
+++ b/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.qhelp
@@ -16,15 +16,15 @@
In this example, we are allocating 365 integers, one for each day of the year. This code will fail on a leap year, when there are 366 days.
-
+
When using arrays, allocate the correct number of elements to match the year.
-
+
NASA / Goddard Space Flight Center - Calendars
- Wikipedia - Leap year bug
+ Wikipedia - Leap year bug
Microsoft Azure blog - Is your code ready for the leap year?
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.ql b/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.ql
index b27db937b577..72aa653c4dff 100644
--- a/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.ql
+++ b/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.ql
@@ -1,41 +1,62 @@
/**
- * @name Unsafe array for days of the year
+ * @name Unsafe array for days of the year (AntiPattern 4)
* @description An array of 365 items typically indicates one entry per day of the year, but without considering leap years, which would be 366 days.
* An access on a leap year could result in buffer overflow bugs.
* @kind problem
* @problem.severity warning
- * @id cpp/leap-year/unsafe-array-for-days-of-the-year
+ * @id cpp/microsoft/public/leap-year/unsafe-array-for-days-of-the-year
* @precision low
- * @tags security
- * leap-year
+ * @tags leap-year
+ * correctness
*/
import cpp
-class LeapYearUnsafeDaysOfTheYearArrayType extends ArrayType {
- LeapYearUnsafeDaysOfTheYearArrayType() { this.getArraySize() = 365 }
-}
+/* Note: We used to have a `LeapYearUnsafeDaysOfTheYearArrayType` class which was the
+ set of ArrayType that had a fixed length of 365. However, to eliminate false positives,
+ we use `isElementAnArrayOfFixedSize` that *also* finds arrays of 366 items, where the programmer
+ has also catered for leap years.
+ So, instead of `instanceof` checks, for simplicity, we simply pass in 365/366 as integers as needed.
+*/
-from Element element, string allocType
-where
+bindingset[size]
+predicate isElementAnArrayOfFixedSize(
+ Element element, Type t, Declaration f, string allocType, int size
+) {
exists(NewArrayExpr nae |
element = nae and
- nae.getAllocatedType() instanceof LeapYearUnsafeDaysOfTheYearArrayType and
- allocType = "an array allocation"
+ nae.getAllocatedType().(ArrayType).getArraySize() = size and
+ allocType = "an array allocation" and
+ f = nae.getEnclosingFunction() and
+ t = nae.getAllocatedType().(ArrayType).getBaseType()
)
or
exists(Variable var |
var = element and
- var.getType() instanceof LeapYearUnsafeDaysOfTheYearArrayType and
- allocType = "an array allocation"
+ var.getType().(ArrayType).getArraySize() = size and
+ allocType = "an array allocation" and
+ f = var and
+ t = var.getType().(ArrayType).getBaseType()
)
or
exists(ConstructorCall cc |
element = cc and
cc.getTarget().hasName("vector") and
- cc.getArgument(0).getValue().toInt() = 365 and
- allocType = "a std::vector allocation"
+ cc.getArgument(0).getValue().toInt() = size and
+ allocType = "a std::vector allocation" and
+ f = cc.getEnclosingFunction() and
+ t = cc.getTarget().getDeclaringType()
+ )
+}
+
+from Element element, string allocType, Declaration f, Type t
+where
+ isElementAnArrayOfFixedSize(element, t, f, allocType, 365) and
+ not exists(Element element2, Declaration f2 |
+ isElementAnArrayOfFixedSize(element2, t, f2, _, 366) and
+ if f instanceof Function then f = f2 else f.getParentScope() = f2.getParentScope()
)
select element,
- "There is " + allocType +
- " with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios."
+ "$@: There is " + allocType +
+ " with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios.",
+ f, f.toString()
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/examples/LeapYearConditionalLogicBad.c b/cpp/ql/src/Likely Bugs/Leap Year/examples/LeapYearConditionalLogicBad.c
new file mode 100644
index 000000000000..7751b9eb34b8
--- /dev/null
+++ b/cpp/ql/src/Likely Bugs/Leap Year/examples/LeapYearConditionalLogicBad.c
@@ -0,0 +1,21 @@
+// Checking for leap year
+bool isLeapYear = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
+if (isLeapYear)
+{
+ // untested path
+}
+else
+{
+ // tested path
+}
+
+
+// Checking specifically for the leap day
+if (month == 2 && day == 29) // (or 1 with a tm_mon value)
+{
+ // untested path
+}
+else
+{
+ // tested path
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModificationBad.c b/cpp/ql/src/Likely Bugs/Leap Year/examples/UncheckedLeapYearAfterYearModificationBad.c
similarity index 100%
rename from cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModificationBad.c
rename to cpp/ql/src/Likely Bugs/Leap Year/examples/UncheckedLeapYearAfterYearModificationBad.c
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModificationGood.c b/cpp/ql/src/Likely Bugs/Leap Year/examples/UncheckedLeapYearAfterYearModificationGood.c
similarity index 100%
rename from cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModificationGood.c
rename to cpp/ql/src/Likely Bugs/Leap Year/examples/UncheckedLeapYearAfterYearModificationGood.c
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYearBad.c b/cpp/ql/src/Likely Bugs/Leap Year/examples/UnsafeArrayForDaysOfYearBad.c
similarity index 100%
rename from cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYearBad.c
rename to cpp/ql/src/Likely Bugs/Leap Year/examples/UnsafeArrayForDaysOfYearBad.c
diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYearGood.c b/cpp/ql/src/Likely Bugs/Leap Year/examples/UnsafeArrayForDaysOfYearGood.c
similarity index 100%
rename from cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYearGood.c
rename to cpp/ql/src/Likely Bugs/Leap Year/examples/UnsafeArrayForDaysOfYearGood.c
diff --git a/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp b/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp
index cc62cb50f498..8ef045c70923 100644
--- a/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp
+++ b/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp
@@ -49,21 +49,16 @@ need to be part of the class. (A classic example of this is the
observes, there are at least two key problems with this approach:
-
--
-It may be possible to generalize some of the utility functions beyond the
+1. It may be possible to generalize some of the utility functions beyond the
narrow context of the class in question -- by bundling them with the class,
the class author reduces the scope for functionality reuse.
-
--
-It's usually impossible for the class author to know every possible
+2. It's usually impossible for the class author to know every possible
operation that the user might want to perform on the class, so the public
interface will inherently be incomplete. New utility functions will end up
having a different syntax to the privileged public functions in the class,
negatively impacting on code consistency.
-
-
+
To refactor a class like this, simply move its utility functions elsewhere,
paring its public interface down to the bare minimum.
diff --git a/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp b/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp
index 0d560f920aa6..70c4c862fb61 100644
--- a/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp
+++ b/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp
@@ -46,21 +46,17 @@ need to be part of the class. (A classic example of this is the
std::string class in the C++ Standard Library.) As [Sutter]
observes, there are at least two key problems with this approach:
-
--
-It may be possible to generalize some of the utility functions beyond the
+
+1. It may be possible to generalize some of the utility functions beyond the
narrow context of the class in question -- by bundling them with the class,
the class author reduces the scope for functionality reuse.
-
--
-It's usually impossible for the class author to know every possible
+2. It's usually impossible for the class author to know every possible
operation that the user might want to perform on the class, so the public
interface will inherently be incomplete. New utility functions will end up
having a different syntax to the privileged public functions in the class,
negatively impacting on code consistency.
-
-
+
To refactor a class like this, simply move its utility functions elsewhere,
paring its public interface down to the bare minimum.
diff --git a/cpp/ql/src/Metrics/Dependencies/ExternalDependencies.qll b/cpp/ql/src/Metrics/Dependencies/ExternalDependencies.qll
index 16a8b22d168a..fed054262e69 100644
--- a/cpp/ql/src/Metrics/Dependencies/ExternalDependencies.qll
+++ b/cpp/ql/src/Metrics/Dependencies/ExternalDependencies.qll
@@ -26,6 +26,12 @@ private newtype LibraryT =
LibraryTElement(LibraryElement lib, string name, string version) {
lib.getName() = name and
lib.getVersion() = version
+ } or
+ LibraryTExternalPackage(@external_package ep, string name, string version) {
+ exists(string package_name |
+ external_packages(ep, _, package_name, version) and
+ name = package_name
+ )
}
/**
@@ -35,7 +41,10 @@ class Library extends LibraryT {
string name;
string version;
- Library() { this = LibraryTElement(_, name, version) }
+ Library() {
+ this = LibraryTElement(_, name, version) or
+ this = LibraryTExternalPackage(_, name, version)
+ }
string getName() { result = name }
@@ -54,6 +63,11 @@ class Library extends LibraryT {
this = LibraryTElement(lib, _, _) and
result = lib.getAFile()
)
+ or
+ exists(@external_package ep |
+ this = LibraryTExternalPackage(ep, _, _) and
+ header_to_external_package(unresolveElement(result), ep)
+ )
}
}
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuard.qhelp b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuard.qhelp
new file mode 100644
index 000000000000..1f27b051e8f8
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuard.qhelp
@@ -0,0 +1,20 @@
+
+
+
+ Checking for overflow of an addition by comparing against one of the arguments of the addition fails if the size of all the argument types are smaller than 4 bytes. This is because the result of the addition is promoted to a 4 byte int.
+
+
+
+Check the overflow by comparing the addition against a value that is at least 4 bytes.
+
+
+
+ In this example, the result of the comparison will result in an integer overflow.
+
+
+ To fix the bug, check the overflow by comparing the addition against a value that is at least 4 bytes.
+
+
+
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuard.ql b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuard.ql
new file mode 100644
index 000000000000..8d220bdd62eb
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuard.ql
@@ -0,0 +1,31 @@
+/**
+ * @name Bad overflow check
+ * @description Checking for overflow of an addition by comparing against one
+ * of the arguments of the addition fails if the size of all the
+ * argument types are smaller than 4 bytes. This is because the
+ * result of the addition is promoted to a 4 byte int.
+ * @kind problem
+ * @problem.severity error
+ * @tags security
+ * external/cwe/cwe-190
+ * external/cwe/cwe-191
+ * @id cpp/microsoft/public/badoverflowguard
+ */
+
+import cpp
+
+/*
+ * Example:
+ *
+ * uint16 v, uint16 b
+ * if ((v + b < v) <-- bad check for overflow
+ */
+
+from AddExpr a, Variable v, RelationalOperation cmp
+where
+ a.getAnOperand() = v.getAnAccess() and
+ forall(Expr op | op = a.getAnOperand() | op.getType().getSize() < 4) and
+ cmp.getAnOperand() = a and
+ cmp.getAnOperand() = v.getAnAccess() and
+ not a.getExplicitlyConverted().getType().getSize() < 4
+select cmp, "Bad overflow check"
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuardBadCode.c b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuardBadCode.c
new file mode 100644
index 000000000000..b7dc59a33785
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuardBadCode.c
@@ -0,0 +1,9 @@
+unsigned short CheckForInt16OverflowBadCode(unsigned short v, unsigned short b)
+{
+ if (v + b < v) // BUG: "v + b" will be promoted to 32 bits
+ {
+ // ... do something
+ }
+
+ return v + b;
+}
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuardGoodCode.c b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuardGoodCode.c
new file mode 100644
index 000000000000..f5cc5c2ed4f6
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Conversion/BadOverflowGuardGoodCode.c
@@ -0,0 +1,9 @@
+unsigned short CheckForInt16OverflowCorrectCode(unsigned short v, unsigned short b)
+{
+ if (v + b > 0x00FFFF)
+ {
+ // ... do something
+ }
+
+ return v + b;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.qhelp b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.qhelp
new file mode 100644
index 000000000000..e7a85e353ed5
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.qhelp
@@ -0,0 +1,29 @@
+
+
+
+ RtlCompareMemory routine compares two blocks of memory and returns the number of bytes that match, not a boolean value indicating a full comparison like RtlEqualMemory does.
+ This query detects the return value of RtlCompareMemory being handled as a boolean.
+
+
+
+ Any findings from this rule may indicate that the return value of a call to RtlCompareMemory is being incorrectly interpreted as a boolean.
+ Review the logic of the call, and if necessary, replace the function call with RtlEqualMemory.
+
+
+
+The following example is a typical one where an identity comparison is intended, but the wrong API is being used.
+
+
+In this example, the fix is to replace the call to RtlCompareMemory with RtlEqualMemory.
+
+
+
+
+
+ Books online RtlCompareMemory function (wdm.h)
+ Books online RtlEqualMemory macro (wdm.h)
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.ql b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.ql
new file mode 100644
index 000000000000..1470a0905465
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.ql
@@ -0,0 +1,69 @@
+/**
+ * @id cpp/microsoft/public/drivers/incorrect-usage-of-rtlcomparememory
+ * @name Incorrect usage of RtlCompareMemory
+ * @description `RtlCompareMemory` routine compares two blocks of memory and returns the number of bytes that match, not a boolean value indicating a full comparison like `RtlEqualMemory` does.
+ * This query detects the return value of `RtlCompareMemory` being handled as a boolean.
+ * @security.severity Important
+ * @kind problem
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ * kernel
+ */
+
+import cpp
+
+predicate isLiteralABooleanMacro(Literal l) {
+ exists(MacroInvocation mi | mi.getExpr() = l |
+ mi.getMacroName() in ["true", "false", "TRUE", "FALSE"]
+ )
+}
+
+from FunctionCall fc, Function f, Expr e, string msg
+where
+ f.getQualifiedName() = "RtlCompareMemory" and
+ f.getACallToThisFunction() = fc and
+ (
+ exists(UnaryLogicalOperation ulo | e = ulo |
+ ulo.getAnOperand() = fc and
+ msg = "as an operand in an unary logical operation"
+ )
+ or
+ exists(BinaryLogicalOperation blo | e = blo |
+ blo.getAnOperand() = fc and
+ msg = "as an operand in a binary logical operation"
+ )
+ or
+ exists(Conversion conv | e = conv |
+ (
+ conv.getType().hasName("bool") or
+ conv.getType().hasName("BOOLEAN") or
+ conv.getType().hasName("_Bool")
+ ) and
+ conv.getUnconverted() = fc and
+ msg = "as a boolean"
+ )
+ or
+ exists(IfStmt s | e = s.getControllingExpr() |
+ s.getControllingExpr() = fc and
+ msg = "as the controlling expression in an If statement"
+ )
+ or
+ exists(EqualityOperation bao, Expr e2 | e = bao |
+ bao.hasOperands(fc, e2) and
+ isLiteralABooleanMacro(e2) and
+ msg =
+ "as an operand in an equality operation where the other operand is a boolean value (high precision result)"
+ )
+ or
+ exists(EqualityOperation bao, Expr e2 | e = bao |
+ bao.hasOperands(fc, e2) and
+ (e2.(Literal).getValue().toInt() = 1 or e2.(Literal).getValue().toInt() = 0) and
+ not isLiteralABooleanMacro(e2) and
+ msg =
+ "as an operand in an equality operation where the other operand is likely a boolean value (lower precision result, needs to be reviewed)"
+ )
+ )
+select e,
+ "This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`.",
+ fc, "call to `RtlCompareMemory`", e, msg
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemoryBad.c b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemoryBad.c
new file mode 100644
index 000000000000..34dd300663ca
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemoryBad.c
@@ -0,0 +1,5 @@
+//bug, the code assumes RtlCompareMemory is comparing for identical values & return false if not identical
+if (!RtlCompareMemory(pBuffer, ptr, 16))
+{
+ return FALSE;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemoryGood.c b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemoryGood.c
new file mode 100644
index 000000000000..a8a5945a9e3c
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemoryGood.c
@@ -0,0 +1,5 @@
+//fixed
+if (!RtlEqualMemory(pBuffer, ptr, 16))
+{
+ return FALSE;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.qhelp b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.qhelp
new file mode 100644
index 000000000000..5cca10d929ed
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.qhelp
@@ -0,0 +1,22 @@
+
+
+
+ If the argument for a sizeof call is a binary operation or a sizeof call, it is typically a sign that there is a confusion on the usage of the sizeof usage.
+
+
+
+ Any findings from this rule may indicate that the sizeof is being used incorrectly.
+ Review the logic of the call.
+
+
+
+ The following example shows a case where sizeof a binary operation by mistake.
+
+
+ In this example, the fix is to multiply the result of sizeof by the number of elements.
+
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.ql b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.ql
new file mode 100644
index 000000000000..4a20a36d4f2f
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.ql
@@ -0,0 +1,62 @@
+/**
+ * @id cpp/microsoft/public/sizeof/sizeof-or-operation-as-argument
+ * @name Usage of an expression that is a binary operation, or sizeof call passed as an argument to a sizeof call
+ * @description When the `expr` passed to `sizeof` is a binary operation, or a sizeof call, this is typically a sign that there is a confusion on the usage of sizeof.
+ * @kind problem
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ */
+
+import cpp
+import SizeOfTypeUtils
+
+/**
+ * Windows SDK corecrt_math.h defines a macro _CLASS_ARG that
+ * intentionally misuses sizeof to determine the size of a floating point type.
+ * Explicitly ignoring any hit in this macro.
+ */
+predicate isPartOfCrtFloatingPointMacroExpansion(Expr e) {
+ exists(MacroInvocation mi |
+ mi.getMacroName() = "_CLASS_ARG" and
+ mi.getMacro().getFile().getBaseName() = "corecrt_math.h" and
+ mi.getAnExpandedElement() = e
+ )
+}
+
+/**
+ * Determines if the sizeOfExpr is ignorable.
+ */
+predicate ignorableSizeof(SizeofExprOperator sizeofExpr) {
+ // a common pattern found is to sizeof a binary operation to check a type
+ // to then perfomr an onperaiton for a 32 or 64 bit type.
+ // these cases often look like sizeof(x) >=4
+ // more generally we see binary operations frequently used in different type
+ // checks, where the sizeof is part of some comparison operation of a switch statement guard.
+ // sizeof as an argument is also similarly used, but seemingly less frequently.
+ exists(ComparisonOperation comp | comp.getAnOperand() = sizeofExpr)
+ or
+ exists(ConditionalStmt s | s.getControllingExpr() = sizeofExpr)
+ or
+ // another common practice is to use bit-wise operations in sizeof to allow the compiler to
+ // 'pack' the size appropriate but get the size of the result out of a sizeof operation.
+ sizeofExpr.getExprOperand() instanceof BinaryBitwiseOperation
+}
+
+from SizeofExprOperator sizeofExpr, string message, Expr op
+where
+ exists(string tmpMsg |
+ (
+ op instanceof BinaryOperation and tmpMsg = "binary operator"
+ or
+ op instanceof SizeofOperator and tmpMsg = "sizeof"
+ ) and
+ if sizeofExpr.isInMacroExpansion()
+ then message = tmpMsg + "(in a macro expansion)"
+ else message = tmpMsg
+ ) and
+ op = sizeofExpr.getExprOperand() and
+ not isPartOfCrtFloatingPointMacroExpansion(op) and
+ not ignorableSizeof(sizeofExpr)
+select sizeofExpr, "$@: $@ of $@ inside sizeof.", sizeofExpr, message,
+ sizeofExpr.getEnclosingFunction(), "Usage", op, message
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperationBad.c b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperationBad.c
new file mode 100644
index 000000000000..52b296b94016
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperationBad.c
@@ -0,0 +1,5 @@
+#define SIZEOF_CHAR sizeof(char)
+
+char* buffer;
+// bug - the code is really going to allocate sizeof(size_t) instead o fthe intended sizeof(char) * 10
+buffer = (char*) malloc(sizeof(SIZEOF_CHAR * 10));
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperationGood.c b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperationGood.c
new file mode 100644
index 000000000000..c61e019b41ef
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperationGood.c
@@ -0,0 +1,4 @@
+#define SIZEOF_CHAR sizeof(char)
+
+char* buffer;
+buffer = (char*) malloc(SIZEOF_CHAR * 10);
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.qhelp b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.qhelp
new file mode 100644
index 000000000000..ed473d234e4b
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.qhelp
@@ -0,0 +1,26 @@
+
+
+
+ If the argument for a sizeof call is a macro that expands to a constant integer type, it is a likely indication that the macro operation may be misused or that the argument was selected by mistake (i.e. typo).
+ This query detects if the argument for sizeof is a macro that expands to a constant integer value.
+ NOTE: This rule will ignore multicharacter literal values that are exactly 4 bytes long as it matches the length of int and may be expected.
+
+
+
+ Any findings from this rule may indicate that the sizeof is being used incorrectly.
+ Review the logic of the call.
+
+
+
+The following example shows a case where sizeof a constant was used instead of the sizeof of a structure by mistake as the names are similar.
+
+
+In this example, the fix is to replace the argument for sizeof with the structure name.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.ql b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.ql
new file mode 100644
index 000000000000..709a33865924
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.ql
@@ -0,0 +1,54 @@
+/**
+ * @id cpp/microsoft/public/sizeof/const-int-argument
+ * @name Passing a constant integer macro to sizeof
+ * @description The expression passed to sizeof is a macro that expands to an integer constant. A data type was likely intended instead.
+ * @kind problem
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ */
+
+import cpp
+import SizeOfTypeUtils
+
+predicate isExprAConstInteger(Expr e, MacroInvocation mi) {
+ exists(Type type |
+ type = e.getExplicitlyConverted().getType() and
+ isTypeDangerousForSizeof(type) and
+ // Special case for wide-char literals when the compiler doesn't recognize wchar_t (i.e. L'\\', L'\0')
+ // Accounting for parenthesis "()" around the value
+ not exists(Macro m | m = mi.getMacro() |
+ m.getBody().toString().regexpMatch("^[\\s(]*L'.+'[\\s)]*$")
+ ) and
+ // Special case for token pasting operator
+ not exists(Macro m | m = mi.getMacro() | m.getBody().toString().regexpMatch("^.*\\s*##\\s*.*$")) and
+ // Special case for multichar literal integers that are exactly 4 character long (i.e. 'val1')
+ not exists(Macro m | m = mi.getMacro() |
+ e.getType().toString() = "int" and
+ m.getBody().toString().regexpMatch("^'.{4}'$")
+ ) and
+ e.isConstant()
+ )
+}
+
+int countMacros(Expr e) { result = count(MacroInvocation mi | mi.getExpr() = e | mi) }
+
+predicate isSizeOfExprOperandMacroInvocationAConstInteger(
+ SizeofExprOperator sizeofExpr, MacroInvocation mi
+) {
+ exists(Expr e |
+ e = mi.getExpr() and
+ e = sizeofExpr.getExprOperand() and
+ isExprAConstInteger(e, mi) and
+ // Special case for FPs that involve an inner macro that resolves to 0 such as _T('\0')
+ not exists(int macroCount | macroCount = countMacros(e) |
+ macroCount > 1 and e.(Literal).getValue().toInt() = 0
+ )
+ )
+}
+
+from SizeofExprOperator sizeofExpr, MacroInvocation mi
+where isSizeOfExprOperandMacroInvocationAConstInteger(sizeofExpr, mi)
+select sizeofExpr,
+ "$@: sizeof of integer macro $@ will always return the size of the underlying integer type.",
+ sizeofExpr, sizeofExpr.getEnclosingFunction().getName(), mi.getMacro(), mi.getMacro().getName()
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacroBad.c b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacroBad.c
new file mode 100644
index 000000000000..63d73f4d349c
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacroBad.c
@@ -0,0 +1,12 @@
+#define SOMESTRUCT_ERRNO_THAT_MATTERS 0x8000000d
+
+typedef struct {
+ int a;
+ bool b;
+} SOMESTRUCT_THAT_MATTERS;
+
+//bug, the code is using SOMESTRUCT_ERRNO_THAT_MATTERS by mistake instead of SOMESTRUCT_THAT_MATTERS
+if (somedata.length >= sizeof(SOMESTRUCT_ERRNO_THAT_MATTERS))
+{
+ /// Do something
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacroGood.c b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacroGood.c
new file mode 100644
index 000000000000..bfadb4d59892
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacroGood.c
@@ -0,0 +1,11 @@
+#define SOMESTRUCT_ERRNO_THAT_MATTERS 0x8000000d
+
+typedef struct {
+ int a;
+ bool b;
+} SOMESTRUCT_THAT_MATTERS;
+
+if (somedata.length >= sizeof(SOMESTRUCT_THAT_MATTERS))
+{
+ /// Do something
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfTypeUtils.qll b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfTypeUtils.qll
new file mode 100644
index 000000000000..87e5b1fa0f4b
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfTypeUtils.qll
@@ -0,0 +1,45 @@
+import cpp
+
+/**
+ * Holds if `type` is a `Type` that typically should not be used for `sizeof` in macros or function return values.
+ */
+predicate isTypeDangerousForSizeof(Type type) {
+ (
+ type instanceof IntegralOrEnumType and
+ // ignore string literals
+ not type instanceof WideCharType and
+ not type instanceof CharType
+ )
+}
+
+/**
+ * Holds if `type` is a `Type` that typically should not be used for `sizeof` in macros or function return values.
+ * This predicate extends the types detected in exchange of precision.
+ * For higher precision, please use `isTypeDangerousForSizeof`
+ */
+predicate isTypeDangerousForSizeofLowPrecision(Type type) {
+ (
+ // UINT8/BYTE are typedefs to char, so we treat them separately.
+ // WCHAR is sometimes a typedef to UINT16, so we treat it separately too.
+ type.getName() = "UINT8"
+ or
+ type.getName() = "BYTE"
+ or
+ not type.getName() = "WCHAR" and
+ exists(Type ut |
+ ut = type.getUnderlyingType() and
+ ut instanceof IntegralOrEnumType and
+ not ut instanceof WideCharType and
+ not ut instanceof CharType
+ )
+ )
+}
+
+/**
+ * Holds if the `Function` return type is dangerous as input for `sizeof`.
+ */
+class FunctionWithTypeDangerousForSizeofLowPrecision extends Function {
+ FunctionWithTypeDangerousForSizeofLowPrecision() {
+ exists(Type type | type = this.getType() | isTypeDangerousForSizeofLowPrecision(type))
+ }
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/BannedEncryption.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/BannedEncryption.qhelp
new file mode 100644
index 000000000000..57ea002bd6a7
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/BannedEncryption.qhelp
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Finds explicit uses of symmetric encryption algorithms that are weak, obsolete, or otherwise unapproved.
+
+
+ Encryption algorithms such as DES, (uses keys of 56 bits only), RC2 (uses keys of 128 bits only), and TripleDES (provides at most 112 bits of security) are considered to be weak.
+
+
+ These cryptographic algorithms do not provide as much security assurance as more modern counterparts.
+
+
+
+
+
+ For Microsoft internal security standards:
+
+
+ For WinCrypt, switch to ALG_SID_AES, ALG_SID_AES_128, ALG_SID_AES_192, or ALG_SID_AES_256.
+
+
+ For BCrypt, switch to AES or any algorithm other than RC2, RC4, DES, DESX, 3DES, 3DES_112. AES_GMAC and AES_CMAC require crypto board review.
+
+
+
+
+Violations:
+
+
+
+
+Solutions:
+
+
+
+
+
+
+Microsoft Docs: Microsoft SDL Cryptographic Recommendations.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/BannedEncryption.ql b/cpp/ql/src/Microsoft/Security/Cryptography/BannedEncryption.ql
new file mode 100644
index 000000000000..0be6cf70086f
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/BannedEncryption.ql
@@ -0,0 +1,58 @@
+/**
+ * @name Weak cryptography
+ * @description Finds explicit uses of symmetric encryption algorithms that are weak, obsolete, or otherwise unapproved.
+ * @kind problem
+ * @id cpp/microsoft/public/weak-crypto/banned-encryption-algorithms
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ * external/cwe/cwe-327
+ */
+
+import cpp
+import CryptoFilters
+import CryptoDataflowCapi
+import CryptoDataflowCng
+import experimental.cryptography.Concepts
+
+predicate isCapiOrCNGBannedAlg(Expr e, string msg) {
+ exists(FunctionCall fc |
+ CapiCryptCreateEncryptionBanned::flow(DataFlow::exprNode(e),
+ DataFlow::exprNode(fc.getArgument(1)))
+ or
+ BCryptOpenAlgorithmProviderBannedEncryption::flow(DataFlow::exprNode(e),
+ DataFlow::exprNode(fc.getArgument(1)))
+ ) and
+ msg =
+ "Call to a cryptographic function with a banned symmetric encryption algorithm: " +
+ e.getValueText()
+}
+
+predicate isGeneralBannedAlg(SymmetricEncryptionAlgorithm alg, Expr confSink, string msg) {
+ // Handle unknown cases in a separate query
+ not alg.getEncryptionName() = unknownAlgorithm() and
+ exists(string resMsg |
+ (
+ not alg.getEncryptionName().matches("AES%") and
+ resMsg = "Use of banned symmetric encryption algorithm: " + alg.getEncryptionName() + "."
+ ) and
+ (
+ if alg.hasConfigurationSink() and alg.configurationSink() != alg
+ then (
+ confSink = alg.configurationSink() and msg = resMsg + " Algorithm used at sink: $@."
+ ) else (
+ confSink = alg and msg = resMsg
+ )
+ )
+ )
+}
+
+from Expr sink, Expr confSink, string msg
+where
+ (
+ isCapiOrCNGBannedAlg(sink, msg) and confSink = sink
+ or
+ isGeneralBannedAlg(sink, confSink, msg)
+ ) and
+ not isSrcSinkFiltered(sink, confSink)
+select sink, msg, confSink, confSink.toString()
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCAPI.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCAPI.qhelp
new file mode 100644
index 000000000000..e6e00a06cdb9
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCAPI.qhelp
@@ -0,0 +1,29 @@
+
+
+
+
+ Violation - Use of one of the following unsafe encryption modes that is not approved: ECB, OFB, CFB, CTR, CCM, or GCM.
+ These modes are vulnerable to attacks and may cause exposure of sensitive information. For example, using ECB to encrypt a plaintext block always produces a same cipher text, so it can easily tell if two encrypted messages are identical. Using approved modes can avoid these unnecessary risks.
+
+
+
+ - Use only approved modes CBC, CTS and XTS.
+
+
+
+Violation:
+
+
+
+Solution:
+
+
+
+
+
+Microsoft Docs: Microsoft SDL Cryptographic Recommendations.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCAPI.ql b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCAPI.ql
new file mode 100644
index 000000000000..16d83e54abc6
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCAPI.ql
@@ -0,0 +1,40 @@
+/**
+ * @name Weak cryptography
+ * @description Finds explicit uses of block cipher chaining mode algorithms that are not approved. (CAPI)
+ * @kind problem
+ * @id cpp/microsoft/public/weak-crypto/capi/banned-modes
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ * external/cwe/cwe-327
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+import CryptoDataflowCapi
+
+module CapiSetBlockCipherConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ source.asExpr().isConstant() and
+ // KP_MODE
+ // CRYPT_MODE_CBC 1 - Cipher block chaining - Microsoft-Only: Only mode allowed by Crypto Board from this list (CBC-MAC)
+ // CRYPT_MODE_ECB 2 - Electronic code book - Generally not recommended for usage in cryptographic protocols at all
+ // CRYPT_MODE_OFB 3 - Output feedback mode - Microsoft-Only: Banned, usage requires Crypto Board review
+ // CRYPT_MODE_CFB 4 - Cipher feedback mode - Microsoft-Only: Banned, usage requires Crypto Board review
+ // CRYPT_MODE_CTS 5 - Ciphertext stealing mode - Microsoft-Only: CTS is approved by Crypto Board, but should probably use CNG and not CAPI
+ source.asExpr().getValue().toInt() != 1
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(CapiCryptCryptSetKeyParamtoKPMODE call | sink.asIndirectExpr() = call.getArgument(2))
+ }
+}
+
+module CapiSetBlockCipherTrace = DataFlow::Global;
+
+from CapiCryptCryptSetKeyParamtoKPMODE call, DataFlow::Node src, DataFlow::Node sink
+where
+ sink.asIndirectExpr() = call.getArgument(2) and
+ CapiSetBlockCipherTrace::flow(src, sink)
+select call,
+ "Call to 'CryptSetKeyParam' function with argument dwParam = KP_MODE is setting up a banned block cipher mode."
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCNG.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCNG.qhelp
new file mode 100644
index 000000000000..4713ef9ff13c
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCNG.qhelp
@@ -0,0 +1,31 @@
+
+
+
+
+ Violation - Use of one of the following unsafe encryption modes that is not approved: ECB, OFB, CFB, CTR, CCM, or GCM.
+ These modes are vulnerable to attacks and may cause exposure of sensitive information. For example, using ECB to encrypt a plaintext block always produces a same cipher text, so it can easily tell if two encrypted messages are identical. Using approved modes can avoid these unnecessary risks.
+
+
+
+ - Use only approved modes CBC, CTS and XTS.
+
+
+
+Violation:
+
+
+
+Solution:
+
+
+
+
+
+
+Microsoft Docs: Microsoft SDL Cryptographic Recommendations.
+
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCNG.ql b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCNG.ql
new file mode 100644
index 000000000000..d7184114b0a7
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/BannedModesCNG.ql
@@ -0,0 +1,23 @@
+/**
+ * @name Weak cryptography
+ * @description Finds explicit uses of block cipher chaining mode algorithms that are not approved. (CNG)
+ * @kind problem
+ * @id cpp/microsoft/public/weak-crypto/cng/banned-modes
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ * external/cwe/cwe-327
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+import CryptoDataflowCng
+
+from CngBCryptSetPropertyParamtoKChainingMode call, DataFlow::Node src, DataFlow::Node sink
+where
+ sink.asIndirectArgument() = call.getArgument(2) and
+ CngBCryptSetPropertyChainingBannedModeIndirectParameter::flow(src, sink)
+ or
+ sink.asExpr() = call.getArgument(2) and CngBCryptSetPropertyChainingBannedMode::flow(src, sink)
+select call,
+ "Call to 'BCryptSetProperty' function with argument pszProperty = \"ChainingMode\" is setting up a banned block cipher mode."
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/CryptoDataflowCapi.qll b/cpp/ql/src/Microsoft/Security/Cryptography/CryptoDataflowCapi.qll
new file mode 100644
index 000000000000..52c835ea9b89
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/CryptoDataflowCapi.qll
@@ -0,0 +1,97 @@
+/**
+ * Provides classes and predicates for identifying expressions that are use Crypto API (CAPI).
+ */
+
+import cpp
+private import semmle.code.cpp.dataflow.new.DataFlow
+
+/**
+ * Dataflow that detects a call to CryptSetKeyParam dwParam = KP_MODE (CAPI)
+ */
+module CapiCryptCryptSetKeyParamtoKPMODEConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ source.asExpr().getValue().toInt() = 4 // KP_MODE
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // CryptSetKeyParam 2nd argument specifies the key parameter to set
+ sink.asExpr() = call.getArgument(1) and
+ call.getTarget().hasGlobalName("CryptSetKeyParam")
+ )
+ }
+}
+
+module CapiCryptCryptSetKeyParamtoKPMODE =
+ DataFlow::Global;
+
+/**
+ * A function call to CryptSetKeyParam with dwParam = KP_MODE (CAPI)
+ */
+class CapiCryptCryptSetKeyParamtoKPMODE extends FunctionCall {
+ CapiCryptCryptSetKeyParamtoKPMODE() {
+ exists(Expr var |
+ CapiCryptCryptSetKeyParamtoKPMODE::flow(DataFlow::exprNode(var),
+ DataFlow::exprNode(this.getArgument(1)))
+ )
+ }
+}
+
+// CAPI-specific DataFlow configuration
+module CapiCryptCreateHashBannedConfiguration implements DataFlow::ConfigSig {
+ // This mechnism will verify for approved set of values to call, rejecting anythign that is not in the list.
+ // NOTE: This mechanism is not guaranteed to work with CSPs that do not use the same algorithms defined in Wincrypt.h
+ //
+ predicate isSource(DataFlow::Node source) {
+ // Verify if source matched the mask for CAPI ALG_CLASS_HASH == 32768
+ source.asExpr().getValue().toInt().bitShiftRight(13) = 4 and
+ // The following hash algorithms are safe to use, anything else is considered banned
+ not (
+ source.asExpr().getValue().toInt().bitXor(32768) = 12 or // ALG_SID_SHA_256
+ source.asExpr().getValue().toInt().bitXor(32768) = 13 or // ALG_SID_SHA_384
+ source.asExpr().getValue().toInt().bitXor(32768) = 14 // ALG_SID_SHA_512
+ )
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // CryptCreateHash 2nd argument specifies the hash algorithm to be used.
+ sink.asExpr() = call.getArgument(1) and
+ call.getTarget().hasGlobalName("CryptCreateHash")
+ )
+ }
+}
+
+module CapiCryptCreateHashBanned = DataFlow::Global;
+
+// CAPI-specific DataFlow configuration
+module CapiCryptCreateEncryptionBannedConfiguration implements DataFlow::ConfigSig {
+ // This mechanism will verify for approved set of values to call, rejecting anything that is not in the list.
+ // NOTE: This mechanism is not guaranteed to work with CSPs that do not use the same algorithms defined in Wincrypt.h
+ //
+ predicate isSource(DataFlow::Node source) {
+ // Verify if source matched the mask for CAPI ALG_CLASS_DATA_ENCRYPT == 24576
+ source.asExpr().getValue().toInt().bitShiftRight(13) = 3 and
+ // The following algorithms are safe to use, anything else is considered banned
+ not (
+ source.asExpr().getValue().toInt().bitXor(26112) = 14 or // ALG_SID_AES_128
+ source.asExpr().getValue().toInt().bitXor(26112) = 15 or // ALG_SID_AES_192
+ source.asExpr().getValue().toInt().bitXor(26112) = 16 or // ALG_SID_AES_256
+ source.asExpr().getValue().toInt().bitXor(26112) = 17 // ALG_SID_AES
+ )
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // CryptGenKey or CryptDeriveKey 2nd argument specifies the hash algorithm to be used.
+ sink.asExpr() = call.getArgument(1) and
+ (
+ call.getTarget().hasGlobalName("CryptGenKey") or
+ call.getTarget().hasGlobalName("CryptDeriveKey")
+ )
+ )
+ }
+}
+
+module CapiCryptCreateEncryptionBanned =
+ DataFlow::Global;
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/CryptoDataflowCng.qll b/cpp/ql/src/Microsoft/Security/Cryptography/CryptoDataflowCng.qll
new file mode 100644
index 000000000000..a54650692075
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/CryptoDataflowCng.qll
@@ -0,0 +1,137 @@
+/**
+ * Provides classes and predicates for identifying expressions that are use crypto API Next Generation (CNG).
+ */
+
+import cpp
+private import semmle.code.cpp.dataflow.new.DataFlow
+
+/**
+ * Dataflow that detects a call to BCryptSetProperty pszProperty = ChainingMode (CNG)
+ */
+module CngBCryptSetPropertyParamtoKChainingModeConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ source.asExpr().getValue().toString().matches("ChainingMode")
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // BCryptSetProperty 2nd argument specifies the key parameter to set
+ sink.asExpr() = call.getArgument(1) and
+ call.getTarget().hasGlobalName("BCryptSetProperty")
+ )
+ }
+}
+
+module CngBCryptSetPropertyParamtoKChainingMode =
+ DataFlow::Global;
+
+/**
+ * A function call to BCryptSetProperty pszProperty = ChainingMode (CNG)
+ */
+class CngBCryptSetPropertyParamtoKChainingMode extends FunctionCall {
+ CngBCryptSetPropertyParamtoKChainingMode() {
+ exists(Expr var |
+ CngBCryptSetPropertyParamtoKChainingMode::flow(DataFlow::exprNode(var),
+ DataFlow::exprNode(this.getArgument(1)))
+ )
+ }
+}
+
+predicate isChaniningModeCbc(DataFlow::Node source) {
+ // Verify if algorithm is in the approved list.
+ exists(string s | s = source.asExpr().getValue().toString() |
+ s.regexpMatch("ChainingMode[A-Za-z0-9/]+") and
+ // Property Strings
+ // BCRYPT_CHAIN_MODE_NA L"ChainingModeN/A" - The algorithm does not support chaining
+ // BCRYPT_CHAIN_MODE_CBC L"ChainingModeCBC" - Microsoft-Only: Only mode allowed by Crypto Board from this list (CBC-MAC)
+ // BCRYPT_CHAIN_MODE_ECB L"ChainingModeECB" - Generally not recommended for usage in cryptographic protocols at all
+ // BCRYPT_CHAIN_MODE_CFB L"ChainingModeCFB" - Microsoft-Only: Banned, usage requires Crypto Board review
+ // BCRYPT_CHAIN_MODE_CCM L"ChainingModeCCM" - Microsoft-Only: Banned, usage requires Crypto Board review
+ // BCRYPT_CHAIN_MODE_GCM L"ChainingModeGCM" - Microsoft-Only: Only for TLS, other usage requires Crypto Board review
+ not s.matches("ChainingModeCBC")
+ )
+}
+
+module CngBCryptSetPropertyChainingBannedModeConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { isChaniningModeCbc(source) }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(CngBCryptSetPropertyParamtoKChainingMode call |
+ // BCryptOpenAlgorithmProvider 3rd argument sets the chaining mode value
+ sink.asExpr() = call.getArgument(2)
+ )
+ }
+}
+
+module CngBCryptSetPropertyChainingBannedMode =
+ DataFlow::Global;
+
+module CngBCryptSetPropertyChainingBannedModeIndirectParameterConfiguration implements
+ DataFlow::ConfigSig
+{
+ predicate isSource(DataFlow::Node source) { isChaniningModeCbc(source) }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(CngBCryptSetPropertyParamtoKChainingMode call |
+ // CryptSetKeyParam 3rd argument specifies the mode (KP_MODE)
+ sink.asIndirectExpr() = call.getArgument(2)
+ )
+ }
+}
+
+module CngBCryptSetPropertyChainingBannedModeIndirectParameter =
+ DataFlow::Global;
+
+// CNG-specific DataFlow configuration
+module BCryptOpenAlgorithmProviderBannedHashConfiguration implements DataFlow::ConfigSig {
+ // NOTE: Unlike the CAPI scenario, CNG will use this method to load and initialize
+ // a cryptographic provider for any type of algorithm,not only hash.
+ // Therefore, we have to take a banned-list instead of approved list approach.
+ //
+ predicate isSource(DataFlow::Node source) {
+ // Verify if algorithm is marked as banned.
+ source.asExpr().getValue().toString().matches("MD_")
+ or
+ source.asExpr().getValue().toString().matches("SHA1")
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // BCryptOpenAlgorithmProvider 2nd argument specifies the algorithm to be used
+ sink.asExpr() = call.getArgument(1) and
+ call.getTarget().hasGlobalName("BCryptOpenAlgorithmProvider")
+ )
+ }
+}
+
+module BCryptOpenAlgorithmProviderBannedHash =
+ DataFlow::Global;
+
+// CNG-specific DataFlow configuration
+module BCryptOpenAlgorithmProviderBannedEncryptionConfiguration implements DataFlow::ConfigSig {
+ // NOTE: Unlike the CAPI scenario, CNG will use this method to load and initialize
+ // a cryptographic provider for any type of algorithm,not only encryption.
+ // Therefore, we have to take a banned-list instead of approved list approach.
+ //
+ predicate isSource(DataFlow::Node source) {
+ // Verify if algorithm is marked as banned.
+ source.asExpr().getValue().toString().matches("RC_") or
+ source.asExpr().getValue().toString().matches("DES") or
+ source.asExpr().getValue().toString().matches("DESX") or
+ source.asExpr().getValue().toString().matches("3DES") or
+ source.asExpr().getValue().toString().matches("3DES_112") or
+ source.asExpr().getValue().toString().matches("AES_GMAC") or // Microsoft Only: Requires Cryptoboard review
+ source.asExpr().getValue().toString().matches("AES_CMAC") // Microsoft Only: Requires Cryptoboard review
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // BCryptOpenAlgorithmProvider 2nd argument specifies the algorithm to be used
+ sink.asExpr() = call.getArgument(1) and
+ call.getTarget().hasGlobalName("BCryptOpenAlgorithmProvider")
+ )
+ }
+}
+
+module BCryptOpenAlgorithmProviderBannedEncryption =
+ DataFlow::Global;
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/CryptoFilters.qll b/cpp/ql/src/Microsoft/Security/Cryptography/CryptoFilters.qll
new file mode 100644
index 000000000000..65f9dde5f911
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/CryptoFilters.qll
@@ -0,0 +1,45 @@
+import cpp
+
+/**
+ * Determines if an element should be filtered (ignored)
+ * from any result set.
+ *
+ * The current strategy is to determine if the element
+ * resides in a path that appears to be a library (in particular openssl).
+ *
+ * It is therefore important that the element being examined represents
+ * a use or configuration of cryptography in the user code.
+ * E.g., if a global variable were defined in an OpenSSL library
+ * representing a bad/vuln algorithm, and this global were assessed
+ * it would appear to be ignorable, as it exists in a a filtered library.
+ * The use of that global must be examined with this filter.
+ *
+ * ASSUMPTION/CAVEAT: note if an openssl library wraps a dangerous crypo use
+ * this filter approach will ignore the wrapper call, unless it is also flagged
+ * as dangerous. e.g., SomeWraper(){ ... ...}
+ * The wrapper if defined in openssl would result in ignoring
+ * the use of MD5 internally, since it's use is entirely in openssl.
+ *
+ * TODO: these caveats need to be reassessed in the future.
+ */
+predicate isUseFiltered(Element e) {
+ e.getFile().getAbsolutePath().toLowerCase().matches("%openssl%")
+}
+
+/**
+ * Filtered only if both src and sink are considered filtered.
+ *
+ * This approach is meant to partially address some of the implications of
+ * `isUseFiltered`. Specifically, if an algorithm is specified by a user
+ * and some how passes to a user inside openssl, then this filter
+ * would not ignore that the user was specifying the use of something dangerous.
+ *
+ * e.g., if a wrapper in openssl existed of the form SomeWrapper(string alg, ...){ ... ...}
+ * and the user did something like SomeWrapper("MD5", ...), this would not be ignored.
+ *
+ * The source in the above example would the algorithm, and the sink is the configuration sink
+ * of the algorithm.
+ */
+predicate isSrcSinkFiltered(Element src, Element sink) {
+ isUseFiltered(src) and isUseFiltered(sink)
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/HardcodedIVCNG.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/HardcodedIVCNG.qhelp
new file mode 100644
index 000000000000..bd0b71f227e4
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/HardcodedIVCNG.qhelp
@@ -0,0 +1,23 @@
+
+
+
+ An initialization vector (IV) is an input to a cryptographic primitive being used to provide the initial state. The IV is typically required to be random or pseudorandom (randomized scheme), but sometimes an IV only needs to be unpredictable or unique (stateful scheme).
+ Randomization is crucial for some encryption schemes to achieve semantic security, a property whereby repeated usage of the scheme under the same key does not allow an attacker to infer relationships between (potentially similar) segments of the encrypted message.
+
+
+
+ All symmetric block ciphers must also be used with an appropriate initialization vector (IV) according to the mode of operation being used.
+ If using a randomized scheme such as CBC, it is recommended to use cryptographically secure pseudorandom number generator such as BCryptGenRandom.
+
+
+
+
+ BCryptEncrypt function (bcrypt.h)
+ BCryptGenRandom function (bcrypt.h)
+ Initialization vector (Wikipedia)
+
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/HardcodedIVCNG.ql b/cpp/ql/src/Microsoft/Security/Cryptography/HardcodedIVCNG.ql
new file mode 100644
index 000000000000..86b98d807723
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/HardcodedIVCNG.ql
@@ -0,0 +1,58 @@
+/**
+ * @name Weak cryptography
+ * @description Finds usage of a static (hardcoded) IV. (CNG)
+ * @kind problem
+ * @id cpp/microsoft/public/weak-crypto/cng/hardcoded-iv
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ * external/cwe/cwe-327
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+
+/**
+ * Gets const element of `ArrayAggregateLiteral`.
+ */
+Expr getConstElement(ArrayAggregateLiteral lit) {
+ exists(int n |
+ result = lit.getElementExpr(n, _) and
+ result.isConstant()
+ )
+}
+
+/**
+ * Gets the last element in an `ArrayAggregateLiteral`.
+ */
+Expr getLastElement(ArrayAggregateLiteral lit) {
+ exists(int n |
+ result = lit.getElementExpr(n, _) and
+ not exists(lit.getElementExpr(n + 1, _))
+ )
+}
+
+module CngBCryptEncryptHardcodedIVConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ exists(AggregateLiteral lit |
+ getLastElement(lit) = source.asDefinition() and
+ exists(getConstElement(lit))
+ )
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // BCryptEncrypt 5h argument specifies the IV
+ sink.asIndirectExpr() = call.getArgument(4) and
+ call.getTarget().hasGlobalName("BCryptEncrypt")
+ )
+ }
+}
+
+module Flow = DataFlow::Global;
+
+from DataFlow::Node sl, DataFlow::Node fc, AggregateLiteral lit
+where
+ Flow::flow(sl, fc) and
+ getLastElement(lit) = sl.asDefinition()
+select lit, "Calling BCryptEncrypt with a hard-coded IV on function "
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFBannedHashAlgorithm.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFBannedHashAlgorithm.qhelp
new file mode 100644
index 000000000000..b61202a4dbc3
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFBannedHashAlgorithm.qhelp
@@ -0,0 +1,14 @@
+
+
+
+
+Use of KDF algorithm BCryptDeriveKeyPBKDF2 uses insecure hash from BCryptOpenAlgorithmProvider.
+
+
+
+Use SHA 256, 384, or 512.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFBannedHashAlgorithm.ql b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFBannedHashAlgorithm.ql
new file mode 100644
index 000000000000..27f15531df56
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFBannedHashAlgorithm.ql
@@ -0,0 +1,85 @@
+/**
+ * @name KDF may only use SHA256/384/512 in generating a key.
+ * @description KDF may only use SHA256/384/512 in generating a key.
+ * @kind problem
+ * @id cpp/microsoft/public/kdf-insecure-hash
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+
+module BannedHashAlgorithmConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ // Verify if algorithm is marked as banned.
+ not source.asExpr().getValue().toString().matches("SHA256") and
+ not source.asExpr().getValue().toString().matches("SHA384") and
+ not source.asExpr().getValue().toString().matches("SHA512")
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ // Argument 1 (0-based) specified the algorithm ID.
+ // NTSTATUS BCryptOpenAlgorithmProvider(
+ // [out] BCRYPT_ALG_HANDLE *phAlgorithm,
+ // [in] LPCWSTR pszAlgId,
+ // [in] LPCWSTR pszImplementation,
+ // [in] ULONG dwFlags
+ // );
+ sink.asExpr() = call.getArgument(1) and
+ call.getTarget().hasGlobalName("BCryptOpenAlgorithmProvider")
+ )
+ }
+}
+
+module BannedHashAlgorithmTrace = DataFlow::Global;
+
+module BCRYPT_ALG_HANDLE_Config implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ exists(FunctionCall call |
+ // Argument 0 (0-based) specified the algorithm handle
+ // NTSTATUS BCryptOpenAlgorithmProvider(
+ // [out] BCRYPT_ALG_HANDLE *phAlgorithm,
+ // [in] LPCWSTR pszAlgId,
+ // [in] LPCWSTR pszImplementation,
+ // [in] ULONG dwFlags
+ // );
+ source.asDefiningArgument() = call.getArgument(0) and
+ call.getTarget().hasGlobalName("BCryptOpenAlgorithmProvider")
+ )
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ // Algorithm handle is the 0th (0-based) argument of the call
+ // NTSTATUS BCryptDeriveKeyPBKDF2(
+ // [in] BCRYPT_ALG_HANDLE hPrf,
+ // [in, optional] PUCHAR pbPassword,
+ // [in] ULONG cbPassword,
+ // [in, optional] PUCHAR pbSalt,
+ // [in] ULONG cbSalt,
+ // [in] ULONGLONG cIterations,
+ // [out] PUCHAR pbDerivedKey,
+ // [in] ULONG cbDerivedKey,
+ // [in] ULONG dwFlags
+ // );
+ exists(Call c | c.getTarget().getName() = "BCryptDeriveKeyPBKDF2" |
+ c.getArgument(0) = sink.asExpr()
+ )
+ }
+}
+
+module BCRYPT_ALG_HANDLE_Trace = DataFlow::Global;
+
+from DataFlow::Node src1, DataFlow::Node src2, DataFlow::Node sink1, DataFlow::Node sink2
+where
+ BannedHashAlgorithmTrace::flow(src1, sink1) and
+ exists(Call c |
+ c.getAnArgument() = sink1.asExpr() and src2.asDefiningArgument() = c.getAnArgument()
+ |
+ BCRYPT_ALG_HANDLE_Trace::flow(src2, sink2)
+ )
+select sink2.asExpr(),
+ "BCRYPT_ALG_HANDLE is passed to this to KDF derived from insecure hashing function $@. Must use SHA256 or higher.",
+ src1.asExpr(), src1.asExpr().getValue()
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFLowIterationCount.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFLowIterationCount.qhelp
new file mode 100644
index 000000000000..84722ccec5cd
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFLowIterationCount.qhelp
@@ -0,0 +1,14 @@
+
+
+
+
+Use of KDF algorithm BCryptDeriveKeyPBKDF2 uses low iteration count (less than 100k).
+
+
+
+Use a minimum of 100,000 for iteration count.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFLowIterationCount.ql b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFLowIterationCount.ql
new file mode 100644
index 000000000000..53f7ab79a74d
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFLowIterationCount.ql
@@ -0,0 +1,51 @@
+/**
+ * @name Use iteration count at least 100k to prevent brute force attacks
+ * @description When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).
+ * This query traces constants of <100k to the iteration count parameter of CNG's BCryptDeriveKeyPBKDF2.
+ * This query traces constants of less than the min length to the target parameter.
+ * NOTE: if the constant is modified, or if a non-constant gets to the iteration count, this query will not flag these cases.
+ * The rationale currently is that this query is meant to validate common uses of key derivation.
+ * Non-common uses (modifying the iteration count somehow or getting the count from outside sources) are assumed to be intentional.
+ * @kind problem
+ * @id cpp/microsoft/public/kdf-low-iteration-count
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+
+module IterationCountDataFlowConfig implements DataFlow::ConfigSig {
+ /**
+ * Defines the source for iteration count when it's coming from a fixed value
+ * Any expression that has an assigned value < 100000 could be a source.
+ */
+ predicate isSource(DataFlow::Node src) { src.asExpr().getValue().toInt() < 100000 }
+
+ predicate isSink(DataFlow::Node sink) {
+ // iterations count is the 5th (0-based) argument of the call
+ // NTSTATUS BCryptDeriveKeyPBKDF2(
+ // [in] BCRYPT_ALG_HANDLE hPrf,
+ // [in, optional] PUCHAR pbPassword,
+ // [in] ULONG cbPassword,
+ // [in, optional] PUCHAR pbSalt,
+ // [in] ULONG cbSalt,
+ // [in] ULONGLONG cIterations,
+ // [out] PUCHAR pbDerivedKey,
+ // [in] ULONG cbDerivedKey,
+ // [in] ULONG dwFlags
+ // );
+ exists(Call c | c.getTarget().getName() = "BCryptDeriveKeyPBKDF2" |
+ c.getArgument(5) = sink.asExpr()
+ )
+ }
+}
+
+module IterationCountDataFlow = DataFlow::Global;
+
+from DataFlow::Node src, DataFlow::Node sink
+where IterationCountDataFlow::flow(src, sink)
+select sink.asExpr(),
+ "Iteration count $@ is passed to this to KDF. Use at least 100000 iterations when deriving cryptographic key from password.",
+ src, src.asExpr().getValue()
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallKeyLength.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallKeyLength.qhelp
new file mode 100644
index 000000000000..6927cd16583c
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallKeyLength.qhelp
@@ -0,0 +1,14 @@
+
+
+
+
+Use of KDF algorithm BCryptDeriveKeyPBKDF2 uses small key size (less than 16 bytes).
+
+
+
+Use a minimum of 16 bytes for key size.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallKeyLength.ql b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallKeyLength.ql
new file mode 100644
index 000000000000..b70e68fba371
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallKeyLength.ql
@@ -0,0 +1,46 @@
+/**
+ * @name Small KDF derived key length.
+ * @description KDF derived keys should be a minimum of 128 bits (16 bytes).
+ * This query traces constants of less than the min length to the target parameter.
+ * NOTE: if the constant is modified, or if a non-constant gets to the target, this query will not flag these cases.
+ * The rationale currently is that this query is meant to validate common uses of key derivation.
+ * Non-common uses (modifying the values somehow or getting the count from outside sources) are assumed to be intentional.
+ * @kind problem
+ * @id cpp/microsoft/public/kdf-small-key-size
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+
+module KeyLenConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node src) { src.asExpr().getValue().toInt() < 16 }
+
+ predicate isSink(DataFlow::Node sink) {
+ // Key length size is the 7th (0-based) argument of the call
+ // NTSTATUS BCryptDeriveKeyPBKDF2(
+ // [in] BCRYPT_ALG_HANDLE hPrf,
+ // [in, optional] PUCHAR pbPassword,
+ // [in] ULONG cbPassword,
+ // [in, optional] PUCHAR pbSalt,
+ // [in] ULONG cbSalt,
+ // [in] ULONGLONG cIterations,
+ // [out] PUCHAR pbDerivedKey,
+ // [in] ULONG cbDerivedKey,
+ // [in] ULONG dwFlags
+ // );
+ exists(Call c | c.getTarget().getName() = "BCryptDeriveKeyPBKDF2" |
+ c.getArgument(7) = sink.asExpr()
+ )
+ }
+}
+
+module KeyLenTrace = DataFlow::Global;
+
+from DataFlow::Node src, DataFlow::Node sink
+where KeyLenTrace::flow(src, sink)
+select sink.asExpr(),
+ "Key size $@ is passed to this to KDF. Use at least 16 bytes for key length when deriving cryptographic key from password.",
+ src.asExpr(), src.asExpr().getValue()
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallSaltSize.qhelp b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallSaltSize.qhelp
new file mode 100644
index 000000000000..bf664be8d63c
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallSaltSize.qhelp
@@ -0,0 +1,15 @@
+
+
+
+
+Use of KDF algorithm BCryptDeriveKeyPBKDF2 uses small salt size (less than 16 bytes).
+
+
+
+Use a minimum of 16 bytes for salt size.
+
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallSaltSize.ql b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallSaltSize.ql
new file mode 100644
index 000000000000..8f42679c584a
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/WeakKDFSmallSaltSize.ql
@@ -0,0 +1,46 @@
+/**
+ * @name Small KDF salt length.
+ * @description KDF salts should be a minimum of 128 bits (16 bytes).
+ * This query traces constants of less than the min length to the target parameter.
+ * NOTE: if the constant is modified, or if a non-constant gets to the target, this query will not flag these cases.
+ * The rationale currently is that this query is meant to validate common uses of key derivation.
+ * Non-common uses (modifying the values somehow or getting the count from outside sources) are assumed to be intentional.
+ * @kind problem
+ * @id cpp/microsoft/public/kdf-small-salt-size
+ * @problem.severity error
+ * @precision high
+ * @tags security
+ */
+
+import cpp
+import semmle.code.cpp.dataflow.new.DataFlow
+
+module SaltLenConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node src) { src.asExpr().getValue().toInt() < 16 }
+
+ predicate isSink(DataFlow::Node sink) {
+ // Key length size is the 7th (0-based) argument of the call
+ // NTSTATUS BCryptDeriveKeyPBKDF2(
+ // [in] BCRYPT_ALG_HANDLE hPrf,
+ // [in, optional] PUCHAR pbPassword,
+ // [in] ULONG cbPassword,
+ // [in, optional] PUCHAR pbSalt,
+ // [in] ULONG cbSalt,
+ // [in] ULONGLONG cIterations,
+ // [out] PUCHAR pbDerivedKey,
+ // [in] ULONG cbDerivedKey,
+ // [in] ULONG dwFlags
+ // );
+ exists(Call c | c.getTarget().getName() = "BCryptDeriveKeyPBKDF2" |
+ c.getArgument(4) = sink.asExpr()
+ )
+ }
+}
+
+module SaltLenTrace = DataFlow::Global;
+
+from DataFlow::Node src, DataFlow::Node sink
+where SaltLenTrace::flow(src, sink)
+select sink.asExpr(),
+ "Salt size $@ is passed to this to KDF. Use at least 16 bytes for salt size when deriving cryptographic key from password.",
+ src, src.asExpr().getValue()
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCAPI/BannedModesCAPI1.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCAPI/BannedModesCAPI1.cpp
new file mode 100644
index 000000000000..6296e68499bf
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCAPI/BannedModesCAPI1.cpp
@@ -0,0 +1,11 @@
+#include
+#include
+#include
+
+int main(){
+ DWORD ivLen;
+ HCRYPTKEY hKey;
+
+ //BAD
+ CryptGetKeyParam(hKey, CRYPT_MODE_ECB, NULL, &ivLen, 0);
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCAPI/BannedModesCAPI2.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCAPI/BannedModesCAPI2.cpp
new file mode 100644
index 000000000000..d804432a1237
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCAPI/BannedModesCAPI2.cpp
@@ -0,0 +1,11 @@
+#include
+#include
+#include
+
+int main(){
+ DWORD ivLen;
+ HCRYPTKEY hKey;
+
+ //OKAY
+ CryptGetKeyParam(hKey, CRYPT_MODE_CBC, NULL, &ivLen, 0);
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCNG/BannedModesCNG1.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCNG/BannedModesCNG1.cpp
new file mode 100644
index 000000000000..45b2e3607b55
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCNG/BannedModesCNG1.cpp
@@ -0,0 +1,14 @@
+#include
+#include
+#include
+
+int main(){
+ BCRYPT_ALG_HANDLE aes;
+
+ //BAD
+ status = BCryptSetProperty(aes,
+ BCRYPT_CHAINING_MODE,
+ (PBYTE)BCRYPT_CHAIN_MODE_ECB,
+ sizeof(BCRYPT_CHAIN_MODE_ECB),
+ 0);
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCNG/BannedModesCNG2.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCNG/BannedModesCNG2.cpp
new file mode 100644
index 000000000000..5bf92ca87a47
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/BannedModesCNG/BannedModesCNG2.cpp
@@ -0,0 +1,14 @@
+#include
+#include
+#include
+
+int main(){
+ BCRYPT_ALG_HANDLE aes;
+
+ //OKAY
+ status = BCryptSetProperty(aes,
+ BCRYPT_CHAINING_MODE,
+ (PBYTE)BCRYPT_CHAIN_MODE_CBC,
+ sizeof(BCRYPT_CHAIN_MODE_CBC),
+ 0);
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption1.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption1.cpp
new file mode 100644
index 000000000000..bdaaa7056ec5
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption1.cpp
@@ -0,0 +1,14 @@
+#include
+#include
+#include
+
+int main(){
+ HCRYPTPROV hCryptProv;
+ HCRYPTKEY hKey;
+
+ //BAD
+ if(CryptGenKey( hCryptProv, CALG_DES_128, KEYLENGTH | CRYPT_EXPORTABLE, &hKey))
+ {
+ printf("A session key has been created.\n");
+ }
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption2.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption2.cpp
new file mode 100644
index 000000000000..7e20995e8c95
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption2.cpp
@@ -0,0 +1,14 @@
+#include
+#include
+#include
+
+int main(){
+ HCRYPTPROV hCryptProv;
+ HCRYPTKEY hKey;
+
+ //OKAY
+ if(CryptGenKey( hCryptProv, CALG_AES_128, KEYLENGTH | CRYPT_EXPORTABLE, &hKey))
+ {
+ printf("A session key has been created.\n");
+ }
+}
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption3.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption3.cpp
new file mode 100644
index 000000000000..e0ee60d830f9
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption3.cpp
@@ -0,0 +1,12 @@
+#include
+#include
+#include
+
+int main(){
+ BCRYPT_ALG_HANDLE hAlg;
+ NTSTATUS status;
+ //BAD
+ status = BCryptOpenAlgorithmProvider(&hAlg, BCRYPT_DES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
+}
+
+
diff --git a/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption4.cpp b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption4.cpp
new file mode 100644
index 000000000000..57d8e0bb9675
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Cryptography/examples/WeakEncryption/WeakEncryption4.cpp
@@ -0,0 +1,12 @@
+#include
+#include
+#include
+
+int main(){
+ BCRYPT_ALG_HANDLE hAlg;
+ NTSTATUS status;
+ //OKAY
+ status = BCryptOpenAlgorithmProvider(&hAlg, BCRYPT_AES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
+}
+
+
diff --git a/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.c b/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.c
new file mode 100644
index 000000000000..dead60efd5fd
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.c
@@ -0,0 +1,15 @@
+typedef enum {
+ exampleSomeValue,
+ exampleSomeOtherValue,
+ exampleValueMax
+} EXAMPLE_VALUES;
+
+/*...*/
+
+int variable = someStructure->example;
+if (variable >= exampleValueMax)
+{
+ /* ... Some action ... */
+}
+// ...
+Status = someArray[variable](/*...*/);
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.qhelp b/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.qhelp
new file mode 100644
index 000000000000..3f3f6b8c4ab6
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.qhelp
@@ -0,0 +1,24 @@
+
+
+
+ This rule finds code where an enumerated type (enum) is used to check for an upper boundary, but not the lower boundary, and the value is used as an index to access an array.
+ By default an enum variable is signed, and therefore it is important to ensure that it cannot take on a negative value. When the enum is subsequently used to index an array, or worse still an array of function pointers, then a negative enum value would lead to potentially arbitrary memory being read, used and/or executed.
+
+
+In the majority of cases the fix is simply to add the required lower bounds check to ensure that the enum has a positive value.
+
+
+
+The following example a value is passed and gets cast to an enumerated type and only partially bounds checked.
+
+In this example, the result of the out-of-bounds may allow for arbitrary code execution.
+To fix the problem in this example, you need to add an additional check to the guarding if statement to verify that the index is a positive value.
+
+
+
+
+
+
+
diff --git a/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.ql b/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.ql
new file mode 100644
index 000000000000..963538355c0b
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/MemoryAccess/EnumIndex/UncheckedBoundsEnumAsIndex.ql
@@ -0,0 +1,122 @@
+/**
+ * @name EnumIndex
+ * @description Code using enumerated types as indexes into arrays will often check for
+ * an upper bound to ensure the index is not out of range.
+ * By default an enum variable is signed, and therefore it is important to ensure
+ * that it cannot take on a negative value. When the enum is subsequently used
+ * to index an array, or worse still an array of function pointers, then a negative
+ * enum value would lead to potentially arbitrary memory being read, used and/or executed.
+ * @kind problem
+ * @problem.severity error
+ * @precision high
+ * @id cpp/microsoft/public/enum-index
+ * @tags security
+ * external/cwe/cwe-125
+ * external/microsoft/c33010
+ */
+
+import cpp
+import semmle.code.cpp.controlflow.Guards
+private import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils
+import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
+
+/**
+ * Holds if `ec` is the upper bound of an enum
+ */
+predicate isUpperBoundEnumValue(EnumConstant ec) {
+ not exists(EnumConstant ec2, Enum enum | enum = ec2.getEnclosingElement() |
+ enum = ec.getEnclosingElement() and
+ ec2.getValue().toInt() > ec.getValue().toInt()
+ )
+}
+
+/**
+ * Holds if 'eca' is an access to the upper bound of an enum
+ */
+predicate isUpperBoundEnumAccess(EnumConstantAccess eca) {
+ exists(EnumConstant ec |
+ varbind(eca, ec) and
+ isUpperBoundEnumValue(ec)
+ )
+}
+
+/**
+ * Holds if the expression `e` is accessing the enum constant `ec`
+ */
+predicate isExpressionAccessingUpperboundEnum(Expr e, EnumConstantAccess ec) {
+ isExpressionAccessingUpperboundEnum(e.getAChild(), ec)
+ or
+ ec = e and
+ isUpperBoundEnumAccess(ec)
+}
+
+/**
+ * Holds if `e` is a child of an If statement
+ */
+predicate isPartOfAnIfStatement(Expr e) {
+ isPartOfAnIfStatement(e.getAChild())
+ or
+ exists(IfStmt ifs | ifs.getAChild() = e)
+}
+
+/**
+ * Holds if the variable access `offsetExpr` upper bound is guarded by an If statement GuardCondition
+ * that is using the upper bound of an enum to check the upper bound of `offsetExpr`
+ */
+predicate hasUpperBoundDefinedByEnum(VariableAccess offsetExpr) {
+ exists(BasicBlock controlled, StackVariable offsetVar, SsaDefinition def |
+ controlled.contains(offsetExpr) and
+ linearBoundControlsEnum(controlled, def, offsetVar, Lesser()) and
+ offsetExpr = def.getAUse(offsetVar)
+ )
+}
+
+pragma[noinline]
+predicate linearBoundControlsEnum(
+ BasicBlock controlled, SsaDefinition def, StackVariable offsetVar, RelationDirection direction
+) {
+ exists(GuardCondition guard |
+ exists(boolean branch |
+ guard.controls(controlled, branch) and
+ cmpWithLinearBound(guard, def.getAUse(offsetVar), direction, branch)
+ ) and
+ exists(EnumConstantAccess enumca | isExpressionAccessingUpperboundEnum(guard, enumca)) and
+ isPartOfAnIfStatement(guard)
+ )
+}
+
+/**
+ * Holds if the variable access `offsetExpr` lower bound is guarded
+ */
+predicate hasLowerBound(VariableAccess offsetExpr) {
+ exists(BasicBlock controlled, StackVariable offsetVar, SsaDefinition def |
+ controlled.contains(offsetExpr) and
+ linearBoundControls(controlled, def, offsetVar, Greater()) and
+ offsetExpr = def.getAUse(offsetVar)
+ )
+}
+
+pragma[noinline]
+predicate linearBoundControls(
+ BasicBlock controlled, SsaDefinition def, StackVariable offsetVar, RelationDirection direction
+) {
+ exists(GuardCondition guard, boolean branch |
+ guard.controls(controlled, branch) and
+ cmpWithLinearBound(guard, def.getAUse(offsetVar), direction, branch) and
+ isPartOfAnIfStatement(guard)
+ )
+}
+
+from VariableAccess offset, ArrayExpr array
+where
+ offset = array.getArrayOffset() and
+ hasUpperBoundDefinedByEnum(offset) and
+ not hasLowerBound(offset) and
+ exists(IntegralType t |
+ t = offset.getUnderlyingType() and
+ not t.isUnsigned()
+ ) and
+ lowerBound(offset.getFullyConverted()) < 0
+select offset,
+ "When accessing array " + array.getArrayBase() + " with index " + offset +
+ ", the upper bound of an enum is used to check the upper bound of the array, but the lower bound is not checked."
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.qhelp b/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.qhelp
new file mode 100644
index 000000000000..e34d26933823
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.qhelp
@@ -0,0 +1,29 @@
+
+
+
+
+Hard-coding security protocols rather than specifying the system default is risky because the protocol may become deprecated in future.
+The grbitEnabledProtocols member of the SCHANNEL_CRED struct contains a bit string that represents the protocols supported by connections made with credentials acquired by using this structure. If this member is zero, Schannel selects the protocol. Applications should set grbitEnabledProtocols to zero and use the protocol versions enabled on the system by default.
+
+
+
+ - Set the grbitEnabledProtocols member of the SCHANNEL_CRED struct to 0.
+
+
+
+Violation:
+
+
+
+Solution:
+
+
+
+
+
+Microsoft Docs: SCHANNEL_CRED structure.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.ql b/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.ql
new file mode 100644
index 000000000000..64c1be93c24e
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.ql
@@ -0,0 +1,19 @@
+/**
+ * @name Hard-coded use of a security protocol
+ * @description Hard-coding the security protocol used rather than specifying the system default is
+ * risky because the protocol may become deprecated in future.
+ * @kind problem
+ * @problem.severity warning
+ * @id cpp/microsoft/public/hardcoded-security-protocol
+ */
+
+import cpp
+import HardCodedSecurityProtocol
+
+from ProtocolConstant constantValue, DataFlow::Node grbitEnabledProtocolsAssignment
+where
+ GrbitEnabledConstantTace::flow(DataFlow::exprNode(constantValue), grbitEnabledProtocolsAssignment) and
+ constantValue.isHardcodedProtocol()
+select constantValue,
+ "Hard-coded use of security protocol " + getConstantName(constantValue) + " set here $@.",
+ grbitEnabledProtocolsAssignment, grbitEnabledProtocolsAssignment.toString()
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.qll b/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.qll
new file mode 100644
index 000000000000..1cc71668ccbe
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/HardCodedSecurityProtocol.qll
@@ -0,0 +1,140 @@
+import cpp
+import semmle.code.cpp.dataflow.new.TaintTracking
+
+/**
+ * A constant representing one or more security protocols for the `grbitEnabledProtocols` field.
+ */
+class ProtocolConstant extends Expr {
+ ProtocolConstant() {
+ this.isConstant() and
+ GrbitEnabledConstantTace::flow(DataFlow::exprNode(this), _) and
+ (
+ this instanceof Literal
+ or
+ this = any(ConstantMacroInvocation mi).getExpr()
+ or
+ // This is a workaround for folded constants, which currently have no
+ // dataflow node representation. Attach to the outermost dataflow node
+ // where a literal exists as a child that has no dataflow node representation.
+ exists(Literal l |
+ this.getAChild*() = l and
+ not exists(DataFlow::Node n | n.asExpr() = l)
+ )
+ )
+ }
+
+ /** Gets the bitmask represented by this constant. */
+ int getBitmask() { result = this.getValue().toInt() }
+
+ /** Holds if this constant only represents TLS1.3 protocols. */
+ predicate isTLS1_3Only() {
+ // Flags for TLS1.3 are 0x00001000 and 0x00002000
+ // 12288 = 0x00001000 | 0x00002000
+ this.getBitmask().bitAnd(12288.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents TLS1.2 protocols. */
+ predicate isTLS1_2Only() {
+ // Flags for TLS1.2 are 0x00000400 and 0x00000800
+ // 3072 = 0x00000400 | 0x00000800
+ this.getBitmask().bitAnd(3072.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents TLS1.1 protocols. */
+ predicate isTLS1_1Only() {
+ // Flags for TLS1.1 are 0x00000100 and 0x00000200
+ // 768 = 0x00000100 | 0x00000200
+ this.getBitmask().bitAnd(768.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents TLS1.0 protocols. */
+ predicate isTLS1_0Only() {
+ // Flags for TLS1.0 are 0x00000040 and 0x00000080
+ // 192 = 0x00000040 | 0x00000080
+ this.getBitmask().bitAnd(192.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents TLS1.1 protocols. */
+ predicate isSSL3Only() {
+ // Flags for SSL3 are 0x00000010 and 0x00000020
+ // 48 = 0x00000010 | 0x00000020
+ this.getBitmask().bitAnd(48.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents SSL2 protocols. */
+ predicate isSSL2Only() {
+ // Flags for TLS1.0 are 0x00000004 and 0x00000008
+ // 12 = 0x00000004 | 0x00000008
+ this.getBitmask().bitAnd(12.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents PCT1 protocols. */
+ predicate isPCT1Only() {
+ // Flags for PCT are 0x00000001 and 0x00000002
+ // 3 = 0x00000001 | 0x00000002
+ this.getBitmask().bitAnd(3.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant only represents any combination of TLS-related protocols. */
+ predicate isHardcodedProtocol() {
+ // 16383 = SP_PROT_TLS1_3 | SP_PROT_TLS1_2 | SP_PROT_TLS1_1 | SP_PROT_TLS1_3
+ // | SP_PROT_TLS1 | SP_PROT_SSL3 | SP_PROT_SSL2 | SP_PROT_PCT1
+ this.getBitmask().bitAnd(16383.bitNot()) = 0 and
+ not this.isSystemDefault()
+ }
+
+ /** Holds if this constant represents the system default protocol. */
+ predicate isSystemDefault() { this.getBitmask() = 0 }
+}
+
+/**
+ * A data flow configuration that tracks from constant values to assignments to the
+ * `grbitEnabledProtocols` field on the SCHANNEL_CRED structure.
+ */
+module GrbitEnabledConstantConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { source.asExpr().isConstant() }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(Field grbitEnabledProtocols |
+ grbitEnabledProtocols.hasName("grbitEnabledProtocols") and
+ sink.asExpr() = grbitEnabledProtocols.getAnAssignedValue()
+ )
+ }
+
+ predicate isBarrier(DataFlow::Node node) {
+ // Do not flow through other macro invocations if they would, themselves, be represented
+ node.asExpr() = any(ConstantMacroInvocation mi).getExpr().getAChild+()
+ or
+ // Do not flow through complements, as they change the meaning
+ node.asExpr() instanceof ComplementExpr
+ }
+}
+
+module GrbitEnabledConstantTace = TaintTracking::Global;
+
+/**
+ * A macro that represents a constant value.
+ */
+class ConstantMacroInvocation extends MacroInvocation {
+ ConstantMacroInvocation() {
+ exists(this.getExpr().getValue()) and
+ not this.getMacro().getHead().matches("%(%)%")
+ }
+}
+
+/**
+ * Gets the name of the constant `val`, if it is a constant.
+ */
+string getConstantName(Expr val) {
+ exists(val.getValue()) and
+ if exists(ConstantMacroInvocation mi | mi.getExpr() = val)
+ then result = any(ConstantMacroInvocation mi | mi.getExpr() = val).getMacroName()
+ else result = val.toString()
+}
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/UseOfDeprecatedSecurityProtocol.qhelp b/cpp/ql/src/Microsoft/Security/Protocols/UseOfDeprecatedSecurityProtocol.qhelp
new file mode 100644
index 000000000000..0876a4e50439
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/UseOfDeprecatedSecurityProtocol.qhelp
@@ -0,0 +1,29 @@
+
+
+
+
+Older protocol versions of TLS are less secure than TLS 1.2 and TLS 1.3 and are more likely to have new vulnerabilities. Avoid older protocol versions to minimize risk.
+The grbitEnabledProtocols member of the SCHANNEL_CRED struct contains a bit string that represents the protocols supported by connections made with credentials acquired by using this structure. If this member is zero, Schannel selects the protocol. Applications should set grbitEnabledProtocols to zero and use the protocol versions enabled on the system by default.
+
+
+
+ - Set the grbitEnabledProtocols member of the SCHANNEL_CRED struct to 0.
+
+
+
+Violation:
+
+
+
+Solution:
+
+
+
+
+
+Microsoft Docs: SCHANNEL_CRED structure.
+
+
+
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/UseOfDeprecatedSecurityProtocol.ql b/cpp/ql/src/Microsoft/Security/Protocols/UseOfDeprecatedSecurityProtocol.ql
new file mode 100644
index 000000000000..f9d957e15e26
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/UseOfDeprecatedSecurityProtocol.ql
@@ -0,0 +1,21 @@
+/**
+ * @name Hard-coded use of a deprecated security protocol
+ * @description Using a deprecated security protocol rather than the system default is risky.
+ * @kind problem
+ * @problem.severity error
+ * @id cpp/microsoft/public/use-of-deprecated-security-protocol
+ */
+
+import cpp
+import HardCodedSecurityProtocol
+
+from ProtocolConstant constantValue, DataFlow::Node grbitEnabledProtocolsAssignment
+where
+ GrbitEnabledConstantTace::flow(DataFlow::exprNode(constantValue), grbitEnabledProtocolsAssignment) and
+ // If the system default hasn't been specified, and TLS2 has not been specified, then this is a deprecated security protocol
+ not constantValue.isSystemDefault() and
+ not constantValue.isTLS1_2Only() and
+ not constantValue.isTLS1_3Only()
+select constantValue,
+ "Hard-coded use of deprecated security protocol " + getConstantName(constantValue) +
+ " set here $@.", constantValue, getConstantName(constantValue)
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/examples/HardCodedSecurityProtocol/HardCodedSecurityProtocol1.cpp b/cpp/ql/src/Microsoft/Security/Protocols/examples/HardCodedSecurityProtocol/HardCodedSecurityProtocol1.cpp
new file mode 100644
index 000000000000..3ad2eca405bb
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/examples/HardCodedSecurityProtocol/HardCodedSecurityProtocol1.cpp
@@ -0,0 +1,18 @@
+#include
+#include
+#include
+#include
+#include
+
+void HardCodedSecurityProtocolGood()
+{
+
+ SCHANNEL_CRED credData;
+ ZeroMemory(&credData, sizeof(credData));
+
+ // BAD: hardcoded protocols
+ credData.grbitEnabledProtocols = SP_PROT_TLS1_2;
+ credData.grbitEnabledProtocols = SP_PROT_TLS1_3;
+
+ return;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/examples/HardCodedSecurityProtocol/HardCodedSecurityProtocol2.cpp b/cpp/ql/src/Microsoft/Security/Protocols/examples/HardCodedSecurityProtocol/HardCodedSecurityProtocol2.cpp
new file mode 100644
index 000000000000..7f5318248ef1
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/examples/HardCodedSecurityProtocol/HardCodedSecurityProtocol2.cpp
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+#include
+
+void HardCodedSecurityProtocolGood()
+{
+
+ SCHANNEL_CRED credData;
+ ZeroMemory(&credData, sizeof(credData));
+
+ // GOOD: system default protocol
+ credData.grbitEnabledProtocols = 0;
+
+ return;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/examples/UseOfDeprecatedSecurityProtocol/UseOfDeprecatedSecurityProtocol1.cpp b/cpp/ql/src/Microsoft/Security/Protocols/examples/UseOfDeprecatedSecurityProtocol/UseOfDeprecatedSecurityProtocol1.cpp
new file mode 100644
index 000000000000..d9b0ddc4af74
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/examples/UseOfDeprecatedSecurityProtocol/UseOfDeprecatedSecurityProtocol1.cpp
@@ -0,0 +1,23 @@
+#include
+#include
+#include
+#include
+#include
+
+void UseOfDeprecatedSecurityProtocolGood()
+{
+
+ SCHANNEL_CRED credData;
+ ZeroMemory(&credData, sizeof(credData));
+
+ // BAD: Deprecated protocols
+ credData.grbitEnabledProtocols = SP_PROT_PCT1_SERVER;
+ credData.grbitEnabledProtocols = SP_PROT_SSL2_SERVER;
+ credData.grbitEnabledProtocols = SP_PROT_SSL3_SERVER;
+ credData.grbitEnabledProtocols = SP_PROT_TLS1_1;
+ credData.grbitEnabledProtocols = SP_PROT_TLS1_1_SERVER;
+ credData.grbitEnabledProtocols = SP_PROT_TLS1_1_CLIENT;
+ credData.grbitEnabledProtocols = SP_PROT_SSL3TLS1;
+
+ return;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Microsoft/Security/Protocols/examples/UseOfDeprecatedSecurityProtocol/UseOfDeprecatedSecurityProtocol2.cpp b/cpp/ql/src/Microsoft/Security/Protocols/examples/UseOfDeprecatedSecurityProtocol/UseOfDeprecatedSecurityProtocol2.cpp
new file mode 100644
index 000000000000..7f5318248ef1
--- /dev/null
+++ b/cpp/ql/src/Microsoft/Security/Protocols/examples/UseOfDeprecatedSecurityProtocol/UseOfDeprecatedSecurityProtocol2.cpp
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+#include
+
+void HardCodedSecurityProtocolGood()
+{
+
+ SCHANNEL_CRED credData;
+ ZeroMemory(&credData, sizeof(credData));
+
+ // GOOD: system default protocol
+ credData.grbitEnabledProtocols = 0;
+
+ return;
+}
\ No newline at end of file
diff --git a/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql b/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql
index 0ea4ce2e95f4..2ea1cb024658 100644
--- a/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql
+++ b/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql
@@ -38,9 +38,6 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
predicate isSink(DataFlow::Node node) {
exists(SqlLikeFunction runSql | runSql.outermostWrapperFunctionCall(asSinkExpr(node), _))
- or
- // sink defined using models-as-data
- sinkNode(node, "sql-injection")
}
predicate isBarrier(DataFlow::Node node) {
@@ -59,21 +56,13 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
module SqlTainted = TaintTracking::Global;
from
- Expr taintedArg, FlowSource taintSource, SqlTainted::PathNode sourceNode,
- SqlTainted::PathNode sinkNode, string extraText
+ SqlLikeFunction runSql, Expr taintedArg, FlowSource taintSource, SqlTainted::PathNode sourceNode,
+ SqlTainted::PathNode sinkNode, string callChain
where
- (
- exists(SqlLikeFunction runSql, string callChain |
- runSql.outermostWrapperFunctionCall(taintedArg, callChain) and
- extraText = " and then passed to " + callChain
- )
- or
- sinkNode(sinkNode.getNode(), "sql-injection") and
- extraText = ""
- ) and
+ runSql.outermostWrapperFunctionCall(taintedArg, callChain) and
SqlTainted::flowPath(sourceNode, sinkNode) and
taintedArg = asSinkExpr(sinkNode.getNode()) and
taintSource = sourceNode.getNode()
select taintedArg, sourceNode, sinkNode,
- "This argument to a SQL query function is derived from $@" + extraText + ".", taintSource,
- "user input (" + taintSource.getSourceType() + ")"
+ "This argument to a SQL query function is derived from $@ and then passed to " + callChain + ".",
+ taintSource, "user input (" + taintSource.getSourceType() + ")"
diff --git a/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql b/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql
index 17c1b09c3e68..463d6e583bd3 100644
--- a/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql
+++ b/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql
@@ -51,7 +51,10 @@ predicate offsetIsAlwaysInBounds(ArrayExpr arrayExpr, VariableAccess offsetExpr)
}
module ImproperArrayIndexValidationConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node source) { isFlowSource(source, _) }
+ predicate isSource(DataFlow::Node source) {
+ isFlowSource(source, _) and
+ not source.getLocation().getFile().getRelativePath().regexpMatch("(.*/)?tests?/.*")
+ }
predicate isBarrier(DataFlow::Node node) {
node = DataFlow::BarrierGuard::getABarrierNode()
@@ -73,7 +76,8 @@ module ImproperArrayIndexValidationConfig implements DataFlow::ConfigSig {
module ImproperArrayIndexValidation = TaintTracking::Global;
from
- ImproperArrayIndexValidation::PathNode source, ImproperArrayIndexValidation::PathNode sink,
+ ImproperArrayIndexValidation::PathNode source,
+ ImproperArrayIndexValidation::PathNode sink,
string sourceType
where
ImproperArrayIndexValidation::flowPath(source, sink) and
diff --git a/cpp/ql/src/change-notes/2025-06-20-sql-injection-models.md b/cpp/ql/src/change-notes/2025-06-20-sql-injection-models.md
deleted file mode 100644
index ebb517d0a395..000000000000
--- a/cpp/ql/src/change-notes/2025-06-20-sql-injection-models.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* The query `cpp/sql-injection` now can be extended using the `sql-injection` Models as Data (MaD) sink kind.
\ No newline at end of file
diff --git a/cpp/ql/src/change-notes/2025-07-01-global-vars-ubi-query-fixes.md.md b/cpp/ql/src/change-notes/2025-07-01-global-vars-ubi-query-fixes.md.md
deleted file mode 100644
index b5ab2362bf43..000000000000
--- a/cpp/ql/src/change-notes/2025-07-01-global-vars-ubi-query-fixes.md.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Fixed a number of false positives and false negatives in `cpp/global-use-before-init`. Note that this query is not part of any of the default query suites.
diff --git a/cpp/ql/src/experimental/cryptography/example_alerts/WeakEncryption.ql b/cpp/ql/src/experimental/cryptography/example_alerts/WeakEncryption.ql
index d8d5c4e4a566..a29a620675d4 100644
--- a/cpp/ql/src/experimental/cryptography/example_alerts/WeakEncryption.ql
+++ b/cpp/ql/src/experimental/cryptography/example_alerts/WeakEncryption.ql
@@ -2,7 +2,7 @@
* @name Weak cryptography
* @description Finds explicit uses of symmetric encryption algorithms that are weak, unknown, or otherwise unaccepted.
* @kind problem
- * @id cpp/weak-crypto/banned-encryption-algorithms
+ * @id cpp/experimental/weak-crypto/banned-encryption-algorithms
* @problem.severity error
* @precision high
* @tags external/cwe/cwe-327
diff --git a/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql b/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql
index 59a6838c23e3..704c5baa0672 100644
--- a/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql
+++ b/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql
@@ -37,7 +37,7 @@ abstract class MaybePreprocessorDirective extends TMaybePreprocessorDirective {
class NoPreprocessorDirective extends TNoPreprocessorDirective, MaybePreprocessorDirective {
override string toString() { result = "" }
- override Location getLocation() { result instanceof UnknownLocation }
+ override Location getLocation() { result instanceof UnknownDefaultLocation }
}
class SomePreprocessorDirective extends TSomePreprocessorDirective, MaybePreprocessorDirective {
diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml
index ade2daeb369a..1ea432be220c 100644
--- a/cpp/ql/src/qlpack.yml
+++ b/cpp/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/cpp-queries
-version: 1.4.4-dev
+version: 1.4.3
groups:
- cpp
- queries
diff --git a/cpp/ql/test/experimental/library-tests/quantum/node_edges.expected b/cpp/ql/test/experimental/library-tests/quantum/node_edges.expected
index 27be8e5cfba5..e9e3bf868ae0 100644
--- a/cpp/ql/test/experimental/library-tests/quantum/node_edges.expected
+++ b/cpp/ql/test/experimental/library-tests/quantum/node_edges.expected
@@ -30,12 +30,9 @@
| openssl_basic.c:144:13:144:22 | HashOperation | Message | openssl_basic.c:144:24:144:30 | Message |
| openssl_basic.c:144:24:144:30 | Message | Source | openssl_basic.c:181:49:181:87 | Constant |
| openssl_basic.c:144:46:144:51 | Digest | Source | openssl_basic.c:144:46:144:51 | Digest |
-| openssl_basic.c:155:22:155:41 | Key | Algorithm | openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:155:22:155:41 | KeyGeneration | Algorithm | openssl_basic.c:155:22:155:41 | KeyGeneration |
-| openssl_basic.c:155:22:155:41 | KeyGeneration | KeyInput | openssl_basic.c:155:64:155:66 | Key |
| openssl_basic.c:155:22:155:41 | KeyGeneration | Output | openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:155:43:155:55 | MACAlgorithm | H | openssl_basic.c:160:39:160:48 | HashAlgorithm |
-| openssl_basic.c:155:64:155:66 | Key | Source | openssl_basic.c:179:43:179:76 | Constant |
| openssl_basic.c:160:59:160:62 | Key | Source | openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:163:35:163:41 | Message | Source | openssl_basic.c:181:49:181:87 | Constant |
| openssl_basic.c:167:9:167:27 | SignOperation | Algorithm | openssl_basic.c:167:9:167:27 | SignOperation |
@@ -43,11 +40,8 @@
| openssl_basic.c:167:9:167:27 | SignOperation | Input | openssl_basic.c:163:35:163:41 | Message |
| openssl_basic.c:167:9:167:27 | SignOperation | Key | openssl_basic.c:160:59:160:62 | Key |
| openssl_basic.c:167:9:167:27 | SignOperation | Output | openssl_basic.c:167:34:167:36 | SignatureOutput |
-| openssl_pkey.c:21:10:21:28 | KeyGeneration | Algorithm | openssl_pkey.c:21:10:21:28 | KeyGeneration |
-| openssl_pkey.c:21:10:21:28 | KeyGeneration | Output | openssl_pkey.c:21:30:21:32 | Key |
| openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm | Mode | openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm |
| openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm | Padding | openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm |
-| openssl_pkey.c:21:30:21:32 | Key | Algorithm | openssl_pkey.c:21:30:21:32 | Key |
| openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm | Mode | openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm |
| openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm | Padding | openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm |
| openssl_pkey.c:55:9:55:23 | KeyGeneration | Algorithm | openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm |
@@ -83,13 +77,6 @@
| openssl_signature.c:133:52:133:55 | Key | Source | openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:133:52:133:55 | Key | Source | openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:134:38:134:44 | Message | Source | openssl_signature.c:602:37:602:77 | Constant |
-| openssl_signature.c:135:9:135:27 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
-| openssl_signature.c:135:9:135:27 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
-| openssl_signature.c:135:9:135:27 | SignOperation | HashAlgorithm | openssl_signature.c:684:24:684:33 | HashAlgorithm |
-| openssl_signature.c:135:9:135:27 | SignOperation | HashAlgorithm | openssl_signature.c:740:24:740:33 | HashAlgorithm |
-| openssl_signature.c:135:9:135:27 | SignOperation | Input | openssl_signature.c:134:38:134:44 | Message |
-| openssl_signature.c:135:9:135:27 | SignOperation | Key | openssl_signature.c:133:52:133:55 | Key |
-| openssl_signature.c:135:9:135:27 | SignOperation | Output | openssl_signature.c:135:37:135:40 | SignatureOutput |
| openssl_signature.c:142:9:142:27 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:142:9:142:27 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:142:9:142:27 | SignOperation | HashAlgorithm | openssl_signature.c:684:24:684:33 | HashAlgorithm |
@@ -100,13 +87,6 @@
| openssl_signature.c:190:57:190:60 | Key | Source | openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:190:57:190:60 | Key | Source | openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:196:38:196:44 | Message | Source | openssl_signature.c:602:37:602:77 | Constant |
-| openssl_signature.c:197:9:197:27 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
-| openssl_signature.c:197:9:197:27 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
-| openssl_signature.c:197:9:197:27 | SignOperation | HashAlgorithm | openssl_signature.c:684:24:684:33 | HashAlgorithm |
-| openssl_signature.c:197:9:197:27 | SignOperation | HashAlgorithm | openssl_signature.c:740:24:740:33 | HashAlgorithm |
-| openssl_signature.c:197:9:197:27 | SignOperation | Input | openssl_signature.c:196:38:196:44 | Message |
-| openssl_signature.c:197:9:197:27 | SignOperation | Key | openssl_signature.c:190:57:190:60 | Key |
-| openssl_signature.c:197:9:197:27 | SignOperation | Output | openssl_signature.c:197:37:197:40 | SignatureOutput |
| openssl_signature.c:204:9:204:27 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:204:9:204:27 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:204:9:204:27 | SignOperation | HashAlgorithm | openssl_signature.c:684:24:684:33 | HashAlgorithm |
@@ -116,14 +96,6 @@
| openssl_signature.c:204:9:204:27 | SignOperation | Output | openssl_signature.c:204:37:204:46 | SignatureOutput |
| openssl_signature.c:260:39:260:42 | Key | Source | openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:260:39:260:42 | Key | Source | openssl_signature.c:578:34:578:37 | Key |
-| openssl_signature.c:263:9:263:21 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
-| openssl_signature.c:263:9:263:21 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
-| openssl_signature.c:263:9:263:21 | SignOperation | HashAlgorithm | openssl_signature.c:684:24:684:33 | HashAlgorithm |
-| openssl_signature.c:263:9:263:21 | SignOperation | HashAlgorithm | openssl_signature.c:740:24:740:33 | HashAlgorithm |
-| openssl_signature.c:263:9:263:21 | SignOperation | Input | openssl_signature.c:263:54:263:59 | Message |
-| openssl_signature.c:263:9:263:21 | SignOperation | Key | openssl_signature.c:260:39:260:42 | Key |
-| openssl_signature.c:263:9:263:21 | SignOperation | Output | openssl_signature.c:263:33:263:36 | SignatureOutput |
-| openssl_signature.c:263:54:263:59 | Message | Source | openssl_signature.c:263:54:263:59 | Message |
| openssl_signature.c:270:9:270:21 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:270:9:270:21 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:270:9:270:21 | SignOperation | HashAlgorithm | openssl_signature.c:684:24:684:33 | HashAlgorithm |
@@ -135,14 +107,6 @@
| openssl_signature.c:321:39:321:42 | Key | Source | openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:321:39:321:42 | Key | Source | openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:326:48:326:54 | Message | Source | openssl_signature.c:602:37:602:77 | Constant |
-| openssl_signature.c:327:9:327:35 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
-| openssl_signature.c:327:9:327:35 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
-| openssl_signature.c:327:9:327:35 | SignOperation | Algorithm | openssl_signature.c:702:60:702:71 | KeyOperationAlgorithm |
-| openssl_signature.c:327:9:327:35 | SignOperation | Algorithm | openssl_signature.c:758:60:758:64 | KeyOperationAlgorithm |
-| openssl_signature.c:327:9:327:35 | SignOperation | HashAlgorithm | openssl_signature.c:327:9:327:35 | SignOperation |
-| openssl_signature.c:327:9:327:35 | SignOperation | Input | openssl_signature.c:326:48:326:54 | Message |
-| openssl_signature.c:327:9:327:35 | SignOperation | Key | openssl_signature.c:321:39:321:42 | Key |
-| openssl_signature.c:327:9:327:35 | SignOperation | Output | openssl_signature.c:327:47:327:50 | SignatureOutput |
| openssl_signature.c:334:9:334:35 | SignOperation | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:334:9:334:35 | SignOperation | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:334:9:334:35 | SignOperation | Algorithm | openssl_signature.c:702:60:702:71 | KeyOperationAlgorithm |
@@ -156,9 +120,7 @@
| openssl_signature.c:548:9:548:23 | KeyGeneration | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:548:9:548:23 | KeyGeneration | Output | openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:548:34:548:37 | Key | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
-| openssl_signature.c:575:32:575:37 | Key | Source | openssl_signature.c:575:32:575:37 | Key |
| openssl_signature.c:578:9:578:23 | KeyGeneration | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
-| openssl_signature.c:578:9:578:23 | KeyGeneration | KeyInput | openssl_signature.c:575:32:575:37 | Key |
| openssl_signature.c:578:9:578:23 | KeyGeneration | Output | openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:578:34:578:37 | Key | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:702:60:702:71 | KeyOperationAlgorithm | Padding | openssl_signature.c:702:60:702:71 | KeyOperationAlgorithm |
diff --git a/cpp/ql/test/experimental/library-tests/quantum/node_properties.expected b/cpp/ql/test/experimental/library-tests/quantum/node_properties.expected
index 52a7c61502bd..1ac047ad334e 100644
--- a/cpp/ql/test/experimental/library-tests/quantum/node_properties.expected
+++ b/cpp/ql/test/experimental/library-tests/quantum/node_properties.expected
@@ -20,10 +20,9 @@
| openssl_basic.c:144:67:144:73 | HashAlgorithm | DigestSize | 128 | openssl_basic.c:144:67:144:73 | openssl_basic.c:144:67:144:73 |
| openssl_basic.c:144:67:144:73 | HashAlgorithm | Name | MD5 | openssl_basic.c:144:67:144:73 | openssl_basic.c:144:67:144:73 |
| openssl_basic.c:144:67:144:73 | HashAlgorithm | RawName | EVP_md5 | openssl_basic.c:144:67:144:73 | openssl_basic.c:144:67:144:73 |
-| openssl_basic.c:155:22:155:41 | Key | KeyType | Asymmetric | openssl_basic.c:155:22:155:41 | openssl_basic.c:155:22:155:41 |
+| openssl_basic.c:155:22:155:41 | Key | KeyType | Symmetric | openssl_basic.c:155:22:155:41 | openssl_basic.c:155:22:155:41 |
| openssl_basic.c:155:43:155:55 | MACAlgorithm | Name | HMAC | openssl_basic.c:155:43:155:55 | openssl_basic.c:155:43:155:55 |
| openssl_basic.c:155:43:155:55 | MACAlgorithm | RawName | 855 | openssl_basic.c:155:43:155:55 | openssl_basic.c:155:43:155:55 |
-| openssl_basic.c:155:64:155:66 | Key | KeyType | Unknown | openssl_basic.c:155:64:155:66 | openssl_basic.c:155:64:155:66 |
| openssl_basic.c:160:39:160:48 | HashAlgorithm | DigestSize | 256 | openssl_basic.c:160:39:160:48 | openssl_basic.c:160:39:160:48 |
| openssl_basic.c:160:39:160:48 | HashAlgorithm | Name | SHA2 | openssl_basic.c:160:39:160:48 | openssl_basic.c:160:39:160:48 |
| openssl_basic.c:160:39:160:48 | HashAlgorithm | RawName | EVP_sha256 | openssl_basic.c:160:39:160:48 | openssl_basic.c:160:39:160:48 |
@@ -35,7 +34,6 @@
| openssl_basic.c:218:32:218:33 | Constant | Description | 32 | openssl_basic.c:218:32:218:33 | openssl_basic.c:218:32:218:33 |
| openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm | Name | RSA | openssl_pkey.c:21:10:21:28 | openssl_pkey.c:21:10:21:28 |
| openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm | RawName | RSA_generate_key_ex | openssl_pkey.c:21:10:21:28 | openssl_pkey.c:21:10:21:28 |
-| openssl_pkey.c:21:30:21:32 | Key | KeyType | Asymmetric | openssl_pkey.c:21:30:21:32 | openssl_pkey.c:21:30:21:32 |
| openssl_pkey.c:45:49:45:65 | Constant | Description | Hello, OpenSSL! | openssl_pkey.c:45:49:45:65 | openssl_pkey.c:45:49:45:65 |
| openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm | Name | RSA | openssl_pkey.c:50:31:50:42 | openssl_pkey.c:50:31:50:42 |
| openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm | RawName | 6 | openssl_pkey.c:50:31:50:42 | openssl_pkey.c:50:31:50:42 |
@@ -46,16 +44,12 @@
| openssl_signature.c:80:9:80:21 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:80:9:80:21 | openssl_signature.c:80:9:80:21 |
| openssl_signature.c:80:53:80:56 | Key | KeyType | Unknown | openssl_signature.c:80:53:80:56 | openssl_signature.c:80:53:80:56 |
| openssl_signature.c:133:52:133:55 | Key | KeyType | Unknown | openssl_signature.c:133:52:133:55 | openssl_signature.c:133:52:133:55 |
-| openssl_signature.c:135:9:135:27 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:135:9:135:27 | openssl_signature.c:135:9:135:27 |
| openssl_signature.c:142:9:142:27 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:142:9:142:27 | openssl_signature.c:142:9:142:27 |
| openssl_signature.c:190:57:190:60 | Key | KeyType | Unknown | openssl_signature.c:190:57:190:60 | openssl_signature.c:190:57:190:60 |
-| openssl_signature.c:197:9:197:27 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:197:9:197:27 | openssl_signature.c:197:9:197:27 |
| openssl_signature.c:204:9:204:27 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:204:9:204:27 | openssl_signature.c:204:9:204:27 |
| openssl_signature.c:260:39:260:42 | Key | KeyType | Unknown | openssl_signature.c:260:39:260:42 | openssl_signature.c:260:39:260:42 |
-| openssl_signature.c:263:9:263:21 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:263:9:263:21 | openssl_signature.c:263:9:263:21 |
| openssl_signature.c:270:9:270:21 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:270:9:270:21 | openssl_signature.c:270:9:270:21 |
| openssl_signature.c:321:39:321:42 | Key | KeyType | Unknown | openssl_signature.c:321:39:321:42 | openssl_signature.c:321:39:321:42 |
-| openssl_signature.c:327:9:327:35 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:327:9:327:35 | openssl_signature.c:327:9:327:35 |
| openssl_signature.c:334:9:334:35 | SignOperation | KeyOperationSubtype | Sign | openssl_signature.c:334:9:334:35 | openssl_signature.c:334:9:334:35 |
| openssl_signature.c:521:46:521:66 | PaddingAlgorithm | Name | PSS | openssl_signature.c:521:46:521:66 | openssl_signature.c:521:46:521:66 |
| openssl_signature.c:521:46:521:66 | PaddingAlgorithm | RawName | 6 | openssl_signature.c:521:46:521:66 | openssl_signature.c:521:46:521:66 |
@@ -66,7 +60,6 @@
| openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm | Name | DSA | openssl_signature.c:565:50:565:54 | openssl_signature.c:565:50:565:54 |
| openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm | RawName | dsa | openssl_signature.c:565:50:565:54 | openssl_signature.c:565:50:565:54 |
| openssl_signature.c:569:55:569:58 | Constant | Description | 2048 | openssl_signature.c:569:55:569:58 | openssl_signature.c:569:55:569:58 |
-| openssl_signature.c:575:32:575:37 | Key | KeyType | Unknown | openssl_signature.c:575:32:575:37 | openssl_signature.c:575:32:575:37 |
| openssl_signature.c:578:34:578:37 | Key | KeyType | Asymmetric | openssl_signature.c:578:34:578:37 | openssl_signature.c:578:34:578:37 |
| openssl_signature.c:602:37:602:77 | Constant | Description | Test message for OpenSSL signature APIs | openssl_signature.c:602:37:602:77 | openssl_signature.c:602:37:602:77 |
| openssl_signature.c:684:24:684:33 | HashAlgorithm | DigestSize | 256 | openssl_signature.c:684:24:684:33 | openssl_signature.c:684:24:684:33 |
diff --git a/cpp/ql/test/experimental/library-tests/quantum/nodes.expected b/cpp/ql/test/experimental/library-tests/quantum/nodes.expected
index 223f7bfca6c5..5c3b212b0804 100644
--- a/cpp/ql/test/experimental/library-tests/quantum/nodes.expected
+++ b/cpp/ql/test/experimental/library-tests/quantum/nodes.expected
@@ -25,7 +25,6 @@
| openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:155:22:155:41 | KeyGeneration |
| openssl_basic.c:155:43:155:55 | MACAlgorithm |
-| openssl_basic.c:155:64:155:66 | Key |
| openssl_basic.c:160:39:160:48 | HashAlgorithm |
| openssl_basic.c:160:59:160:62 | Key |
| openssl_basic.c:163:35:163:41 | Message |
@@ -35,9 +34,7 @@
| openssl_basic.c:180:42:180:59 | Constant |
| openssl_basic.c:181:49:181:87 | Constant |
| openssl_basic.c:218:32:218:33 | Constant |
-| openssl_pkey.c:21:10:21:28 | KeyGeneration |
| openssl_pkey.c:21:10:21:28 | KeyOperationAlgorithm |
-| openssl_pkey.c:21:30:21:32 | Key |
| openssl_pkey.c:45:49:45:65 | Constant |
| openssl_pkey.c:50:31:50:42 | KeyOperationAlgorithm |
| openssl_pkey.c:54:47:54:50 | Constant |
@@ -57,27 +54,18 @@
| openssl_signature.c:80:53:80:56 | Key |
| openssl_signature.c:133:52:133:55 | Key |
| openssl_signature.c:134:38:134:44 | Message |
-| openssl_signature.c:135:9:135:27 | SignOperation |
-| openssl_signature.c:135:37:135:40 | SignatureOutput |
| openssl_signature.c:142:9:142:27 | SignOperation |
| openssl_signature.c:142:37:142:46 | SignatureOutput |
| openssl_signature.c:190:57:190:60 | Key |
| openssl_signature.c:196:38:196:44 | Message |
-| openssl_signature.c:197:9:197:27 | SignOperation |
-| openssl_signature.c:197:37:197:40 | SignatureOutput |
| openssl_signature.c:204:9:204:27 | SignOperation |
| openssl_signature.c:204:37:204:46 | SignatureOutput |
| openssl_signature.c:260:39:260:42 | Key |
-| openssl_signature.c:263:9:263:21 | SignOperation |
-| openssl_signature.c:263:33:263:36 | SignatureOutput |
-| openssl_signature.c:263:54:263:59 | Message |
| openssl_signature.c:270:9:270:21 | SignOperation |
| openssl_signature.c:270:33:270:42 | SignatureOutput |
| openssl_signature.c:270:60:270:65 | Message |
| openssl_signature.c:321:39:321:42 | Key |
| openssl_signature.c:326:48:326:54 | Message |
-| openssl_signature.c:327:9:327:35 | SignOperation |
-| openssl_signature.c:327:47:327:50 | SignatureOutput |
| openssl_signature.c:334:9:334:35 | SignOperation |
| openssl_signature.c:334:47:334:56 | SignatureOutput |
| openssl_signature.c:521:46:521:66 | PaddingAlgorithm |
@@ -87,7 +75,6 @@
| openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:569:55:569:58 | Constant |
-| openssl_signature.c:575:32:575:37 | Key |
| openssl_signature.c:578:9:578:23 | KeyGeneration |
| openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:602:37:602:77 | Constant |
diff --git a/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.ql b/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.ql
index 240567b536c2..1b77763682ad 100644
--- a/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.ql
+++ b/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.ql
@@ -15,5 +15,5 @@ query predicate instructionBounds(
not valueNumber(b.getInstruction()) = valueNumber(i) and
if reason instanceof CondReason
then reasonLoc = reason.(CondReason).getCond().getLocation()
- else reasonLoc instanceof UnknownLocation
+ else reasonLoc instanceof UnknownDefaultLocation
}
diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected
index 40b9275766c7..385af7a4e2c3 100644
--- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected
+++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected
@@ -1,80 +1,57 @@
-models
-| 1 | Sink: ; ; false; ymlSink; ; ; Argument[0]; test-sink; manual |
-| 2 | Sink: boost::asio; ; false; write; ; ; Argument[*1]; remote-sink; manual |
-| 3 | Source: ; ; false; GetCommandLineA; ; ; ReturnValue[*]; local; manual |
-| 4 | Source: ; ; false; GetEnvironmentStringsA; ; ; ReturnValue[*]; local; manual |
-| 5 | Source: ; ; false; GetEnvironmentVariableA; ; ; Argument[*1]; local; manual |
-| 6 | Source: ; ; false; MapViewOfFile2; ; ; ReturnValue[*]; local; manual |
-| 7 | Source: ; ; false; MapViewOfFile3; ; ; ReturnValue[*]; local; manual |
-| 8 | Source: ; ; false; MapViewOfFile3FromApp; ; ; ReturnValue[*]; local; manual |
-| 9 | Source: ; ; false; MapViewOfFile; ; ; ReturnValue[*]; local; manual |
-| 10 | Source: ; ; false; MapViewOfFileEx; ; ; ReturnValue[*]; local; manual |
-| 11 | Source: ; ; false; MapViewOfFileFromApp; ; ; ReturnValue[*]; local; manual |
-| 12 | Source: ; ; false; MapViewOfFileNuma2; ; ; ReturnValue[*]; local; manual |
-| 13 | Source: ; ; false; NtReadFile; ; ; Argument[*5]; local; manual |
-| 14 | Source: ; ; false; ReadFile; ; ; Argument[*1]; local; manual |
-| 15 | Source: ; ; false; ReadFileEx; ; ; Argument[*1]; local; manual |
-| 16 | Source: ; ; false; ymlSource; ; ; ReturnValue; local; manual |
-| 17 | Source: boost::asio; ; false; read_until; ; ; Argument[*1]; remote; manual |
-| 18 | Summary: ; ; false; CommandLineToArgvA; ; ; Argument[*0]; ReturnValue[**]; taint; manual |
-| 19 | Summary: ; ; false; ReadFileEx; ; ; Argument[*3].Field[@hEvent]; Argument[4].Parameter[*2].Field[@hEvent]; value; manual |
-| 20 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated |
-| 21 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual |
-| 22 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual |
-| 23 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual |
+testFailures
edges
-| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:23 |
-| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:17 |
-| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:17 Sink:MaD:2 |
+| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:10 |
+| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:2 |
+| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:2 Sink:MaD:6 |
| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction |
| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:100:64:100:71 | *send_str | provenance | TaintFunction |
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | |
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | |
-| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 |
+| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:6 |
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | |
-| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:23 |
-| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:21 |
-| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:20 |
-| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:22 |
+| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:10 |
+| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:26955 |
+| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:26956 |
+| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:26957 |
| test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | |
| test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | |
-| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:16 |
-| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:14:10:14:10 | x | provenance | Sink:MaD:1 |
+| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:26953 |
+| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:14:10:14:10 | x | provenance | Sink:MaD:26954 |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:17:24:17:24 | x | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:21:27:21:27 | x | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:25:35:25:35 | x | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:32:41:32:41 | x | provenance | |
| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | |
-| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:1 |
+| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:26954 |
| test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | provenance | |
-| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:21 |
+| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:26955 |
| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | |
-| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:1 |
+| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:26954 |
| test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | provenance | |
-| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:20 |
+| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:26956 |
| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | |
-| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:1 |
+| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:26954 |
| test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | provenance | |
-| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:22 |
+| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:26957 |
| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | |
-| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:1 |
+| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:26954 |
| test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | provenance | |
| test.cpp:32:41:32:41 | x | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | |
-| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:18 |
-| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 |
+| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:341 |
+| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:325 |
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | |
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:27:36:27:38 | *cmd | provenance | |
| windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | |
| windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:30:8:30:15 | * ... | provenance | |
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | provenance | |
-| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:18 |
-| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | provenance | Src:MaD:4 |
+| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:341 |
+| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | provenance | Src:MaD:327 |
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:36:10:36:13 | * ... | provenance | |
-| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | windows.cpp:41:10:41:13 | * ... | provenance | Src:MaD:5 |
+| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | windows.cpp:41:10:41:13 | * ... | provenance | Src:MaD:329 |
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | provenance | |
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | provenance | |
-| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:19 |
-| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:19 |
+| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:343 |
+| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:343 |
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | provenance | |
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] | windows.cpp:157:16:157:27 | *lpOverlapped [hEvent] | provenance | |
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | provenance | |
@@ -90,36 +67,36 @@ edges
| windows.cpp:159:12:159:55 | hEvent | windows.cpp:160:8:160:8 | c | provenance | |
| windows.cpp:159:35:159:46 | *lpOverlapped [hEvent] | windows.cpp:159:12:159:55 | hEvent | provenance | |
| windows.cpp:159:35:159:46 | *lpOverlapped [hEvent] | windows.cpp:159:12:159:55 | hEvent | provenance | |
-| windows.cpp:168:35:168:40 | ReadFile output argument | windows.cpp:170:10:170:16 | * ... | provenance | Src:MaD:14 |
-| windows.cpp:177:23:177:28 | ReadFileEx output argument | windows.cpp:179:10:179:16 | * ... | provenance | Src:MaD:15 |
-| windows.cpp:189:21:189:26 | ReadFile output argument | windows.cpp:190:5:190:56 | *... = ... | provenance | Src:MaD:14 |
+| windows.cpp:168:35:168:40 | ReadFile output argument | windows.cpp:170:10:170:16 | * ... | provenance | Src:MaD:331 |
+| windows.cpp:177:23:177:28 | ReadFileEx output argument | windows.cpp:179:10:179:16 | * ... | provenance | Src:MaD:332 |
+| windows.cpp:189:21:189:26 | ReadFile output argument | windows.cpp:190:5:190:56 | *... = ... | provenance | Src:MaD:331 |
| windows.cpp:190:5:190:14 | *overlapped [post update] [*hEvent] | windows.cpp:192:53:192:63 | *& ... [*hEvent] | provenance | |
| windows.cpp:190:5:190:56 | *... = ... | windows.cpp:190:5:190:14 | *overlapped [post update] [*hEvent] | provenance | |
| windows.cpp:192:53:192:63 | *& ... [*hEvent] | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | provenance | |
-| windows.cpp:198:21:198:26 | ReadFile output argument | windows.cpp:199:5:199:57 | ... = ... | provenance | Src:MaD:14 |
+| windows.cpp:198:21:198:26 | ReadFile output argument | windows.cpp:199:5:199:57 | ... = ... | provenance | Src:MaD:331 |
| windows.cpp:199:5:199:14 | *overlapped [post update] [hEvent] | windows.cpp:201:53:201:63 | *& ... [hEvent] | provenance | |
| windows.cpp:199:5:199:57 | ... = ... | windows.cpp:199:5:199:14 | *overlapped [post update] [hEvent] | provenance | |
| windows.cpp:201:53:201:63 | *& ... [hEvent] | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | provenance | |
-| windows.cpp:209:84:209:89 | NtReadFile output argument | windows.cpp:211:10:211:16 | * ... | provenance | Src:MaD:13 |
-| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:286:23:286:35 | *call to MapViewOfFile | provenance | Src:MaD:9 |
+| windows.cpp:209:84:209:89 | NtReadFile output argument | windows.cpp:211:10:211:16 | * ... | provenance | Src:MaD:340 |
+| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:286:23:286:35 | *call to MapViewOfFile | provenance | Src:MaD:333 |
| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:287:20:287:52 | *pMapView | provenance | |
| windows.cpp:287:20:287:52 | *pMapView | windows.cpp:289:10:289:16 | * ... | provenance | |
-| windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | provenance | Src:MaD:6 |
+| windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | provenance | Src:MaD:334 |
| windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | windows.cpp:294:20:294:52 | *pMapView | provenance | |
| windows.cpp:294:20:294:52 | *pMapView | windows.cpp:296:10:296:16 | * ... | provenance | |
-| windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | provenance | Src:MaD:7 |
+| windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | provenance | Src:MaD:335 |
| windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | windows.cpp:303:20:303:52 | *pMapView | provenance | |
| windows.cpp:303:20:303:52 | *pMapView | windows.cpp:305:10:305:16 | * ... | provenance | |
-| windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | provenance | Src:MaD:8 |
+| windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | provenance | Src:MaD:336 |
| windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | windows.cpp:312:20:312:52 | *pMapView | provenance | |
| windows.cpp:312:20:312:52 | *pMapView | windows.cpp:314:10:314:16 | * ... | provenance | |
-| windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | provenance | Src:MaD:10 |
+| windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | provenance | Src:MaD:337 |
| windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | windows.cpp:319:20:319:52 | *pMapView | provenance | |
| windows.cpp:319:20:319:52 | *pMapView | windows.cpp:321:10:321:16 | * ... | provenance | |
-| windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | provenance | Src:MaD:11 |
+| windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | provenance | Src:MaD:338 |
| windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | windows.cpp:326:20:326:52 | *pMapView | provenance | |
| windows.cpp:326:20:326:52 | *pMapView | windows.cpp:328:10:328:16 | * ... | provenance | |
-| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | provenance | Src:MaD:12 |
+| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | provenance | Src:MaD:339 |
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:333:20:333:52 | *pMapView | provenance | |
| windows.cpp:333:20:333:52 | *pMapView | windows.cpp:335:10:335:16 | * ... | provenance | |
nodes
@@ -245,4 +222,3 @@ subpaths
| test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body |
| test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body |
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA |
-testFailures
diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.ql b/cpp/ql/test/library-tests/dataflow/external-models/flow.ql
index 8419248c70dc..7d41597c3b8e 100644
--- a/cpp/ql/test/library-tests/dataflow/external-models/flow.ql
+++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.ql
@@ -1,7 +1,7 @@
import utils.test.dataflow.FlowTestCommon
import cpp
import semmle.code.cpp.security.FlowSources
-import codeql.dataflow.test.ProvenancePathGraph
+import IRTest::IRFlow::PathGraph
module IRTest {
private import semmle.code.cpp.ir.IR
@@ -33,4 +33,3 @@ module IRTest {
}
import MakeTest>
-import ShowProvenance
diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
index 1eab706df430..24f651ca3892 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
@@ -4717,7 +4717,7 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| stl.h:292:30:292:40 | call to allocator | stl.h:292:21:292:41 | noexcept(...) | TAINT |
| stl.h:292:30:292:40 | call to allocator | stl.h:292:21:292:41 | noexcept(...) | TAINT |
| stl.h:292:30:292:40 | call to allocator | stl.h:292:21:292:41 | noexcept(...) | TAINT |
-| stl.h:292:53:292:63 | 0 | stl.h:292:46:292:64 | constructor init | TAINT |
+| stl.h:292:53:292:63 | 0 | stl.h:292:46:292:64 | (no string representation) | TAINT |
| stl.h:396:3:396:3 | this | stl.h:396:36:396:43 | constructor init of field first [pre-this] | |
| stl.h:396:3:396:3 | this | stl.h:396:36:396:43 | constructor init of field first [pre-this] | |
| stl.h:396:3:396:3 | this | stl.h:396:36:396:43 | constructor init of field first [pre-this] | |
diff --git a/cpp/ql/test/library-tests/includes/includes/locations.expected b/cpp/ql/test/library-tests/includes/includes/locations.expected
index c61055c84413..1b6b3b068923 100644
--- a/cpp/ql/test/library-tests/includes/includes/locations.expected
+++ b/cpp/ql/test/library-tests/includes/includes/locations.expected
@@ -1,5 +1,7 @@
| bar.h:0:0:0:0 | bar.h:0:0:0:0 |
| file://:0:0:0:0 | file://:0:0:0:0 |
+| file://:0:0:0:0 | file://:0:0:0:0 |
+| file://:0:0:0:0 | file://:0:0:0:0 |
| includes.c:0:0:0:0 | includes.c:0:0:0:0 |
| includes.c:2:1:2:15 | includes.c:2:1:2:15 |
| includes.c:4:1:4:16 | includes.c:4:1:4:16 |
diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected
index 8f280c89764c..53ebaf2114ff 100644
--- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected
+++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected
@@ -15134,7 +15134,7 @@ ir.cpp:
# 1506| [Constructor] void Inheritance_Test_A::Inheritance_Test_A()
# 1506| :
# 1506| :
-# 1506| getInitializer(0): [ConstructorInit] constructor init
+# 1506| getInitializer(0): (no string representation)
# 1506| Type = [Struct] Inheritance_Test_B
# 1506| ValueCategory = prvalue
# 1506| getInitializer(1): [ConstructorFieldInit] constructor init of field x
@@ -17205,7 +17205,7 @@ ir.cpp:
# 1785| getExpr(): [ReferenceDereferenceExpr] (reference dereference)
# 1785| Type = [SpecifiedType] const CopyConstructorTestNonVirtualClass
# 1785| ValueCategory = lvalue
-# 1785| getInitializer(1): [ConstructorInit] constructor init
+# 1785| getInitializer(1): (no string representation)
# 1785| Type = [VirtualBaseClass] CopyConstructorWithBitwiseCopyClass
# 1785| ValueCategory = prvalue
# 1785| getEntryPoint(): [BlockStmt] { ... }
@@ -17254,7 +17254,7 @@ ir.cpp:
# 1792| getExpr(): [ReferenceDereferenceExpr] (reference dereference)
# 1792| Type = [SpecifiedType] const CopyConstructorTestVirtualClass
# 1792| ValueCategory = lvalue
-# 1792| getInitializer(1): [ConstructorInit] constructor init
+# 1792| getInitializer(1): (no string representation)
# 1792| Type = [VirtualBaseClass] CopyConstructorWithBitwiseCopyClass
# 1792| ValueCategory = prvalue
# 1792| getEntryPoint(): [BlockStmt] { ... }
diff --git a/cpp/ql/test/library-tests/macros/inmacroexpansion/inmacroexpansion.expected b/cpp/ql/test/library-tests/macros/inmacroexpansion/inmacroexpansion.expected
index 4e477a101a90..f8eff955d47c 100644
--- a/cpp/ql/test/library-tests/macros/inmacroexpansion/inmacroexpansion.expected
+++ b/cpp/ql/test/library-tests/macros/inmacroexpansion/inmacroexpansion.expected
@@ -14,14 +14,14 @@
| test.cpp:4:1:4:1 | operator= | false |
| test.cpp:4:1:4:1 | operator= | false |
| test.cpp:4:1:4:10 | CLASS_DECL | false |
-| test.cpp:4:1:4:10 | S | true |
+| test.cpp:4:1:4:10 | S | false |
| test.cpp:4:1:4:10 | declaration | true |
| test.cpp:4:1:4:10 | definition of S | true |
| test.cpp:4:1:4:10 | definition of f | true |
| test.cpp:4:1:4:10 | definition of i | true |
| test.cpp:4:1:4:10 | definition of j | true |
-| test.cpp:4:1:4:10 | f | true |
-| test.cpp:4:1:4:10 | i | true |
+| test.cpp:4:1:4:10 | f | false |
+| test.cpp:4:1:4:10 | i | false |
| test.cpp:4:1:4:10 | j | true |
| test.cpp:4:1:4:10 | return ... | true |
| test.cpp:4:1:4:10 | { ... } | true |
@@ -30,7 +30,7 @@
| test.cpp:8:1:8:13 | declaration | true |
| test.cpp:8:1:8:13 | definition of f1 | true |
| test.cpp:8:1:8:13 | definition of k | true |
-| test.cpp:8:1:8:13 | f1 | true |
+| test.cpp:8:1:8:13 | f1 | false |
| test.cpp:8:1:8:13 | k | true |
| test.cpp:8:1:8:13 | return ... | true |
| test.cpp:8:1:8:13 | { ... } | true |
@@ -68,18 +68,18 @@
| test.cpp:38:1:38:13 | 1 | true |
| test.cpp:38:1:38:13 | ... == ... | true |
| test.cpp:38:1:38:13 | STATIC_ASSERT | false |
-| test.cpp:38:1:38:13 | static_assert(..., "") | true |
+| test.cpp:38:1:38:13 | static_assert(..., "") | false |
| test.cpp:40:1:40:42 | #define ATTRIBUTE [[nodiscard("reason1")]] | false |
| test.cpp:42:1:42:9 | ATTRIBUTE | false |
-| test.cpp:42:1:42:9 | nodiscard | true |
-| test.cpp:42:1:42:9 | reason1 | true |
+| test.cpp:42:1:42:9 | nodiscard | false |
+| test.cpp:42:1:42:9 | reason1 | false |
| test.cpp:42:1:42:9 | reason1 | true |
| test.cpp:43:5:43:6 | declaration of f2 | false |
| test.cpp:43:5:43:6 | f2 | false |
| test.cpp:45:1:45:31 | #define ATTRIBUTE_ARG "reason2" | false |
| test.cpp:47:3:47:11 | nodiscard | false |
| test.cpp:47:13:47:25 | ATTRIBUTE_ARG | false |
-| test.cpp:47:13:47:25 | reason2 | true |
+| test.cpp:47:13:47:25 | reason2 | false |
| test.cpp:47:13:47:25 | reason2 | true |
| test.cpp:48:5:48:6 | declaration of f3 | false |
| test.cpp:48:5:48:6 | f3 | false |
diff --git a/cpp/ql/test/library-tests/ptr_to_member/segfault/exprs.expected b/cpp/ql/test/library-tests/ptr_to_member/segfault/exprs.expected
index 46cdbc64c6ef..d808cf89139c 100644
--- a/cpp/ql/test/library-tests/ptr_to_member/segfault/exprs.expected
+++ b/cpp/ql/test/library-tests/ptr_to_member/segfault/exprs.expected
@@ -4,7 +4,6 @@
| file://:0:0:0:0 | uls | file://:0:0:0:0 | unsigned long |
| segfault.cpp:25:46:25:65 | call to S | file://:0:0:0:0 | void |
| segfault.cpp:25:46:25:65 | call to S | file://:0:0:0:0 | void |
-| segfault.cpp:25:46:25:65 | constructor init | segfault.cpp:22:8:22:8 | S |
| segfault.cpp:25:48:25:55 | __second | segfault.cpp:15:7:15:11 | tuple |
| segfault.cpp:25:48:25:55 | __second | segfault.cpp:15:7:15:11 | tuple |
| segfault.cpp:25:48:25:55 | __second | segfault.cpp:15:7:15:11 | tuple |
diff --git a/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected b/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected
index eba49fd1c6d6..672fae72e062 100644
--- a/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected
+++ b/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected
@@ -1,5 +1,3 @@
| file://:0:0:0:0 | operator= | file://:0:0:0:0 | __va_list_tag && |
| file://:0:0:0:0 | operator= | file://:0:0:0:0 | const __va_list_tag & |
-| test.cpp:2:6:2:6 | foo | file://:0:0:0:0 | float |
-| test.cpp:2:6:2:6 | foo | file://:0:0:0:0 | int |
| test.cpp:2:6:2:8 | foo | test.cpp:1:19:1:19 | T |
diff --git a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected
index 7a7b1761e987..e1c7f956c7b6 100644
--- a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected
+++ b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected
@@ -10,4 +10,3 @@
| isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | ClassTemplateInstantiation | file://:0:0:0:0 | int |
| isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | ClassTemplateInstantiation | file://:0:0:0:0 | long |
| load.cpp:13:7:13:27 | basic_text_iprimitive | ClassTemplateInstantiation | load.cpp:3:7:3:24 | std_istream_mockup |
-| load.cpp:22:10:22:10 | load | FunctionTemplateInstantiation | file://:0:0:0:0 | short |
diff --git a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected
index 316b5273cdce..cb35f7a6dd09 100644
--- a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected
+++ b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected
@@ -104,15 +104,6 @@
| isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:77:26:77:45 | AnotherTemplateClass |
| isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:97:52:97:52 | AnotherTemplateClass::myMethod2(MyClassEnum) |
| isfromtemplateinstantiation.cpp:110:3:110:3 | definition of var_template | isfromtemplateinstantiation.cpp:110:3:110:3 | var_template |
-| isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass |
-| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass |
-| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() |
-| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass |
-| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() |
-| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass |
-| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() |
-| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass |
-| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() |
| isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer |
| isfromtemplateinstantiation.cpp:135:31:135:35 | declaration of Inner | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer |
| isfromtemplateinstantiation.cpp:136:7:136:7 | definition of x | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner |
@@ -121,94 +112,7 @@
| isfromtemplateinstantiation.cpp:137:7:137:7 | y | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner |
| load.cpp:15:14:15:15 | definition of is | load.cpp:13:7:13:27 | basic_text_iprimitive |
| load.cpp:15:14:15:15 | is | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:18:5:18:5 | definition of basic_text_iprimitive | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:18:5:18:5 | definition of basic_text_iprimitive | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:18:36:18:42 | definition of isParam | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:18:36:18:42 | definition of isParam | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:18:36:18:42 | std_istream_mockup & isParam | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:18:36:18:42 | std_istream_mockup & isParam | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:19:11:19:21 | constructor init of field is | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:19:11:19:21 | constructor init of field is | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:19:14:19:20 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:19:14:19:20 | (reference dereference) | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:19:14:19:20 | (reference to) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:19:14:19:20 | (reference to) | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:19:14:19:20 | isParam | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:19:14:19:20 | isParam | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:19:23:19:24 | { ... } | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:19:23:19:24 | { ... } | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:19:24:19:24 | return ... | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:19:24:19:24 | return ... | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) |
-| load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:22:10:22:10 | definition of load | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:22:10:22:10 | definition of load | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
| load.cpp:22:10:22:13 | basic_text_iprimitive::load(T &) | load.cpp:13:7:13:27 | basic_text_iprimitive |
| load.cpp:22:10:22:13 | declaration of load | load.cpp:13:7:13:27 | basic_text_iprimitive |
| load.cpp:22:19:22:19 | T & t | load.cpp:13:7:13:27 | basic_text_iprimitive |
| load.cpp:22:19:22:19 | declaration of t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:22:19:22:19 | definition of t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:22:19:22:19 | definition of t | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:22:19:22:19 | short & t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:22:19:22:19 | short & t | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:23:5:25:5 | { ... } | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:23:5:25:5 | { ... } | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:9:24:10 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:9:24:10 | (reference dereference) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:9:24:10 | is | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:9:24:10 | is | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:9:24:10 | this | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:9:24:10 | this | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:9:24:16 | ExprStmt | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:9:24:16 | ExprStmt | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:12:24:12 | call to operator>> | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:12:24:12 | call to operator>> | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:12:24:16 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:12:24:16 | (reference dereference) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:15:24:15 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:15:24:15 | (reference dereference) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:15:24:15 | (reference to) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:15:24:15 | (reference to) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:24:15:24:15 | t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:24:15:24:15 | t | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:25:5:25:5 | return ... | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:25:5:25:5 | return ... | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) |
-| load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:27:10:27:10 | definition of load | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:27:10:27:10 | definition of load | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:27:22:27:22 | char & t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:27:22:27:22 | char & t | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:27:22:27:22 | definition of t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:27:22:27:22 | definition of t | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:28:5:32:5 | { ... } | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:28:5:32:5 | { ... } | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:29:9:29:20 | declaration | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:29:9:29:20 | declaration | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:29:19:29:19 | definition of i | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:29:19:29:19 | definition of i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:29:19:29:19 | i | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:29:19:29:19 | i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:30:9:30:12 | call to load | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:30:9:30:12 | call to load | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:30:9:30:12 | this | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:30:9:30:12 | this | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:30:9:30:16 | ExprStmt | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:30:9:30:16 | ExprStmt | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:30:14:30:14 | (reference to) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:30:14:30:14 | (reference to) | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:30:14:30:14 | i | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:30:14:30:14 | i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:31:9:31:9 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:31:9:31:9 | (reference dereference) | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:31:9:31:9 | t | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:31:9:31:9 | t | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:31:9:31:13 | ... = ... | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:31:9:31:13 | ... = ... | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:31:9:31:14 | ExprStmt | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:31:9:31:14 | ExprStmt | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:31:13:31:13 | (char)... | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:31:13:31:13 | (char)... | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:31:13:31:13 | i | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:31:13:31:13 | i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
-| load.cpp:32:5:32:5 | return ... | load.cpp:13:7:13:27 | basic_text_iprimitive |
-| load.cpp:32:5:32:5 | return ... | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) |
diff --git a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected
index ce20dedcfca2..8a78058a7230 100644
--- a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected
+++ b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected
@@ -425,16 +425,7 @@ isFromUninstantiatedTemplate
| isfromtemplateinstantiation.cpp:123:6:123:6 | f | | | Declaration | |
| isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | | T | Declaration | |
| isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | I | | Declaration | |
-| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | | T | Definition | |
-| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | I | | Definition | |
| isfromtemplateinstantiation.cpp:129:6:129:6 | f | | T | Declaration | |
-| isfromtemplateinstantiation.cpp:129:6:129:6 | f | I | | Declaration | |
-| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | | T | Stmt | |
-| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | I | | Stmt | |
-| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | | T | Stmt | |
-| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | I | | Stmt | |
-| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | | T | Expr | |
-| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | I | | Expr | |
| isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | | T | Declaration | |
| isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | I | | Declaration | |
| isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | | T | Declaration | |
@@ -470,82 +461,21 @@ isFromUninstantiatedTemplate
| load.cpp:15:14:15:15 | definition of is | I | | Definition | |
| load.cpp:15:14:15:15 | is | | T | Declaration | |
| load.cpp:15:14:15:15 | is | I | | Declaration | |
-| load.cpp:18:5:18:5 | basic_text_iprimitive | I | | Declaration | |
| load.cpp:18:5:18:25 | basic_text_iprimitive | | T | Declaration | |
-| load.cpp:18:36:18:42 | definition of isParam | | T | Definition | |
-| load.cpp:18:36:18:42 | definition of isParam | I | | Definition | |
-| load.cpp:18:36:18:42 | isParam | | T | Declaration | |
-| load.cpp:18:36:18:42 | isParam | I | | Declaration | |
-| load.cpp:19:11:19:21 | constructor init of field is | | T | Expr | |
-| load.cpp:19:11:19:21 | constructor init of field is | I | | Expr | |
| load.cpp:19:14:19:20 | (reference dereference) | | T | Expr | |
-| load.cpp:19:14:19:20 | (reference dereference) | I | | Expr | |
| load.cpp:19:14:19:20 | (reference to) | | T | Expr | |
-| load.cpp:19:14:19:20 | (reference to) | I | | Expr | |
| load.cpp:19:14:19:20 | isParam | | T | Expr | Ref |
-| load.cpp:19:14:19:20 | isParam | I | | Expr | Ref |
-| load.cpp:19:23:19:24 | { ... } | | T | Stmt | |
-| load.cpp:19:23:19:24 | { ... } | I | | Stmt | |
-| load.cpp:19:24:19:24 | return ... | | T | Stmt | |
-| load.cpp:19:24:19:24 | return ... | I | | Stmt | |
-| load.cpp:22:10:22:10 | load | I | | Declaration | |
| load.cpp:22:10:22:13 | load | | T | Declaration | |
| load.cpp:22:10:22:13 | load | I | T | Declaration | |
-| load.cpp:22:19:22:19 | definition of t | | T | Definition | |
-| load.cpp:22:19:22:19 | definition of t | I | | Definition | |
| load.cpp:22:19:22:19 | t | | T | Declaration | |
-| load.cpp:22:19:22:19 | t | I | | Declaration | |
| load.cpp:22:19:22:19 | t | I | T | Declaration | |
-| load.cpp:23:5:25:5 | { ... } | | T | Stmt | |
-| load.cpp:23:5:25:5 | { ... } | I | | Stmt | |
| load.cpp:24:9:24:10 | (reference dereference) | | T | Expr | |
-| load.cpp:24:9:24:10 | (reference dereference) | I | | Expr | |
| load.cpp:24:9:24:10 | is | | T | Expr | Not ref |
-| load.cpp:24:9:24:10 | is | I | | Expr | Not ref |
| load.cpp:24:9:24:10 | this | | T | Expr | |
-| load.cpp:24:9:24:10 | this | I | | Expr | |
-| load.cpp:24:9:24:16 | ExprStmt | | T | Stmt | |
-| load.cpp:24:9:24:16 | ExprStmt | I | | Stmt | |
| load.cpp:24:15:24:15 | (reference dereference) | | T | Expr | |
-| load.cpp:24:15:24:15 | (reference dereference) | I | | Expr | |
-| load.cpp:24:15:24:15 | (reference to) | I | | Expr | |
| load.cpp:24:15:24:15 | t | | T | Expr | Not ref |
-| load.cpp:24:15:24:15 | t | I | | Expr | Ref |
-| load.cpp:25:5:25:5 | return ... | | T | Stmt | |
-| load.cpp:25:5:25:5 | return ... | I | | Stmt | |
-| load.cpp:27:10:27:10 | load | I | | Declaration | |
| load.cpp:27:10:27:13 | load | | T | Declaration | |
-| load.cpp:27:22:27:22 | definition of t | | T | Definition | |
-| load.cpp:27:22:27:22 | definition of t | I | | Definition | |
-| load.cpp:27:22:27:22 | t | | T | Declaration | |
-| load.cpp:27:22:27:22 | t | I | | Declaration | |
-| load.cpp:28:5:32:5 | { ... } | | T | Stmt | |
-| load.cpp:28:5:32:5 | { ... } | I | | Stmt | |
-| load.cpp:29:9:29:20 | declaration | | T | Stmt | |
-| load.cpp:29:9:29:20 | declaration | I | | Stmt | |
-| load.cpp:29:19:29:19 | definition of i | | T | Definition | |
-| load.cpp:29:19:29:19 | definition of i | I | | Definition | |
-| load.cpp:29:19:29:19 | i | | T | Declaration | |
-| load.cpp:29:19:29:19 | i | I | | Declaration | |
-| load.cpp:30:9:30:12 | Unknown literal | | T | Expr | |
-| load.cpp:30:9:30:12 | call to load | I | | Expr | |
-| load.cpp:30:9:30:12 | this | I | | Expr | |
-| load.cpp:30:9:30:16 | ExprStmt | | T | Stmt | |
-| load.cpp:30:9:30:16 | ExprStmt | I | | Stmt | |
-| load.cpp:30:14:30:14 | (reference to) | I | | Expr | |
-| load.cpp:30:14:30:14 | i | | T | Expr | Not ref |
-| load.cpp:30:14:30:14 | i | I | | Expr | Ref |
| load.cpp:31:9:31:9 | (reference dereference) | | T | Expr | |
-| load.cpp:31:9:31:9 | (reference dereference) | I | | Expr | |
| load.cpp:31:9:31:9 | t | | T | Expr | Not ref |
-| load.cpp:31:9:31:9 | t | I | | Expr | Not ref |
-| load.cpp:31:9:31:13 | ... = ... | | T | Expr | |
-| load.cpp:31:9:31:13 | ... = ... | I | | Expr | |
-| load.cpp:31:9:31:14 | ExprStmt | | T | Stmt | |
-| load.cpp:31:9:31:14 | ExprStmt | I | | Stmt | |
| load.cpp:31:13:31:13 | (char)... | | T | Expr | |
-| load.cpp:31:13:31:13 | (char)... | I | | Expr | |
| load.cpp:31:13:31:13 | i | | T | Expr | Not ref |
-| load.cpp:31:13:31:13 | i | I | | Expr | Not ref |
-| load.cpp:32:5:32:5 | return ... | | T | Stmt | |
-| load.cpp:32:5:32:5 | return ... | I | | Stmt | |
diff --git a/cpp/ql/test/library-tests/templates/switch/test.expected b/cpp/ql/test/library-tests/templates/switch/test.expected
index b4124494ffeb..1ba49e1caf9d 100644
--- a/cpp/ql/test/library-tests/templates/switch/test.expected
+++ b/cpp/ql/test/library-tests/templates/switch/test.expected
@@ -1,2 +1 @@
| test.cpp:13:3:20:3 | switch (...) ... | 3 |
-| test.cpp:13:3:20:3 | switch (...) ... | 3 |
diff --git a/cpp/ql/test/library-tests/templates/type_instantiations/types.expected b/cpp/ql/test/library-tests/templates/type_instantiations/types.expected
index e6c8b1d9406b..548f5f101892 100644
--- a/cpp/ql/test/library-tests/templates/type_instantiations/types.expected
+++ b/cpp/ql/test/library-tests/templates/type_instantiations/types.expected
@@ -5,13 +5,10 @@
| file://:0:0:0:0 | _Complex _Float64 |
| file://:0:0:0:0 | _Complex _Float64x |
| file://:0:0:0:0 | _Complex _Float128 |
-| file://:0:0:0:0 | _Complex __bf16 |
| file://:0:0:0:0 | _Complex __float128 |
-| file://:0:0:0:0 | _Complex __fp16 |
| file://:0:0:0:0 | _Complex double |
| file://:0:0:0:0 | _Complex float |
| file://:0:0:0:0 | _Complex long double |
-| file://:0:0:0:0 | _Complex std::float16_t |
| file://:0:0:0:0 | _Decimal32 |
| file://:0:0:0:0 | _Decimal64 |
| file://:0:0:0:0 | _Decimal128 |
diff --git a/cpp/ql/test/library-tests/type_sizes/type_sizes.expected b/cpp/ql/test/library-tests/type_sizes/type_sizes.expected
index ac1344753e9c..c77aadc8f4f6 100644
--- a/cpp/ql/test/library-tests/type_sizes/type_sizes.expected
+++ b/cpp/ql/test/library-tests/type_sizes/type_sizes.expected
@@ -25,13 +25,10 @@
| file://:0:0:0:0 | _Complex _Float64 | 16 |
| file://:0:0:0:0 | _Complex _Float64x | 32 |
| file://:0:0:0:0 | _Complex _Float128 | 32 |
-| file://:0:0:0:0 | _Complex __bf16 | 4 |
| file://:0:0:0:0 | _Complex __float128 | 32 |
-| file://:0:0:0:0 | _Complex __fp16 | 4 |
| file://:0:0:0:0 | _Complex double | 16 |
| file://:0:0:0:0 | _Complex float | 8 |
| file://:0:0:0:0 | _Complex long double | 32 |
-| file://:0:0:0:0 | _Complex std::float16_t | 4 |
| file://:0:0:0:0 | _Decimal32 | 4 |
| file://:0:0:0:0 | _Decimal64 | 8 |
| file://:0:0:0:0 | _Decimal128 | 16 |
diff --git a/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected b/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected
index 3f22b9f98f52..94185a66899d 100644
--- a/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected
+++ b/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected
@@ -7,13 +7,10 @@
| file://:0:0:0:0 | _Complex _Float64 | _Complex _Float64 |
| file://:0:0:0:0 | _Complex _Float64x | _Complex _Float64x |
| file://:0:0:0:0 | _Complex _Float128 | _Complex _Float128 |
-| file://:0:0:0:0 | _Complex __bf16 | _Complex __bf16 |
| file://:0:0:0:0 | _Complex __float128 | _Complex __float128 |
-| file://:0:0:0:0 | _Complex __fp16 | _Complex __fp16 |
| file://:0:0:0:0 | _Complex double | _Complex double |
| file://:0:0:0:0 | _Complex float | _Complex float |
| file://:0:0:0:0 | _Complex long double | _Complex long double |
-| file://:0:0:0:0 | _Complex std::float16_t | _Complex std::float16_t |
| file://:0:0:0:0 | _Decimal32 | _Decimal32 |
| file://:0:0:0:0 | _Decimal64 | _Decimal64 |
| file://:0:0:0:0 | _Decimal128 | _Decimal128 |
diff --git a/cpp/ql/test/library-tests/variables/variables/types.expected b/cpp/ql/test/library-tests/variables/variables/types.expected
index c2ea5f7cfe3c..362ab5c64334 100644
--- a/cpp/ql/test/library-tests/variables/variables/types.expected
+++ b/cpp/ql/test/library-tests/variables/variables/types.expected
@@ -6,13 +6,10 @@
| _Complex _Float64 | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Complex _Float64x | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Complex _Float128 | BinaryFloatingPointType, ComplexNumberType | | | | |
-| _Complex __bf16 | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Complex __float128 | BinaryFloatingPointType, ComplexNumberType | | | | |
-| _Complex __fp16 | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Complex double | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Complex float | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Complex long double | BinaryFloatingPointType, ComplexNumberType | | | | |
-| _Complex std::float16_t | BinaryFloatingPointType, ComplexNumberType | | | | |
| _Decimal32 | Decimal32Type | | | | |
| _Decimal64 | Decimal64Type | | | | |
| _Decimal128 | Decimal128Type | | | | |
diff --git a/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/GlobalUseBeforeInit.expected b/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/GlobalUseBeforeInit.expected
index 8298707a6b0a..c7c2d1ffad49 100644
--- a/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/GlobalUseBeforeInit.expected
+++ b/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/GlobalUseBeforeInit.expected
@@ -1,2 +1 @@
-| test.cpp:28:5:28:6 | f1 | The variable $@ is used in this function but may not be initialized when it is called. | test.cpp:14:5:14:5 | b | b |
-| test.cpp:39:5:39:8 | main | The variable $@ is used in this function but may not be initialized when it is called. | test.cpp:14:5:14:5 | b | b |
+| test.cpp:27:5:27:6 | f1 | The variable $@ is used in this function but may not be initialized when it is called. | test.cpp:14:5:14:5 | b | b |
diff --git a/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/test.cpp b/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/test.cpp
index 81883a1a8a16..fcecf6c5c44a 100644
--- a/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/test.cpp
+++ b/cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/test.cpp
@@ -12,7 +12,6 @@ int vfprintf (FILE *, const char *, va_list);
int a = 1;
int b;
-int *c;
int my_printf(const char * fmt, ...)
{
@@ -32,15 +31,8 @@ int f1()
return 0;
}
-void f2() {
- my_printf("%d\n", b); // GOOD
-}
-
int main()
{
- unsigned size = sizeof(*c); // GOOD
- my_printf("%d\n", b); // BAD
- b = f1();
- f2();
+ int b = f1();
return 0;
-}
+}
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/Adding365daysPerYear.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/Adding365daysPerYear.expected
index d9d9c4d3d338..094d84495ce4 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/Adding365daysPerYear.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/Adding365daysPerYear.expected
@@ -1,5 +1,7 @@
-| test.cpp:173:29:173:51 | ... & ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:170:2:170:47 | ... += ... | ... += ... |
-| test.cpp:174:30:174:45 | ... >> ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:170:2:170:47 | ... += ... | ... += ... |
-| test.cpp:193:15:193:24 | ... / ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:193:15:193:24 | ... / ... | ... / ... |
-| test.cpp:217:29:217:51 | ... & ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:214:2:214:47 | ... += ... | ... += ... |
-| test.cpp:218:30:218:45 | ... >> ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:214:2:214:47 | ... += ... | ... += ... |
+| test.cpp:175:29:175:51 | ... & ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:159:6:159:17 | antipattern2 | antipattern2 | test.cpp:172:2:172:47 | ... += ... | ... += ... | test.cpp:175:29:175:51 | ... & ... | ... & ... |
+| test.cpp:176:30:176:45 | ... >> ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:159:6:159:17 | antipattern2 | antipattern2 | test.cpp:172:2:172:47 | ... += ... | ... += ... | test.cpp:176:30:176:45 | ... >> ... | ... >> ... |
+| test.cpp:195:15:195:24 | ... / ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:185:8:185:13 | mkTime | mkTime | test.cpp:195:15:195:24 | ... / ... | ... / ... | test.cpp:195:15:195:24 | ... / ... | ... / ... |
+| test.cpp:219:29:219:51 | ... & ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:203:6:203:19 | checkedExample | checkedExample | test.cpp:216:2:216:47 | ... += ... | ... += ... | test.cpp:219:29:219:51 | ... & ... | ... & ... |
+| test.cpp:220:30:220:45 | ... >> ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:203:6:203:19 | checkedExample | checkedExample | test.cpp:216:2:216:47 | ... += ... | ... += ... | test.cpp:220:30:220:45 | ... >> ... | ... >> ... |
+| test.cpp:247:29:247:51 | ... & ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:230:6:230:18 | antipattern2A | antipattern2A | test.cpp:240:20:240:23 | 365 | 365 | test.cpp:247:29:247:51 | ... & ... | ... & ... |
+| test.cpp:248:30:248:45 | ... >> ... | $@: This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:230:6:230:18 | antipattern2A | antipattern2A | test.cpp:240:20:240:23 | 365 | 365 | test.cpp:248:30:248:45 | ... >> ... | ... >> ... |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp
index a14667c75ca5..ccc9bf8446e0 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp
@@ -153,7 +153,9 @@ GetFileTime(
LPFILETIME lpLastWriteTime
);
-
+/**
+ * AntiPattern2 - datetime.AddDays(±365)
+*/
void antipattern2()
{
// get the current time as a FILETIME
@@ -223,3 +225,28 @@ void checkedExample()
// handle error...
}
}
+
+
+void antipattern2A()
+{
+ // get the current time as a FILETIME
+ SYSTEMTIME st; FILETIME ft;
+ GetSystemTime(&st);
+ SystemTimeToFileTime(&st, &ft);
+
+ // convert to a quadword (64-bit integer) to do arithmetic
+ ULONGLONG qwLongTime;
+ qwLongTime = (((ULONGLONG)ft.dwHighDateTime) << 32) + ft.dwLowDateTime;
+ int days_in_year = 365;
+
+ // add a year by calculating the ticks in 365 days
+ // (which may be incorrect when crossing a leap day)
+ qwLongTime += days_in_year * 24 * 60 * 60 * 10000000LLU;
+
+ // copy back to a FILETIME
+ ft.dwLowDateTime = (DWORD)(qwLongTime & 0xFFFFFFFF); // BAD
+ ft.dwHighDateTime = (DWORD)(qwLongTime >> 32); // BAD
+
+ // convert back to SYSTEMTIME for display or other usage
+ FileTimeToSystemTime(&ft, &st);
+}
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/AntiPattern5InvalidLeapYearCheck.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/AntiPattern5InvalidLeapYearCheck.expected
new file mode 100644
index 000000000000..8e375a5ea5ce
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/AntiPattern5InvalidLeapYearCheck.expected
@@ -0,0 +1,3 @@
+| test.cpp:183:23:183:35 | ... == ... | Possible Insufficient Leap Year check (AntiPattern 5) |
+| test.cpp:190:24:190:40 | ... == ... | Possible Insufficient Leap Year check (AntiPattern 5) |
+| test.cpp:245:6:245:18 | ... == ... | Possible Insufficient Leap Year check (AntiPattern 5) |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/AntiPattern5InvalidLeapYearCheck.qlref b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/AntiPattern5InvalidLeapYearCheck.qlref
new file mode 100644
index 000000000000..70e3f8ba1029
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/AntiPattern5InvalidLeapYearCheck.qlref
@@ -0,0 +1 @@
+Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck.ql
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/test.cpp
new file mode 100644
index 000000000000..c0cd102321c1
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck/test.cpp
@@ -0,0 +1,255 @@
+typedef unsigned short WORD;
+typedef unsigned long DWORD, HANDLE;
+typedef int BOOL, BOOLEAN, errno_t;
+typedef char CHAR;
+typedef short SHORT;
+typedef long LONG;
+typedef unsigned short WCHAR; // wc, 16-bit UNICODE character
+typedef long __time64_t, time_t;
+#define NULL 0
+
+typedef long long LONGLONG;
+typedef unsigned long long ULONGLONG;
+
+
+typedef struct _SYSTEMTIME {
+ WORD wYear;
+ WORD wMonth;
+ WORD wDayOfWeek;
+ WORD wDay;
+ WORD wHour;
+ WORD wMinute;
+ WORD wSecond;
+ WORD wMilliseconds;
+} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
+
+typedef struct _FILETIME {
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+} FILETIME, *PFILETIME, *LPFILETIME;
+
+typedef struct _TIME_ZONE_INFORMATION {
+ LONG Bias;
+ WCHAR StandardName[32];
+ SYSTEMTIME StandardDate;
+ LONG StandardBias;
+ WCHAR DaylightName[32];
+ SYSTEMTIME DaylightDate;
+ LONG DaylightBias;
+} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
+
+typedef struct _TIME_DYNAMIC_ZONE_INFORMATION {
+ LONG Bias;
+ WCHAR StandardName[32];
+ SYSTEMTIME StandardDate;
+ LONG StandardBias;
+ WCHAR DaylightName[32];
+ SYSTEMTIME DaylightDate;
+ LONG DaylightBias;
+ WCHAR TimeZoneKeyName[128];
+ BOOLEAN DynamicDaylightTimeDisabled;
+} DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION;
+
+struct tm
+{
+ int tm_sec; // seconds after the minute - [0, 60] including leap second
+ int tm_min; // minutes after the hour - [0, 59]
+ int tm_hour; // hours since midnight - [0, 23]
+ int tm_mday; // day of the month - [1, 31]
+ int tm_mon; // months since January - [0, 11]
+ int tm_year; // years since 1900
+ int tm_wday; // days since Sunday - [0, 6]
+ int tm_yday; // days since January 1 - [0, 365]
+ int tm_isdst; // daylight savings time flag
+};
+
+BOOL
+SystemTimeToFileTime(
+ const SYSTEMTIME* lpSystemTime,
+ LPFILETIME lpFileTime
+);
+
+BOOL
+FileTimeToSystemTime(
+ const FILETIME* lpFileTime,
+ LPSYSTEMTIME lpSystemTime
+);
+
+BOOL
+SystemTimeToTzSpecificLocalTime(
+ const TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpUniversalTime,
+ LPSYSTEMTIME lpLocalTime
+);
+
+BOOL
+SystemTimeToTzSpecificLocalTimeEx(
+ const DYNAMIC_TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpUniversalTime,
+ LPSYSTEMTIME lpLocalTime
+);
+
+BOOL
+TzSpecificLocalTimeToSystemTime(
+ const TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpLocalTime,
+ LPSYSTEMTIME lpUniversalTime
+);
+
+BOOL
+TzSpecificLocalTimeToSystemTimeEx(
+ const DYNAMIC_TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpLocalTime,
+ LPSYSTEMTIME lpUniversalTime
+);
+
+void GetSystemTime(
+ LPSYSTEMTIME lpSystemTime
+);
+
+void GetSystemTimeAsFileTime(
+ LPFILETIME lpSystemTimeAsFileTime
+);
+
+__time64_t _mkgmtime64(
+ struct tm* _Tm
+);
+
+__time64_t _mkgmtime(
+ struct tm* const _Tm
+)
+{
+ return _mkgmtime64(_Tm);
+}
+
+__time64_t mktime(
+ struct tm* const _Tm
+)
+{
+ return _mkgmtime64(_Tm);
+}
+
+__time64_t _time64(
+ __time64_t* _Time
+);
+
+__time64_t time(
+ time_t* const _Time
+)
+{
+ return _time64(_Time);
+}
+
+int gmtime_s(
+ struct tm* _Tm,
+ __time64_t const* _Time
+);
+
+BOOL
+GetFileTime(
+ HANDLE hFile,
+ LPFILETIME lpCreationTime,
+ LPFILETIME lpLastAccessTime,
+ LPFILETIME lpLastWriteTime
+);
+
+time_t mktime(struct tm *timeptr);
+struct tm *gmtime(const time_t *timer);
+
+time_t mkTime(int days)
+{
+ struct tm tm;
+ time_t t;
+
+ tm.tm_sec = 0;
+ tm.tm_min = 0;
+ tm.tm_hour = 0;
+ tm.tm_mday = 0;
+ tm.tm_mon = 0;
+ tm.tm_year = days / 365; // BAD
+ // ...
+
+ t = mktime(&tm); // convert tm -> time_t
+
+ return t;
+}
+
+/**
+ * Positive AntiPattern 5 - year % 4 == 0
+*/
+void antipattern5()
+{
+ int year = 1;
+ bool isLeapYear = year % 4 == 0;
+
+ // get the current time as a FILETIME
+ SYSTEMTIME st; FILETIME ft;
+ GetSystemTime(&st);
+ SystemTimeToFileTime(&st, &ft);
+
+ bool isLeapYear2 = st.wYear % 4 == 0;
+}
+
+/**
+ * Negative AntiPattern 5 - year % 4 == 0
+*/
+void antipattern5_negative()
+{
+ SYSTEMTIME st; FILETIME ft;
+ GetSystemTime(&st);
+ SystemTimeToFileTime(&st, &ft);
+ bool isLeapYear = st.wYear % 4 == 0 && (st.wYear % 100 != 0 || st.wYear % 400 == 0);
+
+ int year = 1;
+ bool isLeapYear2 = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
+}
+
+/**
+* Negative - Valid Leap year check (logically equivalent) (#1035)
+*/
+bool ap5_negative_inverted_form(int year){
+ return year % 400 == 0 || (year % 100 != 0 && year % 4 == 0);
+}
+
+/**
+* Negative - Valid Leap Year check (#1035)
+* Century subexpression component is inverted `!(year % 100 == 0)`
+*/
+bool ap5_negative_inverted_century_100(int year){
+ return !((year % 4 == 0) && (!(year % 100 == 0) || (year % 400 == 0)));
+}
+
+class SomeResultClass{
+ public:
+ int GetYear() {
+ return 2000;
+ }
+};
+
+/**
+ * Negative - Valid Leap Year Check (#1038)
+ * Valid leap year check, but the expression is the result of a Call and thus breaks SSA.
+*/
+bool ap5_fp_expr_call(SomeResultClass result){
+ if (result.GetYear() % 4 == 0 && (result.GetYear() % 100 != 0 || result.GetYear() % 400 == 0)){
+ return true;
+ }
+ return false;
+}
+
+/**
+* Positive - Invalid Leap Year check
+* Components are split up and distributed across multiple if statements.
+*/
+bool tp_leap_year_multiple_if_statements(int year){
+ if (year % 4 == 0) {
+ if (year % 100 == 0) {
+ if (year % 400 == 0) {
+ return true;
+ }
+ }else{
+ return true;
+ }
+ }
+ return false;
+}
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.cpp
new file mode 100644
index 000000000000..3f9b61c68505
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.cpp
@@ -0,0 +1,198 @@
+
+typedef unsigned short WORD;
+typedef unsigned long DWORD, HANDLE;
+typedef int BOOL, BOOLEAN, errno_t;
+typedef char CHAR;
+typedef short SHORT;
+typedef long LONG;
+typedef unsigned short WCHAR; // wc, 16-bit UNICODE character
+typedef long __time64_t, time_t;
+#define NULL 0
+
+typedef long long LONGLONG;
+typedef unsigned long long ULONGLONG;
+
+
+typedef struct _SYSTEMTIME {
+ WORD wYear;
+ WORD wMonth;
+ WORD wDayOfWeek;
+ WORD wDay;
+ WORD wHour;
+ WORD wMinute;
+ WORD wSecond;
+ WORD wMilliseconds;
+} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
+
+typedef struct _FILETIME {
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+} FILETIME, *PFILETIME, *LPFILETIME;
+
+typedef struct _TIME_ZONE_INFORMATION {
+ LONG Bias;
+ WCHAR StandardName[32];
+ SYSTEMTIME StandardDate;
+ LONG StandardBias;
+ WCHAR DaylightName[32];
+ SYSTEMTIME DaylightDate;
+ LONG DaylightBias;
+} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
+
+typedef struct _TIME_DYNAMIC_ZONE_INFORMATION {
+ LONG Bias;
+ WCHAR StandardName[32];
+ SYSTEMTIME StandardDate;
+ LONG StandardBias;
+ WCHAR DaylightName[32];
+ SYSTEMTIME DaylightDate;
+ LONG DaylightBias;
+ WCHAR TimeZoneKeyName[128];
+ BOOLEAN DynamicDaylightTimeDisabled;
+} DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION;
+
+struct tm
+{
+ int tm_sec; // seconds after the minute - [0, 60] including leap second
+ int tm_min; // minutes after the hour - [0, 59]
+ int tm_hour; // hours since midnight - [0, 23]
+ int tm_mday; // day of the month - [1, 31]
+ int tm_mon; // months since January - [0, 11]
+ int tm_year; // years since 1900
+ int tm_wday; // days since Sunday - [0, 6]
+ int tm_yday; // days since January 1 - [0, 365]
+ int tm_isdst; // daylight savings time flag
+};
+
+BOOL
+SystemTimeToFileTime(
+ const SYSTEMTIME* lpSystemTime,
+ LPFILETIME lpFileTime
+);
+
+BOOL
+FileTimeToSystemTime(
+ const FILETIME* lpFileTime,
+ LPSYSTEMTIME lpSystemTime
+);
+
+BOOL
+SystemTimeToTzSpecificLocalTime(
+ const TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpUniversalTime,
+ LPSYSTEMTIME lpLocalTime
+);
+
+BOOL
+SystemTimeToTzSpecificLocalTimeEx(
+ const DYNAMIC_TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpUniversalTime,
+ LPSYSTEMTIME lpLocalTime
+);
+
+BOOL
+TzSpecificLocalTimeToSystemTime(
+ const TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpLocalTime,
+ LPSYSTEMTIME lpUniversalTime
+);
+
+BOOL
+TzSpecificLocalTimeToSystemTimeEx(
+ const DYNAMIC_TIME_ZONE_INFORMATION* lpTimeZoneInformation,
+ const SYSTEMTIME* lpLocalTime,
+ LPSYSTEMTIME lpUniversalTime
+);
+
+void GetSystemTime(
+ LPSYSTEMTIME lpSystemTime
+);
+
+void GetSystemTimeAsFileTime(
+ LPFILETIME lpSystemTimeAsFileTime
+);
+
+__time64_t _mkgmtime64(
+ struct tm* _Tm
+);
+
+__time64_t _mkgmtime(
+ struct tm* const _Tm
+)
+{
+ return _mkgmtime64(_Tm);
+}
+
+__time64_t mktime(
+ struct tm* const _Tm
+)
+{
+ return _mkgmtime64(_Tm);
+}
+
+__time64_t _time64(
+ __time64_t* _Time
+);
+
+__time64_t time(
+ time_t* const _Time
+)
+{
+ return _time64(_Time);
+}
+
+int gmtime_s(
+ struct tm* _Tm,
+ __time64_t const* _Time
+);
+
+BOOL
+GetFileTime(
+ HANDLE hFile,
+ LPFILETIME lpCreationTime,
+ LPFILETIME lpLastAccessTime,
+ LPFILETIME lpLastWriteTime
+);
+
+void print(const char* s);
+
+/**
+ * AntiPattern7 - isLeapYear Conditional
+*/
+void antipattern7()
+{
+ // get the current time as a FILETIME
+ SYSTEMTIME st; FILETIME ft;
+ GetSystemTime(&st);
+ SystemTimeToFileTime(&st, &ft);
+
+ bool isLeapYear = st.wYear % 4 == 0 && (st.wYear % 100 != 0 || st.wYear % 400 == 0);
+ if(isLeapYear){
+ // do something to cater for a leap year....
+ print("It was a leap year");
+ }else{
+ // do another (different) thing
+ print("It was **not** a leap year");
+ }
+}
+
+time_t mktime(struct tm *timeptr);
+struct tm *gmtime(const time_t *timer);
+
+time_t mkTime(int days)
+{
+ struct tm tm;
+ time_t t;
+
+ tm.tm_sec = 0;
+ tm.tm_min = 0;
+ tm.tm_hour = 0;
+ tm.tm_mday = 0;
+ tm.tm_mon = 0;
+ tm.tm_year = days / 365; // BAD
+ // ...
+
+ t = mktime(&tm); // convert tm -> time_t
+
+ return t;
+}
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.expected
new file mode 100644
index 000000000000..be5f31d55769
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.expected
@@ -0,0 +1 @@
+| LeapYearConditionalLogic.cpp:170:5:176:5 | if (...) ... | Leap Year conditional statement may have untested code paths |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.qlref b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.qlref
new file mode 100644
index 000000000000..750ff8deb60a
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/LeapYearConditionalLogic/LeapYearConditionalLogic.qlref
@@ -0,0 +1 @@
+Likely Bugs/Leap Year/LeapYearConditionalLogic.ql
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected
index a9c1bc66c50f..555002b40867 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected
@@ -1,15 +1,8 @@
-| test.cpp:314:5:314:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:309:13:309:14 | st | st |
-| test.cpp:327:5:327:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:322:13:322:14 | st | st |
-| test.cpp:338:6:338:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:333:62:333:63 | st | st |
-| test.cpp:484:5:484:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:480:13:480:14 | st | st |
-| test.cpp:497:5:497:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:492:13:492:14 | st | st |
-| test.cpp:509:5:509:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:505:13:505:14 | st | st |
-| test.cpp:606:11:606:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:602:12:602:19 | timeinfo | timeinfo |
-| test.cpp:634:11:634:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:628:12:628:19 | timeinfo | timeinfo |
-| test.cpp:636:11:636:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:628:12:628:19 | timeinfo | timeinfo |
-| test.cpp:640:5:640:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st |
-| test.cpp:642:5:642:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st |
-| test.cpp:718:5:718:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:712:13:712:14 | st | st |
-| test.cpp:731:5:731:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st |
-| test.cpp:732:5:732:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st |
-| test.cpp:733:5:733:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st |
+| test.cpp:617:2:617:11 | ... ++ | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:611:6:611:32 | AntiPattern_1_year_addition | AntiPattern_1_year_addition | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:613:13:613:14 | st | st |
+| test.cpp:634:2:634:25 | ... += ... | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:627:6:627:32 | AntiPattern_simple_addition | AntiPattern_simple_addition | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st |
+| test.cpp:763:2:763:19 | ... ++ | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:756:6:756:40 | AntiPattern_year_addition_struct_tm | AntiPattern_year_addition_struct_tm | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:759:12:759:19 | timeinfo | timeinfo |
+| test.cpp:800:2:800:40 | ... = ... | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:791:6:791:23 | FalseNegativeTests | FalseNegativeTests | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:793:12:793:19 | timeinfo | timeinfo |
+| test.cpp:803:2:803:43 | ... = ... | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:791:6:791:23 | FalseNegativeTests | FalseNegativeTests | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:793:12:793:19 | timeinfo | timeinfo |
+| test.cpp:808:2:808:24 | ... = ... | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:791:6:791:23 | FalseNegativeTests | FalseNegativeTests | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:794:13:794:14 | st | st |
+| test.cpp:811:2:811:33 | ... = ... | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:791:6:791:23 | FalseNegativeTests | FalseNegativeTests | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:794:13:794:14 | st | st |
+| test.cpp:850:3:850:36 | ... = ... | $@: Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:818:6:818:23 | tp_intermediaryVar | tp_intermediaryVar | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:70:18:70:19 | tm | tm |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected
index fb79592b7f2d..ae8a55449daf 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected
@@ -1,5 +1,5 @@
-| test.cpp:317:2:317:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:309:13:309:14 | st | st |
-| test.cpp:330:2:330:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:322:13:322:14 | st | st |
-| test.cpp:341:2:341:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:333:62:333:63 | st | st |
-| test.cpp:720:2:720:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:712:13:712:14 | st | st |
-| test.cpp:735:2:735:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:725:13:725:14 | st | st |
+| test.cpp:395:2:395:21 | call to SystemTimeToFileTime | $@: Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:385:6:385:48 | AntiPattern_unchecked_filetime_conversion2a | AntiPattern_unchecked_filetime_conversion2a | test.cpp:75:1:75:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:387:13:387:14 | st | st |
+| test.cpp:413:2:413:21 | call to SystemTimeToFileTime | $@: Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:403:6:403:48 | AntiPattern_unchecked_filetime_conversion2b | AntiPattern_unchecked_filetime_conversion2b | test.cpp:75:1:75:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:405:13:405:14 | st | st |
+| test.cpp:429:2:429:21 | call to SystemTimeToFileTime | $@: Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:421:6:421:48 | AntiPattern_unchecked_filetime_conversion2b | AntiPattern_unchecked_filetime_conversion2b | test.cpp:75:1:75:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:421:62:421:63 | st | st |
+| test.cpp:948:3:948:22 | call to SystemTimeToFileTime | $@: Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:938:7:938:15 | modified3 | modified3 | test.cpp:75:1:75:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:940:14:940:15 | st | st |
+| test.cpp:965:3:965:22 | call to SystemTimeToFileTime | $@: Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:955:7:955:15 | modified4 | modified4 | test.cpp:75:1:75:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:957:14:957:15 | st | st |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp
index 3db9b61edd2b..beb2c4061496 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp
@@ -59,6 +59,18 @@ struct tm
int tm_isdst; // daylight savings time flag
};
+struct timespec
+{
+ time_t tv_sec;
+ long tv_nsec;
+};
+
+/* Timestamps of log entries. */
+struct logtime {
+ struct tm tm;
+ long usec;
+};
+
BOOL
SystemTimeToFileTime(
const SYSTEMTIME* lpSystemTime,
@@ -102,6 +114,9 @@ TzSpecificLocalTimeToSystemTimeEx(
void GetSystemTime(
LPSYSTEMTIME lpSystemTime
);
+void GetLocalTime(
+ LPSYSTEMTIME lpSystemTime
+);
void GetSystemTimeAsFileTime(
LPFILETIME lpSystemTimeAsFileTime
@@ -149,6 +164,12 @@ GetFileTime(
LPFILETIME lpLastWriteTime
);
+struct tm *localtime_r( const time_t *timer, struct tm *buf );
+
+/**
+ * Negative Case
+ * FileTimeToSystemTime is called and the return value is checked
+*/
void Correct_FileTimeToSystemTime(const FILETIME* lpFileTime)
{
SYSTEMTIME systemTime;
@@ -162,6 +183,10 @@ void Correct_FileTimeToSystemTime(const FILETIME* lpFileTime)
/// Normal usage
}
+/**
+ * Positive (Out of Scope) Bug Case
+ * FileTimeToSystemTime is called but no check is conducted to verify the result of the operation
+*/
void AntiPattern_FileTimeToSystemTime(const FILETIME* lpFileTime)
{
SYSTEMTIME systemTime;
@@ -170,6 +195,10 @@ void AntiPattern_FileTimeToSystemTime(const FILETIME* lpFileTime)
FileTimeToSystemTime(lpFileTime, &systemTime);
}
+/**
+ * Negative Case
+ * SystemTimeToTzSpecificLocalTime is called and the return value is verified
+*/
void Correct_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime)
{
SYSTEMTIME localTime;
@@ -183,6 +212,10 @@ void Correct_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTime
/// Normal usage
}
+/**
+ * Positive (Out of Scope) Case
+ * AntiPattern_SystemTimeToTzSpecificLocalTime is called but the return value is not validated
+*/
void AntiPattern_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime)
{
SYSTEMTIME localTime;
@@ -191,6 +224,10 @@ void AntiPattern_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lp
SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation, lpUniversalTime, &localTime);
}
+/**
+ * Negative Case
+ * SystemTimeToTzSpecificLocalTimeEx is called and the return value is validated
+*/
void Correct_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime)
{
SYSTEMTIME localTime;
@@ -204,6 +241,10 @@ void Correct_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFORMATI
/// Normal usage
}
+/**
+ * Positive Case
+ * SystemTimeToTzSpecificLocalTimeEx is called but the return value is not validated
+*/
void AntiPattern_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime)
{
SYSTEMTIME localTime;
@@ -212,6 +253,10 @@ void AntiPattern_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFOR
SystemTimeToTzSpecificLocalTimeEx(lpTimeZoneInformation, lpUniversalTime, &localTime);
}
+/**
+ * Negative Case
+ * Correct use of TzSpecificLocalTimeToSystemTime, function is called and the return value is validated.
+*/
void Correct_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime)
{
SYSTEMTIME universalTime;
@@ -225,6 +270,10 @@ void Correct_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTime
/// Normal usage
}
+/**
+ * Positive (Out of Scope) Case
+ * TzSpecificLocalTimeToSystemTime is called however the return value is not validated
+*/
void AntiPattern_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime)
{
SYSTEMTIME universalTime;
@@ -233,6 +282,10 @@ void AntiPattern_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lp
TzSpecificLocalTimeToSystemTime(lpTimeZoneInformation, lpLocalTime, &universalTime);
}
+/**
+ * Negative Case
+ * TzSpecificLocalTimeToSystemTimeEx is called and the return value is correctly validated
+*/
void Correct_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime)
{
SYSTEMTIME universalTime;
@@ -246,6 +299,10 @@ void Correct_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFORMATI
/// Normal usage
}
+/**
+ * Positive (Out of Scope) Case
+ * TzSpecificLocalTimeToSystemTimeEx is called however the return value is not validated
+*/
void AntiPattern_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime)
{
SYSTEMTIME universalTime;
@@ -258,6 +315,10 @@ void AntiPattern_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFOR
SYSTEMTIME Cases
*************************************************/
+/**
+ * Negative Case
+ * SystemTimeToFileTime is called and the return value is validated in a guard
+*/
void Correct_filetime_conversion_check(SYSTEMTIME& st)
{
FILETIME ft;
@@ -273,6 +334,10 @@ void Correct_filetime_conversion_check(SYSTEMTIME& st)
//////////////////////////////////////////////
+/**
+ * Positive (Out of Scope) Case
+ * SystemTimeToFileTime is called but the return value is not validated in a guard
+*/
void AntiPattern_unchecked_filetime_conversion(SYSTEMTIME& st)
{
FILETIME ft;
@@ -281,6 +346,10 @@ void AntiPattern_unchecked_filetime_conversion(SYSTEMTIME& st)
SystemTimeToFileTime(&st, &ft);
}
+/**
+ * Positive (Out of Scope) Case
+ * SystemTimeToFileTime is called but the return value is not validated in a guard
+*/
void AntiPattern_unchecked_filetime_conversion2(SYSTEMTIME* st)
{
FILETIME ft;
@@ -292,6 +361,10 @@ void AntiPattern_unchecked_filetime_conversion2(SYSTEMTIME* st)
}
}
+/**
+ * Positive (Out of Scope)
+ * SYSTEMTIME.wDay is incremented by one (and no guard exists)
+*/
void AntiPattern_unchecked_filetime_conversion2()
{
SYSTEMTIME st;
@@ -304,6 +377,11 @@ void AntiPattern_unchecked_filetime_conversion2()
SystemTimeToFileTime(&st, &ft);
}
+/**
+ * Positive Cases
+ * - Anti-pattern 1: [year ±n, month, day]
+ * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions
+*/
void AntiPattern_unchecked_filetime_conversion2a()
{
SYSTEMTIME st;
@@ -317,6 +395,11 @@ void AntiPattern_unchecked_filetime_conversion2a()
SystemTimeToFileTime(&st, &ft);
}
+/**
+ * Positive Cases
+ * - Anti-pattern 1: [year ±n, month, day]
+ * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions
+*/
void AntiPattern_unchecked_filetime_conversion2b()
{
SYSTEMTIME st;
@@ -330,6 +413,11 @@ void AntiPattern_unchecked_filetime_conversion2b()
SystemTimeToFileTime(&st, &ft);
}
+/**
+ * Positive Cases
+ * - Anti-pattern 1: [year ±n, month, day]
+ * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions
+*/
void AntiPattern_unchecked_filetime_conversion2b(SYSTEMTIME* st)
{
FILETIME ft;
@@ -341,6 +429,11 @@ void AntiPattern_unchecked_filetime_conversion2b(SYSTEMTIME* st)
SystemTimeToFileTime(st, &ft);
}
+/**
+ * Positive Cases
+ * - Anti-pattern 3: datetime.AddDays(±28)
+ * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions
+*/
void AntiPattern_unchecked_filetime_conversion3()
{
SYSTEMTIME st;
@@ -349,11 +442,12 @@ void AntiPattern_unchecked_filetime_conversion3()
if (st.wMonth < 12)
{
+ // Anti-pattern 3: datetime.AddDays(±28)
st.wMonth++;
}
else
{
- // Check for leap year, but...
+ // No check for leap year is required here, as the month is statically set to January.
st.wMonth = 1;
st.wYear++;
}
@@ -363,6 +457,11 @@ void AntiPattern_unchecked_filetime_conversion3()
}
//////////////////////////////////////////////
+
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Year is incremented and if we are on Feb the 29th, set to the 28th if the new year is a common year.
+*/
void CorrectPattern_check1()
{
SYSTEMTIME st;
@@ -370,7 +469,7 @@ void CorrectPattern_check1()
st.wYear++;
- // Guard
+ // Guard against February the 29th
if (st.wMonth == 2 && st.wDay == 29)
{
// move back a day when landing on Feb 29 in an non-leap year
@@ -385,6 +484,10 @@ void CorrectPattern_check1()
AntiPattern_unchecked_filetime_conversion(st);
}
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer and then the leap year case is correctly guarded and handled.
+*/
void CorrectPattern_check2(int yearsToAdd)
{
SYSTEMTIME st;
@@ -400,11 +503,18 @@ void CorrectPattern_check2(int yearsToAdd)
AntiPattern_unchecked_filetime_conversion(st);
}
+/**
+ * Could give rise to AntiPattern 7: IsLeapYear (Conditional Logic)
+*/
bool isLeapYear(SYSTEMTIME& st)
{
return st.wYear % 4 == 0 && (st.wYear % 100 != 0 || st.wYear % 400 == 0);
}
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer and then the leap year case is correctly guarded and handled.
+*/
void CorrectPattern_check3()
{
SYSTEMTIME st;
@@ -413,6 +523,9 @@ void CorrectPattern_check3()
st.wYear++;
// Guard
+ /** Negative Case - Anti-pattern 7: IsLeapYear
+ * Body of conditional statement is safe recommended code
+ */
if (st.wMonth == 2 && st.wDay == 29 && isLeapYear(st))
{
// move back a day when landing on Feb 29 in an non-leap year
@@ -423,6 +536,9 @@ void CorrectPattern_check3()
AntiPattern_unchecked_filetime_conversion(st);
}
+/**
+ * Could give rise to AntiPattern 7: IsLeapYear (Conditional Logic)
+*/
bool isLeapYear2(int year)
{
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
@@ -433,6 +549,10 @@ bool fixDate(int day, int month, int year)
return (month == 2 && day == 29 && isLeapYear2(year));
}
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer and then the leap year case is correctly guarded and handled.
+*/
void CorrectPattern_check4()
{
SYSTEMTIME st;
@@ -442,18 +562,23 @@ void CorrectPattern_check4()
st.wYear++;
// Guard
+ /** Negative Case - Anti-pattern 7: IsLeapYear
+ * Body of conditional statement is safe recommended code
+ */
if (fixDate(st.wDay, st.wMonth, st.wYear))
{
// move back a day when landing on Feb 29 in an non-leap year
- st.wDay = 28; // GOOD [FALSE POSITIVE]
+ st.wDay = 28; // GOOD [FALSE POSITIVE] Anti-pattern 7
}
// Safe to use
AntiPattern_unchecked_filetime_conversion(st);
}
-
-
+/**
+ * Negative Case - Generic
+ * No manipulation is conducted on struct populated from GetSystemTime.
+*/
void CorrectPattern_NotManipulated_DateFromAPI_0()
{
SYSTEMTIME st;
@@ -464,6 +589,10 @@ void CorrectPattern_NotManipulated_DateFromAPI_0()
SystemTimeToFileTime(&st, &ft);
}
+/**
+ * Negative Case - Generic
+ * No manipulation is conducted on struct populated from GetFileTime.
+*/
void CorrectPattern_NotManipulated_DateFromAPI_1(HANDLE hWatchdog)
{
SYSTEMTIME st;
@@ -475,18 +604,26 @@ void CorrectPattern_NotManipulated_DateFromAPI_1(HANDLE hWatchdog)
/////////////////////////////////////////////////////////////////
+/**
+ * Positive Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer but a leap year is not handled.
+*/
void AntiPattern_1_year_addition()
{
SYSTEMTIME st;
GetSystemTime(&st);
- // BUG - UncheckedLeapYearAfterYearModification
- st.wYear++;
+ // BUG - UncheckedLeapYearAfterYearModification
+ st.wYear++; // BUg V2
// Usage of potentially invalid date
Correct_filetime_conversion_check(st);
}
+/**
+ * Positive Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer but a leap year is not handled.
+*/
void AntiPattern_simple_addition(int yearAddition)
{
SYSTEMTIME st;
@@ -494,12 +631,16 @@ void AntiPattern_simple_addition(int yearAddition)
GetSystemTime(&st);
// BUG - UncheckedLeapYearAfterYearModification
- st.wYear += yearAddition;
+ st.wYear += yearAddition; // Bug V2
// Usage of potentially invalid date
Correct_filetime_conversion_check(st);
}
+/**
+ * Positive Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer but a leap year is not handled *correctly*.
+*/
void AntiPattern_IncorrectGuard(int yearsToAdd)
{
SYSTEMTIME st;
@@ -511,7 +652,7 @@ void AntiPattern_IncorrectGuard(int yearsToAdd)
// Incorrect Guard
if (st.wMonth == 2 && st.wDay == 29)
{
- // Part of a different anti-pattern.
+ // Part of a different anti-pattern (AntiPattern 5).
// Make sure the guard includes the proper check
bool isLeapYear = st.wYear % 4 == 0;
if (!isLeapYear)
@@ -539,6 +680,10 @@ void CorrectUsageOf_mkgmtime(struct tm& timeinfo)
/// _mkgmtime succeeded
}
+/**
+ * Positive Case - General (Out of Scope)
+ * Must Check for return value of _mkgmtime
+*/
void AntiPattern_uncheckedUsageOf_mkgmtime(struct tm& timeinfo)
{
// (out-of-scope) GeneralBug: Must check return value for _mkgmtime
@@ -550,6 +695,10 @@ void AntiPattern_uncheckedUsageOf_mkgmtime(struct tm& timeinfo)
//////////////////////////////////////////////////////////
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer and leap year is not handled correctly.
+*/
void Correct_year_addition_struct_tm()
{
time_t rawtime;
@@ -575,6 +724,10 @@ void Correct_year_addition_struct_tm()
AntiPattern_uncheckedUsageOf_mkgmtime(timeinfo);
}
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer and leap year is not handled correctly.
+*/
void Correct_LinuxPattern()
{
time_t rawtime;
@@ -596,6 +749,10 @@ void Correct_LinuxPattern()
//////////////////////////////////////////
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Years is incremented by some integer and leap year is not handled correctly.
+*/
void AntiPattern_year_addition_struct_tm()
{
time_t rawtime;
@@ -603,7 +760,7 @@ void AntiPattern_year_addition_struct_tm()
time(&rawtime);
gmtime_s(&timeinfo, &rawtime);
// BUG - UncheckedLeapYearAfterYearModification
- timeinfo.tm_year++;
+ timeinfo.tm_year++; // Bug V2
// Usage of potentially invalid date
CorrectUsageOf_mkgmtime(timeinfo);
@@ -611,6 +768,10 @@ void AntiPattern_year_addition_struct_tm()
/////////////////////////////////////////////////////////
+/**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * False positive: Years is initialized to or incremented by some integer (but never used).
+*/
void FalsePositiveTests(int x)
{
struct tm timeinfo;
@@ -623,6 +784,10 @@ void FalsePositiveTests(int x)
st.wYear = 1900 + x;
}
+/**
+ * Positive Case - Anti-pattern 1: [year ±n, month, day]
+ * False positive: Years is initialized to or incremented by some integer (but never used).
+*/
void FalseNegativeTests(int x)
{
struct tm timeinfo;
@@ -631,106 +796,211 @@ void FalseNegativeTests(int x)
timeinfo.tm_year = x;
// BUG - UncheckedLeapYearAfterYearModification
- timeinfo.tm_year = x + timeinfo.tm_year;
+ // Positive Case - Anti-pattern 1: [year ±n, month, day]
+ timeinfo.tm_year = x + timeinfo.tm_year; // Bug V2
// BUG - UncheckedLeapYearAfterYearModification
- timeinfo.tm_year = 1970 + timeinfo.tm_year;
+ // Positive Case - Anti-pattern 1: [year ±n, month, day]
+ timeinfo.tm_year = 1970 + timeinfo.tm_year; // Bug V2
st.wYear = x;
// BUG - UncheckedLeapYearAfterYearModification
- st.wYear = x + st.wYear;
+ // Positive Case - Anti-pattern 1: [year ±n, month, day]
+ st.wYear = x + st.wYear; // Bug V2
// BUG - UncheckedLeapYearAfterYearModification
- st.wYear = (1986 + st.wYear) - 1;
+ // Positive Case - Anti-pattern 1: [year ±n, month, day]
+ st.wYear = (1986 + st.wYear) - 1; // Bug V2
+}
+
+/**
+ * Positive AntiPattern 1
+ * Year field is modified but via an intermediary variable.
+*/
+bool tp_intermediaryVar(struct timespec now, struct logtime ×tamp_remote)
+{
+ struct tm tm_parsed;
+ bool timestamp_found = false;
+
+ struct tm tm_now;
+ time_t t_now;
+ int year;
+
+ timestamp_found = true;
+
+ /*
+ * As the timestamp does not contain the year
+ * number, daylight saving time information, nor
+ * a time zone, attempt to infer it. Due to
+ * clock skews, the timestamp may even be part
+ * of the next year. Use the last year for which
+ * the timestamp is at most one week in the
+ * future.
+ *
+ * This loop can only run for at most three
+ * iterations before terminating.
+ */
+ t_now = now.tv_sec;
+ localtime_r(&t_now, &tm_now);
+
+ timestamp_remote.tm = tm_parsed;
+ timestamp_remote.tm.tm_isdst = -1;
+ timestamp_remote.usec = now.tv_nsec * 0.001;
+ for (year = tm_now.tm_year + 1;; --year)
+ {
+ // assert(year >= tm_now.tm_year - 1);
+ timestamp_remote.tm.tm_year = year;
+ if (mktime(×tamp_remote.tm) < t_now + 7 * 24 * 60 * 60)
+ break;
+ }
}
-// False positive
-inline void
-IncrementMonth(LPSYSTEMTIME pst)
-{
- if (pst->wMonth < 12)
+
+ // False positive
+ inline void
+ IncrementMonth(LPSYSTEMTIME pst)
{
- pst->wMonth++;
+ if (pst->wMonth < 12)
+ {
+ pst->wMonth++;
+ }
+ else
+ {
+ pst->wMonth = 1;
+ pst->wYear++;
+ }
}
- else
+
+ /////////////////////////////////////////////////////////
+
+ void mkDateTest(int year)
{
- pst->wMonth = 1;
- pst->wYear++;
+ struct tm t;
+
+ t.tm_sec = 0;
+ t.tm_min = 0;
+ t.tm_hour = 0;
+ t.tm_mday = 1; // day of the month - [1, 31]
+ t.tm_mon = 0; // months since January - [0, 11]
+ if (year >= 1900)
+ {
+ // 4-digit year
+ t.tm_year = year - 1900; // GOOD
+ }
+ else if ((year >= 0) && (year < 100))
+ {
+ // 2-digit year assumed in the range 2000 - 2099
+ t.tm_year = year + 100; // GOOD [FALSE POSITIVE]
+ }
+ else
+ {
+ // fail
+ }
+ // ...
}
-}
-/////////////////////////////////////////////////////////
+ /**
+ * Negative Case - Anti-pattern 1a: [a.year, b.month, b.day]
+ * False positive: No modification of SYSTEMTIME struct.
+ */
+ void unmodified1()
+ {
+ SYSTEMTIME st;
+ FILETIME ft;
+ WORD w;
-void mkDateTest(int year)
-{
- struct tm t;
+ GetSystemTime(&st);
- t.tm_sec = 0;
- t.tm_min = 0;
- t.tm_hour = 0;
- t.tm_mday = 1; // day of the month - [1, 31]
- t.tm_mon = 0; // months since January - [0, 11]
- if (year >= 1900)
- {
- // 4-digit year
- t.tm_year = year - 1900; // GOOD
- } else if ((year >= 0) && (year < 100)) {
- // 2-digit year assumed in the range 2000 - 2099
- t.tm_year = year + 100; // GOOD [FALSE POSITIVE]
- } else {
- // fail
+ w = st.wYear;
+
+ SystemTimeToFileTime(&st, &ft); // GOOD - no modification
}
- // ...
-}
-void unmodified1()
-{
- SYSTEMTIME st;
- FILETIME ft;
- WORD w;
+ /**
+ * Negative Case - Anti-pattern 1a: [a.year, b.month, b.day]
+ * False positive: No modification of SYSTEMTIME struct.
+ */
+ void unmodified2()
+ {
+ SYSTEMTIME st;
+ FILETIME ft;
+ WORD *w_ptr;
- GetSystemTime(&st);
+ GetSystemTime(&st);
- w = st.wYear;
+ w_ptr = &(st.wYear);
- SystemTimeToFileTime(&st, &ft); // GOOD - no modification
-}
+ SystemTimeToFileTime(&st, &ft); // GOOD - no modification
+ }
-void unmodified2()
-{
- SYSTEMTIME st;
- FILETIME ft;
- WORD *w_ptr;
+ /**
+ * Positive Case - Anti-pattern 1: [year ±n, month, day]
+ * Modification of SYSTEMTIME struct adding to year but no leap year guard is conducted.
+ */
+ void modified3()
+ {
+ SYSTEMTIME st;
+ FILETIME ft;
+ WORD *w_ptr;
- GetSystemTime(&st);
+ GetSystemTime(&st);
- w_ptr = &(st.wYear);
+ st.wYear = st.wYear + 1; // BAD
- SystemTimeToFileTime(&st, &ft); // GOOD - no modification
-}
+ SystemTimeToFileTime(&st, &ft);
+ }
-void modified3()
-{
- SYSTEMTIME st;
- FILETIME ft;
- WORD *w_ptr;
+ /**
+ * Positive Case - Anti-pattern 1: [year ±n, month, day]
+ * Modification of SYSTEMTIME struct adding to year but no leap year guard is conducted.
+ */
+ void modified4()
+ {
+ SYSTEMTIME st;
+ FILETIME ft;
+ WORD *w_ptr;
- GetSystemTime(&st);
+ GetSystemTime(&st);
- st.wYear = st.wYear + 1; // BAD
+ st.wYear++; // BAD Positive Case - Anti-pattern 1: [year ±n, month, day]
- SystemTimeToFileTime(&st, &ft);
-}
+ SystemTimeToFileTime(&st, &ft);
+ }
-void modified4()
-{
- SYSTEMTIME st;
- FILETIME ft;
- WORD *w_ptr;
+ /**
+ * Negative Case - Anti-pattern 1: [year ±n, month, day]
+ * Modification of SYSTEMTIME struct adding to year but no leap year guard is conducted.
+ */
+ void modified5()
+ {
+ SYSTEMTIME st;
+ FILETIME ft;
+ WORD *w_ptr;
- GetSystemTime(&st);
+ GetSystemTime(&st);
- st.wYear++; // BAD
- st.wYear++; // BAD
- st.wYear++; // BAD
+ st.wYear++; // Negative Case - Anti-pattern 1: [year ±n, month, day], guard condition below.
- SystemTimeToFileTime(&st, &ft);
-}
+ if (SystemTimeToFileTime(&st, &ft))
+ {
+ ///...
+ }
+ }
+
+ struct tm ltime(void)
+ {
+ SYSTEMTIME st;
+ struct tm tm;
+ bool isLeapYear;
+
+ GetLocalTime(&st);
+ tm.tm_sec=st.wSecond;
+ tm.tm_min=st.wMinute;
+ tm.tm_hour=st.wHour;
+ tm.tm_mday=st.wDay;
+ tm.tm_mon=st.wMonth-1;
+ tm.tm_year=(st.wYear>=1900?st.wYear-1900:0);
+
+ // Check for leap year, and adjust the date accordingly
+ isLeapYear = tm.tm_year % 4 == 0 && (tm.tm_year % 100 != 0 || tm.tm_year % 400 == 0);
+ tm.tm_mday = tm.tm_mon == 2 && tm.tm_mday == 29 && !isLeapYear ? 28 : tm.tm_mday;
+ return tm;
+ }
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/GlobalFp.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/GlobalFp.cpp
new file mode 100644
index 000000000000..abed05719fa6
--- /dev/null
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/GlobalFp.cpp
@@ -0,0 +1,2 @@
+int NormalYear[365];
+int LeapYear[366];
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/UnsafeArrayForDaysOfYear.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/UnsafeArrayForDaysOfYear.expected
index 37dd8b1ae7d0..59a981aa3a8f 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/UnsafeArrayForDaysOfYear.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/UnsafeArrayForDaysOfYear.expected
@@ -1,3 +1,4 @@
-| test.cpp:17:6:17:10 | items | There is an array allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. |
-| test.cpp:25:15:25:26 | new[] | There is an array allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. |
-| test.cpp:52:20:52:23 | call to vector | There is a std::vector allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. |
+| test.cpp:20:6:20:10 | items | $@: There is an array allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. | test.cpp:20:6:20:10 | items | items |
+| test.cpp:31:15:31:26 | new[] | $@: There is an array allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. | test.cpp:28:6:28:21 | ArrayOfDays_Bug2 | ArrayOfDays_Bug2 |
+| test.cpp:68:20:68:23 | call to vector | $@: There is a std::vector allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. | test.cpp:65:6:65:21 | VectorOfDays_Bug | VectorOfDays_Bug |
+| test.cpp:115:7:115:15 | items_bad | $@: There is an array allocation with a hard-coded set of 365 elements, which may indicate the number of days in a year without considering leap year scenarios. | test.cpp:115:7:115:15 | items_bad | items_bad |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/test.cpp
index 7f6f2cfd3fe7..32a0f59ac6f8 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/test.cpp
+++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear/test.cpp
@@ -11,6 +11,9 @@ class vector {
const T& operator[](int idx) const { return _x; }
};
+/**
+ * AntiPattern 4 - Static allocation of 365 array items
+*/
void ArrayOfDays_Bug(int dayOfYear, int x)
{
// BUG
@@ -19,6 +22,9 @@ void ArrayOfDays_Bug(int dayOfYear, int x)
items[dayOfYear - 1] = x;
}
+/**
+ * AntiPattern 4 - Static allocation of 365 array items
+*/
void ArrayOfDays_Bug2(int dayOfYear, int x)
{
// BUG
@@ -28,7 +34,10 @@ void ArrayOfDays_Bug2(int dayOfYear, int x)
delete items;
}
-
+/**
+ * True Negative
+ * Correct conditional allocation of array length
+*/
void ArrayOfDays_Correct(unsigned long year, int dayOfYear, int x)
{
bool isLeapYear = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
@@ -39,6 +48,10 @@ void ArrayOfDays_Correct(unsigned long year, int dayOfYear, int x)
delete[] items;
}
+/**
+ * True Negative
+ * Allocation of 366 items (Irregardless of common or leap year)
+*/
void ArrayOfDays_FalsePositive(int dayOfYear, int x)
{
int items[366];
@@ -46,6 +59,9 @@ void ArrayOfDays_FalsePositive(int dayOfYear, int x)
items[dayOfYear - 1] = x;
}
+/**
+ * AntiPattern 4 - Static allocation of 365 array items
+*/
void VectorOfDays_Bug(int dayOfYear, int x)
{
// BUG
@@ -54,6 +70,10 @@ void VectorOfDays_Bug(int dayOfYear, int x)
items[dayOfYear - 1] = x;
}
+/**
+ * True Negative
+ * Conditional quantity allocation on the basis of common or leap year
+*/
void VectorOfDays_Correct(unsigned long year, int dayOfYear, int x)
{
bool isLeapYear = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
@@ -62,9 +82,66 @@ void VectorOfDays_Correct(unsigned long year, int dayOfYear, int x)
items[dayOfYear - 1] = x;
}
+/**
+ * True Negative
+ * Allocation of 366 items (Irregardless of common or leap year)
+*/
void VectorOfDays_FalsePositive(int dayOfYear, int x)
{
vector items(366);
items[dayOfYear - 1] = x;
}
+
+/**
+ * AntiPattern 4 - Static allocation of 365 array items
+*/
+void HandleBothCases(int dayOfYear, int x)
+{
+ vector items(365);
+ vector items_leap(366);
+
+ items[dayOfYear - 1] = x; // BUG
+}
+
+/**
+ * AntiPattern 4 - Static allocation of 365 array items
+*/
+void HandleBothCases2(int dayOfYear, int x)
+{
+ int items[365];
+ int items_leap[366];
+
+ char items_bad[365]; // BUG
+
+ items[dayOfYear - 1] = x; // BUG
+}
+
+const short LeapYearDayToMonth[366] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // January
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // February
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // March
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // April
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, // May
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, // June
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, // July
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // August
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, // September
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // October
+ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, // November
+ 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11}; // December
+
+/* Negative - #947 Sibling definition above*/
+const short NormalYearDayToMonth[365] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // January
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // February
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // March
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // April
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, // May
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, // June
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, // July
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // August
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, // September
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // October
+ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, // November
+ 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11}; // December
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.expected b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.expected
new file mode 100644
index 000000000000..812f7dffd433
--- /dev/null
+++ b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.expected
@@ -0,0 +1,15 @@
+| test.c:29:6:29:46 | ... && ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:29:15:29:30 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:29:6:29:46 | ... && ... | as an operand in a binary logical operation |
+| test.c:34:6:34:38 | ! ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:34:7:34:22 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:34:6:34:38 | ! ... | as an operand in an unary logical operation |
+| test.c:39:6:39:21 | call to RtlCompareMemory | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:39:6:39:21 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:39:6:39:21 | call to RtlCompareMemory | as the controlling expression in an If statement |
+| test.c:49:6:49:42 | ... == ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:49:11:49:26 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:49:6:49:42 | ... == ... | as an operand in an equality operation where the other operand is likely a boolean value (lower precision result, needs to be reviewed) |
+| test.c:75:6:75:37 | (bool)... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:75:6:75:21 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:75:6:75:37 | (bool)... | as a boolean |
+| test.c:77:6:77:46 | ... == ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:77:15:77:30 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:77:6:77:46 | ... == ... | as an operand in an equality operation where the other operand is a boolean value (high precision result) |
+| test.c:84:6:84:37 | (BOOLEAN)... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:84:6:84:21 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:84:6:84:37 | (BOOLEAN)... | as a boolean |
+| test.c:86:6:86:45 | ... == ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:86:14:86:29 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:86:6:86:45 | ... == ... | as an operand in an equality operation where the other operand is a boolean value (high precision result) |
+| test.c:91:9:91:52 | ... && ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.c:91:21:91:36 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.c:91:9:91:52 | ... && ... | as an operand in a binary logical operation |
+| test.cpp:18:6:18:46 | ... && ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.cpp:18:15:18:30 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.cpp:18:6:18:46 | ... && ... | as an operand in a binary logical operation |
+| test.cpp:18:15:18:46 | (bool)... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.cpp:18:15:18:30 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.cpp:18:15:18:46 | (bool)... | as a boolean |
+| test.cpp:23:6:23:38 | ! ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.cpp:23:7:23:22 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.cpp:23:6:23:38 | ! ... | as an operand in an unary logical operation |
+| test.cpp:23:7:23:38 | (bool)... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.cpp:23:7:23:22 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.cpp:23:7:23:38 | (bool)... | as a boolean |
+| test.cpp:28:9:28:52 | ... && ... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.cpp:28:21:28:36 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.cpp:28:9:28:52 | ... && ... | as an operand in a binary logical operation |
+| test.cpp:28:21:28:52 | (bool)... | This $@ is being handled $@ instead of the number of matching bytes. Please review the usage of this function and consider replacing it with `RtlEqualMemory`. | test.cpp:28:21:28:36 | call to RtlCompareMemory | call to `RtlCompareMemory` | test.cpp:28:21:28:52 | (bool)... | as a boolean |
diff --git a/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.qlref b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.qlref
new file mode 100644
index 000000000000..629e248bce7e
--- /dev/null
+++ b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.qlref
@@ -0,0 +1 @@
+Microsoft/Likely Bugs/Drivers/IncorrectUsageOfRtlCompareMemory.ql
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/test.c b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/test.c
new file mode 100644
index 000000000000..cf3b006d0030
--- /dev/null
+++ b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/test.c
@@ -0,0 +1,92 @@
+// semmle-extractor-options: --microsoft
+typedef unsigned __int64 size_t;
+
+size_t RtlCompareMemory(
+ const void* Source1,
+ const void* Source2,
+ size_t Length
+)
+{
+ return Length;
+}
+
+
+#define bool _Bool
+#define false 0
+#define true 1
+
+typedef unsigned char UCHAR;
+typedef UCHAR BOOLEAN; // winnt
+#define FALSE 0
+#define TRUE 1
+
+int Test(const void* ptr)
+{
+ size_t t = RtlCompareMemory("test", ptr, 5); //OK
+ bool x;
+ BOOLEAN y;
+
+ if (t > 0 && RtlCompareMemory("test", ptr, 5)) //bug
+ {
+ t++;
+ }
+
+ if (!RtlCompareMemory("test", ptr, 4)) //bug
+ {
+ t--;
+ }
+
+ if (RtlCompareMemory("test", ptr, 4)) //bug
+ {
+ t--;
+ }
+
+ if (6 == RtlCompareMemory("test", ptr, 4)) //OK
+ {
+ t++;
+ }
+
+ if (0 == RtlCompareMemory("test", ptr, 4)) // potentially a bug (lower precision)
+ {
+ t++;
+ }
+
+ if (6 == RtlCompareMemory("test", ptr, 4) + 1) //OK
+ {
+ t++;
+ }
+
+ if (0 == RtlCompareMemory("test", ptr, 4) + 1) // OK
+ {
+ t++;
+ }
+
+ switch (RtlCompareMemory("test", ptr, 4))
+ {
+ case 1:
+ t--;
+ break;
+ default:
+ t++;
+ }
+
+ /// _Bool
+
+ x = RtlCompareMemory("test", ptr, 4); // bug
+
+ if (false == RtlCompareMemory("test", ptr, 4)) // bug
+ {
+ t++;
+ }
+
+ // BOOLEAN
+
+ y = RtlCompareMemory("test", ptr, 4); // bug
+
+ if (TRUE == RtlCompareMemory("test", ptr, 4)) // bug
+ {
+ t++;
+ }
+
+ return (t == 5) && RtlCompareMemory("test", ptr, 5); //bug
+}
diff --git a/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/test.cpp b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/test.cpp
new file mode 100644
index 000000000000..f876133c67aa
--- /dev/null
+++ b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/Drivers/test.cpp
@@ -0,0 +1,29 @@
+// semmle-extractor-options: --microsoft
+typedef unsigned __int64 size_t;
+
+size_t RtlCompareMemory(
+ const void* Source1,
+ const void* Source2,
+ size_t Length
+)
+{
+ return Length;
+}
+
+
+bool Test(const void* ptr)
+{
+ size_t t = RtlCompareMemory("test", ptr, 5); //OK
+
+ if (t > 0 && RtlCompareMemory("test", ptr, 5)) //bug
+ {
+ t++;
+ }
+
+ if (!RtlCompareMemory("test", ptr, 4)) //bug
+ {
+ t--;
+ }
+
+ return (t == 5) && RtlCompareMemory("test", ptr, 5); //bug
+}
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.expected b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.expected
new file mode 100644
index 000000000000..2099532f8f4a
--- /dev/null
+++ b/cpp/ql/test/query-tests/Microsoft/Likely Bugs/SizeOfMisuse/ArgumentIsSizeofOrOperation.expected
@@ -0,0 +1,48 @@
+| test2.c:86:6:86:29 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:86:6:86:29 | sizeof() | binary operator | test2.c:64:6:64:11 | Test01 | Usage | test2.c:86:13:86:28 | ... / ... | binary operator |
+| test2.c:86:6:86:29 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:86:6:86:29 | sizeof() | binary operator | test.c:64:6:64:11 | Test01 | Usage | test2.c:86:13:86:28 | ... / ... | binary operator |
+| test2.c:93:6:93:30 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:93:6:93:30 | sizeof() | binary operator | test2.c:64:6:64:11 | Test01 | Usage | test2.c:93:13:93:29 | ... * ... | binary operator |
+| test2.c:93:6:93:30 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:93:6:93:30 | sizeof() | binary operator | test.c:64:6:64:11 | Test01 | Usage | test2.c:93:13:93:29 | ... * ... | binary operator |
+| test2.c:95:6:95:35 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:95:6:95:35 | sizeof() | binary operator | test2.c:64:6:64:11 | Test01 | Usage | test2.c:95:13:95:34 | ... * ... | binary operator |
+| test2.c:95:6:95:35 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:95:6:95:35 | sizeof() | binary operator | test.c:64:6:64:11 | Test01 | Usage | test2.c:95:13:95:34 | ... * ... | binary operator |
+| test2.c:98:6:98:31 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:98:6:98:31 | sizeof() | sizeof | test2.c:64:6:64:11 | Test01 | Usage | test2.c:98:13:98:30 | sizeof(int) | sizeof |
+| test2.c:98:6:98:31 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:98:6:98:31 | sizeof() | sizeof | test.c:64:6:64:11 | Test01 | Usage | test2.c:98:13:98:30 | sizeof(int) | sizeof |
+| test2.c:116:6:116:24 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:116:6:116:24 | sizeof() | sizeof | test2.c:64:6:64:11 | Test01 | Usage | test2.c:116:13:116:23 | sizeof(int) | sizeof |
+| test2.c:116:6:116:24 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:116:6:116:24 | sizeof() | sizeof | test.c:64:6:64:11 | Test01 | Usage | test2.c:116:13:116:23 | sizeof(int) | sizeof |
+| test2.c:117:6:117:18 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:117:6:117:18 | sizeof() | binary operator | test2.c:64:6:64:11 | Test01 | Usage | test2.c:117:13:117:17 | ... + ... | binary operator |
+| test2.c:117:6:117:18 | sizeof() | $@: $@ of $@ inside sizeof. | test2.c:117:6:117:18 | sizeof() | binary operator | test.c:64:6:64:11 | Test01 | Usage | test2.c:117:13:117:17 | ... + ... | binary operator |
+| test2.cpp:89:6:89:29 | sizeof() | $@: $@ of $@ inside sizeof. | test2.cpp:89:6:89:29 | sizeof() | binary operator | test2.cpp:66:6:66:11 | Test01 | Usage | test2.cpp:89:13:89:28 | ... / ... | binary operator |
+| test2.cpp:89:6:89:29 | sizeof() | $@: $@ of $@ inside sizeof. | test2.cpp:89:6:89:29 | sizeof() | binary operator | test.cpp:66:6:66:11 | Test01 | Usage | test2.cpp:89:13:89:28 | ... / ... | binary operator |
+| test2.cpp:96:6:96:30 | sizeof() | $@: $@ of $@ inside sizeof. | test2.cpp:96:6:96:30 | sizeof() | binary operator | test2.cpp:66:6:66:11 | Test01 | Usage | test2.cpp:96:13:96:29 | ... * ... | binary operator |
+| test2.cpp:96:6:96:30 | sizeof() | $@: $@ of $@ inside sizeof. | test2.cpp:96:6:96:30 | sizeof() | binary operator | test.cpp:66:6:66:11 | Test01 | Usage | test2.cpp:96:13:96:29 | ... * ... | binary operator |
+| test2.cpp:98:6:98:35 | sizeof(