[clang-tidy] Add bugprone-inaccurate-erase check.
This will hopefully identify misusage of the erase-remove idiom. Test: "foo.erase(std::remove_if(...))" produces error. Test: mmm system/core/adb -j (no warnings) Change-Id: Iba0a6fc40cb6e7c65a7a3926d915874dc89a60c6
This commit is contained in:
parent
a22e74cd4e
commit
89169a372f
1 changed files with 9 additions and 0 deletions
|
|
@ -12,6 +12,11 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
tidy_errors = [
|
||||
"-*",
|
||||
"bugprone-inaccurate-erase",
|
||||
]
|
||||
|
||||
cc_defaults {
|
||||
name: "adb_defaults",
|
||||
|
||||
|
|
@ -73,6 +78,10 @@ cc_defaults {
|
|||
],
|
||||
},
|
||||
},
|
||||
|
||||
tidy: true,
|
||||
tidy_checks: tidy_errors,
|
||||
tidy_checks_as_errors: tidy_errors,
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue