[cfe-commits] r122270 - in /cfe/trunk: include/clang/Checker/PathSensitive/ lib/Checker/
Ted Kremenek
kremenek at apple.com
Mon Dec 20 13:19:10 PST 2010
Author: kremenek
Date: Mon Dec 20 15:19:09 2010
New Revision: 122270
URL: http://llvm.org/viewvc/llvm-project?rev=122270&view=rev
Log:
Rename 'Generate[Node,Sink]' to 'generate[Node,Sink]'.
Modified:
cfe/trunk/include/clang/Checker/PathSensitive/Checker.h
cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h
cfe/trunk/lib/Checker/AdjustedReturnValueChecker.cpp
cfe/trunk/lib/Checker/ArrayBoundChecker.cpp
cfe/trunk/lib/Checker/AttrNonNullChecker.cpp
cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp
cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp
cfe/trunk/lib/Checker/CStringChecker.cpp
cfe/trunk/lib/Checker/CallAndMessageChecker.cpp
cfe/trunk/lib/Checker/CastSizeChecker.cpp
cfe/trunk/lib/Checker/CastToStructChecker.cpp
cfe/trunk/lib/Checker/ChrootChecker.cpp
cfe/trunk/lib/Checker/DereferenceChecker.cpp
cfe/trunk/lib/Checker/DivZeroChecker.cpp
cfe/trunk/lib/Checker/FixedAddressChecker.cpp
cfe/trunk/lib/Checker/GRCoreEngine.cpp
cfe/trunk/lib/Checker/GRExprEngine.cpp
cfe/trunk/lib/Checker/MacOSXAPIChecker.cpp
cfe/trunk/lib/Checker/MallocChecker.cpp
cfe/trunk/lib/Checker/NoReturnFunctionChecker.cpp
cfe/trunk/lib/Checker/OSAtomicChecker.cpp
cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp
cfe/trunk/lib/Checker/PointerArithChecker.cpp
cfe/trunk/lib/Checker/PointerSubChecker.cpp
cfe/trunk/lib/Checker/PthreadLockChecker.cpp
cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp
cfe/trunk/lib/Checker/ReturnUndefChecker.cpp
cfe/trunk/lib/Checker/StackAddrLeakChecker.cpp
cfe/trunk/lib/Checker/StreamChecker.cpp
cfe/trunk/lib/Checker/UndefCapturedBlockVarChecker.cpp
cfe/trunk/lib/Checker/UndefResultChecker.cpp
cfe/trunk/lib/Checker/UndefinedArraySubscriptChecker.cpp
cfe/trunk/lib/Checker/UndefinedAssignmentChecker.cpp
cfe/trunk/lib/Checker/UnixAPIChecker.cpp
cfe/trunk/lib/Checker/VLASizeChecker.cpp
Modified: cfe/trunk/include/clang/Checker/PathSensitive/Checker.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/Checker.h?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/Checker.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/Checker.h Mon Dec 20 15:19:09 2010
@@ -91,47 +91,47 @@
return Eng.getSValBuilder();
}
- ExplodedNode *GenerateNode(bool autoTransition = true) {
+ ExplodedNode *generateNode(bool autoTransition = true) {
assert(statement && "Only transitions with statements currently supported");
- ExplodedNode *N = GenerateNodeImpl(statement, getState(), false);
+ ExplodedNode *N = generateNodeImpl(statement, getState(), false);
if (N && autoTransition)
Dst.Add(N);
return N;
}
- ExplodedNode *GenerateNode(const Stmt *stmt, const GRState *state,
+ ExplodedNode *generateNode(const Stmt *stmt, const GRState *state,
bool autoTransition = true) {
assert(state);
- ExplodedNode *N = GenerateNodeImpl(stmt, state, false);
+ ExplodedNode *N = generateNodeImpl(stmt, state, false);
if (N && autoTransition)
addTransition(N);
return N;
}
- ExplodedNode *GenerateNode(const GRState *state, ExplodedNode *pred,
+ ExplodedNode *generateNode(const GRState *state, ExplodedNode *pred,
bool autoTransition = true) {
assert(statement && "Only transitions with statements currently supported");
- ExplodedNode *N = GenerateNodeImpl(statement, state, pred, false);
+ ExplodedNode *N = generateNodeImpl(statement, state, pred, false);
if (N && autoTransition)
addTransition(N);
return N;
}
- ExplodedNode *GenerateNode(const GRState *state, bool autoTransition = true) {
+ ExplodedNode *generateNode(const GRState *state, bool autoTransition = true) {
assert(statement && "Only transitions with statements currently supported");
- ExplodedNode *N = GenerateNodeImpl(statement, state, false);
+ ExplodedNode *N = generateNodeImpl(statement, state, false);
if (N && autoTransition)
addTransition(N);
return N;
}
- ExplodedNode *GenerateSink(const Stmt *stmt, const GRState *state = 0) {
- return GenerateNodeImpl(stmt, state ? state : getState(), true);
+ ExplodedNode *generateSink(const Stmt *stmt, const GRState *state = 0) {
+ return generateNodeImpl(stmt, state ? state : getState(), true);
}
- ExplodedNode *GenerateSink(const GRState *state = 0) {
+ ExplodedNode *generateSink(const GRState *state = 0) {
assert(statement && "Only transitions with statements currently supported");
- return GenerateNodeImpl(statement, state ? state : getState(), true);
+ return generateNodeImpl(statement, state ? state : getState(), true);
}
void addTransition(ExplodedNode *node) {
@@ -144,7 +144,7 @@
// is new.
if (state != getState() || (ST && ST != B.GetState(Pred)))
// state is new or equals to ST.
- GenerateNode(state, true);
+ generateNode(state, true);
else
Dst.Add(Pred);
}
@@ -166,7 +166,7 @@
}
private:
- ExplodedNode *GenerateNodeImpl(const Stmt* stmt, const GRState *state,
+ ExplodedNode *generateNodeImpl(const Stmt* stmt, const GRState *state,
bool markAsSink) {
ExplodedNode *node = B.generateNode(stmt, state, Pred);
if (markAsSink && node)
@@ -174,7 +174,7 @@
return node;
}
- ExplodedNode *GenerateNodeImpl(const Stmt* stmt, const GRState *state,
+ ExplodedNode *generateNodeImpl(const Stmt* stmt, const GRState *state,
ExplodedNode *pred, bool markAsSink) {
ExplodedNode *node = B.generateNode(stmt, state, pred);
if (markAsSink && node)
Modified: cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h Mon Dec 20 15:19:09 2010
@@ -66,7 +66,7 @@
/// too many times.
BlocksAborted blocksAborted;
- void GenerateNode(const ProgramPoint& Loc, const GRState* State,
+ void generateNode(const ProgramPoint& Loc, const GRState* State,
ExplodedNode* Pred);
void HandleBlockEdge(const BlockEdge& E, ExplodedNode* Pred);
@@ -515,7 +515,7 @@
unsigned getIndex() const { return Index; }
- void GenerateNode(const GRState *state);
+ void generateNode(const GRState *state);
};
class GRCallExitNodeBuilder {
@@ -530,7 +530,7 @@
const GRState *getState() const { return Pred->getState(); }
- void GenerateNode(const GRState *state);
+ void generateNode(const GRState *state);
};
} // end clang namespace
Modified: cfe/trunk/lib/Checker/AdjustedReturnValueChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/AdjustedReturnValueChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/AdjustedReturnValueChecker.cpp (original)
+++ cfe/trunk/lib/Checker/AdjustedReturnValueChecker.cpp Mon Dec 20 15:19:09 2010
@@ -54,7 +54,7 @@
// Casting to void? Discard the value.
if (expectedResultTy->isVoidType()) {
- C.GenerateNode(state->BindExpr(CE, UnknownVal()));
+ C.generateNode(state->BindExpr(CE, UnknownVal()));
return;
}
@@ -90,6 +90,6 @@
// the cast avoids some assertion failures elsewhere.
SValBuilder &svalBuilder = C.getSValBuilder();
V = svalBuilder.evalCast(V, expectedResultTy, actualResultTy);
- C.GenerateNode(state->BindExpr(CE, V));
+ C.generateNode(state->BindExpr(CE, V));
}
}
Modified: cfe/trunk/lib/Checker/ArrayBoundChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ArrayBoundChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ArrayBoundChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ArrayBoundChecker.cpp Mon Dec 20 15:19:09 2010
@@ -66,7 +66,7 @@
const GRState *StInBound = state->assumeInBound(Idx, NumElements, true);
const GRState *StOutBound = state->assumeInBound(Idx, NumElements, false);
if (StOutBound && !StInBound) {
- ExplodedNode *N = C.GenerateSink(StOutBound);
+ ExplodedNode *N = C.generateSink(StOutBound);
if (!N)
return;
Modified: cfe/trunk/lib/Checker/AttrNonNullChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/AttrNonNullChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/AttrNonNullChecker.cpp (original)
+++ cfe/trunk/lib/Checker/AttrNonNullChecker.cpp Mon Dec 20 15:19:09 2010
@@ -96,7 +96,7 @@
if (stateNull && !stateNotNull) {
// Generate an error node. Check for a null node in case
// we cache out.
- if (ExplodedNode *errorNode = C.GenerateSink(stateNull)) {
+ if (ExplodedNode *errorNode = C.generateSink(stateNull)) {
// Lazily allocate the BugType object if it hasn't already been
// created. Ownership is transferred to the BugReporter object once
Modified: cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp Mon Dec 20 15:19:09 2010
@@ -99,7 +99,7 @@
if (!BT)
BT = new APIMisuse("nil argument");
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
llvm::SmallString<128> sbuf;
llvm::raw_svector_ostream os(sbuf);
os << "Argument to '" << GetReceiverNameType(ME) << "' method '"
@@ -329,8 +329,8 @@
// FIXME: We can actually create an abstract "CFNumber" object that has
// the bits initialized to the provided values.
//
- if (ExplodedNode *N = SourceSize < TargetSize ? C.GenerateSink()
- : C.GenerateNode()) {
+ if (ExplodedNode *N = SourceSize < TargetSize ? C.generateSink()
+ : C.generateNode()) {
llvm::SmallString<128> sbuf;
llvm::raw_svector_ostream os(sbuf);
@@ -420,7 +420,7 @@
llvm::tie(stateTrue, stateFalse) = state->assume(ArgIsNull);
if (stateTrue && !stateFalse) {
- ExplodedNode *N = C.GenerateSink(stateTrue);
+ ExplodedNode *N = C.generateSink(stateTrue);
if (!N)
return;
@@ -492,7 +492,7 @@
if (!(S == releaseS || S == retainS || S == autoreleaseS || S == drainS))
return;
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
llvm::SmallString<200> buf;
llvm::raw_svector_ostream os(buf);
Modified: cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp (original)
+++ cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp Mon Dec 20 15:19:09 2010
@@ -50,7 +50,7 @@
// For __builtin_expect, just return the value of the subexpression.
assert (CE->arg_begin() != CE->arg_end());
SVal X = state->getSVal(*(CE->arg_begin()));
- C.GenerateNode(state->BindExpr(CE, X));
+ C.generateNode(state->BindExpr(CE, X));
return true;
}
@@ -73,7 +73,7 @@
svalBuilder.evalEQ(state, Extent, Size);
state = state->assume(extentMatchesSizeArg, true);
- C.GenerateNode(state->BindExpr(CE, loc::MemRegionVal(R)));
+ C.generateNode(state->BindExpr(CE, loc::MemRegionVal(R)));
return true;
}
}
Modified: cfe/trunk/lib/Checker/CStringChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CStringChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CStringChecker.cpp (original)
+++ cfe/trunk/lib/Checker/CStringChecker.cpp Mon Dec 20 15:19:09 2010
@@ -137,7 +137,7 @@
llvm::tie(stateNull, stateNonNull) = assumeZero(C, state, l, S->getType());
if (stateNull && !stateNonNull) {
- ExplodedNode *N = C.GenerateSink(stateNull);
+ ExplodedNode *N = C.generateSink(stateNull);
if (!N)
return NULL;
@@ -194,7 +194,7 @@
const GRState *StInBound = state->assumeInBound(Idx, Size, true);
const GRState *StOutBound = state->assumeInBound(Idx, Size, false);
if (StOutBound && !StInBound) {
- ExplodedNode *N = C.GenerateSink(StOutBound);
+ ExplodedNode *N = C.generateSink(StOutBound);
if (!N)
return NULL;
@@ -406,7 +406,7 @@
void CStringChecker::emitOverlapBug(CheckerContext &C, const GRState *state,
const Stmt *First, const Stmt *Second) {
- ExplodedNode *N = C.GenerateSink(state);
+ ExplodedNode *N = C.generateSink(state);
if (!N)
return;
@@ -485,7 +485,7 @@
// C string. In the context of locations, the only time we can issue such
// a warning is for labels.
if (loc::GotoLabel *Label = dyn_cast<loc::GotoLabel>(&Buf)) {
- if (ExplodedNode *N = C.GenerateNode(state)) {
+ if (ExplodedNode *N = C.generateNode(state)) {
if (!BT_NotCString)
BT_NotCString = new BuiltinBug("API",
"Argument is not a null-terminated string.");
@@ -541,7 +541,7 @@
// Other regions (mostly non-data) can't have a reliable C string length.
// In this case, an error is emitted and UndefinedVal is returned.
// The caller should always be prepared to handle this case.
- if (ExplodedNode *N = C.GenerateNode(state)) {
+ if (ExplodedNode *N = C.generateNode(state)) {
if (!BT_NotCString)
BT_NotCString = new BuiltinBug("API",
"Argument is not a null-terminated string.");
@@ -1041,5 +1041,5 @@
}
state = state->set<CStringLength>(Entries);
- C.GenerateNode(state);
+ C.generateNode(state);
}
Modified: cfe/trunk/lib/Checker/CallAndMessageChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CallAndMessageChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CallAndMessageChecker.cpp (original)
+++ cfe/trunk/lib/Checker/CallAndMessageChecker.cpp Mon Dec 20 15:19:09 2010
@@ -67,7 +67,7 @@
void CallAndMessageChecker::EmitBadCall(BugType *BT, CheckerContext &C,
const CallExpr *CE) {
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (!N)
return;
@@ -85,7 +85,7 @@
const SVal &V = C.getState()->getSVal(Ex);
if (V.isUndef()) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
LazyInit_BT(BT_desc, BT);
// Generate a report for this bug.
@@ -147,7 +147,7 @@
D->getStore());
if (F.Find(D->getRegion())) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
LazyInit_BT(BT_desc, BT);
llvm::SmallString<512> Str;
llvm::raw_svector_ostream os(Str);
@@ -221,7 +221,7 @@
// FIXME: Handle 'super'?
if (const Expr *receiver = ME->getInstanceReceiver())
if (state->getSVal(receiver).isUndef()) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT_msg_undef)
BT_msg_undef =
new BuiltinBug("Receiver in message expression is an uninitialized value");
@@ -297,7 +297,7 @@
// have the "use of undefined value" be smarter about where the
// undefined value came from.
if (C.getPredecessor()->getParentMap().isConsumedExpr(ME)) {
- if (ExplodedNode* N = C.GenerateSink(state))
+ if (ExplodedNode* N = C.generateSink(state))
emitNilReceiverBug(C, ME, N);
return;
}
@@ -322,7 +322,7 @@
Ctx.LongDoubleTy == CanRetTy ||
Ctx.LongLongTy == CanRetTy ||
Ctx.UnsignedLongLongTy == CanRetTy))) {
- if (ExplodedNode* N = C.GenerateSink(state))
+ if (ExplodedNode* N = C.generateSink(state))
emitNilReceiverBug(C, ME, N);
return;
}
@@ -341,7 +341,7 @@
// of this case unless we have *a lot* more knowledge.
//
SVal V = C.getSValBuilder().makeZeroVal(ME->getType());
- C.GenerateNode(state->BindExpr(ME, V));
+ C.generateNode(state->BindExpr(ME, V));
return;
}
Modified: cfe/trunk/lib/Checker/CastSizeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CastSizeChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CastSizeChecker.cpp (original)
+++ cfe/trunk/lib/Checker/CastSizeChecker.cpp Mon Dec 20 15:19:09 2010
@@ -71,7 +71,7 @@
return;
if (regionSize % typeSize != 0) {
- if (ExplodedNode *errorNode = C.GenerateSink()) {
+ if (ExplodedNode *errorNode = C.generateSink()) {
if (!BT)
BT = new BuiltinBug("Cast region with wrong size.",
"Cast a region whose size is not a multiple of the"
Modified: cfe/trunk/lib/Checker/CastToStructChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CastToStructChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CastToStructChecker.cpp (original)
+++ cfe/trunk/lib/Checker/CastToStructChecker.cpp Mon Dec 20 15:19:09 2010
@@ -60,7 +60,7 @@
// Now the cast-to-type is struct pointer, the original type is not void*.
if (!OrigPointeeTy->isRecordType()) {
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT)
BT = new BuiltinBug("Cast from non-struct type to struct type",
"Casting a non-structure type to a structure type "
Modified: cfe/trunk/lib/Checker/ChrootChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ChrootChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ChrootChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ChrootChecker.cpp Mon Dec 20 15:19:09 2010
@@ -147,7 +147,7 @@
void* const* k = state->FindGDM(ChrootChecker::getTag());
if (k)
if (isRootChanged((intptr_t) *k))
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT_BreakJail)
BT_BreakJail = new BuiltinBug("Break out of jail",
"No call of chdir(\"/\") immediately "
Modified: cfe/trunk/lib/Checker/DereferenceChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/DereferenceChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/DereferenceChecker.cpp (original)
+++ cfe/trunk/lib/Checker/DereferenceChecker.cpp Mon Dec 20 15:19:09 2010
@@ -87,7 +87,7 @@
SVal l) {
// Check for dereference of an undefined value.
if (l.isUndef()) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT_undef)
BT_undef = new BuiltinBug("Dereference of undefined pointer value");
@@ -114,7 +114,7 @@
if (nullState) {
if (!notNullState) {
// Generate an error node.
- ExplodedNode *N = C.GenerateSink(nullState);
+ ExplodedNode *N = C.generateSink(nullState);
if (!N)
return;
@@ -193,7 +193,7 @@
// Otherwise, we have the case where the location could either be
// null or not-null. Record the error node as an "implicit" null
// dereference.
- if (ExplodedNode *N = C.GenerateSink(nullState))
+ if (ExplodedNode *N = C.generateSink(nullState))
ImplicitNullDerefNodes.push_back(N);
}
}
Modified: cfe/trunk/lib/Checker/DivZeroChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/DivZeroChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/DivZeroChecker.cpp (original)
+++ cfe/trunk/lib/Checker/DivZeroChecker.cpp Mon Dec 20 15:19:09 2010
@@ -64,7 +64,7 @@
llvm::tie(stateNotZero, stateZero) = CM.assumeDual(C.getState(), *DV);
if (stateZero && !stateNotZero) {
- if (ExplodedNode *N = C.GenerateSink(stateZero)) {
+ if (ExplodedNode *N = C.generateSink(stateZero)) {
if (!BT)
BT = new BuiltinBug("Division by zero");
Modified: cfe/trunk/lib/Checker/FixedAddressChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/FixedAddressChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/FixedAddressChecker.cpp (original)
+++ cfe/trunk/lib/Checker/FixedAddressChecker.cpp Mon Dec 20 15:19:09 2010
@@ -54,7 +54,7 @@
if (!RV.isConstant() || RV.isZeroConstant())
return;
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT)
BT = new BuiltinBug("Use fixed address",
"Using a fixed address is not portable because that "
Modified: cfe/trunk/lib/Checker/GRCoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRCoreEngine.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRCoreEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRCoreEngine.cpp Mon Dec 20 15:19:09 2010
@@ -186,9 +186,9 @@
if (!InitState)
// Generate the root.
- GenerateNode(StartLoc, getInitialState(L), 0);
+ generateNode(StartLoc, getInitialState(L), 0);
else
- GenerateNode(StartLoc, InitState, 0);
+ generateNode(StartLoc, InitState, 0);
}
// Check if we have a steps limit
@@ -288,7 +288,7 @@
// FIXME: Should we allow ProcessBlockEntrance to also manipulate state?
if (ProcessBlockEntrance(Blk, Pred, WList->getBlockCounter()))
- GenerateNode(BlockEntrance(Blk, Pred->getLocationContext()),
+ generateNode(BlockEntrance(Blk, Pred->getLocationContext()),
Pred->State, Pred);
else {
blocksAborted.push_back(std::make_pair(L, Pred));
@@ -399,7 +399,7 @@
assert (B->succ_size() == 1 &&
"Blocks with no terminator should have at most 1 successor.");
- GenerateNode(BlockEdge(B, *(B->succ_begin()), Pred->getLocationContext()),
+ generateNode(BlockEdge(B, *(B->succ_begin()), Pred->getLocationContext()),
Pred->State, Pred);
}
@@ -426,9 +426,9 @@
}
}
-/// GenerateNode - Utility method to generate nodes, hook up successors,
+/// generateNode - Utility method to generate nodes, hook up successors,
/// and add nodes to the worklist.
-void GRCoreEngine::GenerateNode(const ProgramPoint& Loc,
+void GRCoreEngine::generateNode(const ProgramPoint& Loc,
const GRState* State, ExplodedNode* Pred) {
bool IsNew;
@@ -715,7 +715,7 @@
}
-void GRCallEnterNodeBuilder::GenerateNode(const GRState *state) {
+void GRCallEnterNodeBuilder::generateNode(const GRState *state) {
// Check if the callee is in the same translation unit.
if (CalleeCtx->getTranslationUnit() !=
Pred->getLocationContext()->getTranslationUnit()) {
@@ -790,7 +790,7 @@
Eng.WList->Enqueue(Node);
}
-void GRCallExitNodeBuilder::GenerateNode(const GRState *state) {
+void GRCallExitNodeBuilder::generateNode(const GRState *state) {
// Get the callee's location context.
const StackFrameContext *LocCtx
= cast<StackFrameContext>(Pred->getLocationContext());
Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Mon Dec 20 15:19:09 2010
@@ -1450,7 +1450,7 @@
void GRExprEngine::ProcessCallEnter(GRCallEnterNodeBuilder &B) {
const GRState *state = B.getState()->EnterStackFrame(B.getCalleeContext());
- B.GenerateNode(state);
+ B.generateNode(state);
}
void GRExprEngine::ProcessCallExit(GRCallExitNodeBuilder &B) {
@@ -1486,7 +1486,7 @@
}
}
- B.GenerateNode(state);
+ B.generateNode(state);
}
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/lib/Checker/MacOSXAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MacOSXAPIChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MacOSXAPIChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MacOSXAPIChecker.cpp Mon Dec 20 15:19:09 2010
@@ -73,7 +73,7 @@
if (!R || !isa<StackSpaceRegion>(R->getMemorySpace()))
return;
- ExplodedNode *N = C.GenerateSink(state);
+ ExplodedNode *N = C.generateSink(state);
if (!N)
return;
Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MallocChecker.cpp Mon Dec 20 15:19:09 2010
@@ -352,7 +352,7 @@
// Check double free.
if (RS->isReleased()) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT_DoubleFree)
BT_DoubleFree
= new BuiltinBug("Double free",
@@ -463,7 +463,7 @@
void MallocChecker::ReportBadFree(CheckerContext &C, SVal ArgVal,
SourceRange range) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT_BadFree)
BT_BadFree = new BuiltinBug("Bad free");
@@ -573,7 +573,7 @@
for (RegionStateTy::iterator I = RS.begin(), E = RS.end(); I != E; ++I) {
if (SymReaper.isDead(I->first)) {
if (I->second.isAllocated()) {
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT_Leak)
BT_Leak = new BuiltinBug("Memory leak",
"Allocated memory never released. Potential memory leak.");
@@ -587,7 +587,7 @@
RS = F.remove(RS, I->first);
}
}
- C.GenerateNode(state->set<RegionState>(RS));
+ C.generateNode(state->set<RegionState>(RS));
}
void MallocChecker::evalEndPath(GREndPathNodeBuilder &B, void *tag,
@@ -655,7 +655,7 @@
if (Sym) {
const RefState *RS = C.getState()->get<RegionState>(Sym);
if (RS && RS->isReleased()) {
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT_UseFree)
BT_UseFree = new BuiltinBug("Use dynamically allocated memory after"
" it is freed.");
Modified: cfe/trunk/lib/Checker/NoReturnFunctionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/NoReturnFunctionChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/NoReturnFunctionChecker.cpp (original)
+++ cfe/trunk/lib/Checker/NoReturnFunctionChecker.cpp Mon Dec 20 15:19:09 2010
@@ -75,5 +75,5 @@
}
if (BuildSinks)
- C.GenerateSink(CE);
+ C.generateSink(CE);
}
Modified: cfe/trunk/lib/Checker/OSAtomicChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/OSAtomicChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/OSAtomicChecker.cpp (original)
+++ cfe/trunk/lib/Checker/OSAtomicChecker.cpp Mon Dec 20 15:19:09 2010
@@ -183,7 +183,7 @@
QualType T = CE->getType();
if (!T->isVoidType())
Res = Engine.getSValBuilder().makeTruthVal(true, T);
- C.GenerateNode(stateNew->BindExpr(CE, Res), predNew);
+ C.generateNode(stateNew->BindExpr(CE, Res), predNew);
}
}
@@ -194,7 +194,7 @@
QualType T = CE->getType();
if (!T->isVoidType())
Res = Engine.getSValBuilder().makeTruthVal(false, CE->getType());
- C.GenerateNode(stateNotEqual->BindExpr(CE, Res), N);
+ C.generateNode(stateNotEqual->BindExpr(CE, Res), N);
}
}
Modified: cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp Mon Dec 20 15:19:09 2010
@@ -47,7 +47,7 @@
// Uninitialized value used for the mutex?
if (isa<UndefinedVal>(V)) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT_undef)
BT_undef = new BuiltinBug("Uninitialized value used as mutex "
"for @synchronized");
@@ -70,7 +70,7 @@
if (!notNullState) {
// Generate an error node. This isn't a sink since
// a null mutex just means no synchronization occurs.
- if (ExplodedNode *N = C.GenerateNode(nullState)) {
+ if (ExplodedNode *N = C.generateNode(nullState)) {
if (!BT_null)
BT_null = new BuiltinBug("Nil value used as mutex for @synchronized() "
"(no synchronization will occur)");
Modified: cfe/trunk/lib/Checker/PointerArithChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/PointerArithChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/PointerArithChecker.cpp (original)
+++ cfe/trunk/lib/Checker/PointerArithChecker.cpp Mon Dec 20 15:19:09 2010
@@ -53,7 +53,7 @@
if (isa<VarRegion>(LR) || isa<CodeTextRegion>(LR) ||
isa<CompoundLiteralRegion>(LR)) {
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT)
BT = new BuiltinBug("Dangerous pointer arithmetic",
"Pointer arithmetic done on non-array variables "
Modified: cfe/trunk/lib/Checker/PointerSubChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/PointerSubChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/PointerSubChecker.cpp (original)
+++ cfe/trunk/lib/Checker/PointerSubChecker.cpp Mon Dec 20 15:19:09 2010
@@ -62,7 +62,7 @@
if (isa<SymbolicRegion>(BaseLR) || isa<SymbolicRegion>(BaseRR))
return;
- if (ExplodedNode *N = C.GenerateNode()) {
+ if (ExplodedNode *N = C.generateNode()) {
if (!BT)
BT = new BuiltinBug("Pointer subtraction",
"Subtraction of two pointers that do not point to "
Modified: cfe/trunk/lib/Checker/PthreadLockChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/PthreadLockChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/PthreadLockChecker.cpp (original)
+++ cfe/trunk/lib/Checker/PthreadLockChecker.cpp Mon Dec 20 15:19:09 2010
@@ -108,7 +108,7 @@
const GRState *lockFail;
llvm::tie(lockFail, lockSucc) = state->assume(retVal);
assert(lockFail && lockSucc);
- C.addTransition(C.GenerateNode(CE, lockFail));
+ C.addTransition(C.generateNode(CE, lockFail));
}
else {
// Assume that the return value was 0.
@@ -119,7 +119,7 @@
// Record that the lock was acquired.
lockSucc = lockSucc->add<LockSet>(lockR);
- C.addTransition(lockSucc != state ? C.GenerateNode(CE, lockSucc) :
+ C.addTransition(lockSucc != state ? C.generateNode(CE, lockSucc) :
C.getPredecessor());
}
@@ -140,5 +140,5 @@
if (state == unlockState)
return;
- C.addTransition(C.GenerateNode(CE, unlockState));
+ C.addTransition(C.generateNode(CE, unlockState));
}
Modified: cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp Mon Dec 20 15:19:09 2010
@@ -68,7 +68,7 @@
const GRState *StInBound = state->assumeInBound(Idx, NumElements, true);
const GRState *StOutBound = state->assumeInBound(Idx, NumElements, false);
if (StOutBound && !StInBound) {
- ExplodedNode *N = C.GenerateSink(StOutBound);
+ ExplodedNode *N = C.generateSink(StOutBound);
if (!N)
return;
Modified: cfe/trunk/lib/Checker/ReturnUndefChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ReturnUndefChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ReturnUndefChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ReturnUndefChecker.cpp Mon Dec 20 15:19:09 2010
@@ -49,7 +49,7 @@
if (!C.getState()->getSVal(RetE).isUndef())
return;
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (!N)
return;
Modified: cfe/trunk/lib/Checker/StackAddrLeakChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/StackAddrLeakChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/StackAddrLeakChecker.cpp (original)
+++ cfe/trunk/lib/Checker/StackAddrLeakChecker.cpp Mon Dec 20 15:19:09 2010
@@ -89,7 +89,7 @@
void StackAddrLeakChecker::EmitStackError(CheckerContext &C, const MemRegion *R,
const Expr *RetE) {
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (!N)
return;
Modified: cfe/trunk/lib/Checker/StreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/StreamChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/StreamChecker.cpp (original)
+++ cfe/trunk/lib/Checker/StreamChecker.cpp Mon Dec 20 15:19:09 2010
@@ -280,7 +280,7 @@
if (x >= 0 && x <= 2)
return;
- if (ExplodedNode *N = C.GenerateNode(state)) {
+ if (ExplodedNode *N = C.generateNode(state)) {
if (!BT_illegalwhence)
BT_illegalwhence = new BuiltinBug("Illegal whence argument",
"The whence argument to fseek() should be "
@@ -350,7 +350,7 @@
llvm::tie(stateNotNull, stateNull) = CM.assumeDual(state, *DV);
if (!stateNotNull && stateNull) {
- if (ExplodedNode *N = C.GenerateSink(stateNull)) {
+ if (ExplodedNode *N = C.generateSink(stateNull)) {
if (!BT_nullfp)
BT_nullfp = new BuiltinBug("NULL stream pointer",
"Stream pointer might be NULL.");
@@ -378,7 +378,7 @@
// Check: Double close a File Descriptor could cause undefined behaviour.
// Conforming to man-pages
if (SS->isClosed()) {
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (N) {
if (!BT_doubleclose)
BT_doubleclose = new BuiltinBug("Double fclose",
@@ -405,7 +405,7 @@
return;
if (SS->isOpened()) {
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (N) {
if (!BT_ResourceLeak)
BT_ResourceLeak = new BuiltinBug("Resource Leak",
Modified: cfe/trunk/lib/Checker/UndefCapturedBlockVarChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UndefCapturedBlockVarChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UndefCapturedBlockVarChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UndefCapturedBlockVarChecker.cpp Mon Dec 20 15:19:09 2010
@@ -79,7 +79,7 @@
VR = C.getSValBuilder().getRegionManager().getVarRegion(VD, LC);
if (state->getSVal(VR).isUndef())
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT)
BT = new BuiltinBug("Captured block variable is uninitialized");
Modified: cfe/trunk/lib/Checker/UndefResultChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UndefResultChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UndefResultChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UndefResultChecker.cpp Mon Dec 20 15:19:09 2010
@@ -41,7 +41,7 @@
const GRState *state = C.getState();
if (state->getSVal(B).isUndef()) {
// Generate an error node.
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (!N)
return;
Modified: cfe/trunk/lib/Checker/UndefinedArraySubscriptChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UndefinedArraySubscriptChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UndefinedArraySubscriptChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UndefinedArraySubscriptChecker.cpp Mon Dec 20 15:19:09 2010
@@ -41,7 +41,7 @@
UndefinedArraySubscriptChecker::PreVisitArraySubscriptExpr(CheckerContext &C,
const ArraySubscriptExpr *A) {
if (C.getState()->getSVal(A->getIdx()).isUndef()) {
- if (ExplodedNode *N = C.GenerateSink()) {
+ if (ExplodedNode *N = C.generateSink()) {
if (!BT)
BT = new BuiltinBug("Array subscript is undefined");
Modified: cfe/trunk/lib/Checker/UndefinedAssignmentChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UndefinedAssignmentChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UndefinedAssignmentChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UndefinedAssignmentChecker.cpp Mon Dec 20 15:19:09 2010
@@ -46,7 +46,7 @@
if (!val.isUndef())
return;
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (!N)
return;
Modified: cfe/trunk/lib/Checker/UnixAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UnixAPIChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UnixAPIChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UnixAPIChecker.cpp Mon Dec 20 15:19:09 2010
@@ -118,7 +118,7 @@
return;
if (CE->getNumArgs() < 3) {
- ExplodedNode *N = C.GenerateSink(trueState);
+ ExplodedNode *N = C.generateSink(trueState);
if (!N)
return;
@@ -153,7 +153,7 @@
if (!R || !isa<StackSpaceRegion>(R->getMemorySpace()))
return;
- ExplodedNode *N = C.GenerateSink(state);
+ ExplodedNode *N = C.generateSink(state);
if (!N)
return;
@@ -199,7 +199,7 @@
// Is the value perfectly constrained to zero?
if (falseState && !trueState) {
- ExplodedNode *N = C.GenerateSink(falseState);
+ ExplodedNode *N = C.generateSink(falseState);
if (!N)
return;
Modified: cfe/trunk/lib/Checker/VLASizeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/VLASizeChecker.cpp?rev=122270&r1=122269&r2=122270&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/VLASizeChecker.cpp (original)
+++ cfe/trunk/lib/Checker/VLASizeChecker.cpp Mon Dec 20 15:19:09 2010
@@ -58,7 +58,7 @@
if (sizeV.isUndef()) {
// Generate an error node.
- ExplodedNode *N = C.GenerateSink();
+ ExplodedNode *N = C.generateSink();
if (!N)
return;
@@ -86,7 +86,7 @@
llvm::tie(stateNotZero, stateZero) = state->assume(sizeD);
if (stateZero && !stateNotZero) {
- ExplodedNode* N = C.GenerateSink(stateZero);
+ ExplodedNode* N = C.generateSink(stateZero);
if (!BT_zero)
BT_zero = new BuiltinBug("Declared variable-length array (VLA) has zero "
"size");
More information about the cfe-commits
mailing list