diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-04-14 17:10:28 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-04-14 17:10:28 +0000 |
| commit | db908332e33e385b539ddee5ddbc44127e2b5570 (patch) | |
| tree | 2a982799bbf6aed47f2515c535fdb7ea84877299 /clang | |
| parent | 4225e23e622b3fcf50ce1734eca7f31ba7988b3e (diff) | |
| download | bcm5719-llvm-db908332e33e385b539ddee5ddbc44127e2b5570.tar.gz bcm5719-llvm-db908332e33e385b539ddee5ddbc44127e2b5570.zip | |
Add a tricky, tricky test case for PCH that we currently don't handle. Committed with a FIXME so that we don't forget it
llvm-svn: 69052
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/PCH/struct.c | 10 | ||||
| -rw-r--r-- | clang/test/PCH/struct.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/PCH/struct.c b/clang/test/PCH/struct.c index c81ec469c58..220f0794656 100644 --- a/clang/test/PCH/struct.c +++ b/clang/test/PCH/struct.c @@ -22,3 +22,13 @@ struct Fun2 { int get_very_fun() { return fun2->very_fun; } + +/* FIXME: DeclContexts aren't yet able to find "struct Nested" nested + within "struct S", so causing the following to fail. When not using + PCH, this works because Sema puts the nested struct onto the + declaration chain for its identifier, where C/Objective-C always + look. To fix the problem, we either need to give DeclContexts a way + to keep track of declarations that are visible without having to + build a full lookup table, or we need PCH files to read the + declaration chains. */ +/* struct Nested nested = { 1, 2 }; */ diff --git a/clang/test/PCH/struct.h b/clang/test/PCH/struct.h index e3d85abaaeb..6c256221fa0 100644 --- a/clang/test/PCH/struct.h +++ b/clang/test/PCH/struct.h @@ -23,3 +23,7 @@ struct Fun { struct Fun2; struct Fun2 *fun2; + +struct S { + struct Nested { int x, y; } nest; +}; |

