aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn_false_to_pointer.cpp
AgeCommit message (Collapse)Author
2011-04-09Clean up the bool conversion warning. Group it with other conversionChandler Carruth
warnings, and make its text appropriate for constant bool expressions other than 'false'. This should finish off PR9612. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129205 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-09Add support for warning on general null pointer expressions of booleanChandler Carruth
type rather than just the literal 'false'. This begins fixing PR9612, but the message is now wrong. WIP, the cleanup of the messaging is next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01Move the bool-conversions behind the DiagRuntimeBehavior logic. It'sChandler Carruth
possible for these to show up due to metaprogramming both in unevaluated contexts and compile-time dead branches. Those aren't the bugs we're looking for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-28Don't warn with -Wbool-conversions if the user wrote an explicit cast like ↵Argyrios Kyrtzidis
"(void *)false". Fixes rdar://8459342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08Implement a warning when converting the literal 'false' to aDouglas Gregor
pointer. Original patch by Troy D. Straszheim; fixes PR7283. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105621 91177308-0d34-0410-b5e6-96231b3b80d8