aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-05-15 16:56:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-05-15 16:56:36 +0000
commitbe0ee875d8a91c031a085cbbd73ad9e8dc1aa8ff (patch)
tree351c48682f0a027cc17dfe30ba4c2776ae74baec /test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
parent8f674a80529b327a88be665defcc0163089916e4 (diff)
Improve some of the conversion warnings to fire on conversion to bool.
Moves the bool bail-out down a little in SemaChecking - so now -Wnull-conversion and -Wliteral-conversion can fire when the target type is bool. Also improve the wording/details in the -Wliteral-conversion warning to match the -Wconstant-conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.unary/expr.unary.op/p6.cpp')
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.op/p6.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp b/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
index ac11940c80..2646264273 100644
--- a/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
@@ -4,7 +4,7 @@
bool b = !0;
-bool b2 = !1.2;
+bool b2 = !1.2; //expected-warning{{implicit conversion from 'double' to 'bool' changes value from 1.2 to true}}
bool b3 = !4;