[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / FixIt / typo-location-bugs.cpp
blobc7111a801066d32d110937864eba95be549c8445
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: cp %s %t
3 // RUN: not %clang_cc1 -fsyntax-only -fixit -x c++ %t
4 // RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ %t
6 namespace dcl_fct_default_p10 {
7 struct A {
8 virtual void f(int a = 7); // expected-note{{'A::f' declared here}}
9 };
11 struct B : public A {
12 void f(int a);
15 void m() {
16 B* pb = new B;
17 A* pa = pb;
18 pa->f(); // OK, calls pa->B::f(7)
19 pb->f(); // expected-error{{too few arguments to function call, expected 1, have 0; did you mean 'A::f'?}}
23 namespace PR18608 {
24 struct A {
25 virtual void f() const;
26 virtual void f(int x) const; // expected-note{{'A::f' declared here}}
29 struct B : public A {
30 virtual void f() const;
33 void test(B b) {
34 b.f(1); // expected-error{{too many arguments to function call, expected 0, have 1; did you mean 'A::f'?}}
38 namespace PR20626 {
39 class A {
40 public:
41 void Foo(){}; // expected-note{{'Foo' declared here}}
43 class B {};
44 class C : public A, public B {
45 void Run() {
46 B::Foo(); // expected-error{{no member named 'Foo' in 'PR20626::B'; did you mean simply 'Foo'?}}