Skip to content

Commit

Permalink
Revert "Revert "C++: Implement compilation_build_mode""
Browse files Browse the repository at this point in the history
  • Loading branch information
calumgrant authored Nov 22, 2024
1 parent 86c25d0 commit fcf1684
Show file tree
Hide file tree
Showing 9 changed files with 10,697 additions and 1,286 deletions.
2,339 changes: 2,339 additions & 0 deletions cpp/downgrades/f0156f5f88ab5967c79162012c20f30600ca5ebf/old.dbscheme

Large diffs are not rendered by default.

2,323 changes: 2,323 additions & 0 deletions cpp/downgrades/f0156f5f88ab5967c79162012c20f30600ca5ebf/semmlecode.cpp.dbscheme

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: Implement compilation_build_mode/2
compatibility: full
compilation_build_mode.rel: delete
3 changes: 3 additions & 0 deletions cpp/ql/lib/semmle/code/cpp/Compilation.qll
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ class Compilation extends @compilation {
* termination, but crashing due to something like a segfault is not.
*/
predicate normalTermination() { compilation_finished(this, _, _) }

/** Holds if this compilation was compiled using the "none" build mode. */
predicate buildModeNone() { compilation_build_mode(this, 0) }
}
16 changes: 16 additions & 0 deletions cpp/ql/lib/semmlecode.cpp.dbscheme
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ compilation_args(
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
Expand Down
Loading

0 comments on commit fcf1684

Please sign in to comment.