Lines Matching +full:- +full:wconversion

1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -Wconversion -std=c++11 -verify %s
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -Wconversion -std=c++11 %s 2>&1 | File…
19 return (E - I); // expected-warning {{implicit conversion loses integer precision}} in test1_positive()
23 return static_cast<int32_t>(E - I); in test1_negative()
27 return x; // expected-warning {{implicit conversion loses integer precision}} in test2_positive()
53 …A() : x(10) {} // expected-warning {{implicit truncation from 'int' to bitfield changes value from… in A()
57 // This file tests -Wnull-conversion, a subcategory of -Wconversion
61 int a = NULL; // expected-warning {{implicit conversion of NULL constant to 'int'}} in test3()
63 b = NULL; // expected-warning {{implicit conversion of NULL constant to 'int'}} in test3()
65 int c = ((((NULL)))); // expected-warning {{implicit conversion of NULL constant to 'int'}} in test3()
67 d = ((((NULL)))); // expected-warning {{implicit conversion of NULL constant to 'int'}} in test3()
68 bool bl = NULL; // expected-warning {{implicit conversion of NULL constant to 'bool'}} in test3()
69 char ch = NULL; // expected-warning {{implicit conversion of NULL constant to 'char'}} in test3()
70 …unsigned char uch = NULL; // expected-warning {{implicit conversion of NULL constant to 'unsigned … in test3()
71 short sh = NULL; // expected-warning {{implicit conversion of NULL constant to 'short'}} in test3()
72 double dbl = NULL; // expected-warning {{implicit conversion of NULL constant to 'double'}} in test3()
74 // Use FileCheck to ensure we don't get any unnecessary macro-expansion notes in test3()
75 // (that don't appear as 'real' notes & can't be seen/tested by -verify) in test3()
76 // CHECK-NOT: note: in test3()
79 FINIT // expected-warning {{implicit conversion of NULL constant to 'int'}} in test3()
94 …// FIXME: We should warn for non-dependent args (only when the param type is also non-dependent) o…
97 void tmpl(char c = NULL, // expected-warning 3 {{implicit conversion of NULL constant to 'char'}} in tmpl()
98 T a = NULL, // expected-warning {{implicit conversion of NULL constant to 'char'}} \ in tmpl()
99 expected-warning {{implicit conversion of NULL constant to 'int'}} in tmpl()
100 …T b = 1024) { // expected-warning {{implicit conversion from 'int' to 'char' changes value from 10…
108 …tmpl<char>(); // expected-note 2 {{in instantiation of default function argument expression for 't… in func()
109 …tmpl<int>(); // expected-note 2 {{in instantiation of default function argument expression for 'tm… in func()
132 bool x = nullptr; // expected-warning {{implicit conversion of nullptr constant to 'bool'}} in fun()
133 if (nullptr) {} // expected-warning {{implicit conversion of nullptr constant to 'bool'}} in fun()
134 return nullptr; // expected-warning {{implicit conversion of nullptr constant to 'bool'}} in fun()
255 x // expected-warning{{}} in run()
260 // More tests with macros. Specficially, test function-like macros that either
278 …CHECK13(some_bool_function(nullptr)); // expected-warning{{implicit conversion of nullptr constan… in function2()
279 …CHECK13(some_bool_function(NULL)); // expected-warning{{implicit conversion of NULL constant to '… in function2()