blob: 6d2cda90b1d3358586223de79bbdaf9218e70fee [file] [log] [blame]
Richard Trieu304e2332011-07-01 20:02:53 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3struct BaseReturn {};
4
5struct Base {
6 virtual BaseReturn Foo() = 0; // expected-note{{overridden virtual function is here}}
7};
8struct X {};
9struct 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
13Derived d;