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