Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 // expected-no-diagnostics
      3 
      4 namespace 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 }
     19 
     20 namespace 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 }
     34 
     35 namespace Templates {
     36   template<int Value>
     37   void f() {
     38     struct Inner {
     39       static int getValue() { return Value; }
     40     };
     41   }
     42 }
     43