-
-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 22623 - ImportC: typedef'd struct definition tag not put in…
… symbol table
- Loading branch information
1 parent
a6e6708
commit ef8c229
Showing
4 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// https://issues.dlang.org/show_bug.cgi?id=22623 | ||
|
||
struct S { | ||
struct T *child; | ||
}; | ||
|
||
typedef | ||
struct T { | ||
int xyz; | ||
} U; | ||
|
||
void fn() | ||
{ | ||
struct S s; | ||
struct T t; | ||
if (s.child != &t) | ||
; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// check importAll analysis of C files | ||
/* TEST_OUTPUT: | ||
--- | ||
fail_compilation/failcstuff3.c(100): Error: can only `*` a pointer, not a `int` | ||
fail_compilation/failcstuff3.c(157): Error: variable `failcstuff3.T22106.f1` no definition of struct `S22106_t` | ||
--- | ||
*/ | ||
|
||
/***************************************************/ | ||
// https://issues.dlang.org/show_bug.cgi?id=22103 | ||
#line 100 | ||
int test22103(int array[*4]); | ||
|
||
/***************************************************/ | ||
// https://issues.dlang.org/show_bug.cgi?id=22106 | ||
#line 150 | ||
typedef struct S22106 | ||
{ | ||
int field; | ||
} S22106_t; | ||
|
||
struct T22106 | ||
{ | ||
struct S22106_t f1; | ||
}; |