]> granicus.if.org Git - clang/commitdiff
Pass -fexceptions to all tests that use try/catch/throw.
authorAnders Carlsson <andersca@mac.com>
Sat, 19 Feb 2011 19:23:03 +0000 (19:23 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 19 Feb 2011 19:23:03 +0000 (19:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126037 91177308-0d34-0410-b5e6-96231b3b80d8

30 files changed:
test/Analysis/auto-obj-dtors-cfg-output.cpp
test/Analysis/dead-stores.cpp
test/CXX/class.access/p4.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp
test/CXX/except/except.handle/p16.cpp
test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
test/CXX/special/class.copy/p33-0x.cpp
test/CXX/temp/temp.decls/temp.variadic/p5.cpp
test/CodeGenCXX/PR5863-unreachable-block.cpp
test/CodeGenCXX/anonymous-namespaces.cpp
test/CodeGenCXX/nrvo.cpp
test/CodeGenCXX/throw-expressions.cpp
test/PCH/cxx-templates.cpp
test/PCH/cxx_exprs.cpp
test/Parser/cxx-stmt.cpp
test/Parser/cxx-throw.cpp
test/Parser/cxx0x-attributes.cpp
test/SemaCXX/conditional-expr.cpp
test/SemaCXX/exceptions.cpp
test/SemaCXX/nullptr.cpp
test/SemaCXX/return.cpp
test/SemaCXX/rval-references.cpp
test/SemaCXX/unreachable-catch-clauses.cpp
test/SemaCXX/unreachable-code.cpp
test/SemaCXX/warn-unreachable.cpp
test/SemaObjCXX/exceptions-fragile.mm
test/SemaTemplate/instantiate-expr-4.cpp
test/SemaTemplate/instantiate-function-1.cpp
test/SemaTemplate/instantiate-try-catch.cpp

index 315eb121e6880a8ae31b7228c2f12d678ef960c3..4bcfccd120e206dd64a78e089e156550a55d3aa6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -cfg-add-implicit-dtors %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -analyze -analyzer-checker=debug.DumpCFG -cfg-add-implicit-dtors %s 2>&1 | FileCheck %s
 // XPASS: *
 
 class A {
index c384f9f5ec40f455dd7fb2b0db312fa21e7de0b4..59a48bada1b30185267908afb2158d3cae38c8b9 100644 (file)
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
-// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic -analyzer-constraints=basic -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
-// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic -analyzer-constraints=range -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
-// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=region -analyzer-constraints=basic -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
-// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=region -analyzer-constraints=range -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
+// RUN: %clang_cc1 -fexceptions -analyze -analyzer-experimental-internal-checks -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
+// RUN: %clang_cc1 -fexceptions -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic -analyzer-constraints=basic -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
+// RUN: %clang_cc1 -fexceptions -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic -analyzer-constraints=range -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
+// RUN: %clang_cc1 -fexceptions -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=region -analyzer-constraints=basic -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
+// RUN: %clang_cc1 -fexceptions -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=region -analyzer-constraints=range -analyzer-checker=core.DeadStores -verify -Wno-unreachable-code %s
 
 //===----------------------------------------------------------------------===//
 // Basic dead store checking (but in C++ mode).
index a8a2ef928e501a815abf20db765d6810a7ce58bc..84b7b1915f173828bdf8b8fb2025cdf7089b3968 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 // C++0x [class.access]p4:
 
index e73925479324e2663db6e061b4903b6e7050f3cd..17dcbb981558302ccd863ec69b379cb24486016b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s -std=c++0x
 void f() {
   auto a = a; // expected-error{{variable 'a' declared with 'auto' type cannot appear in its own initializer}}
 }
index 4950a2f6aab01cdacccd31f0be58926d3ef60643..24f0db08cd8daecf27aa4f9a6e4cdd73f3e083fd 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 // The object declared in an exception-declaration or, if the
 // exception-declaration does not specify a name, a temporary (12.2)
index e7a8b1e47f8f93db72e6b4023ced6009da47f373..6aec3a2781efa9bf6d1fd0a12e7adc321399792a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include %S/ser.h %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++0x -x c++ %S/ser.h
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include-pch %t-ser.pch %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include %S/ser.h %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++0x -x c++ %S/ser.h
+// RUN: %clang_cc1 -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include-pch %t-ser.pch %s -o - | FileCheck %s
 
 struct D {
   ~D() throw();
index 0605746a58569c6f1bfde85fb6515af911681eae..98c6f4e09f516f97efc39f46ed20706c1ac1e6c1 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -fms-extensions %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify -std=c++0x -fms-extensions %s
 
 #define P(e) static_assert(noexcept(e), "expected nothrow")
 #define N(e) static_assert(!noexcept(e), "expected throw")
index 38eb7adb38b016d9c7376c1da3803498a124ae5d..262809e35cb1b486b20f843eb50f018c1dcb3b7a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -std=c++0x -fsyntax-only -verify %s
 class X {
   X(const X&);
 
index b5d734d82b24bae71d00efaabf95d1178cf586a7..1acc21eb4fd548e94069630db33f15e7f77ab7a4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++0x -fblocks -fms-extensions -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -std=c++0x -fblocks -fms-extensions -fsyntax-only -verify %s
 
 template<typename T, typename U> struct pair;
 template<typename ...> struct tuple;
index 77096153992b578030532740f793f68193e510a2..4829b5277aadd759bcb479f94e3b2b88696a5a2e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only %s
+// RUN: %clang_cc1 -fexceptions -emit-llvm-only %s
 
 // PR5863
 class E { };
index 3ec7032ee5f54649c659b747f18614595154c6db..0198ed0e3e232076c92108511c17225c3edc2e7e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - > %t
+// RUN: %clang_cc1 -fexceptions -triple x86_64-apple-darwin10 -emit-llvm %s -o - > %t
 // RUN: FileCheck %s -check-prefix=1 < %t
 // RUN: FileCheck %s -check-prefix=2 < %t
 
index ecf6afdc7ca7ccf439643b9f513e3065dca8cb22..d03b21bacbaf7fdd618aaa5c2ba79403bcc46560 100644 (file)
@@ -132,6 +132,7 @@ X test4(bool B) {
   exit(1);
 }
 
+#ifdef __EXCEPTIONS
 // CHECK-EH: define void @_Z5test5
 void may_throw();
 X test5() {
@@ -144,3 +145,4 @@ X test5() {
     return x;
   }
 }
+#endif
index f41d35ec37404c75c6c2028268ae6d2b704ed896..1d22ec05c37fa63c8b24e22fbfee1080454ed2c0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -verify %s -Wno-unreachable-code
+// RUN: %clang_cc1 -fexceptions -emit-llvm-only -verify %s -Wno-unreachable-code
 
 int val = 42;
 int& test1() {
index e2ad46c6595cc3f400734d3db04602bdc42a2152..05dd6ed0d2bed44fbd424aa5e7a68f5de832e07b 100644 (file)
@@ -1,11 +1,11 @@
 // Test this without pch.
-// RUN: %clang_cc1 -include %S/cxx-templates.h -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -include %S/cxx-templates.h %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - | FileCheck %s
 
 // Test with pch.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -include-pch %t -verify %s -ast-dump  -o -
-// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -fexceptions -include-pch %t -verify %s -ast-dump  -o -
+// RUN: %clang_cc1 -fexceptions -include-pch %t %s -emit-llvm -o - | FileCheck %s
 
 // CHECK: define weak_odr void @_ZN2S4IiE1mEv
 // CHECK: define linkonce_odr void @_ZN2S3IiE1mEv
index 2b9a5abbf11a940baeca6f59113ec5dc4de7d2c3..cf7ae338eba1215c5fabbaf183ab0d5c5a6f8d37 100644 (file)
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: %clang_cc1 -include %S/cxx_exprs.h -std=c++0x -fsyntax-only -verify %s -ast-dump
+// RUN: %clang_cc1 -fexceptions -include %S/cxx_exprs.h -std=c++0x -fsyntax-only -verify %s -ast-dump
 
 // Test with pch. Use '-ast-dump' to force deserialization of function bodies.
-// RUN: %clang_cc1 -x c++-header -std=c++0x -emit-pch -o %t %S/cxx_exprs.h
-// RUN: %clang_cc1 -std=c++0x -include-pch %t -fsyntax-only -verify %s -ast-dump
+// RUN: %clang_cc1 -fexceptions -x c++-header -std=c++0x -emit-pch -o %t %S/cxx_exprs.h
+// RUN: %clang_cc1 -fexceptions -std=c++0x -include-pch %t -fsyntax-only -verify %s -ast-dump
 
 int integer;
 double floating;
index fdd573e6bfa5de2769935f697a7bf5655a7e0057..795aca6e93c016096c5b005d12f7db0e43783ba7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 void f1()
 {
index a87881647dd4fa233eef797314f11745ffabbdcf..20b8f4b754abc0da98822621d916f89625263c02 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 int i;
 
index 9956427ebf119c27bc9a6506ab290f9995d1b678..3147de9404181c94201da4e2b445e027398fb046 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify -std=c++0x %s
 
 // Declaration syntax checks
 [[]] int before_attr;
index 5637ed14c0a6245b9aafa268889c6d22eb3363fe..1da9a1724d319eb6b1408be4b3a7d24df4d14d7f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -Wsign-compare %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify -std=c++0x -Wsign-compare %s
 
 // C++ rules for ?: are a lot stricter than C rules, and have to take into
 // account more conversion options.
index ea3cdd9ef1c479a9d6afefcd40d34bce52266af4..bda4a3d2ec54a8ea2d5145d51d59e65d7f6f43fc 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 struct A; // expected-note 4 {{forward declaration of 'A'}}
 
index 1c454771aaa1e0fc6422a9ff4bfebce886c9cd30..01f3d936793526c4a59dd83e17e6253e032505d8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -ffreestanding %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify -std=c++0x -ffreestanding %s
 #include <stdint.h>
 
 typedef decltype(nullptr) nullptr_t;
index 6bdbe52727b247c6698eb806c218e64269dd411e..441c20f152b13f365aba53ede44af9c9a02e5947 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -Wignored-qualifiers -verify
+// RUN: %clang_cc1 %s -fexceptions -fsyntax-only -Wignored-qualifiers -verify
 
 int test1() {
   throw;
index df6e40042850b3ceca9b39cadb732da1ab4dafd3..11187cba5d82abd44e1e60d580f04f97140bce82 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify -std=c++0x %s
 
 typedef int&& irr;
 typedef irr& ilr_c1; // Collapses to int&
index 9fc4aef44a0400201c040a7bb45d94a8df02f3c5..e8158d4495551469e870ab3eb35ad13009f74999 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 class BaseEx {};
 class Ex1: public BaseEx {};
index 40d0c00b9390f30547a6818058592963f6c37761..03d44ab8ce47a0dc3eddf8b19e780ef366e1126f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunreachable-code -fblocks -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -Wunreachable-code -fblocks -verify %s
 
 int j;
 void bar() { }
index 79af56298031aaa6ccf62b3699646ee95886713e..3c8a429b3e585116097f4f091549c971b260622f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value
+// RUN: %clang_cc1 %s -fexceptions -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value
 
 int &halt() __attribute__((noreturn));
 int &live();
index 11dd8e94c1de2a2ec54e4dd1ab2255a5ea3d2eeb..e345ebc70b18ff4712fd3152b11d4dbc907f5885 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s 
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s 
 
 @interface NSException @end
 void opaque();
index d923f2b555cdbb5459469f6558e3b1a30babdd0f..74eb5e5fff3d77ff0184eb0f97f06b16378947d0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 
 // ---------------------------------------------------------------------
 // C++ Functional Casts
index 651c02c6cdcf57c7c359d38a1dcd9ac6d3934b56..dbd1e6930382cb95b50fc6bdec33e1aa2b10dfa4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -verify %s
 template<typename T, typename U>
 struct X0 {
   void f(T x, U y) { 
index aa809e4bf949b5395bd1a4d4929e041073bff9a7..f1ffd06334c3e0f441a435f8c385cf8bc0aab060 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
+// RUN: %clang_cc1 -fexceptions -fsyntax-only -std=c++0x -verify %s
 
 template<typename T> struct TryCatch0 {
   void f() {