xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/PR7410.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 struct BaseReturn {};
4 
5 struct Base {
6   virtual BaseReturn Foo() = 0;  // expected-note{{overridden virtual function is here}}
7 };
8 struct X {};
9 struct Derived : Base {
10   X Foo();  // expected-error{{virtual function 'Foo' has a different return type ('X') than the function it overrides (which has return type 'BaseReturn')}}
11 };
12 
13 Derived d;
14