#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/AST/Expr.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TypeTraits.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
usingnamespaceclang;
usingnamespaceento;
namespace {
class WalkAST: public StmtVisitor<WalkAST> { … };
}
bool WalkAST::containsBadStrncatPattern(const CallExpr *CE) { … }
bool WalkAST::containsBadStrlcpyStrlcatPattern(const CallExpr *CE) { … }
void WalkAST::VisitCallExpr(CallExpr *CE) { … }
void WalkAST::VisitChildren(Stmt *S) { … }
namespace {
class CStringSyntaxChecker: public Checker<check::ASTCodeBody> { … };
}
void ento::registerCStringSyntaxChecker(CheckerManager &mgr) { … }
bool ento::shouldRegisterCStringSyntaxChecker(const CheckerManager &mgr) { … }