[cfe-commits] r69052 - in /cfe/trunk/test/PCH: struct.c struct.h

Douglas Gregor dgregor at apple.com
Tue Apr 14 10:10:28 PDT 2009


Author: dgregor
Date: Tue Apr 14 12:10:28 2009
New Revision: 69052

URL: http://llvm.org/viewvc/llvm-project?rev=69052&view=rev
Log:
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

Modified:
    cfe/trunk/test/PCH/struct.c
    cfe/trunk/test/PCH/struct.h

Modified: cfe/trunk/test/PCH/struct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/struct.c?rev=69052&r1=69051&r2=69052&view=diff

==============================================================================
--- cfe/trunk/test/PCH/struct.c (original)
+++ cfe/trunk/test/PCH/struct.c Tue Apr 14 12:10:28 2009
@@ -22,3 +22,13 @@
 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 }; */

Modified: cfe/trunk/test/PCH/struct.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/struct.h?rev=69052&r1=69051&r2=69052&view=diff

==============================================================================
--- cfe/trunk/test/PCH/struct.h (original)
+++ cfe/trunk/test/PCH/struct.h Tue Apr 14 12:10:28 2009
@@ -23,3 +23,7 @@
 
 struct Fun2;
 struct Fun2 *fun2;
+
+struct S {
+  struct Nested { int x, y; } nest;
+};





More information about the cfe-commits mailing list