[cfe-commits] r124748 - in /cfe/trunk/test: CodeGenCXX/non-empty-class-size-zero.cpp SemaCXX/non-empty-class-size-zero.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Feb 2 13:10:07 PST 2011
Author: fjahanian
Date: Wed Feb 2 15:10:07 2011
New Revision: 124748
URL: http://llvm.org/viewvc/llvm-project?rev=124748&view=rev
Log:
Turn test for // rdar://8945175 into a sema test.
Added:
cfe/trunk/test/SemaCXX/non-empty-class-size-zero.cpp
- copied, changed from r124741, cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp
Removed:
cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp
Removed: cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp?rev=124747&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
-// rdar://8945175
-
-struct X {
- int array[0];
- int array1[0];
- int array2[0];
- X();
- ~X();
-};
-
-struct Y {
- int first;
- X padding;
- int second;
-};
-
-int main() {
-// CHECK: store i32 0, i32* [[RETVAL:%.*]]
- return sizeof(Y) -8 ;
-}
Copied: cfe/trunk/test/SemaCXX/non-empty-class-size-zero.cpp (from r124741, cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/non-empty-class-size-zero.cpp?p2=cfe/trunk/test/SemaCXX/non-empty-class-size-zero.cpp&p1=cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp&r1=124741&r2=124748&rev=124748&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/non-empty-class-size-zero.cpp (original)
+++ cfe/trunk/test/SemaCXX/non-empty-class-size-zero.cpp Wed Feb 2 15:10:07 2011
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
// rdar://8945175
struct X {
@@ -15,7 +15,4 @@
int second;
};
-int main() {
-// CHECK: store i32 0, i32* [[RETVAL:%.*]]
- return sizeof(Y) -8 ;
-}
+int zero_size_array[(sizeof(Y) == 8) -1]; // no error here!
More information about the cfe-commits
mailing list