Merge pull request #2934 from geoffw0/add_tests

C++: Test and typos.
This commit is contained in:
Robert Marsh
2020-02-28 15:12:32 -08:00
committed by GitHub
10 changed files with 30 additions and 19 deletions

View File

@@ -27,3 +27,5 @@
| declarationEntry.cpp:31:4:31:19 | myMemberVariable | declarationEntry.cpp:31:4:31:19 | definition of myMemberVariable | 1 | 1 |
| declarationEntry.cpp:34:22:34:28 | mtc_int | declarationEntry.cpp:34:22:34:28 | definition of mtc_int | 1 | 1 |
| declarationEntry.cpp:35:24:35:32 | mtc_short | declarationEntry.cpp:35:24:35:32 | definition of mtc_short | 1 | 1 |
| macro.c:2:1:2:3 | foo | macro.c:2:1:2:3 | declaration of foo | 1 | 1 |
| macro.c:4:5:4:8 | main | macro.c:4:5:4:8 | definition of main | 1 | 1 |

View File

@@ -1,12 +1,14 @@
| declarationEntry.c:2:6:2:20 | declaration of myFirstFunction | |
| declarationEntry.c:4:6:4:21 | definition of mySecondFunction | |
| declarationEntry.c:8:6:8:20 | definition of myThirdFunction | |
| declarationEntry.c:13:2:13:2 | declaration of myFourthFunction | isImplicit |
| declarationEntry.c:14:2:14:2 | declaration of myFifthFunction | isImplicit |
| declarationEntry.c:17:6:17:21 | declaration of myFourthFunction | |
| declarationEntry.cpp:9:6:9:15 | declaration of myFunction | |
| declarationEntry.cpp:11:6:11:15 | definition of myFunction | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | |
| declarationEntry.c:2:6:2:20 | declaration of myFirstFunction | | 1 | c_linkage |
| declarationEntry.c:4:6:4:21 | definition of mySecondFunction | | 1 | c_linkage |
| declarationEntry.c:8:6:8:20 | definition of myThirdFunction | | 1 | c_linkage |
| declarationEntry.c:13:2:13:2 | declaration of myFourthFunction | isImplicit | 1 | c_linkage |
| declarationEntry.c:14:2:14:2 | declaration of myFifthFunction | isImplicit | 1 | c_linkage |
| declarationEntry.c:17:6:17:21 | declaration of myFourthFunction | | 1 | c_linkage |
| declarationEntry.cpp:9:6:9:15 | declaration of myFunction | | 0 | |
| declarationEntry.cpp:11:6:11:15 | definition of myFunction | | 0 | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
| macro.c:2:1:2:3 | declaration of foo | | 2 | c_linkage, static |
| macro.c:4:5:4:8 | definition of main | | 1 | c_linkage |

View File

@@ -2,4 +2,4 @@ import cpp
from FunctionDeclarationEntry fde, string imp
where if fde.isImplicit() then imp = "isImplicit" else imp = ""
select fde, imp
select fde, imp, count(fde.getASpecifier()), concat(fde.getASpecifier().toString(), ", ")

View File

@@ -0,0 +1,7 @@
#define Foo static void foo()
Foo;
int main()
{
return 0;
}