#include "AssertSideEffectCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
#include <string>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::bugprone {
namespace {
AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls,
clang::ast_matchers::internal::Matcher<NamedDecl>,
IgnoredFunctionsMatcher) { … }
}
AssertSideEffectCheck::AssertSideEffectCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void AssertSideEffectCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void AssertSideEffectCheck::registerMatchers(MatchFinder *Finder) { … }
void AssertSideEffectCheck::check(const MatchFinder::MatchResult &Result) { … }
}