summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-09-28 18:49:41 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-09-28 18:49:41 +0000
commitc82d457db53256a5721980d03e7ab19a00c92a9c (patch)
tree568be2a560adcadc1b75385391dc43f1b54bc823 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
parentc704f4fbd0a41090e68aaf056b31803481f535ff (diff)
downloadbcm5719-llvm-c82d457db53256a5721980d03e7ab19a00c92a9c.tar.gz
bcm5719-llvm-c82d457db53256a5721980d03e7ab19a00c92a9c.zip
[analyzer] [NFC] Remove unused parameters, as found by -Wunused-parameter
Differential Revision: https://reviews.llvm.org/D52640 llvm-svn: 343353
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index c19f0563d11..151865f874e 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -177,7 +177,7 @@ REGISTER_TRAIT_WITH_PROGRAMSTATE(ObjectsUnderConstruction,
static const char* TagProviderName = "ExprEngine";
ExprEngine::ExprEngine(cross_tu::CrossTranslationUnitContext &CTU,
- AnalysisManager &mgr, bool gcEnabled,
+ AnalysisManager &mgr,
SetOfConstDecls *VisitedCalleesIn,
FunctionSummariesTy *FS,
InliningModes HowToInlineIn)
@@ -531,7 +531,6 @@ ExprEngine::processRegionChanges(ProgramStateRef state,
static void printObjectsUnderConstructionForContext(raw_ostream &Out,
ProgramStateRef State,
const char *NL,
- const char *Sep,
const LocationContext *LC) {
PrintingPolicy PP =
LC->getAnalysisDeclContext()->getASTContext().getPrintingPolicy();
@@ -553,7 +552,7 @@ void ExprEngine::printState(raw_ostream &Out, ProgramStateRef State,
Out << Sep << "Objects under construction:" << NL;
LCtx->dumpStack(Out, "", NL, Sep, [&](const LocationContext *LC) {
- printObjectsUnderConstructionForContext(Out, State, NL, Sep, LC);
+ printObjectsUnderConstructionForContext(Out, State, NL, LC);
});
}
}
@@ -561,7 +560,7 @@ void ExprEngine::printState(raw_ostream &Out, ProgramStateRef State,
getCheckerManager().runCheckersForPrintState(Out, State, NL, Sep);
}
-void ExprEngine::processEndWorklist(bool hasWorkRemaining) {
+void ExprEngine::processEndWorklist() {
getCheckerManager().runCheckersForEndAnalysis(G, BR, *this);
}
@@ -1128,7 +1127,7 @@ ProgramStateRef ExprEngine::escapeValue(ProgramStateRef State, SVal V,
InvalidatedSymbols Symbols;
public:
- explicit CollectReachableSymbolsCallback(ProgramStateRef State) {}
+ explicit CollectReachableSymbolsCallback(ProgramStateRef) {}
const InvalidatedSymbols &getSymbols() const { return Symbols; }
@@ -1930,8 +1929,7 @@ void ExprEngine::processCFGBlockEntrance(const BlockEdge &L,
/// integers that promote their values (which are currently not tracked well).
/// This function returns the SVal bound to Condition->IgnoreCasts if all the
// cast(s) did was sign-extend the original value.
-static SVal RecoverCastedSymbol(ProgramStateManager& StateMgr,
- ProgramStateRef state,
+static SVal RecoverCastedSymbol(ProgramStateRef state,
const Stmt *Condition,
const LocationContext *LCtx,
ASTContext &Ctx) {
@@ -2028,7 +2026,7 @@ static const Stmt *ResolveCondition(const Stmt *Condition,
llvm_unreachable("could not resolve condition");
}
-void ExprEngine::processBranch(const Stmt *Condition, const Stmt *Term,
+void ExprEngine::processBranch(const Stmt *Condition,
NodeBuilderContext& BldCtx,
ExplodedNode *Pred,
ExplodedNodeSet &Dst,
@@ -2079,8 +2077,7 @@ void ExprEngine::processBranch(const Stmt *Condition, const Stmt *Term,
// integers that promote their values are currently not tracked well.
// If 'Condition' is such an expression, try and recover the
// underlying value and use that instead.
- SVal recovered = RecoverCastedSymbol(getStateManager(),
- PrevState, Condition,
+ SVal recovered = RecoverCastedSymbol(PrevState, Condition,
PredI->getLocationContext(),
getContext());
@@ -2665,7 +2662,6 @@ ProgramStateRef
ExprEngine::notifyCheckersOfPointerEscape(ProgramStateRef State,
const InvalidatedSymbols *Invalidated,
ArrayRef<const MemRegion *> ExplicitRegions,
- ArrayRef<const MemRegion *> Regions,
const CallEvent *Call,
RegionAndSymbolInvalidationTraits &ITraits) {
if (!Invalidated || Invalidated->empty())
@@ -2775,7 +2771,7 @@ void ExprEngine::evalStore(ExplodedNodeSet &Dst, const Expr *AssignE,
// Evaluate the location (checks for bad dereferences).
ExplodedNodeSet Tmp;
- evalLocation(Tmp, AssignE, LocationE, Pred, state, location, tag, false);
+ evalLocation(Tmp, AssignE, LocationE, Pred, state, location, false);
if (Tmp.empty())
return;
@@ -2800,7 +2796,7 @@ void ExprEngine::evalLoad(ExplodedNodeSet &Dst,
assert(BoundEx);
// Evaluate the location (checks for bad dereferences).
ExplodedNodeSet Tmp;
- evalLocation(Tmp, NodeEx, BoundEx, Pred, state, location, tag, true);
+ evalLocation(Tmp, NodeEx, BoundEx, Pred, state, location, true);
if (Tmp.empty())
return;
@@ -2831,7 +2827,6 @@ void ExprEngine::evalLocation(ExplodedNodeSet &Dst,
ExplodedNode *Pred,
ProgramStateRef state,
SVal location,
- const ProgramPointTag *tag,
bool isLoad) {
StmtNodeBuilder BldrTop(Pred, Dst, *currBldrCtx);
// Early checks for performance reason.
@@ -2999,7 +2994,7 @@ struct DOTGraphTraits<ExplodedGraph*> : public DefaultDOTGraphTraits {
}
static std::string getNodeAttributes(const ExplodedNode *N,
- ExplodedGraph *G) {
+ ExplodedGraph *) {
SmallVector<StringRef, 10> Out;
auto Noop = [](const ExplodedNode*){};
if (traverseHiddenNodes(N, Noop, Noop, &nodeHasBugReport)) {
@@ -3035,8 +3030,8 @@ struct DOTGraphTraits<ExplodedGraph*> : public DefaultDOTGraphTraits {
if (nodeHasBugReport(N))
Out << "\\lBug report attached\\l";
},
- [&](const ExplodedNode *OtherNode) { Out << "\\l--------\\l"; },
- [&](const ExplodedNode *N) { return false; });
+ [&](const ExplodedNode *) { Out << "\\l--------\\l"; },
+ [&](const ExplodedNode *) { return false; });
Out << "\\l\\|";
OpenPOWER on IntegriCloud