|
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 136 of file UseEmplaceCheck.cpp.
References clang::tidy::modernize::DefaultContainersWithPush, clang::tidy::modernize::DefaultContainersWithPushBack, clang::tidy::modernize::DefaultContainersWithPushFront, clang::tidy::modernize::DefaultEmplacyFunctions, clang::tidy::modernize::DefaultSmartPointers, clang::tidy::modernize::DefaultTupleMakeFunctions, and clang::tidy::modernize::DefaultTupleTypes.
|
override |
Definition at line 307 of file UseEmplaceCheck.cpp.
|
inlineoverride |
Definition at line 28 of file UseEmplaceCheck.h.
|
override |
Definition at line 154 of file UseEmplaceCheck.cpp.
References clang::tidy::modernize::cxxMemberCallExprOnContainer(), and clang::tidy::modernize::hasTypeOrPointeeType().
|
override |
Definition at line 411 of file UseEmplaceCheck.cpp.
References clang::tidy::utils::options::serializeStringList().