[cfe-commits] r44553 - in /cfe/trunk: Driver/RewriteTest.cpp test/Sema/undef-field-reference-1.m
Fariborz Jahanian
fjahanian at apple.com
Mon Dec 3 14:25:42 PST 2007
Author: fjahanian
Date: Mon Dec 3 16:25:42 2007
New Revision: 44553
URL: http://llvm.org/viewvc/llvm-project?rev=44553&view=rev
Log:
Fixed a bug exposed by referencing an ivar field using component reference syntax.
Added:
cfe/trunk/test/Sema/undef-field-reference-1.m
Modified:
cfe/trunk/Driver/RewriteTest.cpp
Modified: cfe/trunk/Driver/RewriteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteTest.cpp?rev=44553&r1=44552&r2=44553&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteTest.cpp (original)
+++ cfe/trunk/Driver/RewriteTest.cpp Mon Dec 3 16:25:42 2007
@@ -593,7 +593,9 @@
ResultStr += "#define _REWRITER_typedef_";
ResultStr += ClassDecl->getName();
ResultStr += "\n";
- ResultStr += "typedef struct objc_object ";
+ ResultStr += "typedef struct ";
+ ResultStr += ClassDecl->getName();
+ ResultStr += " ";
ResultStr += ClassDecl->getName();
ResultStr += ";\n#endif\n";
Added: cfe/trunk/test/Sema/undef-field-reference-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/undef-field-reference-1.m?rev=44553&view=auto
==============================================================================
--- cfe/trunk/test/Sema/undef-field-reference-1.m (added)
+++ cfe/trunk/test/Sema/undef-field-reference-1.m Mon Dec 3 16:25:42 2007
@@ -0,0 +1,17 @@
+// RUN: clang -rewrite-test %s | clang
+
+#include <objc/objc.h>
+
+ at interface MyDerived
+{
+ at public
+ int IVAR;
+}
+ at end
+
+MyDerived *pd;
+int main() {
+ return pd->IVAR;
+}
+
+
More information about the cfe-commits
mailing list