diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-18 00:44:17 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-18 00:44:17 +0000 |
commit | 6678a05ba19c40d60ed68b37262942eb887be217 (patch) | |
tree | 829ae31f38321e743f16588499af30b6dcb19760 /test/CXX | |
parent | 8d7a24e94b58676e57fd3f47353cbdbc59917d81 (diff) | |
download | clang-6678a05ba19c40d60ed68b37262942eb887be217.tar.gz |
Tests for DR1507.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r-- | test/CXX/dcl.decl/dcl.init/p7.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CXX/dcl.decl/dcl.init/p7.cpp b/test/CXX/dcl.decl/dcl.init/p7.cpp new file mode 100644 index 0000000000..03216f4c28 --- /dev/null +++ b/test/CXX/dcl.decl/dcl.init/p7.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -std=c++11 -verify %s + +struct NotAggregateBase {}; + +struct A : NotAggregateBase { +private: + A() = default; // expected-note {{here}} +}; +A a = {}; // expected-error {{calling a private constructor}} + +struct B : NotAggregateBase { + explicit B() = default; // expected-note {{here}} +}; +B b = {}; // expected-error {{chosen constructor is explicit}} |