• Home
  • Raw
  • Download

Lines Matching refs:it

16   std::vector<int>::iterator it = v.begin();  in foo1()  local
17 fum(it); // no-warning in foo1()
18 *it; // no-warning in foo1()
20 std::vector<int>::iterator et = it + 3; in foo1()
21 while(it != et) { // no-warning in foo1()
22 if (*it == 0) // no-warning in foo1()
23 *it = 1; // no-warning in foo1()
27 while(it != et) // expected-warning{{Cannot compare iterators from different containers}} in foo1()
30 for( std::vector<int>::iterator it = v.begin(); it != v.end(); it++ ) { // no-warning in foo1() local
31 if (*it == 1) // no-warning in foo1()
32 *it = 0; // no-warning in foo1()
36 et = it; // no-warning in foo1()
40 et = it + 2; // no-warning in foo1()
42 et = 2 + it; // no-warning in foo1()
44 et = 2 + 4 + it; // no-warning in foo1()
49 it = v.insert( it, 1 ); // no-warning in foo1()
51 ++it; // no-warning in foo1()
54 v.erase(it); // no-warning in foo1()
55 et = it + 2; // expected-warning{{Attempt to use an iterator made invalid by call to 'erase'}} in foo1()
56 …et = 2 + it + 2; // expected-warning{{Attempt to use an iterator made invalid by call to 'erase'}} in foo1()
57 et = 2 + it; // expected-warning{{Attempt to use an iterator made invalid by call to 'erase'}} in foo1()
58 ++it; // expected-warning{{Attempt to use an iterator made invalid by call to 'erase'}} in foo1()
59 it++; // expected-warning{{Attempt to use an iterator made invalid by call to 'erase'}} in foo1()
60 *it; // expected-warning{{Attempt to use an iterator made invalid by call to 'erase'}} in foo1()
61it = v.insert( it, 1 ); // expected-warning{{Attempt to use an iterator made invalid by call to 'e… in foo1()
63 *it; // no-warning in foo1()
72 vector<int>::iterator it = v.begin(); in foo2() local
73 *it; // no-warning in foo2()
74 v.insert( it, 1 ); // no-warning in foo2()
75 *it; // expected-warning{{Attempt to use an iterator made invalid by call to 'insert'}} in foo2()
76it = v.insert( it, 1 ); // expected-warning{{Attempt to use an iterator made invalid by call to 'i… in foo2()
77 *it; // no-warning in foo2()
100 std::vector<float>::iterator it = v.begin(); in foo4() local
101 *it; // no-warning in foo4()
103 …*it; // expected-warning{{Attempt to use an iterator made invalid by copying another container to… in foo4()