Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109392 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Coverage/parse-callbacks.c b/test/Coverage/parse-callbacks.c
deleted file mode 100644
index 02f3a83..0000000
--- a/test/Coverage/parse-callbacks.c
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -parse-noop %s
-// RUN: %clang_cc1 -parse-print-callbacks %s
-
-#include "c-language-features.inc"
diff --git a/test/Coverage/parse-callbacks.m b/test/Coverage/parse-callbacks.m
deleted file mode 100644
index f023d3d..0000000
--- a/test/Coverage/parse-callbacks.m
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -parse-noop %s
-// RUN: %clang_cc1 -parse-print-callbacks %s
-
-#include "objc-language-features.inc"
diff --git a/test/Parser/2008-10-31-parse-noop-failure.c b/test/Parser/2008-10-31-parse-noop-failure.c
deleted file mode 100755
index 6df508e..0000000
--- a/test/Parser/2008-10-31-parse-noop-failure.c
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -verify -parse-noop %s
-
-void add_attribute(id) int id; {}
-
diff --git a/test/Parser/block-block-storageclass.c b/test/Parser/block-block-storageclass.c
index a4efc44..97ba113 100644
--- a/test/Parser/block-block-storageclass.c
+++ b/test/Parser/block-block-storageclass.c
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -parse-noop %s
-#if 0
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
 int printf(const char *, ...);
 void _Block_byref_release(void*src){}
 
@@ -16,4 +15,3 @@
 
    return X;
 }
-#endif
diff --git a/test/Parser/block-pointer-decl.c b/test/Parser/block-pointer-decl.c
index 2979b01..a8cc258 100644
--- a/test/Parser/block-pointer-decl.c
+++ b/test/Parser/block-pointer-decl.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -parse-noop -fblocks %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
+
+int printf(char const *, ...);
 
 struct blockStruct {
   int (^a)(float, int);
diff --git a/test/Parser/cxx-condition.cpp b/test/Parser/cxx-condition.cpp
index a3991c4..552d823 100644
--- a/test/Parser/cxx-condition.cpp
+++ b/test/Parser/cxx-condition.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -parse-noop -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 void f() {
   int a;
   while (a) ;
   while (int x) ; // expected-error {{expected '=' after declarator}}
   while (float x = 0) ;
-  if (const int x = a) ;
+  if (const int x = a) ; // expected-warning{{empty body}}
   switch (int x = a+10) {}
   for (; int x = ++a; ) ;
 }
diff --git a/test/Parser/cxx-namespace-alias.cpp b/test/Parser/cxx-namespace-alias.cpp
index 2e4d7af..9b90aab 100644
--- a/test/Parser/cxx-namespace-alias.cpp
+++ b/test/Parser/cxx-namespace-alias.cpp
@@ -1,8 +1,9 @@
-// RUN: %clang_cc1 -parse-noop -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
-namespace A = B;
+namespace A = B; // expected-error{{namespace name}}
 
 namespace A = !; // expected-error {{expected namespace name}}
-namespace A = A::!; // expected-error {{expected namespace name}}
+namespace A = A::!; // expected-error {{expected namespace name}} \
+                    // expected-error{{use of undeclared identifier 'A'}}
 
 
diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c
index 44ebe66..ffc5c83 100644
--- a/test/Parser/expressions.c
+++ b/test/Parser/expressions.c
@@ -1,19 +1,17 @@
-// RUN: %clang_cc1 -parse-noop -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 void test1() {
-  if (sizeof (int){ 1});   // sizeof compound literal
-  if (sizeof (int));       // sizeof type
+  if (sizeof (int){ 1}) {}   // sizeof compound literal
+  if (sizeof (int)) {}       // sizeof type
 
-  (int)4;   // cast.
-  (int){4}; // compound literal.
+  (void)(int)4;   // cast.
+  (void)(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 A = (struct{ int a;}){ 1}.a;
 }
 
 int test2(int a, int b) {
-  return a ? a,b : a;
+  return a ? (void)a,b : a;
 }
 
 int test3(int a, int b, int c) {
@@ -22,23 +20,27 @@
 
 int test4() {
   test4();
+  return 0;
 }
 
+struct X0 { struct { struct { int c[10][9]; } b; } a; };
+
 int test_offsetof() {
-  // FIXME: change into something that is semantically correct.
-  __builtin_offsetof(int, a.b.c[4][5]);
+  (void)__builtin_offsetof(struct X0, a.b.c[4][5]);
+  return 0;
 }
 
 void test_sizeof(){
         int arr[10];
-        sizeof arr[0];
-        sizeof(arr[0]);
-        sizeof(arr)[0];
+        (void)sizeof arr[0];
+        (void)sizeof(arr[0]);
+        (void)sizeof(arr)[0];
 }
 
 // PR3418
 int test_leading_extension() {
   __extension__ (*(char*)0) = 1;
+  return 0;
 }
 
 // PR3972
diff --git a/test/Parser/expressions.m b/test/Parser/expressions.m
index e27f405..1f1005a 100644
--- a/test/Parser/expressions.m
+++ b/test/Parser/expressions.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -parse-noop %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 void test1() {
   @"s";            // expected-warning {{expression result unused}}
diff --git a/test/Parser/method-prototype-1.m b/test/Parser/method-prototype-1.m
index d2d9563..a32bc2e 100644
--- a/test/Parser/method-prototype-1.m
+++ b/test/Parser/method-prototype-1.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -parse-noop
+// RUN: %clang_cc1 %s -fsyntax-only
 @interface MyObject 
 - (void) bycopy  : (int) woodo, ... ;
 - (void) break  : (int) woodo, ... ;
diff --git a/test/Parser/objc-messaging-1.m b/test/Parser/objc-messaging-1.m
index 511290e..82450df 100644
--- a/test/Parser/objc-messaging-1.m
+++ b/test/Parser/objc-messaging-1.m
@@ -1,19 +1,26 @@
-// RUN: %clang_cc1 %s -parse-noop
+// RUN: %clang_cc1 %s -fsyntax-only -verify
 int main ()
 {
 	int i,j;
 	struct S *p;
         id a, b, c;
-	[p ii];
-	[p if: 1 :2];
-	[p inout: 1 :2 another:(2,3,4)];
-	[p inout: 1 :2 another:(2,3,4), 6,6,8];
-	[p inout: 1 :2 another:(2,3,4), (6,4,5),6,8];
-	[p inout: 1 :2 another:(i+10), (i,j-1,5),6,8];
-	[p long: 1 :2 another:(i+10), (i,j-1,5),6,8];
-	[p : "Hello\n" :2 another:(i+10), (i,j-1,5),6,8];
+	[a ii]; // expected-warning{{not found}}
+	[a if: 1 :2]; // expected-warning{{not found}}
+	[a inout: 1 :2 another:(2,3,4)]; // expected-warning{{not found}} \
+           // expected-warning 2{{expression result unused}}
+	[a inout: 1 :2 another:(2,3,4), 6,6,8]; // expected-warning{{not found}} \
+           // expected-warning 2{{expression result unused}}
+	[a inout: 1 :2 another:(2,3,4), (6,4,5),6,8]; // expected-warning{{not found}} \
+           // expected-warning 4{{expression result unused}}
+	[a inout: 1 :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \
+           // expected-warning 2{{expression result unused}}
+	[a long: 1 :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \
+           // expected-warning 2{{expression result unused}}
+	[a : "Hello\n" :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \
+           // expected-warning 2{{expression result unused}}
 
 	// Comma expression as receiver (rdar://6222856)
-	[a, b, c foo];
+	[a, b, c foo]; // expected-warning{{not found}} \
+           // expected-warning 2{{expression result unused}}
 
 }
diff --git a/test/Parser/selector-1.m b/test/Parser/selector-1.m
index 1f9cad6..0f35ce7 100644
--- a/test/Parser/selector-1.m
+++ b/test/Parser/selector-1.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -parse-noop %s 
+// RUN: %clang_cc1 -fsyntax-only -verify %s 
 
 int main() {
  SEL s = @selector(retain);
diff --git a/test/Parser/types.c b/test/Parser/types.c
index 0e8a63d..53b9dd5 100644
--- a/test/Parser/types.c
+++ b/test/Parser/types.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -parse-noop
+// RUN: %clang_cc1 %s -fsyntax-only -verify
 
 // Test the X can be overloaded inside the struct.
 typedef int X;