brintos

brintos / llvm-project-archived public Read only

0
0
Text · 521 B · dcf0901 Raw
39 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 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// PR740519struct 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>();27 28// PR1620629typedef struct {30	char x[4];31} chars;32 33chars getChars();34void use(char *);35 36void test() {37	use(getChars().x);38}39