1ef4a2a2bSDouglas Gregor // RUN: %clang_cc1 -fsyntax-only -verify %s
2*c6e68daaSAndy Gibbs // expected-no-diagnostics
3ef4a2a2bSDouglas Gregor 
4ef4a2a2bSDouglas Gregor struct mystruct {
5ef4a2a2bSDouglas Gregor   int  member;
6ef4a2a2bSDouglas Gregor };
7ef4a2a2bSDouglas Gregor 
8ef4a2a2bSDouglas Gregor template <int i>
9ef4a2a2bSDouglas Gregor int foo() {
10ef4a2a2bSDouglas Gregor   mystruct s[1];
11ef4a2a2bSDouglas Gregor   return s->member;
12ef4a2a2bSDouglas Gregor }
13ef4a2a2bSDouglas Gregor 
14ef4a2a2bSDouglas Gregor int main() {
15ef4a2a2bSDouglas Gregor   foo<1>();
16ef4a2a2bSDouglas Gregor }
17ef4a2a2bSDouglas Gregor 
18ef4a2a2bSDouglas Gregor // PR7405
19ef4a2a2bSDouglas Gregor struct hb_sanitize_context_t {
20ef4a2a2bSDouglas Gregor   int start;
21ef4a2a2bSDouglas Gregor };
22ef4a2a2bSDouglas Gregor template <typename Type> static bool sanitize() {
23ef4a2a2bSDouglas Gregor   hb_sanitize_context_t c[1];
24ef4a2a2bSDouglas Gregor   return !c->start;
25ef4a2a2bSDouglas Gregor }
26ef4a2a2bSDouglas Gregor bool closure = sanitize<int>();
27