C++: Support C23/C++26 #embed preprocessor directives#21195
Merged
jketema merged 4 commits intogithub:mainfrom Jan 20, 2026
Merged
C++: Support C23/C++26 #embed preprocessor directives#21195jketema merged 4 commits intogithub:mainfrom
#embed preprocessor directives#21195jketema merged 4 commits intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds support for C23 and C++26 #embed preprocessor directives to the CodeQL C/C++ library.
Changes:
- Added a new preprocessor directive kind
@ppd_embed(kind 17) to the database schema - Introduced a new
embedsrelation to track embedded files - Created the
Embedclass in the preprocessor library to represent#embeddirectives - Provided upgrade and downgrade scripts to handle schema migration
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
cpp/ql/lib/semmlecode.cpp.dbscheme |
Added @ppd_embed kind and embeds table to the schema |
cpp/ql/lib/semmle/code/cpp/Preprocessor.qll |
Implemented Embed class with documentation and methods |
cpp/ql/lib/change-notes/2026-01-19-embed.md |
Added change note documenting the new feature |
cpp/ql/lib/upgrades/83100310bf73eefc37c1d8d0ac98b2ca3019c7b6/* |
Upgrade scripts for the schema change |
cpp/downgrades/9439176c1d1312787926458dd54d65a849069118/* |
Downgrade scripts to revert the schema change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
tausbn
approved these changes
Jan 20, 2026
Contributor
tausbn
left a comment
There was a problem hiding this comment.
Looks reasonable to me. 👍
I did not inspect the stats changes in detail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.