diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
| commit | 51fb8b013e7734b795139f49d3b1f77c539be20a (patch) | |
| tree | 59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/SemaCXX/value-initialization.cpp | |
| parent | 73490b890977362d28dd6326843a1ecae413921d (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/value-initialization.cpp')
| -rw-r--r-- | test/SemaCXX/value-initialization.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/value-initialization.cpp b/test/SemaCXX/value-initialization.cpp new file mode 100644 index 000000000000..29d866fa64de --- /dev/null +++ b/test/SemaCXX/value-initialization.cpp @@ -0,0 +1,10 @@ +// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x + +struct A { + const int i; // expected-note {{declared at}} + virtual void f() { } +}; + +int main () { + (void)A(); // expected-error {{cannot define the implicit default constructor for 'struct A', because const member 'i' cannot be default-initialized}} +} |
