blob: 500b2197ef35f1016b2a2cecc5d23613229a6950 [file] [log] [blame]
Douglas Gregor9ea9bdb2010-03-01 23:15:13 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3namespace PR6382 {
4 int foo()
5 {
6 goto error;
7 {
8 struct BitPacker {
9 BitPacker() {}
10 };
11 BitPacker packer;
12 }
13
14 error:
15 return -1;
16 }
17}
Douglas Gregor8f8210c2010-03-02 01:29:43 +000018
19namespace PR6383 {
20 void test (bool gross)
21 {
22 struct compare_and_set
23 {
24 void operator() (const bool inner, const bool gross = false)
25 {
26 // the code
27 }
28 } compare_and_set2;
29
30 compare_and_set2 (false, gross);
31 }
32}
Douglas Gregor15dedf02010-04-27 21:10:04 +000033
34namespace Templates {
35 template<int Value>
36 void f() {
37 struct Inner {
38 static int getValue() { return Value; }
39 };
40 }
41}