clang-tools 22.0.0git
|
Flags calls to operator[] in STL containers and suggests replacing it with safe alternatives. More...
#include <ProBoundsAvoidUncheckedContainerAccess.h>
Public Types | |
enum | FixModes { None , At , Function } |
Public Member Functions | |
ProBoundsAvoidUncheckedContainerAccess (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 ProBoundsAvoidUncheckedContainerAccess.h.
Enumerator | |
---|---|
None | |
At | |
Function |
Definition at line 34 of file ProBoundsAvoidUncheckedContainerAccess.h.
clang::tidy::cppcoreguidelines::ProBoundsAvoidUncheckedContainerAccess::ProBoundsAvoidUncheckedContainerAccess | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 22 of file ProBoundsAvoidUncheckedContainerAccess.cpp.
References clang::tidy::cppcoreguidelines::DefaultExclusionStr, and None.
|
override |
Definition at line 103 of file ProBoundsAvoidUncheckedContainerAccess.cpp.
References At, clang::tidy::cppcoreguidelines::findAlternativeAt(), Function, and None.
|
inlineoverride |
Definition at line 27 of file ProBoundsAvoidUncheckedContainerAccess.h.
|
override |
Definition at line 89 of file ProBoundsAvoidUncheckedContainerAccess.cpp.
References clang::tidy::matchers::matchesAnyListedName().
|
override |
Definition at line 31 of file ProBoundsAvoidUncheckedContainerAccess.cpp.
References clang::tidy::utils::options::serializeStringList().