mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #20831 from jketema/expanded
C++: Extract the expanded compiler arguments
This commit is contained in:
2450
cpp/downgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/old.dbscheme
Normal file
2450
cpp/downgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/old.dbscheme
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
|||||||
|
description: Support expanded compilation argument lists
|
||||||
|
compatibility: full
|
||||||
|
compilation_expanded_args.rel: delete
|
||||||
4
cpp/ql/lib/change-notes/2025-11-13-expanded.md
Normal file
4
cpp/ql/lib/change-notes/2025-11-13-expanded.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
category: feature
|
||||||
|
---
|
||||||
|
* New predicates `getAnExpandedArgument` and `getExpandedArgument` were added to the `Compilation` class, yielding compilation arguments after expansion of response files.
|
||||||
@@ -94,6 +94,21 @@ class Compilation extends @compilation {
|
|||||||
*/
|
*/
|
||||||
string getArgument(int i) { compilation_args(this, i, result) }
|
string getArgument(int i) { compilation_args(this, i, result) }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets an expanded argument passed to the extractor on this invocation.
|
||||||
|
*/
|
||||||
|
string getAnExpandedArgument() { result = this.getArgument(_) }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the `i`th expanded argument passed to the extractor on this
|
||||||
|
* invocation.
|
||||||
|
*
|
||||||
|
* This is similar to `getArgument`, but for a `@someFile` argument, it
|
||||||
|
* includes the arguments from that file, rather than just taking the
|
||||||
|
* argument literally.
|
||||||
|
*/
|
||||||
|
string getExpandedArgument(int i) { compilation_expanded_args(this, i, result) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the total amount of CPU time spent processing all the files in the
|
* Gets the total amount of CPU time spent processing all the files in the
|
||||||
* front-end and extractor.
|
* front-end and extractor.
|
||||||
|
|||||||
@@ -47,6 +47,19 @@ compilation_args(
|
|||||||
string arg : string ref
|
string arg : string ref
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The expanded arguments that were passed to the extractor for a
|
||||||
|
* compiler invocation. This is similar to `compilation_args`, but
|
||||||
|
* for a `@someFile` argument, it includes the arguments from that
|
||||||
|
* file, rather than just taking the argument literally.
|
||||||
|
*/
|
||||||
|
#keyset[id, num]
|
||||||
|
compilation_expanded_args(
|
||||||
|
int id : @compilation ref,
|
||||||
|
int num : int ref,
|
||||||
|
string arg : string ref
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optionally, record the build mode for each compilation.
|
* Optionally, record the build mode for each compilation.
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
|||||||
|
description: Support expanded compilation argument lists
|
||||||
|
compatibility: backwards
|
||||||
Reference in New Issue
Block a user