f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
38 lines
521 B
C++
38 lines
521 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
struct mystruct {
|
|
int member;
|
|
};
|
|
|
|
template <int i>
|
|
int foo() {
|
|
mystruct s[1];
|
|
return s->member;
|
|
}
|
|
|
|
int main() {
|
|
foo<1>();
|
|
}
|
|
|
|
// PR7405
|
|
struct hb_sanitize_context_t {
|
|
int start;
|
|
};
|
|
template <typename Type> static bool sanitize() {
|
|
hb_sanitize_context_t c[1];
|
|
return !c->start;
|
|
}
|
|
bool closure = sanitize<int>();
|
|
|
|
// PR16206
|
|
typedef struct {
|
|
char x[4];
|
|
} chars;
|
|
|
|
chars getChars();
|
|
void use(char *);
|
|
|
|
void test() {
|
|
use(getChars().x);
|
|
}
|