[cfe-commits] r141136 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
Anna Zaks
ganna at apple.com
Tue Oct 4 16:29:16 PDT 2011
Author: zaks
Date: Tue Oct 4 18:29:16 2011
New Revision: 141136
URL: http://llvm.org/viewvc/llvm-project?rev=141136&view=rev
Log:
[analyzer] Removing more references to CheckerContext::getNodeBuilder(): ask CheckerContext to generate the nodes.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h?rev=141136&r1=141135&r2=141136&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h Tue Oct 4 18:29:16 2011
@@ -121,8 +121,9 @@
/// Allows checkers to generate a chain of nodes.
ExplodedNode *generateNode(const ProgramState *state,
ExplodedNode *pred,
+ const ProgramPointTag *tag = 0,
bool autoTransition = true) {
- ExplodedNode *N = generateNodeImpl(state, false, pred);
+ ExplodedNode *N = generateNodeImpl(state, false, pred, tag);
if (N && autoTransition)
addTransition(N);
return N;
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp?rev=141136&r1=141135&r2=141136&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Tue Oct 4 18:29:16 2011
@@ -3173,12 +3173,10 @@
if (hasError) {
// Generate an error node.
state = state->set<RefBindings>(Sym, X);
- StmtNodeBuilder &Builder = C.getNodeBuilder();
static SimpleProgramPointTag
ReturnOwnLeakTag("RetainCountChecker : ReturnsOwnLeak");
- ExplodedNode *N = Builder.generateNode(S, state, Pred,
- &ReturnOwnLeakTag);
+ ExplodedNode *N = C.generateNode(state, Pred, &ReturnOwnLeakTag);
if (N) {
const LangOptions &LOpts = C.getASTContext().getLangOptions();
bool GCEnabled = C.isObjCGCEnabled();
@@ -3195,12 +3193,10 @@
// Trying to return a not owned object to a caller expecting an
// owned object.
state = state->set<RefBindings>(Sym, X ^ RefVal::ErrorReturnedNotOwned);
- StmtNodeBuilder &Builder = C.getNodeBuilder();
static SimpleProgramPointTag
ReturnNotOwnedTag("RetainCountChecker : ReturnNotOwnedForOwned");
- ExplodedNode *N = Builder.generateNode(S, state, Pred,
- &ReturnNotOwnedTag);
+ ExplodedNode *N = C.generateNode(state, Pred, &ReturnNotOwnedTag);
if (N) {
if (!returnNotOwnedForOwned)
returnNotOwnedForOwned.reset(new ReturnedNotOwnedForOwned());
More information about the cfe-commits
mailing list