[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

Kalle Huttunen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 1 08:05:27 PDT 2018


khuttun created this revision.
khuttun added a reviewer: alexfh.
Herald added subscribers: xazax.hun, mgorny.

Warns on std::map and std::unordered_map lookups done with operator[]. Inserting values with operator[] is still allowed.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46317

Files:
  clang-tidy/bugprone/BugproneTidyModule.cpp
  clang-tidy/bugprone/CMakeLists.txt
  clang-tidy/bugprone/MapSubscriptOperatorLookupCheck.cpp
  clang-tidy/bugprone/MapSubscriptOperatorLookupCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/bugprone-map-subscript-operator-lookup.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/bugprone-map-subscript-operator-lookup.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46317.144723.patch
Type: text/x-patch
Size: 8517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180501/453964d8/attachment-0001.bin>


More information about the cfe-commits mailing list