brintos

brintos / llvm-project-archived public Read only

0
0
Text · 492 B · e258c7a Raw
17 lines · cpp
1// RUN: %clang_cc1 -Wall -fsyntax-only %s -std=c++11 -verify2 3// The rdar11671507_vector<int *>[]> would previously crash CFG construction4// because of the temporary array of vectors.5template <typename T>6class rdar11671507_vector {7public:8  rdar11671507_vector();9  ~rdar11671507_vector();10  T *Base;11  T *End;12};13 14void rdar11671507(rdar11671507_vector<int*> v, rdar11671507_vector<int*> w) {15  for (auto &vec : (rdar11671507_vector<int *>[]){ v, w }) {} // expected-warning {{unused}}16}17