Douglas Gregor | 9ea9bdb | 2010-03-01 23:15:13 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | namespace 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 Gregor | 8f8210c | 2010-03-02 01:29:43 +0000 | [diff] [blame] | 18 | |
| 19 | namespace 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 Gregor | 15dedf0 | 2010-04-27 21:10:04 +0000 | [diff] [blame] | 33 | |
| 34 | namespace Templates { |
| 35 | template<int Value> |
| 36 | void f() { |
| 37 | struct Inner { |
| 38 | static int getValue() { return Value; } |
| 39 | }; |
| 40 | } |
| 41 | } |