From 155e21e72991a6808799f496b4ae0eabf86fae9b Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 12 Feb 2026 14:50:29 +0000 Subject: [PATCH] C++ overlays: Tweak dbscheme --- cpp/ql/lib/semmlecode.cpp.dbscheme | 36 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 7e7c2f55670..770002bb023 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -245,6 +245,25 @@ trap_filename( string filename: string ref ); +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + /** * In `build-mode: none` overlay mode, indicates that `source_file` * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the @@ -252,16 +271,25 @@ trap_filename( * includes, or a template instantiation it transitively uses. */ source_file_uses_trap( - string source_file: string ref, + int source_file: @source_file ref, int trap_file: @trap ref ); /** - * Holds if there is a definition of `element` in TRAP file `trap_file`. + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. */ -in_trap( +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( int element: @element ref, - int trap_file: @trap ref + int t: @trap_or_tag ref ); pch_uses(