forked from OSchip/llvm-project
3696c70e67
This commit introduces a new check `readability-container-contains` which finds usages of `container.count()` and `container.find() != container.end()` and instead recommends the `container.contains()` method introduced in C++20. For containers which permit multiple entries per key (`multimap`, `multiset`, ...), `contains` is more efficient than `count` because `count` has to do unnecessary additional work. While this this performance difference does not exist for containers with only a single entry per key (`map`, `unordered_map`, ...), `contains` still conveys the intent better. Reviewed By: xazax.hun, whisperity Differential Revision: http://reviews.llvm.org/D112646 |
||
---|---|---|
.. | ||
_static | ||
_templates | ||
clang-tidy | ||
clangd | ||
CMakeLists.txt | ||
ModularizeUsage.rst | ||
README.txt | ||
ReleaseNotes.rst | ||
clang-doc.rst | ||
clang-include-fixer.rst | ||
clang-modernize.rst | ||
clang-rename.rst | ||
clang-tidy.rst | ||
clangd.rst | ||
conf.py | ||
cpp11-migrate.rst | ||
doxygen-mainpage.dox | ||
doxygen.cfg.in | ||
index.rst | ||
make.bat | ||
modularize.rst | ||
pp-trace.rst |
README.txt
---------------------------------- Documentation in clang-tools-extra ---------------------------------- To generate documentation in HTML format from files in clang-tools-extra/docs, build the docs-clang-tools-html target. To generate documentation from the source code using Doxygen, build the doxygen-clang-tools target.