Skip to content

Commit 692c29d

Browse files
author
Matthew Gretton-Dann
committed
C++: Test fun_decl for INVALID_KEYs
1 parent 0f6d64e commit 692c29d

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "fwd.h"
2+
3+
void func1()
4+
{
5+
classA *a = create_an_a();
6+
}
7+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "fwd.h"
2+
3+
class classA {
4+
public:
5+
~classA() { }
6+
};
7+
8+
classA *create_an_a() {
9+
return new classA;
10+
}
11+
12+
void func2()
13+
{
14+
classA *a = create_an_a();
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class classA;
2+
classA *create_an_a(); // permits creation of a classA while it is an incomplete type.
3+
typedef classA classA_typedef;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
| compile1.cpp:3:6:3:10 | func1 |
2+
| compile2.cpp:3:7:3:7 | operator= |
3+
| compile2.cpp:5:2:5:8 | ~classA |
4+
| compile2.cpp:8:9:8:19 | create_an_a |
5+
| compile2.cpp:12:6:12:10 | func2 |
6+
| file://:0:0:0:0 | operator new |
7+
| file://:0:0:0:0 | operator= |
8+
| file://:0:0:0:0 | operator= |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import cpp
2+
3+
from Function f
4+
select f

0 commit comments

Comments
 (0)