[PATCH] D58368: [analyzer] MIGChecker: Implement bug reporter visitors.

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 20 12:57:30 PST 2019


Charusso added a reviewer: Charusso.
Charusso requested changes to this revision.
Charusso added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp:113
+  });
+  C.addTransition(C.getState()->set<ReleasedParameter>(true), T);
 }
----------------
This is a cool approach, but it is difficult to use this API in other checkers. If you do not out-chain D58367 I would like to see something like that here:

```
  SmallString<64> Str;
  llvm::raw_svector_ostream OS(Str);
  OS << "Deallocating object passed through parameter '" << PVD->getName()
     << '\'';

  C.addNote(C.getState()->set<ReleasedParameter>(true), OS.str());
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58368/new/

https://reviews.llvm.org/D58368





More information about the cfe-commits mailing list