[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / SemaCXX / for-range-unused.cpp
blobec11015552e73c699ec8ef67d13e11ac20be6a5a
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 -Wunused
3 // PR9968: We used to warn that __range is unused in a dependent for-range.
5 template <typename T>
6 struct Vector {
7 void doIt() {
8 int a; // expected-warning {{unused variable 'a'}}
10 for (auto& e : elements) // expected-warning {{unused variable 'e'}}
14 T elements[10];
18 int main(int, char**) {
19 Vector<int> vector;
20 vector.doIt(); // expected-note {{here}}