blob: 26d277d7dc05879d279e7280f066e5631f491d80 [file] [log] [blame]
Douglas Gregor83c9abc2010-06-22 02:41:05 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Douglas Gregor83c9abc2010-06-22 02:41:05 +00003
4struct mystruct {
5 int member;
6};
7
8template <int i>
9int foo() {
10 mystruct s[1];
11 return s->member;
12}
13
14int main() {
15 foo<1>();
16}
17
18// PR7405
19struct hb_sanitize_context_t {
20 int start;
21};
22template <typename Type> static bool sanitize() {
23 hb_sanitize_context_t c[1];
24 return !c->start;
25}
26bool closure = sanitize<int>();