9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_FORRANGECOPYCHECK_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_FORRANGECOPYCHECK_H
12#include "../ClangTidyCheck.h"
24 return LangOpts.CPlusPlus11;
28 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
33 bool handleConstValueCopy(
const VarDecl &LoopVar, ASTContext &Context);
38 bool handleCopyIsOnlyConstReferenced(
const VarDecl &LoopVar,
39 const CXXForRangeStmt &ForRange,
42 const bool WarnOnAllAutoCopies;
43 const std::vector<StringRef> AllowedTypes;
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
llvm::StringMap< ClangTidyValue > OptionMap