File indexing completed on 2024-04-28 05:38:41
0001 #include <QtCore/QDebug> 0002 0003 struct S { 0004 void operator=(int); 0005 }; 0006 0007 void foo(int) {} 0008 0009 extern "C" void takesInt_C(int); 0010 extern void takesInt_Cpp(int); 0011 0012 struct A 0013 { 0014 void foo(int); 0015 }; 0016 0017 void testIntToBool(bool b1) 0018 { 0019 bool b2; 0020 foo(false); // Warn 0021 foo(b1); // Warn 0022 foo(b2); // Warn 0023 A a; 0024 a.foo(false); // Warn 0025 0026 takesInt_C(false); // OK 0027 takesInt_Cpp(false); // Warn 0028 0029 S s; s = false; // OK 0030 qDebug("Foo %d", false); // OK 0031 }