]> granicus.if.org Git - clang/commitdiff
Consumed analysis: update to previous test case.
authorDeLesley Hutchins <delesley@google.com>
Thu, 17 Oct 2013 22:21:03 +0000 (22:21 +0000)
committerDeLesley Hutchins <delesley@google.com>
Thu, 17 Oct 2013 22:21:03 +0000 (22:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192926 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/warn-consumed-analysis.cpp

index e7380b97feb215c5531130dc9739c5a67cb31614..264d27af5e77a318b8014eea84ac0f3ad6aaef57 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wconsumed -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wconsumed -fcxx-exceptions -std=c++11 %s
 
 // TODO: Switch to using macros for the expected warnings.
 
@@ -577,5 +577,17 @@ static void foo2() {
   }
 }
 
+class runtime_error
+{
+public:
+  virtual ~runtime_error();
+};
+
+void read(bool sf) {
+    while (sf) {
+        if(sf) throw runtime_error();
+    }
+}
+
 } // end namespace ContinueICETest