Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Douglas Gregor | f4d17c4 | 2009-03-27 04:38:56 +0000 | [diff] [blame] | 2 | |
Richard Smith | 12e7931 | 2016-05-13 06:47:56 +0000 | [diff] [blame] | 3 | struct C { // expected-note 1+{{candidate}} |
Douglas Gregor | 39c778b | 2009-12-20 22:01:25 +0000 | [diff] [blame] | 4 | virtual C() = 0; // expected-error{{constructor cannot be declared 'virtual'}} |
Douglas Gregor | f4d17c4 | 2009-03-27 04:38:56 +0000 | [diff] [blame] | 5 | }; |
| 6 | |
| 7 | void f() { |
Richard Smith | 12e7931 | 2016-05-13 06:47:56 +0000 | [diff] [blame] | 8 | C c; // expected-error {{no matching constructor}} |
Douglas Gregor | f4d17c4 | 2009-03-27 04:38:56 +0000 | [diff] [blame] | 9 | } |