mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Minor edits
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import cpp
|
||||
|
||||
from Diagnostic d
|
||||
select d
|
||||
select d
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
| test.cpp:14:10:14:12 | fn2 |
|
||||
@@ -1,5 +0,0 @@
|
||||
import cpp
|
||||
|
||||
from Function fn
|
||||
where fn.getType() instanceof ErroneousType or not exists(fn.getType())
|
||||
select fn
|
||||
@@ -1 +0,0 @@
|
||||
| test.cpp:6:13:6:31 | <error expr> |
|
||||
@@ -1,6 +0,0 @@
|
||||
import cpp
|
||||
|
||||
from Expr e
|
||||
where e.getType() instanceof ErroneousType
|
||||
and e.fromSource()
|
||||
select e
|
||||
@@ -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,4 +2,4 @@ import cpp
|
||||
|
||||
from Function fn
|
||||
where fn.fromSource()
|
||||
select fn
|
||||
select fn
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
|
||||
#define ADD(A,B) ((A)+(B))
|
||||
|
||||
int f(int);
|
||||
|
||||
Reference in New Issue
Block a user