llvm-project/clang-tools-extra/docs
Matthias Gehre 37f10a0c25 [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index
Summary:
This is http://reviews.llvm.org/D13746 but instead of including <array>,
a stub is provided.
This check flags all array subscriptions on static arrays and
std::arrays that either have a non-compile-time-constant index or are
out of bounds.

Dynamic accesses into arrays are difficult for both tools and humans to
validate as safe. array_view is a bounds-checked, safe type for
accessing arrays of data. at() is another alternative that ensures
single accesses are bounds-checked. If iterators are needed to access an
array, use the iterators from an array_view constructed over the array.

This rule is part of the "Bounds safety" profile of the C++ Core
Guidelines, see
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-bounds2-only-index-into-arrays-using-constant-expressions

Reviewers: alexfh, sbenza, bkramer, aaron.ballman

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15030

llvm-svn: 255470
2015-12-13 22:08:26 +00:00
..
clang-tidy [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index 2015-12-13 22:08:26 +00:00
AddOverrideTransform.rst Revert a LLVM_OVERRIDE to 'override' change in documentation. My search and replace was a little overzealous. 2014-03-02 10:24:34 +00:00
Doxyfile [clang-tidy] Move clang-tidy docs to a separate directory. Create doc files for checks 2015-08-27 18:10:07 +00:00
LoopConvertTransform.rst Rename cpp11-migrate to clang-modernize. 2013-09-04 17:35:07 +00:00
Makefile Add doxygen support for the tools in clang-tools-extra 2013-02-28 16:46:40 +00:00
MigratorUsage.rst clang-modernize: Tweak docs after rename 2013-09-06 19:27:19 +00:00
ModernizerUsage.rst docs: Spell a couple of cmake options with =ON in the docs 2015-05-18 05:05:49 +00:00
ModularizeUsage.rst Added mechanism to modularize for doing a compilation precheck 2015-07-10 00:37:25 +00:00
PassByValueTransform.rst Rename cpp11-migrate to clang-modernize. 2013-09-04 17:35:07 +00:00
README.txt cpp11-migrate: Add Replace-AutoPtr Transform 2013-07-03 13:21:24 +00:00
ReplaceAutoPtrTransform.rst Rename cpp11-migrate to clang-modernize. 2013-09-04 17:35:07 +00:00
UseAutoTransform.rst Rename cpp11-migrate to clang-modernize. 2013-09-04 17:35:07 +00:00
UseNullptrTransform.rst Rename cpp11-migrate to clang-modernize. 2013-09-04 17:35:07 +00:00
clang-modernize.rst Add a deprecation notice to the clang-modernize documentation. 2015-09-10 09:42:01 +00:00
clang-tidy.rst [clang-tidy] Automatically redirect to the new page. 2015-09-09 15:23:39 +00:00
conf.py docs/conf.py: bump version to 3.8 2015-07-14 23:37:08 +00:00
cpp11-migrate.rst clang-modernize: Tweak docs after rename 2013-09-06 19:27:19 +00:00
index.rst [clang-tidy] Move clang-tidy docs to a separate directory. Create doc files for checks 2015-08-27 18:10:07 +00:00
make.bat
modularize.rst Fixing a sphinx warning. 2015-09-28 19:27:37 +00:00
pp-trace.rst Prospective build fix following clang r210518 2014-06-10 09:58:45 +00:00

README.txt

-------------------------------------------------------------
Documentation for the tools of clang-tools-extra repo project
-------------------------------------------------------------

Sphinx and doxygen documentation is generated by executing make.

Sphinx html files can be generated separately using make html.

Doxygen html files can also be generated using make doxygen.

The generated documentation will be placed in _build/html.