diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-03 20:38:53 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-03 20:38:53 +0000 |
commit | 7ad36166594cdd5908255395220387a33b84f3bd (patch) | |
tree | 52b3465a40cb02858dd2e9b9aacb25ab4789a4a6 /clang/test/SemaCXX/value-initialization.cpp | |
parent | a86f919763938395cb77a1a92fc0a4d75b52675d (diff) | |
download | bcm5719-llvm-7ad36166594cdd5908255395220387a33b84f3bd.tar.gz bcm5719-llvm-7ad36166594cdd5908255395220387a33b84f3bd.zip |
Remove previous patch for pr5296 due to further clarification
of value-initialization and trivial constructors.
llvm-svn: 85935
Diffstat (limited to 'clang/test/SemaCXX/value-initialization.cpp')
-rw-r--r-- | clang/test/SemaCXX/value-initialization.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/clang/test/SemaCXX/value-initialization.cpp b/clang/test/SemaCXX/value-initialization.cpp index 6b992973614..29d866fa64d 100644 --- a/clang/test/SemaCXX/value-initialization.cpp +++ b/clang/test/SemaCXX/value-initialization.cpp @@ -1,23 +1,10 @@ // RUN: clang-cc -fsyntax-only -verify %s -std=c++0x struct A { - ~A(); - const int i; // expected-note {{declared at}} -}; - -struct B { - // B is a non-POD with no user-written constructor. - // It has a nontrivial generated constructor. - const int i[12]; // expected-note {{declared at}} - A a; + const int i; // expected-note {{declared at}} + virtual void f() { } }; int main () { - // Value-initializing a "B" doesn't call the default constructor for - // "B"; it value-initializes the members of B. Therefore it shouldn't - // cause an error on generation of the default constructor for the - // following: - new B(); // expected-error {{cannot define the implicit default constructor for 'struct B', because const member 'i'}} - (void)B(); - (void)A(); // expected-error {{cannot define the implicit default constructor for 'struct A', because const member 'i'}} + (void)A(); // expected-error {{cannot define the implicit default constructor for 'struct A', because const member 'i' cannot be default-initialized}} } |