Skip to content

Commit 365d71c

Browse files
committed
C++: Expose the expanded compilation arguments
1 parent 4a0eae6 commit 365d71c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cpp/ql/lib/semmle/code/cpp/Compilation.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ class Compilation extends @compilation {
9494
*/
9595
string getArgument(int i) { compilation_args(this, i, result) }
9696

97+
/**
98+
* Gets an expanded argument passed to the extractor on this invocation.
99+
*/
100+
string getAnExpandedArgument() { result = this.getArgument(_) }
101+
102+
/**
103+
* The expanded arguments that were passed to the extractor for a
104+
* compiler invocation. This is similar to `getArgument`, but
105+
* for a `@someFile` argument, it includes the arguments from that
106+
* file, rather than just taking the argument literally.
107+
*/
108+
string getExpandedArgument(int i) { compilation_expanded_args(this, i, result) }
109+
97110
/**
98111
* Gets the total amount of CPU time spent processing all the files in the
99112
* front-end and extractor.

0 commit comments

Comments
 (0)