Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
Show First 20 Lines • Show All 942 Lines • ▼ Show 20 Lines | ProgramStateRef CStringChecker::InvalidateBuffer(CheckerContext &C, | ||||
return state->killBinding(*L); | return state->killBinding(*L); | ||||
} | } | ||||
bool CStringChecker::SummarizeRegion(raw_ostream &os, ASTContext &Ctx, | bool CStringChecker::SummarizeRegion(raw_ostream &os, ASTContext &Ctx, | ||||
const MemRegion *MR) { | const MemRegion *MR) { | ||||
const TypedValueRegion *TVR = dyn_cast<TypedValueRegion>(MR); | const TypedValueRegion *TVR = dyn_cast<TypedValueRegion>(MR); | ||||
switch (MR->getKind()) { | switch (MR->getKind()) { | ||||
case MemRegion::FunctionTextRegionKind: { | case MemRegion::FunctionCodeRegionKind: { | ||||
const NamedDecl *FD = cast<FunctionTextRegion>(MR)->getDecl(); | const NamedDecl *FD = cast<FunctionCodeRegion>(MR)->getDecl(); | ||||
if (FD) | if (FD) | ||||
os << "the address of the function '" << *FD << '\''; | os << "the address of the function '" << *FD << '\''; | ||||
else | else | ||||
os << "the address of a function"; | os << "the address of a function"; | ||||
return true; | return true; | ||||
} | } | ||||
case MemRegion::BlockTextRegionKind: | case MemRegion::BlockCodeRegionKind: | ||||
os << "block text"; | os << "block text"; | ||||
return true; | return true; | ||||
case MemRegion::BlockDataRegionKind: | case MemRegion::BlockDataRegionKind: | ||||
os << "a block"; | os << "a block"; | ||||
return true; | return true; | ||||
case MemRegion::CXXThisRegionKind: | case MemRegion::CXXThisRegionKind: | ||||
case MemRegion::CXXTempObjectRegionKind: | case MemRegion::CXXTempObjectRegionKind: | ||||
os << "a C++ temp object of type " << TVR->getValueType().getAsString(); | os << "a C++ temp object of type " << TVR->getValueType().getAsString(); | ||||
▲ Show 20 Lines • Show All 1,198 Lines • Show Last 20 Lines |