diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | bfef399519ca9b8a4b4c6b563253bad7e0eeffe0 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /test/Analysis/new-with-exceptions.cpp | |
parent | 6a0372513edbc473b538d2f724efac50405d6fef (diff) |
Diffstat (limited to 'test/Analysis/new-with-exceptions.cpp')
-rw-r--r-- | test/Analysis/new-with-exceptions.cpp | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/test/Analysis/new-with-exceptions.cpp b/test/Analysis/new-with-exceptions.cpp index d909f1fb8b6b..84d77c22302c 100644 --- a/test/Analysis/new-with-exceptions.cpp +++ b/test/Analysis/new-with-exceptions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -fexceptions -fcxx-exceptions -verify -DEXCEPTIONS %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -fexceptions -fcxx-exceptions -verify %s // RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -verify %s void clang_analyzer_eval(bool); @@ -32,33 +32,15 @@ void testNew() { clang_analyzer_eval(new NoThrow); // expected-warning{{UNKNOWN}} clang_analyzer_eval(new NoExcept); // expected-warning{{UNKNOWN}} - clang_analyzer_eval(new DefaultThrow); - clang_analyzer_eval(new ExplicitThrow); -#ifdef EXCEPTIONS - // expected-warning@-3 {{TRUE}} - // expected-warning@-3 {{TRUE}} -#else - // expected-warning@-6 {{UNKNOWN}} - // expected-warning@-6 {{UNKNOWN}} -#endif + clang_analyzer_eval(new DefaultThrow); // expected-warning{{TRUE}} + clang_analyzer_eval(new ExplicitThrow); // expected-warning{{TRUE}} } void testNewArray() { - clang_analyzer_eval(new NoThrow[2]); - clang_analyzer_eval(new NoExcept[2]); - clang_analyzer_eval(new DefaultThrow[2]); - clang_analyzer_eval(new ExplicitThrow[2]); -#ifdef EXCEPTIONS - // expected-warning@-5 {{TRUE}} - // expected-warning@-5 {{TRUE}} - // expected-warning@-5 {{TRUE}} - // expected-warning@-5 {{TRUE}} -#else - // expected-warning@-10 {{UNKNOWN}} - // expected-warning@-10 {{UNKNOWN}} - // expected-warning@-10 {{UNKNOWN}} - // expected-warning@-10 {{UNKNOWN}} -#endif + clang_analyzer_eval(new NoThrow[2]); // expected-warning{{TRUE}} + clang_analyzer_eval(new NoExcept[2]); // expected-warning{{TRUE}} + clang_analyzer_eval(new DefaultThrow[2]); // expected-warning{{TRUE}} + clang_analyzer_eval(new ExplicitThrow[2]); // expected-warning{{TRUE}} } extern void *operator new[](size_t, int) noexcept; |