Skip to content

Commit

Permalink
C++: Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
calumgrant committed Nov 1, 2024
1 parent 8deed3e commit 8035a7c
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cpp/ql/src/Telemetry/Metrics.qll
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ module CppMetrics {
SucceededIncludeCount() {
exists(Include i |
i.getIncludeText() = include_text and
exists(i.getFile().getRelativePath()) // Only report includes from the repo
exists(i.getFile().getRelativePath()) // Only report includes from the repo
) and
this = "Successfully included " + include_text
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| functions without errors | 6.0 |
| lines of code | 19.0 |
| lines of code without errors | 12.0 |
| lines of text | 26.0 |
| lines of text | 24.0 |
| non-error expressions | 3.0 |
| source files | 3.0 |
| source files without errors | 2.0 |
Expand Down
16 changes: 8 additions & 8 deletions cpp/ql/test/library-tests/extraction_errors/PrintAst.expected
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ test.cpp:
#-----| ValueCategory = prvalue
# 17| getStmt(2): [ReturnStmt] return ...
test.h:
# 4| [TopLevelFunction] int f(int)
# 4| <params>:
# 4| getParameter(0): [Parameter] (unnamed parameter 0)
# 4| Type = [IntType] int
# 4| [TopLevelFunction] int f(int)
# 4| <params>:
# 4| getParameter(0): [Parameter] (unnamed parameter 0)
# 4| Type = [IntType] int
# 2| [TopLevelFunction] int f(int)
# 2| <params>:
# 2| getParameter(0): [Parameter] (unnamed parameter 0)
# 2| Type = [IntType] int
# 2| [TopLevelFunction] int f(int)
# 2| <params>:
# 2| getParameter(0): [Parameter] (unnamed parameter 0)
# 2| Type = [IntType] int
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/extraction_errors/diags.ql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import cpp

from Diagnostic d
select d
select d

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions cpp/ql/test/library-tests/extraction_errors/error_types.ql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
| test.c:4:13:4:13 | no_such_function |
| test.cpp:5:6:5:25 | function_with_errors |
| test.cpp:14:10:14:12 | fn2 |
| test.h:4:5:4:5 | f |
| test.h:4:5:4:5 | f |
| test.h:2:5:2:5 | f |
| test.h:2:5:2:5 | f |
2 changes: 1 addition & 1 deletion cpp/ql/test/library-tests/extraction_errors/functions.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import cpp

from Function fn
where fn.fromSource()
select fn
select fn
2 changes: 0 additions & 2 deletions cpp/ql/test/library-tests/extraction_errors/test.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

#define ADD(A,B) ((A)+(B))

int f(int);

0 comments on commit 8035a7c

Please sign in to comment.