From c5f6820b5da175ba6086449d4cacffd433eb3c4d Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 5 Feb 2026 16:05:15 +0000 Subject: [PATCH] C++ overlay: Add trap_filename, source_file_uses_trap, in_trap --- cpp/ql/lib/semmlecode.cpp.dbscheme | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 9439176c1d1..7e7c2f55670 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -236,6 +236,34 @@ extractor_version( string frontend_version: string ref ) +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: 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 + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + string source_file: string ref, + int trap_file: @trap ref +); + +/** + * Holds if there is a definition of `element` in TRAP file `trap_file`. + */ +in_trap( + int element: @element ref, + int trap_file: @trap ref +); + pch_uses( int pch: @pch ref, int compilation: @compilation ref,