[cfe-commits] r142563 - /cfe/trunk/test/FixIt/fixit.cpp

Richard Smith richard-llvm at metafoo.co.uk
Wed Oct 19 18:41:28 PDT 2011


Author: rsmith
Date: Wed Oct 19 20:41:28 2011
New Revision: 142563

URL: http://llvm.org/viewvc/llvm-project?rev=142563&view=rev
Log:
Make the -verify bits in this test actually test something, and fix a few cases
where the test didn't work.

Modified:
    cfe/trunk/test/FixIt/fixit.cpp

Modified: cfe/trunk/test/FixIt/fixit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit.cpp?rev=142563&r1=142562&r2=142563&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/fixit.cpp (original)
+++ cfe/trunk/test/FixIt/fixit.cpp Wed Oct 19 20:41:28 2011
@@ -1,6 +1,7 @@
+// RUN: %clang_cc1 -pedantic -Wall -verify -fcxx-exceptions -x c++ %s
 // RUN: cp %s %t
-// RUN: not %clang_cc1 -pedantic -Wall -fixit -x c++ %t
-// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x c++ %t
+// RUN: not %clang_cc1 -pedantic -Wall -fcxx-exceptions -fixit -x c++ %t
+// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -fcxx-exceptions -x c++ %t
 
 /* This is a test of the various code modification hints that are
    provided as part of warning or extension diagnostics. All of the
@@ -28,7 +29,7 @@
 
 struct CT<0> { }; // expected-error{{'template<>'}}
 
-template<> class CT<1> { }; // expected-error{{tag type}}
+template<> union CT<1> { }; // expected-error{{tag type}}
 
 // Access declarations
 class A {
@@ -40,7 +41,7 @@
   A::foo; // expected-warning{{access declarations are deprecated}}
 };
 
-void f() throw();
+void f() throw(); // expected-note{{previous}}
 void f(); // expected-warning{{missing exception specification}}
 
 namespace rdar7853795 {
@@ -63,7 +64,7 @@
 
 // extra qualification on member
 class C {
-  int C::foo();
+  int C::foo(); // expected-warning {{extra qualification}}
 };
 
 namespace rdar8488464 {
@@ -104,7 +105,7 @@
   AD* aPtr;
   BD b;
   aPtr = b; // expected-error {{assigning to 'AD *' from incompatible type 'BD'; take the address with &}}
-  aPtr = br; // expected-error {{assigning to 'A *' from incompatible type 'B'; take the address with &}}
+  aPtr = br; // expected-error {{assigning to 'AD *' from incompatible type 'BD'; take the address with &}}
 }
 
 void foo1() const {} // expected-error {{type qualifier is not allowed on this function}}
@@ -114,13 +115,13 @@
 struct S { void f(int, char); };
 int itsAComma,
 itsAComma2 = 0,
-oopsAComma(42), // expected-error {{expected ';' after declaration}}
+oopsAComma(42), // expected-error {{expected ';' at end of declaration}}
 AD oopsMoreCommas() {
-  static int n = 0,
+  static int n = 0, // expected-error {{expected ';' at end of declaration}}
   static char c,
-  &d = c, // expected-error {{expected ';' after declaration}}
-  S s, // expected-error {{expected ';' after declaration}}
+  &d = c, // expected-error {{expected ';' at end of declaration}}
+  S s, // expected-error {{expected ';' at end of declaration}}
   s.f(n, d);
-  AD ad, // expected-error {{expected ';' after declaration}}
+  AD ad, // expected-error {{expected ';' at end of declaration}}
   return ad;
 }





More information about the cfe-commits mailing list