1.. title:: clang-tidy - cppcoreguidelines-pro-bounds-constant-array-index
2
3cppcoreguidelines-pro-bounds-constant-array-index
4=================================================
5
6This check flags all array subscript expressions on static arrays and
7``std::arrays`` that either do not have a constant integer expression index or
8are out of bounds (for ``std::array``). For out-of-bounds checking of static
9arrays, see the `-Warray-bounds` Clang diagnostic.
10
11This rule is part of the "Bounds safety" profile of the C++ Core Guidelines, see
12https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Pro-bounds-arrayindex.
13
14Options
15-------
16
17.. option:: GslHeader
18
19   The check can generate fixes after this option has been set to the name of
20   the include file that contains ``gsl::at()``, e.g. `"gsl/gsl.h"`.
21
22.. option:: IncludeStyle
23
24   A string specifying which include-style is used, `llvm` or `google`. Default
25   is `llvm`.
26