]> granicus.if.org Git - clang/commitdiff
Make helpers static. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 4 Apr 2018 11:45:11 +0000 (11:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 4 Apr 2018 11:45:11 +0000 (11:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329170 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
lib/StaticAnalyzer/Core/WorkList.cpp

index 277ae28813d4e2a2e0d8c9083ff6768d12e0777b..48461f953b9220bd713ffbb354c60bce732aa4f6 100644 (file)
@@ -914,11 +914,8 @@ static bool isInitializationOfVar(const ExplodedNode *N, const VarRegion *VR) {
 }
 
 /// Show diagnostics for initializing or declaring a region \p R with a bad value.
-void showBRDiagnostics(const char *action,
-    llvm::raw_svector_ostream& os,
-    const MemRegion *R,
-    SVal V,
-    const DeclStmt *DS) {
+static void showBRDiagnostics(const char *action, llvm::raw_svector_ostream &os,
+                              const MemRegion *R, SVal V, const DeclStmt *DS) {
   if (R->canPrintPretty()) {
     R->printPretty(os);
     os << " ";
index 95ffc44963cac1fce3aa1c3e08d827c7476a5777..833fdf2f58009bf6884886ed995c45ea102f6b49 100644 (file)
@@ -190,6 +190,7 @@ std::unique_ptr<WorkList> WorkList::makeUnexploredFirst() {
   return llvm::make_unique<UnexploredFirstStack>();
 }
 
+namespace {
 class UnexploredFirstPriorityQueue : public WorkList {
   using BlockID = unsigned;
   using LocIdentifier = std::pair<BlockID, const StackFrameContext *>;
@@ -246,6 +247,7 @@ public:
     return U.first;
   }
 };
+} // namespace
 
 std::unique_ptr<WorkList> WorkList::makeUnexploredFirstPriorityQueue() {
   return llvm::make_unique<UnexploredFirstPriorityQueue>();