Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 |
Fariborz Jahanian | 6c813e1 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 2 | |
Richard Smith | 6c4c36c | 2012-03-30 20:53:28 +0000 | [diff] [blame^] | 3 | struct A { // expected-warning {{does not declare any constructor to initialize}} |
| 4 | const int i; // expected-note{{const member 'i' will never be initialized}} expected-note {{implicitly deleted}} |
Fariborz Jahanian | 6f26920 | 2009-11-03 20:38:53 +0000 | [diff] [blame] | 5 | virtual void f() { } |
Fariborz Jahanian | 6c813e1 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 6 | }; |
| 7 | |
| 8 | int main () { |
Douglas Gregor | e4e68d4 | 2012-02-15 19:33:52 +0000 | [diff] [blame] | 9 | (void)A(); // expected-error {{call to implicitly-deleted default constructor}} |
Fariborz Jahanian | 6c813e1 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 10 | } |