diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-07-17 15:40:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-07-17 15:40:56 +0000 |
commit | 180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (patch) | |
tree | 2097d084eb235c0b12c0bff3445f4ec7bbaa8a12 /test/CodeGenCXX/init-incomplete-type.cpp | |
parent | 29cafa66ad3878dbb9f82615f19fa0bded2e443c (diff) |
Vendor import of clang trunk r135360:vendor/clang/clang-r135360
Notes
Notes:
svn path=/vendor/clang/dist/; revision=224135
svn path=/vendor/clang/clang-r135360/; revision=224136; tag=vendor/clang/clang-r135360
Diffstat (limited to 'test/CodeGenCXX/init-incomplete-type.cpp')
-rw-r--r-- | test/CodeGenCXX/init-incomplete-type.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/init-incomplete-type.cpp b/test/CodeGenCXX/init-incomplete-type.cpp index 3312d3e04b71..1755dfb7beb1 100644 --- a/test/CodeGenCXX/init-incomplete-type.cpp +++ b/test/CodeGenCXX/init-incomplete-type.cpp @@ -10,3 +10,22 @@ static struct Bar<int> bar[1] = { { 0 } }; + + +namespace incomplete_type_refs { + struct A; + extern A g[]; + void foo(A*); + void f(void) { + foo(g); // Reference to array with unknown element type. + } + + struct A { // define the element type. + int a,b,c; + }; + + A *f2() { + return &g[1]; + } + +}
\ No newline at end of file |