diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
| commit | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch) | |
| tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/SemaCXX/constructor-initializer.cpp | |
| parent | 9da628931ebf2609493570f87824ca22402cc65f (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/constructor-initializer.cpp')
| -rw-r--r-- | test/SemaCXX/constructor-initializer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp index e439a76c17cc..e8b7f0b6760b 100644 --- a/test/SemaCXX/constructor-initializer.cpp +++ b/test/SemaCXX/constructor-initializer.cpp @@ -74,7 +74,7 @@ class U { union { int b; double d; }; U() : a(1), // expected-note {{previous initialization is here}} - p(0), // expected-error {{initializing multiple members of anonymous union}} + p(0), // expected-error {{initializing multiple members of union}} d(1.0) {} }; @@ -268,3 +268,15 @@ struct S4 { }; } + +namespace PR12049 { + int function(); + + class Class + { + public: + Class() : member(function() {} // expected-note {{to match this '('}} + + int member; // expected-error {{expected ')'}} + }; +} |
