17d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor// RUN: %clang_cc1 -fsyntax-only -Wunused -verify %s
27d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor
37d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregorstruct X0 {
47d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor  ~X0();
57d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor};
67d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor
77d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregorstruct X1 { };
87d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor
97d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregortemplate<typename T>
107d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregorvoid f() {
117d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor  X0 x0;
127d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor  X1 x1; // expected-warning{{unused variable 'x1'}}
137d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor}
147d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor
157d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregortemplate<typename T, typename U>
167d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregorvoid g() {
177d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor  T t;
187d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor  U u; // expected-warning{{unused variable 'u'}}
197d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor}
207d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregor
217d03f837cc8360ff3899d4f93d97692c3a0dcabbDouglas Gregortemplate void g<X0, X1>(); // expected-note{{in instantiation of}}
22