Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -verify %s
      2 struct __attribute__((warn_unused)) Test
      3 {
      4     Test();
      5     ~Test();
      6     void use();
      7 };
      8 
      9 struct TestNormal
     10 {
     11     TestNormal();
     12 };
     13 
     14 int main()
     15 {
     16    Test unused;         // expected-warning {{unused variable 'unused'}}
     17    Test used;
     18    TestNormal normal;
     19    used.use();
     20 }
     21