C++: Test fun_decl for INVALID_KEYs

This commit is contained in:
Matthew Gretton-Dann
2019-10-14 16:20:44 +01:00
parent 0f6d64e27e
commit 692c29d095
5 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#include "fwd.h"
void func1()
{
classA *a = create_an_a();
}

View File

@@ -0,0 +1,15 @@
#include "fwd.h"
class classA {
public:
~classA() { }
};
classA *create_an_a() {
return new classA;
}
void func2()
{
classA *a = create_an_a();
}

View File

@@ -0,0 +1,3 @@
class classA;
classA *create_an_a(); // permits creation of a classA while it is an incomplete type.
typedef classA classA_typedef;

View File

@@ -0,0 +1,8 @@
| compile1.cpp:3:6:3:10 | func1 |
| compile2.cpp:3:7:3:7 | operator= |
| compile2.cpp:5:2:5:8 | ~classA |
| compile2.cpp:8:9:8:19 | create_an_a |
| compile2.cpp:12:6:12:10 | func2 |
| file://:0:0:0:0 | operator new |
| file://:0:0:0:0 | operator= |
| file://:0:0:0:0 | operator= |

View File

@@ -0,0 +1,4 @@
import cpp
from Function f
select f