blob: 4e3acbb767c02cb1cc6881daa516655542f9b3d1 [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
Fariborz Jahanian6c813e12009-10-27 16:51:19 +00002
Richard Smith6c4c36c2012-03-30 20:53:28 +00003struct 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 Jahanian6f269202009-11-03 20:38:53 +00005 virtual void f() { }
Fariborz Jahanian6c813e12009-10-27 16:51:19 +00006};
7
8int main () {
Douglas Gregore4e68d42012-02-15 19:33:52 +00009 (void)A(); // expected-error {{call to implicitly-deleted default constructor}}
Fariborz Jahanian6c813e12009-10-27 16:51:19 +000010}