================
@@ -49,13 +49,25 @@ static void DebugOnlyFunction(AnalysisDeclContext &AC, 
const CFG &Cfg,
 #endif
 
 LifetimeSafetyAnalysis::LifetimeSafetyAnalysis(AnalysisDeclContext &AC,
-                                               LifetimeSafetyReporter 
*Reporter)
-    : AC(AC), Reporter(Reporter) {}
+                                               LifetimeSafetyReporter 
*Reporter,
+                                               const LifetimeSafetyOpts 
&LSOpts)
+    : LSOpts(LSOpts), AC(AC), Reporter(Reporter) {}
 
 void LifetimeSafetyAnalysis::run() {
   llvm::TimeTraceScope TimeProfile("LifetimeSafetyAnalysis");
 
   const CFG &Cfg = *AC.getCFG();
+  if (LSOpts.MaxCFGBlocks > 0 && Cfg.getNumBlockIDs() > LSOpts.MaxCFGBlocks) {
+    DEBUG_WITH_TYPE(
+        "LifetimeSafety", std::string FuncName = "<unknown>";
+        if (const Decl *D = AC.getDecl()) if (const auto *ND =
----------------
Xazax-hun wrote:

Is this clang formatted? I find this formatting very confusing. Maybe clang 
format got confused by the macro?

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

Reply via email to