Lines Matching +full:- +full:wno +full:- +full:sign +full:- +full:conversion
1 // RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ %s
2 // RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -x c++ -std=c++11 %s 2>&1 | Fil…
4 // RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ %t
5 // RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ %t
9 warnings will be fixed by -fixit, and the resulting file should
10 compile cleanly with -Werror -pedantic. */
16 struct C2 : virtual public virtual C1 { }; // expected-error{{duplicate}}
18 virtual void C1::f() { } // expected-error{{'virtual' can only be specified inside the class defini… in f()
20 static void C1::g() { } // expected-error{{'static' can only be specified inside the class definiti… in g()
22 template<int Value> struct CT { template<typename> struct Inner; }; // expected-note{{previous use …
24 CT<10 >> 2> ct; // expected-warning{{require parentheses}}
28 C3(C3, int i = 0); // expected-error{{copy constructor must pass its first argument by reference}}
31 struct CT<0> { }; // expected-error{{'template<>'}}
33 template<> union CT<1> { }; // expected-error{{tag type}}
35 struct CT<2>::Inner<int> { }; // expected-error 2{{'template<>'}}
44 A::foo; // expected-warning{{access declarations are deprecated}}
47 void f() throw(); // expected-note{{previous}}
48 void f(); // expected-error{{missing exception specification}}
52 bool getNumComponents() const; // expected-note{{declared here}}
54 …getNumComponenets(); // expected-error{{use of undeclared identifier 'getNumComponenets'; did you … in dump()
63 : x(1) y(2) { // expected-error{{missing ',' between base or member initializers}} in A()
70 int C::foo(); // expected-error {{extra qualification}}
75 int x1 &= 0; // expected-error {{invalid '&=' at end of declaration; did you mean '='?}}
76 int x2 *= 0; // expected-error {{invalid '*=' at end of declaration; did you mean '='?}}
77 int x3 += 0; // expected-error {{invalid '+=' at end of declaration; did you mean '='?}}
78 int x4 -= 0; // expected-error {{invalid '-=' at end of declaration; did you mean '='?}}
79 int x5 != 0; // expected-error {{invalid '!=' at end of declaration; did you mean '='?}}
80 int x6 /= 0; // expected-error {{invalid '/=' at end of declaration; did you mean '='?}}
81 int x7 %= 0; // expected-error {{invalid '%=' at end of declaration; did you mean '='?}}
82 int x8 <= 0; // expected-error {{invalid '<=' at end of declaration; did you mean '='?}}
83 int x9 <<= 0; // expected-error {{invalid '<<=' at end of declaration; did you mean '='?}}
84 int x10 >= 0; // expected-error {{invalid '>=' at end of declaration; did you mean '='?}}
85 int x11 >>= 0; // expected-error {{invalid '>>=' at end of declaration; did you mean '='?}}
86 int x12 ^= 0; // expected-error {{invalid '^=' at end of declaration; did you mean '='?}}
87 int x13 |= 0; // expected-error {{invalid '|=' at end of declaration; did you mean '='?}}
88 int x14 == 0; // expected-error {{invalid '==' at end of declaration; did you mean '='?}}
93 int x1 &= 0; // expected-error {{invalid '&=' at end of declaration; did you mean '='?}} in f()
95 int x2 *= 0; // expected-error {{invalid '*=' at end of declaration; did you mean '='?}} in f()
97 int x3 += 0; // expected-error {{invalid '+=' at end of declaration; did you mean '='?}} in f()
99 int x4 -= 0; // expected-error {{invalid '-=' at end of declaration; did you mean '='?}} in f()
101 int x5 != 0; // expected-error {{invalid '!=' at end of declaration; did you mean '='?}} in f()
103 int x6 /= 0; // expected-error {{invalid '/=' at end of declaration; did you mean '='?}} in f()
105 int x7 %= 0; // expected-error {{invalid '%=' at end of declaration; did you mean '='?}} in f()
107 int x8 <= 0; // expected-error {{invalid '<=' at end of declaration; did you mean '='?}} in f()
109 int x9 <<= 0; // expected-error {{invalid '<<=' at end of declaration; did you mean '='?}} in f()
111 int x10 >= 0; // expected-error {{invalid '>=' at end of declaration; did you mean '='?}} in f()
113 int x11 >>= 0; // expected-error {{invalid '>>=' at end of declaration; did you mean '='?}} in f()
115 int x12 ^= 0; // expected-error {{invalid '^=' at end of declaration; did you mean '='?}} in f()
117 int x13 |= 0; // expected-error {{invalid '|=' at end of declaration; did you mean '='?}} in f()
119 int x14 == 0; // expected-error {{invalid '==' at end of declaration; did you mean '='?}} in f()
122 …if (int x1 &= 0) { (void)x1; } // expected-error {{invalid '&=' at end of declaration; did you mea… in f()
123 …if (int x2 *= 0) { (void)x2; } // expected-error {{invalid '*=' at end of declaration; did you mea… in f()
124 …if (int x3 += 0) { (void)x3; } // expected-error {{invalid '+=' at end of declaration; did you mea… in f()
125 …if (int x4 -= 0) { (void)x4; } // expected-error {{invalid '-=' at end of declaration; did you mea… in f()
126 …if (int x5 != 0) { (void)x5; } // expected-error {{invalid '!=' at end of declaration; did you mea… in f()
127 …if (int x6 /= 0) { (void)x6; } // expected-error {{invalid '/=' at end of declaration; did you mea… in f()
128 …if (int x7 %= 0) { (void)x7; } // expected-error {{invalid '%=' at end of declaration; did you mea… in f()
129 …if (int x8 <= 0) { (void)x8; } // expected-error {{invalid '<=' at end of declaration; did you mea… in f()
130 …if (int x9 <<= 0) { (void)x9; } // expected-error {{invalid '<<=' at end of declaration; did you m… in f()
131 …if (int x10 >= 0) { (void)x10; } // expected-error {{invalid '>=' at end of declaration; did you m… in f()
132 …if (int x11 >>= 0) { (void)x11; } // expected-error {{invalid '>>=' at end of declaration; did you… in f()
133 …if (int x12 ^= 0) { (void)x12; } // expected-error {{invalid '^=' at end of declaration; did you m… in f()
134 …if (int x13 |= 0) { (void)x13; } // expected-error {{invalid '|=' at end of declaration; did you m… in f()
135 …if (int x14 == 0) { (void)x14; } // expected-error {{invalid '==' at end of declaration; did you m… in f()
149 …typename F1<T>:: /*template*/ Iterator<0> Mypos; // expected-error {{use 'template' keyword to tr…
154 …typename F1<T>:: /*template*/ Iterator<0> Mypos; // expected-error {{use 'template' keyword to tre… in f()
164 …aPtr = b; // expected-error {{assigning to 'AD *' from incompatible type 'BD'; take the address wi… in test()
165 …aPtr = br; // expected-error {{assigning to 'AD *' from incompatible type 'BD'; take the address w… in test()
168 void foo1() const {} // expected-error {{non-member function cannot have 'const' qualifier}} in foo1()
169 void foo2() volatile {} // expected-error {{non-member function cannot have 'volatile' qualifier}} in foo2()
170 void foo3() const volatile {} // expected-error {{non-member function cannot have 'const volatile' … in foo3()
175 oopsAComma(42), // expected-error {{expected ';' at end of declaration}}
177 static int n = 0, // expected-error {{expected ';' at end of declaration}}
179 &d = c, // expected-error {{expected ';' at end of declaration}}
180 S s, // expected-error {{expected ';' at end of declaration}}
182 AD ad, // expected-error {{expected ';' at end of declaration}}
188 : 4, // expected-error {{expected ';' at end of declaration}}
189 char c, // expected-error {{expected ';' at end of declaration}}
190 double d, // expected-error {{expected ';' at end of declaration}}
191 MoreAccidentalCommas *next, // expected-error {{expected ';' at end of declaration}}
193 int k, // expected-error {{expected ';' at end of declaration}}
195 int k2, // expected-error {{expected ';' at end of declaration}}
196 virtual void g(), // expected-error {{expected ';' at end of declaration}}
201 expected-error {{function definition declared 'typedef'}} \
202 expected-error {{missing 'typename' prior to dependent}}
206 template<template<typename> Foo, // expected-error {{template template parameter requires 'class' a…
207 …template<typename> typename Bar, // expected-warning {{template template parameter using 'typename…
208 …template<typename> struct Baz> // expected-error {{template template parameter requires 'class' af…
216 Bar Bar(); // expected-note 2 {{enum 'Bar' is hidden by a non-type declaration of 'Bar' here}}
218 Bar bar_; // expected-error {{must use 'enum' tag to refer to type 'Bar' in this scope}}
220 void Foo::SetBar(Bar bar) { bar_ = bar; } // expected-error {{must use 'enum' tag to refer to type … in SetBar()
224 char c = NULL; // expected-warning {{implicit conversion of NULL constant to 'char'}}
225 double dbl = NULL; // expected-warning {{implicit conversion of NULL constant to 'double'}}
233 T* operator->() { return ptr_; } in operator ->()
245 …ing(); // expected-error {{no member named 'DoSomething' in 'arrow_suggest::wrapped_ptr<arrow_sugg… in test()
250 // Make sure fixing namespace-qualified identifiers functions properly with
251 // namespace-aware typo correction/
254 void BeEvil(); // expected-note {{'BeEvil' declared here}}
258 bool isGood(); // expected-note {{'Bar::Foo::isGood' declared here}}
262 bool Foo::isGood() { // expected-error {{out-of-line definition of 'isGood' does not match any decl… in isGood()
265 void Foo::beEvil() {} // expected-error {{out-of-line definition of 'beEvil' does not match any dec… in beEvil()
268 // Test behavior when a template-id is ended by a token which starts with '>'.
271 …void f(S<int>=0); // expected-error {{a space is required between a right angle bracket and an equ…
273 // FIXME: The fix-its here overlap so -fixit mode can't apply the second one.
281 template<template<typename>> struct TemplateTemplateParam; // expected-error {{requires 'class'}}
286 (void)(&t<int>==p); // expected-error {{use '> ='}} in g()
287 (void)(&t<int>>=p); // expected-error {{use '> >'}} in g()
288 (void)(&t<S<int>>>=p); // expected-error {{use '> >'}} in g()
289 (Shr)&t<S<int>>>>=p; // expected-error {{use '> >'}} in g()
294 // FIXME: The fix-its here overlap. in g()
301 …(void)&i; // expected-error{{must explicitly qualify name of member function when taking its addre… in test()
308 ~bar() { } // expected-error {{expected the class name after '~' to name a destructor}} in ~bar()
309 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:6-[[@LINE-1]]:9}:"foo"
315 ~bar::bar() {} // expected-error {{'~' in destructor name should be after nested name specifier}} in bar()
316 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:4}:""
317 // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:9-[[@LINE-2]]:9}:"~"
322 X<int *p> x; // expected-error {{type-id cannot have a name}}
332 return x.str.(); // expected-error {{unexpected '.' in function call; perhaps remove the '.'?}} in foo()
335 …return foo->(x) == y; // expected-error {{unexpected '->' in function call; perhaps remove the '-… in bar()
347 …return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you m… in f()
353 struct B : A // expected-error{{expected '{' after base class list}}
354 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
357 struct C : A // expected-error{{expected '{' after base class list}}
358 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
361 struct D : A // expected-error{{expected '{' after base class list}}
362 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
365 struct E : A // expected-error{{expected '{' after base class list}}
366 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
369 struct F : A // expected-error{{expected '{' after base class list}}
370 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
374 struct G : A // expected-error{{expected '{' after base class list}}
375 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
378 struct H : A // expected-error{{expected '{' after base class list}}
379 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" {"
386 …conversion_operator::* const operator int(); // expected-error {{put the complete type after 'oper…
387 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:32}:""
388 // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:44-[[@LINE-2]]:44}:" conversion_operator::* const"
394 const const_zero_init czi; // expected-error {{default initialization of an object of const type 'c…
395 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:26-[[@LINE-1]]:26}:"{}"