[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / SemaTemplate / array-to-pointer-decay.cpp
blobdcf0901610408f9137adc2370367a68ff8b8e333
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 struct mystruct {
5 int member;
6 };
8 template <int i>
9 int foo() {
10 mystruct s[1];
11 return s->member;
14 int main() {
15 foo<1>();
18 // PR7405
19 struct hb_sanitize_context_t {
20 int start;
22 template <typename Type> static bool sanitize() {
23 hb_sanitize_context_t c[1];
24 return !c->start;
26 bool closure = sanitize<int>();
28 // PR16206
29 typedef struct {
30 char x[4];
31 } chars;
33 chars getChars();
34 void use(char *);
36 void test() {
37 use(getChars().x);