clang-tools 22.0.0git
|
This check looks for cases when inserting new element into std::vector but the element is constructed temporarily. More...
#include <UseEmplaceCheck.h>
Public Member Functions | |
UseEmplaceCheck (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 |
This check looks for cases when inserting new element into std::vector but the element is constructed temporarily.
It replaces those calls for emplace_back of arguments passed to constructor of temporary object.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html
Definition at line 25 of file UseEmplaceCheck.h.
clang::tidy::modernize::UseEmplaceCheck::UseEmplaceCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 134 of file UseEmplaceCheck.cpp.
|
override |
Definition at line 305 of file UseEmplaceCheck.cpp.
|
inlineoverride |
Definition at line 28 of file UseEmplaceCheck.h.
|
override |
Definition at line 152 of file UseEmplaceCheck.cpp.
|
override |
Definition at line 409 of file UseEmplaceCheck.cpp.
References clang::tidy::utils::options::serializeStringList().