|
clang-tools 22.0.0git
|
Flags calls to operator[] in STL containers and suggests replacing it with safe alternatives. More...
#include <ProBoundsAvoidUncheckedContainerAccessCheck.h>
Public Types | |
| enum | FixModes { None , At , Function } |
Public Member Functions | |
| ProBoundsAvoidUncheckedContainerAccessCheck (StringRef Name, ClangTidyContext *Context) | |
| bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
| void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
| void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
| void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
Flags calls to operator[] in STL containers and suggests replacing it with safe alternatives.
See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#slcon3-avoid-bounds-errors For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.html
Definition at line 23 of file ProBoundsAvoidUncheckedContainerAccessCheck.h.
| Enumerator | |
|---|---|
| None | |
| At | |
| Function | |
Definition at line 34 of file ProBoundsAvoidUncheckedContainerAccessCheck.h.
| clang::tidy::cppcoreguidelines::ProBoundsAvoidUncheckedContainerAccessCheck::ProBoundsAvoidUncheckedContainerAccessCheck | ( | StringRef | Name, |
| ClangTidyContext * | Context ) |
Definition at line 22 of file ProBoundsAvoidUncheckedContainerAccessCheck.cpp.
References clang::tidy::cppcoreguidelines::DefaultExclusionStr, and None.
|
override |
Definition at line 104 of file ProBoundsAvoidUncheckedContainerAccessCheck.cpp.
References At, clang::tidy::cppcoreguidelines::findAlternativeAt(), Function, and None.
|
inlineoverride |
Definition at line 27 of file ProBoundsAvoidUncheckedContainerAccessCheck.h.
|
override |
Definition at line 90 of file ProBoundsAvoidUncheckedContainerAccessCheck.cpp.
References clang::tidy::matchers::matchesAnyListedName().
|
override |
Definition at line 32 of file ProBoundsAvoidUncheckedContainerAccessCheck.cpp.
References clang::tidy::utils::options::serializeStringList().