clang-tools 22.0.0git
|
Warns when the code is unwrapping a std::optional<T>, absl::optional<T>, or base::std::optional<T> object without assuring that it contains a value. More...
#include <UncheckedOptionalAccessCheck.h>
Public Member Functions | |
UncheckedOptionalAccessCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
Warns when the code is unwrapping a std::optional<T>, absl::optional<T>, or base::std::optional<T> object without assuring that it contains a value.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unchecked-optional-access.html
Definition at line 24 of file UncheckedOptionalAccessCheck.h.
|
inline |
Definition at line 26 of file UncheckedOptionalAccessCheck.h.
|
override |
Definition at line 44 of file UncheckedOptionalAccessCheck.cpp.
References FuncDecl, and clang::tidy::bugprone::FuncID().
|
inlineoverride |
Definition at line 31 of file UncheckedOptionalAccessCheck.h.
|
override |
Definition at line 27 of file UncheckedOptionalAccessCheck.cpp.
References clang::tidy::bugprone::FuncID().
|
inlineoverride |
Definition at line 34 of file UncheckedOptionalAccessCheck.h.