clang 10.0.0git

Functions
UndefResultChecker.cpp File Reference
`#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.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/CheckerContext.h"`
`#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"`
`#include "llvm/ADT/SmallString.h"`
`#include "llvm/Support/raw_ostream.h"`
Include dependency graph for UndefResultChecker.cpp:

Go to the source code of this file.

## Functions
static bool | isArrayIndexOutOfBounds (CheckerContext &C, const Expr *Ex)
static bool | isShiftOverflow (const BinaryOperator *B, CheckerContext &C)
static bool | isLeftShiftResultUnrepresentable (const BinaryOperator *B, CheckerContext &C)

## Function Documentation

## ◆ isArrayIndexOutOfBounds()

static bool isArrayIndexOutOfBounds | ( | CheckerContext & | C,
|  | const Expr * | Ex
| ) |  |
| static

Definition at line 37 of file UndefResultChecker.cpp.

References clang::CodeGen::state.

Referenced by isLeftShiftResultUnrepresentable().

## ◆ isLeftShiftResultUnrepresentable()

static bool isLeftShiftResultUnrepresentable | ( | const BinaryOperator * | B,
|  | CheckerContext & | C
| ) |  |
| static

Definition at line 65 of file UndefResultChecker.cpp.

References clang::QualType::getAsString(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOpcodeStr(), clang::BinaryOperator::getRHS(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), isArrayIndexOutOfBounds(), isShiftOverflow(), clang::ento::OS, and State.

## ◆ isShiftOverflow()

static bool isShiftOverflow | ( | const BinaryOperator * | B,
|  | CheckerContext & | C
| ) |  |
| static

Definition at line 60 of file UndefResultChecker.cpp.

References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), and clang::Expr::getType().

Referenced by isLeftShiftResultUnrepresentable().