[cfe-commits] r126641 - /cfe/trunk/test/Driver/clang-exception-flags.cpp

Chandler Carruth chandlerc at gmail.com
Sun Feb 27 23:38:09 PST 2011


Author: chandlerc
Date: Mon Feb 28 01:38:09 2011
New Revision: 126641

URL: http://llvm.org/viewvc/llvm-project?rev=126641&view=rev
Log:
Add a test case that would have caught the bug fixed in r126640.

I've only covered C++'s flags here, we should probably do something
similar for ObjC flags.

Added:
    cfe/trunk/test/Driver/clang-exception-flags.cpp

Added: cfe/trunk/test/Driver/clang-exception-flags.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-exception-flags.cpp?rev=126641&view=auto
==============================================================================
--- cfe/trunk/test/Driver/clang-exception-flags.cpp (added)
+++ cfe/trunk/test/Driver/clang-exception-flags.cpp Mon Feb 28 01:38:09 2011
@@ -0,0 +1,23 @@
+// RUN: %clang -### %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
+// DEFAULT: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
+//
+// RUN: %clang -### -fexceptions %s 2>&1 | FileCheck %s -check-prefix=ON1
+// ON1: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
+//
+// RUN: %clang -### -fno-exceptions -fcxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=ON2
+// ON2: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
+//
+// RUN: %clang -### -fno-cxx-exceptions -fexceptions %s 2>&1 | FileCheck %s -check-prefix=ON3
+// ON3: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
+//
+// RUN: %clang -### -fno-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF1
+// OFF1-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
+//
+// RUN: %clang -### -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF2
+// OFF2-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
+//
+// RUN: %clang -### -fcxx-exceptions -fno-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF3
+// OFF3-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
+//
+// RUN: %clang -### -fexceptions -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF4
+// OFF4-NOT: "-cc1" {{.*}} "-fcxx-exceptions"





More information about the cfe-commits mailing list