[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / cxx-for-range-cfg.cpp
blobe258c7a1e208760e82e2aab6880d9dd2b5842263
1 // RUN: %clang_cc1 -Wall -fsyntax-only %s -std=c++11 -verify
3 // The rdar11671507_vector<int *>[]> would previously crash CFG construction
4 // because of the temporary array of vectors.
5 template <typename T>
6 class rdar11671507_vector {
7 public:
8 rdar11671507_vector();
9 ~rdar11671507_vector();
10 T *Base;
11 T *End;
14 void rdar11671507(rdar11671507_vector<int*> v, rdar11671507_vector<int*> w) {
15 for (auto &vec : (rdar11671507_vector<int *>[]){ v, w }) {} // expected-warning {{unused}}