Merge pull request #12646 from igfoo/igfoo/expanded_args

Java: Store expanded args in the database
This commit is contained in:
Ian Lynagh
2023-03-31 15:27:02 +01:00
committed by GitHub
11 changed files with 6863 additions and 1457 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Remove compilation_expanded_args
compatibility: full
compilation_expanded_args.rel: delete

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* Predicates `Compilation.getExpandedArgument` and `Compilation.getAnExpandedArgument` has been added.

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The filenames embedded in `Compilation.toString()` now use `/` as the path separator on all platforms.

View File

@@ -60,6 +60,19 @@ compilation_args(
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
);
/**
* The source files that are compiled by a compiler invocation.
* If `id` is for the compiler invocation

File diff suppressed because it is too large Load Diff

View File

@@ -83,6 +83,16 @@ class Compilation extends @compilation {
*/
string getArgument(int i) { compilation_args(this, i, result) }
/**
* Gets an expanded argument passed to the extractor on this invocation.
*/
string getAnExpandedArgument() { result = getExpandedArgument(_) }
/**
* Gets the `i`th expanded argument passed to the extractor on this invocation.
*/
string getExpandedArgument(int i) { compilation_expanded_args(this, i, result) }
/**
* Gets the total amount of CPU time spent processing all the files in the
* compiler.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Add compilation_expanded_args
compatibility: backwards