[cfe-commits] r138113 - /cfe/trunk/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp

Eric Christopher echristo at apple.com
Fri Aug 19 15:16:28 PDT 2011


Author: echristo
Date: Fri Aug 19 17:16:28 2011
New Revision: 138113

URL: http://llvm.org/viewvc/llvm-project?rev=138113&view=rev
Log:
Migrate 2008-05-07-CrazyOffsetOf.cpp from llvm/test/FrontendC++.

Added:
    cfe/trunk/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp

Added: cfe/trunk/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp?rev=138113&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp Fri Aug 19 17:16:28 2011
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+// rdar://5914926
+
+struct bork {
+  struct bork *next_local;
+  char * query;
+};
+int offset =  (char *) &(((struct bork *) 0x10)->query) - (char *) 0x10;





More information about the cfe-commits mailing list