================
@@ -0,0 +1,215 @@
+#include "clang/StaticAnalyzer/Checkers/LifetimeModeling.h"
+#include "clang/AST/Attr.h"
+#include "clang/Analysis/Analyses/LifetimeSafety/LifetimeAnnotations.h"
+#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
+#include "clang/StaticAnalyzer/Core/Checker.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
+#include "llvm/Support/raw_ostream.h"
+
+using namespace clang;
+using namespace ento;
+
+REGISTER_SET_FACTORY_WITH_PROGRAMSTATE(LifetimeSourceSet, const MemRegion *)
+REGISTER_MAP_WITH_PROGRAMSTATE(LifetimeBoundMap, SVal, LifetimeSourceSet)
+
+namespace {
+
+class LifetimeModeling : public Checker<check::PostCall, check::DeadSymbols> {
----------------
benedekaibas wrote:

Just to make sure if I understand it correctly you suggest that the 
`LifetimeModeling` checker should be moved to separate file with its functions 
`printState`, `checkPostCall`, and `checkDeadSymbols`? If I would do that then 
the register macro for the map and set should also be moved most likely to the 
header (with modifying them like the `Iterator` checker does) since the 
functions the `LifetimeModeling` checker has would also need it along with the 
functions declared in the header.

If I am correct and that is what you want then probably the easiest thing to do 
is to do similarly how the `Iterator` checker is implemented. 

https://github.com/llvm/llvm-project/pull/205951
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to