A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/BoolAssignmentChecker_8cpp_source.html below:

clang: lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp Source File

22using namespace clang

;

26class

BoolAssignmentChecker :

public Checker

<check::Bind> {

27 const BugType

BT{

this

,

"Assignment of a non-Boolean value"

};

29 bool

IsTainted =

false

)

const

;

37 bool

IsTainted)

const

{

39

StringRef Msg = IsTainted ?

"Might assign a tainted non-Boolean value" 40

:

"Assignment of a non-Boolean value"

;

41 C

.emitReport(std::make_unique<PathSensitiveBugReport>(BT, Msg, N));

50 return

TT->getDecl()->getName() ==

"BOOL"

||

51

TT->getDecl()->getName() ==

"_Bool"

||

52

TT->getDecl()->getName() ==

"Boolean"

;

57void

BoolAssignmentChecker::checkBind(

SVal Loc

,

SVal

Val,

const Stmt

*S,

86

llvm::APSInt

Zero

= BVF.getValue(0, RegTy);

87

llvm::APSInt One = BVF.getValue(1, RegTy);

93

emitReport(StOut,

C

);

95

emitReport(StOut,

C

,

true

);

102bool

ento::shouldRegisterBoolAssignmentChecker(

const CheckerManager

&Mgr) {

static bool isBooleanType(QualType Ty)

A (possibly-)qualified type.

Stmt - This represents one statement.

bool isBooleanType() const

const T * getAs() const

Member-template getAs<specific type>'.

CHECKER * registerChecker(AT &&... Args)

Used to register checkers.

ProgramStatePair assumeInclusiveRangeDual(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To)

Returns a pair of states (StInRange, StOutOfRange) where the given value is assumed to be in the rang...

SVal - This represents a symbolic expression, which can be either an L-value or an R-value.

std::optional< T > getAs() const

Convert to the specified SVal type, returning std::nullopt if this SVal is not of the desired type.

const MemRegion * getAsRegion() const

TypedValueRegion - An abstract class representing regions having a typed value.

virtual QualType getValueType() const =0

bool isTainted(ProgramStateRef State, const Stmt *S, const LocationContext *LCtx, TaintTagType Kind=TaintTagGeneric)

Check if the statement has a tainted value in the given state.

bool Zero(InterpState &S, CodePtr OpPC)

The JSON file list parser is used to communicate input to InstallAPI.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4