Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify -Wall %s
      2 
      3 namespace test1 {
      4   static int abc = 42; // expected-warning {{variable 'abc' is not needed and will not be emitted}}
      5   template <typename T>
      6   int foo(void) {
      7     return abc;
      8   }
      9 }
     10 
     11 namespace test2 {
     12   struct bah {
     13   };
     14   namespace {
     15     struct foo : bah {
     16       static char bar;
     17       virtual void zed();
     18     };
     19     void foo::zed() {
     20       bar++;
     21     }
     22     char foo::bar=0;
     23   }
     24   bah *getfoo() {
     25     return new foo();
     26   }
     27 }
     28