diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-07-16 15:30:04 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-07-16 15:41:40 +0200 |
commit | c17c8cc029dc6c104e16627646389d09eb1e6119 (patch) | |
tree | 9c246f189a49f13f92791d86fc95cc47c6fa2a20 /compilerplugins/clang/pointertobool.cxx | |
parent | c66e9cd24c28ff00f15770037ae9a8dd852fdada (diff) |
mention the explicit bool conversion from C++11 for pointer-to-bool check
Change-Id: I050019b30d2ec96bbd25916624f8cb88d72110e4
Diffstat (limited to 'compilerplugins/clang/pointertobool.cxx')
-rw-r--r-- | compilerplugins/clang/pointertobool.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compilerplugins/clang/pointertobool.cxx b/compilerplugins/clang/pointertobool.cxx index 6988c4f5d93b..238e0180b7e8 100644 --- a/compilerplugins/clang/pointertobool.cxx +++ b/compilerplugins/clang/pointertobool.cxx @@ -26,9 +26,10 @@ and potentially mistakes. So far the only places that are checked are passing arguments to functions, as those could easily choose a different overload. -The original idea was that the only conversions that are considered safe are -in conditions (which in turn means also in ||, && and ! operators) and places -where it's considered unlikely for it to be a problem (or rather, less of a problem +The original idea was that to follow the explicit bool feature from C++11, where +the only conversions that would be considered safe are in conditions (which +in turn means also in ||, && and ! operators) and places where it's considered +unlikely for it to be a problem (or rather, less of a problem than explicitly avoiding the warning in the code). The code for this is currently commented out (there are a couple of places such as 'bool foo = returns_pointer();' that would need modification), possibly enable those later. |