[cfe-commits] r38882 - in /cfe/cfe/trunk/test/Parser: expressions.c statements.c

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:25:27 PDT 2007


Author: sabre
Date: Wed Jul 11 11:25:27 2007
New Revision: 38882

URL: http://llvm.org/viewvc/llvm-project?rev=38882&view=rev
Log:
Split the expression tests out of statements.c into expressions.c

Added:
    cfe/cfe/trunk/test/Parser/expressions.c   (with props)
Modified:
    cfe/cfe/trunk/test/Parser/statements.c

Added: cfe/cfe/trunk/test/Parser/expressions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Parser/expressions.c?rev=38882&view=auto

==============================================================================
--- cfe/cfe/trunk/test/Parser/expressions.c (added)
+++ cfe/cfe/trunk/test/Parser/expressions.c Wed Jul 11 11:25:27 2007
@@ -0,0 +1,21 @@
+// RUN: clang -fsyntax-only %s
+
+void test1() {
+  if (sizeof (int){ 1});   // sizeof compound literal
+  if (sizeof (int));       // sizeof type
+
+  (int)4;   // cast.
+  (int){4}; // compound literal.
+
+  // FIXME: change this to the struct version when we can.
+  //int A = (struct{ int a;}){ 1}.a;
+  int A = (int){ 1}.a;
+}
+
+int test2(int a, int b) {
+  return a ? a,b : a;
+}
+
+int test3(int a, int b) {
+  return a = b = c;
+}

Propchange: cfe/cfe/trunk/test/Parser/expressions.c

------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/cfe/trunk/test/Parser/expressions.c

------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: cfe/cfe/trunk/test/Parser/statements.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Parser/statements.c?rev=38882&r1=38881&r2=38882&view=diff

==============================================================================
--- cfe/cfe/trunk/test/Parser/statements.c (original)
+++ cfe/cfe/trunk/test/Parser/statements.c Wed Jul 11 11:25:27 2007
@@ -47,22 +47,3 @@
   if (0);
 }
 
-void test6() {
-  if (sizeof (int){ 1});   // sizeof compound literal
-  if (sizeof (int));       // sizeof type
-
-  (int)4;   // cast.
-  (int){4}; // compound literal.
-
-  // FIXME: change this to the struct version when we can.
-  //int A = (struct{ int a;}){ 1}.a;
-  int A = (int){ 1}.a;
-}
-
-int test7(int a, int b) {
-  return a ? a,b : a;
-}
-
-int test8(int a, int b) {
-  return a = b = c;
-}





More information about the cfe-commits mailing list