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