clang-tools 22.0.0git
|
Replaces assert() with static_assert() if the condition is evaluatable at compile time. More...
#include <StaticAssertCheck.h>
Public Member Functions | |
StaticAssertCheck (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 |
Replaces assert() with static_assert() if the condition is evaluatable at compile time.
The condition of static_assert() is evaluated at compile time which is safer and more efficient.
Definition at line 23 of file StaticAssertCheck.h.
clang::tidy::misc::StaticAssertCheck::StaticAssertCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 24 of file StaticAssertCheck.cpp.
|
override |
Definition at line 76 of file StaticAssertCheck.cpp.
|
inlineoverride |
Definition at line 26 of file StaticAssertCheck.h.
|
override |
Definition at line 27 of file StaticAssertCheck.cpp.