forked from OSchip/llvm-project
Add a test to cover structural match for recursive data types
This didn't use to work prior to r370639, now that this is supported add a testcase to prevent regressions. rdar://problem/53602368
This commit is contained in:
parent
a4c76be506
commit
3466cebe94
|
@ -0,0 +1,2 @@
|
|||
// rec-types/a.h
|
||||
#include "b.h"
|
|
@ -0,0 +1,2 @@
|
|||
// rec-types/b.h
|
||||
#include "c.h"
|
|
@ -0,0 +1,7 @@
|
|||
struct some_descriptor
|
||||
{
|
||||
// commenting line above make this struct work
|
||||
void *(*thunk)(struct some_descriptor *);
|
||||
unsigned long key;
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
module a {
|
||||
header "a.h"
|
||||
// Hide content by not re-exporting module b.
|
||||
}
|
||||
|
||||
module b {
|
||||
header "b.h"
|
||||
export *
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/rec-types -fsyntax-only %s -verify
|
||||
#include "a.h"
|
||||
#include "c.h"
|
||||
void foo(struct some_descriptor *st) { (void)st->thunk; }
|
||||
|
||||
// expected-no-diagnostics
|
Loading…
Reference in New Issue