#include "clang/AST/ASTContext.h"
#include "clang/AST/CharUnits.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "llvm/Support/FormatVariadic.h"
#include <memory>
usingnamespaceclang;
usingnamespaceento;
formatv;
namespace {
enum class OperandSide { … };
BugReportPtr;
struct NoteTagTemplate { … };
constexpr NoteTagTemplate NoteTagTemplates[] = …;
class BitwiseShiftValidator { … };
void BitwiseShiftValidator::run() { … }
bool BitwiseShiftValidator::assumeRequirement(OperandSide Side,
BinaryOperator::Opcode Comparison,
unsigned Limit) { … }
BugReportPtr BitwiseShiftValidator::checkOvershift() { … }
BugReportPtr BitwiseShiftValidator::checkOperandNegative(OperandSide Side) { … }
BugReportPtr BitwiseShiftValidator::checkLeftShiftOverflow() { … }
void BitwiseShiftValidator::recordAssumption(OperandSide Side,
BinaryOperator::Opcode Comparison,
unsigned Limit) { … }
const NoteTag *BitwiseShiftValidator::createNoteTag() const { … }
std::unique_ptr<PathSensitiveBugReport>
BitwiseShiftValidator::createBugReport(StringRef ShortMsg, StringRef Msg) const { … }
}
class BitwiseShiftChecker : public Checker<check::PreStmt<BinaryOperator>> { … };
void ento::registerBitwiseShiftChecker(CheckerManager &Mgr) { … }
bool ento::shouldRegisterBitwiseShiftChecker(const CheckerManager &mgr) { … }