Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaTemplate/array-to-pointer-decay.cpp @ 222:81f6424ef0e3 llvm-original
LLVM original branch
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Jul 2021 22:10:01 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line source
// 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); }