|
clang-tools 24.0.0git
|
Finds explicit zero initializers of arrays that can be replaced with empty braces, e.g. More...
#include <RedundantZeroInitializerCheck.h>
Public Member Functions | |
| RedundantZeroInitializerCheck (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 |
| std::optional< TraversalKind > | getCheckTraversalKind () const override |
Finds explicit zero initializers of arrays that can be replaced with empty braces, e.g.
char a[12] = {0}; becomes char a[12] = {};.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-zero-initializer.html
Definition at line 21 of file RedundantZeroInitializerCheck.h.
|
inline |
Definition at line 23 of file RedundantZeroInitializerCheck.h.
|
override |
Definition at line 56 of file RedundantZeroInitializerCheck.cpp.
|
inlineoverride |
Definition at line 31 of file RedundantZeroInitializerCheck.h.
|
inlineoverride |
Definition at line 27 of file RedundantZeroInitializerCheck.h.
|
override |
Definition at line 44 of file RedundantZeroInitializerCheck.cpp.