[cfe-commits] r126104 - in /cfe/trunk/test/CodeGenCXX: conditional-gnu-ext.cpp gnu-conditional-scalar-ext.cpp
John McCall
rjmccall at apple.com
Sun Feb 20 18:28:50 PST 2011
Author: rjmccall
Date: Sun Feb 20 20:28:50 2011
New Revision: 126104
URL: http://llvm.org/viewvc/llvm-project?rev=126104&view=rev
Log:
Rename test/CodeGenCXX/gnu-conditional-scalar-ext.cpp to conditional-gnu-ext.cpp
for consistency with other tests (and to remove "scalar" from the name).
Added:
cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp
Removed:
cfe/trunk/test/CodeGenCXX/gnu-conditional-scalar-ext.cpp
Added: cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp?rev=126104&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp Sun Feb 20 20:28:50 2011
@@ -0,0 +1,62 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+// rdar: // 8353567
+// pr7726
+
+extern "C" int printf(...);
+
+void test0() {
+// CHECK: call i32 (...)* @printf({{.*}}, i8* inttoptr (i64 3735928559 to i8*))
+ printf("%p\n", (void *)0xdeadbeef ? : (void *)0xaaaaaa);
+}
+
+// rdar://8446940
+namespace radar8446940 {
+extern "C" void abort();
+
+int main () {
+ char x[1];
+ char *y = x ? : 0;
+
+ if (x != y)
+ abort();
+}
+}
+
+namespace radar8453812 {
+extern "C" void abort();
+_Complex int getComplex(_Complex int val) {
+ static int count;
+ if (count++)
+ abort();
+ return val;
+}
+
+_Complex int cmplx() {
+ _Complex int cond;
+ _Complex int rhs;
+
+ return getComplex(1+2i) ? : rhs;
+}
+
+// lvalue test
+void foo (int& lv) {
+ ++lv;
+}
+
+int global = 1;
+
+int &cond() {
+ static int count;
+ if (count++)
+ abort();
+ return global;
+}
+
+
+int main() {
+ cmplx();
+ int rhs = 10;
+ foo (cond()? : rhs);
+ return global-2;
+}
+}
Removed: cfe/trunk/test/CodeGenCXX/gnu-conditional-scalar-ext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/gnu-conditional-scalar-ext.cpp?rev=126103&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/gnu-conditional-scalar-ext.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/gnu-conditional-scalar-ext.cpp (removed)
@@ -1,62 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
-// rdar: // 8353567
-// pr7726
-
-extern "C" int printf(...);
-
-void test0() {
-// CHECK: call i32 (...)* @printf({{.*}}, i8* inttoptr (i64 3735928559 to i8*))
- printf("%p\n", (void *)0xdeadbeef ? : (void *)0xaaaaaa);
-}
-
-// rdar://8446940
-namespace radar8446940 {
-extern "C" void abort();
-
-int main () {
- char x[1];
- char *y = x ? : 0;
-
- if (x != y)
- abort();
-}
-}
-
-namespace radar8453812 {
-extern "C" void abort();
-_Complex int getComplex(_Complex int val) {
- static int count;
- if (count++)
- abort();
- return val;
-}
-
-_Complex int cmplx() {
- _Complex int cond;
- _Complex int rhs;
-
- return getComplex(1+2i) ? : rhs;
-}
-
-// lvalue test
-void foo (int& lv) {
- ++lv;
-}
-
-int global = 1;
-
-int &cond() {
- static int count;
- if (count++)
- abort();
- return global;
-}
-
-
-int main() {
- cmplx();
- int rhs = 10;
- foo (cond()? : rhs);
- return global-2;
-}
-}
More information about the cfe-commits
mailing list