#include "MisleadingCaptureDefaultByValueCheck.h"
#include "../utils/LexerUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::cppcoreguidelines {
MisleadingCaptureDefaultByValueCheck::MisleadingCaptureDefaultByValueCheck(
StringRef Name, ClangTidyContext *Context)
: … { … }
void MisleadingCaptureDefaultByValueCheck::registerMatchers(
MatchFinder *Finder) { … }
static SourceLocation findDefaultCaptureEnd(const LambdaExpr *Lambda,
ASTContext &Context) { … }
static std::string createReplacementText(const LambdaExpr *Lambda) { … }
void MisleadingCaptureDefaultByValueCheck::check(
const MatchFinder::MatchResult &Result) { … }
}