diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-12-19 23:05:40 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-12-19 23:05:40 +0000 |
commit | 0104d12cd419be03453637ae0433298dcefc8e7d (patch) | |
tree | 558c9c0da3a20dd24284fa608a841f78fcec3661 /test/Analysis/casts.cpp | |
parent | 83f5cbf5f8d5e663b8d4f02fbc3d70444cf7dbc7 (diff) | |
download | clang-0104d12cd419be03453637ae0433298dcefc8e7d.tar.gz |
[analyzer] Fix test in previous commit to account for compiler warning.
--analyze passes -w, but -cc1 -analyze doesn't. Oops!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/casts.cpp')
-rw-r--r-- | test/Analysis/casts.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Analysis/casts.cpp b/test/Analysis/casts.cpp index 763f942ede..53e1cd085a 100644 --- a/test/Analysis/casts.cpp +++ b/test/Analysis/casts.cpp @@ -1,5 +1,4 @@ // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s -// expected-no-diagnostics bool PR14634(int x) { double y = (double)x; @@ -12,8 +11,13 @@ bool PR14634_implicit(int x) { } void intAsBoolAsSwitchCondition(int c) { - switch ((bool)c) { + switch ((bool)c) { // expected-warning {{switch condition has boolean value}} case 0: break; } + + switch ((int)(bool)c) { // no-warning + case 0: + break; + } } |