clang-tools 22.0.0git
|
Finds assert() with side effect. More...
#include <AssertSideEffectCheck.h>
Public Member Functions | |
AssertSideEffectCheck (StringRef Name, ClangTidyContext *Context) | |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Finds assert() with side effect.
The condition of assert() is evaluated only in debug builds so a condition with side effect can cause different behavior in debug / release builds.
There are two options:
Definition at line 32 of file AssertSideEffectCheck.h.
clang::tidy::bugprone::AssertSideEffectCheck::AssertSideEffectCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 88 of file AssertSideEffectCheck.cpp.
|
override |
Definition at line 126 of file AssertSideEffectCheck.cpp.
|
override |
Definition at line 106 of file AssertSideEffectCheck.cpp.
References clang::tidy::matchers::matchesAnyListedName().
|
override |
Definition at line 99 of file AssertSideEffectCheck.cpp.
References clang::tidy::utils::options::serializeStringList().