Skip to content

Commit 2341c65

Browse files
committed
C++: Add FailedExtractions.ql
1 parent 0edae89 commit 2341c65

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* @kind diagnostic
3+
* @id cpp/diagnostics/failed-extractions
4+
*/
5+
import cpp
6+
7+
class AnonymousCompilation extends Compilation {
8+
override string toString() {
9+
result = "<compilation>"
10+
}
11+
}
12+
13+
string describe(Compilation c) {
14+
if c.getArgument(1) = "--mimic"
15+
then result = "compiler invocation " + concat(int i | i > 1 | c.getArgument(i), " " order by i)
16+
else result = "extractor invocation " + concat(int i | | c.getArgument(i), " " order by i)
17+
}
18+
19+
from Compilation c
20+
where not c.normalTermination()
21+
select c, "Extraction failed for " + describe(c), 2
22+

0 commit comments

Comments
 (0)