alexfh requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: docs/clang-tidy/checks/bugprone-bool-to-integer-conversion.rst:37
@@ +36,3 @@
+
+It turns out that the common bug is to have function returning only bools but 
having int as return type.
+If check finds case like this then it function return type to bool.
----------------
It may well not be a bug. It's definitely not a bug for `extern "C"` functions 
and functions in C code. We definitely don't need to change the function return 
type, since it's a rather involved change (and clang-tidy checks currently are 
simply not able to make such change correctly in case of a function with 
external linkage). So please remove this automated fix.

================
Comment at: docs/clang-tidy/checks/bugprone-bool-to-integer-conversion.rst:41
@@ +40,3 @@
+
+.. code-block:: C++
+  int fun() {
----------------
Please check that your documentation compiles.

================
Comment at: test/clang-tidy/bugprone-bool-to-integer-conversion.cpp:191
@@ +190,3 @@
+  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function has return type 'int' 
but returns only bools
+  // CHECK-FIXES: bool yat2() {
+
----------------
That's a dangerous fix. It should either be removed or guarded by an option.


http://reviews.llvm.org/D18821



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to