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