diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /test/Analysis/new-with-exceptions.cpp | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
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 d909f1f..84d77c2 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; |