[PATCH] D52804: [analyzer] NFC: RetainCountChecker: Avoid dumping symbols during normal operation.

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 15 10:49:58 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC344538: [analyzer] NFC: RetainCountChecker: Don't dump() symbols into program point… (authored by dergachev, committed by ).
Herald added a subscriber: donat.nagy.

Repository:
  rC Clang

https://reviews.llvm.org/D52804

Files:
  lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp


Index: lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
===================================================================
--- lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
+++ lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
@@ -1314,19 +1314,6 @@
   processLeaks(state, Leaked, Ctx, Pred);
 }
 
-const ProgramPointTag *
-RetainCountChecker::getDeadSymbolTag(SymbolRef sym) const {
-  const CheckerProgramPointTag *&tag = DeadSymbolTags[sym];
-  if (!tag) {
-    SmallString<64> buf;
-    llvm::raw_svector_ostream out(buf);
-    out << "Dead Symbol : ";
-    sym->dumpToStream(out);
-    tag = new CheckerProgramPointTag(this, out.str());
-  }
-  return tag;
-}
-
 void RetainCountChecker::checkDeadSymbols(SymbolReaper &SymReaper,
                                           CheckerContext &C) const {
   ExplodedNode *Pred = C.getPredecessor();
@@ -1342,8 +1329,8 @@
     if (const RefVal *T = B.lookup(Sym)){
       // Use the symbol as the tag.
       // FIXME: This might not be as unique as we would like.
-      const ProgramPointTag *Tag = getDeadSymbolTag(Sym);
-      state = handleAutoreleaseCounts(state, Pred, Tag, C, Sym, *T);
+      static CheckerProgramPointTag Tag(this, "DeadSymbolAutorelease");
+      state = handleAutoreleaseCounts(state, Pred, &Tag, C, Sym, *T);
       if (!state)
         return;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52804.169725.patch
Type: text/x-patch
Size: 1391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181015/c009efab/attachment.bin>


More information about the cfe-commits mailing list