LegalizeAdulthood added a subscriber: LegalizeAdulthood. ================ Comment at: docs/clang-tidy/checks/modernize-use-bool-literals.rst:17 @@ +16,1 @@ + std::ios_base::sync_with_stdio(false); \ No newline at end of file
---------------- Please ensure the file ends with a newline. ================ Comment at: test/clang-tidy/modernize-use-bool-literals.cpp:3 @@ +2,3 @@ + +bool bar1 = 1; +// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: implicitly converting integer literal to bool, use bool literal instead [modernize-use-bool-literals] ---------------- There is more initialization syntax than just assignment. Here are the ones I can think of: What happens when I write `bool foo{1};` or `bool foo(1);`? What happens when I write: ``` class foo { public: foo() : b(0) {} foo(int) : b{0} {} private: bool b; bool c{0}; bool d(0); bool e = 0; }; ``` Should we warn an a `bool` is initialized by a call to a `constexpr` function that returns an integral type? http://reviews.llvm.org/D18745 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits