]> granicus.if.org Git - clang/commitdiff
Add a tricky, tricky test case for PCH that we currently don't handle. Committed...
authorDouglas Gregor <dgregor@apple.com>
Tue, 14 Apr 2009 17:10:28 +0000 (17:10 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 14 Apr 2009 17:10:28 +0000 (17:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69052 91177308-0d34-0410-b5e6-96231b3b80d8

test/PCH/struct.c
test/PCH/struct.h

index c81ec469c58785ca7ec7990c89e49c8215a7f15b..220f0794656a6b6d7c6a7d845f8dbb27ea1cf5ff 100644 (file)
@@ -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 }; */
index e3d85abaaeb5150c2995e8e6375a5f1a1862fd1d..6c256221fa03431c738027f6df779ec6f8ccd82d 100644 (file)
@@ -23,3 +23,7 @@ struct Fun {
 
 struct Fun2;
 struct Fun2 *fun2;
+
+struct S {
+  struct Nested { int x, y; } nest;
+};