// RUN: %clang_cc1 -fsyntax-only -verify -Wall %s

namespace test1 {
  static int abc = 42; // expected-warning {{variable 'abc' is not needed and will not be emitted}}
  template <typename T>
  int foo(void) {
    return abc;
  }
}

namespace test2 {
  struct bah {
  };
  namespace {
    struct foo : bah {
      static char bar;
      virtual void zed();
    };
    void foo::zed() {
      bar++;
    }
    char foo::bar=0;
  }
  bah *getfoo() {
    return new foo();
  }
}

Add a basic testcase for the "variable is not needed" warning and one that regressed in r168519.
Add a basic testcase for the "variable is not needed" warning and one that
regressed in r168519.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@168563 91177308-0d34-0410-b5e6-96231b3b80d8
