[PATCH] D27806: [clang-tidy] Add obvious-invalid-range
Piotr Padlewski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 15 09:55:15 PST 2016
Prazek added inline comments.
Comment at: test/clang-tidy/misc-invalid-range.cpp:41
+ auto &v2 = v;
+ std::move(v.begin(), v2.end(), v2.begin());
+ // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: call to algorithm with begin and end from different objects [misc-invalid-range]
> They're the same object...
Yep, but this type of code stinks, so it is probably a bug
More information about the cfe-commits