diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2018-09-28 18:49:41 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2018-09-28 18:49:41 +0000 |
commit | b0be6606a0a2abe9bd201e24bac771e572d37031 (patch) | |
tree | 8ab01bf5d34aa79817666c9003ef3651687df200 /include | |
parent | 08f8ea6bafa1e45d42a4b5023ef2e2b99d6276b4 (diff) | |
download | clang-b0be6606a0a2abe9bd201e24bac771e572d37031.tar.gz |
[analyzer] [NFC] Remove unused parameters, as found by -Wunused-parameter
Differential Revision: https://reviews.llvm.org/D52640
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
7 files changed, 16 insertions, 32 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h index cbcc806cbe..ee16522c0b 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h @@ -58,7 +58,7 @@ public: /// The last parameter can be used to register a new visitor with the given /// BugReport while processing a node. virtual std::shared_ptr<PathDiagnosticPiece> - VisitNode(const ExplodedNode *Succ, const ExplodedNode *Pred, + VisitNode(const ExplodedNode *Succ, BugReporterContext &BRC, BugReport &BR) = 0; /// Last function called on the visitor, no further calls to VisitNode @@ -107,7 +107,6 @@ public: void Profile(llvm::FoldingSetNodeID &ID) const override; std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; }; @@ -134,7 +133,6 @@ public: static const char *getTag(); std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; @@ -153,7 +151,6 @@ public: } std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; @@ -179,12 +176,10 @@ public: static const char *getTag(); std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *Prev, BugReporterContext &BRC, BugReport &BR) override; std::shared_ptr<PathDiagnosticPiece> VisitNodeImpl(const ExplodedNode *N, - const ExplodedNode *Prev, BugReporterContext &BRC, BugReport &BR); @@ -237,10 +232,9 @@ public: ID.AddPointer(getTag()); } - std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *Prev, - BugReporterContext &BRC, - BugReport &BR) override { + std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *, + BugReporterContext &, + BugReport &) override { return nullptr; } @@ -267,7 +261,6 @@ public: } std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; }; @@ -297,7 +290,6 @@ public: static const char *getTag(); std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *Succ, - const ExplodedNode *Pred, BugReporterContext &BRC, BugReport &BR) override; }; @@ -311,7 +303,6 @@ public: void Profile(llvm::FoldingSetNodeID &ID) const override {} std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *Succ, - const ExplodedNode *Pred, BugReporterContext &BRC, BugReport &BR) override; }; @@ -327,7 +318,6 @@ public: void Profile(llvm::FoldingSetNodeID &ID) const override { ID.Add(V); } std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; }; @@ -346,7 +336,6 @@ public: void Profile(llvm::FoldingSetNodeID &ID) const override; std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index 4a4af64eb4..7fff42903b 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -632,7 +632,7 @@ public: } static std::shared_ptr<PathDiagnosticCallPiece> - construct(const ExplodedNode *N, const CallExitEnd &CE, + construct(const CallExitEnd &CE, const SourceManager &SM); static PathDiagnosticCallPiece *construct(PathPieces &pieces, diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h index c9c2b4f23c..91e47b37b7 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h @@ -155,7 +155,7 @@ private: public: ExprEngine(cross_tu::CrossTranslationUnitContext &CTU, AnalysisManager &mgr, - bool gcEnabled, SetOfConstDecls *VisitedCalleesIn, + SetOfConstDecls *VisitedCalleesIn, FunctionSummariesTy *FS, InliningModes HowToInlineIn); ~ExprEngine() override; @@ -293,7 +293,7 @@ public: /// ProcessBranch - Called by CoreEngine. Used to generate successor /// nodes by processing the 'effects' of a branch condition. - void processBranch(const Stmt *Condition, const Stmt *Term, + void processBranch(const Stmt *Condition, NodeBuilderContext& BuilderCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, @@ -352,7 +352,7 @@ public: void processCallExit(ExplodedNode *Pred) override; /// Called by CoreEngine when the analysis worklist has terminated. - void processEndWorklist(bool hasWorkRemaining) override; + void processEndWorklist() override; /// evalAssume - Callback function invoked by the ConstraintManager when /// making assumptions about state values. @@ -615,7 +615,6 @@ protected: ProgramStateRef State, const InvalidatedSymbols *Invalidated, ArrayRef<const MemRegion *> ExplicitRegions, - ArrayRef<const MemRegion *> Regions, const CallEvent *Call, RegionAndSymbolInvalidationTraits &ITraits) override; @@ -683,14 +682,13 @@ private: const ProgramPointTag *tag, QualType LoadTy); - // FIXME: 'tag' should be removed, and a LocationContext should be used - // instead. void evalLocation(ExplodedNodeSet &Dst, const Stmt *NodeEx, /* This will eventually be a CFGStmt */ const Stmt *BoundEx, ExplodedNode *Pred, - ProgramStateRef St, SVal location, - const ProgramPointTag *tag, bool isLoad); + ProgramStateRef St, + SVal location, + bool isLoad); /// Count the stack depth and determine if the call is recursive. void examineStackFrames(const Decl *D, const LocationContext *LCtx, diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h index 6aaa1e53fe..13f5b14378 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h @@ -471,8 +471,7 @@ public: const LocationContext *CurrentLC = nullptr) const; void printDOT(raw_ostream &Out, const LocationContext *CurrentLC = nullptr) const; - void printTaint(raw_ostream &Out, const char *nl = "\n", - const char *sep = "") const; + void printTaint(raw_ostream &Out, const char *nl = "\n") const; void dump() const; void dumpTaint() const; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h index 447f8f12ac..4ab7161459 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h @@ -254,8 +254,7 @@ public: virtual bool scanReachableSymbols(Store S, const MemRegion *R, ScanReachableSymbols &Visitor) = 0; - virtual void print(Store store, raw_ostream &Out, - const char* nl, const char *sep) = 0; + virtual void print(Store store, raw_ostream &Out, const char* nl) = 0; class BindingsHandler { public: diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h index d6aa4feddf..d745b0f51a 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h @@ -72,7 +72,7 @@ public: /// Called by CoreEngine. Used to generate successor /// nodes by processing the 'effects' of a branch condition. - virtual void processBranch(const Stmt *Condition, const Stmt *Term, + virtual void processBranch(const Stmt *Condition, NodeBuilderContext& BuilderCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, @@ -156,7 +156,6 @@ public: notifyCheckersOfPointerEscape(ProgramStateRef State, const InvalidatedSymbols *Invalidated, ArrayRef<const MemRegion *> ExplicitRegions, - ArrayRef<const MemRegion *> Regions, const CallEvent *Call, RegionAndSymbolInvalidationTraits &HTraits) = 0; @@ -167,7 +166,7 @@ public: /// Called by CoreEngine when the analysis worklist is either empty or the // maximum number of analysis steps have been reached. - virtual void processEndWorklist(bool hasWorkRemaining) = 0; + virtual void processEndWorklist() = 0; }; } // end GR namespace diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index 888ebc214f..b014c63709 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -657,7 +657,7 @@ public: /// The method returns \c true if symbols should continue be scanned and \c /// false otherwise. virtual bool VisitSymbol(SymbolRef sym) = 0; - virtual bool VisitMemRegion(const MemRegion *region) { return true; } + virtual bool VisitMemRegion(const MemRegion *) { return true; } }; } // namespace ento |