================
@@ -0,0 +1,36 @@
+//===- LifetimeStats.cpp - Lifetime Safety Statistics -*------------ 
C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the data structures and utility function for collection of
+// staticstics related to Lifetimesafety analysis.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Analysis/Analyses/LifetimeSafety/LifetimeStats.h"
+#include "clang/AST/TypeBase.h"
+#include "llvm/Support/raw_ostream.h"
+
+namespace clang::lifetimes {
+void printStats(const LifetimeSafetyStats &Stats) {
+  llvm::errs() << "\n*** LifetimeSafety Missing Origin per QualType: "
+                  "(QualType : count) :\n\n";
+  unsigned TotalMissingOrigins = 0;
+  for (const auto &[type, count] : Stats.ExprTypeToMissingOriginCount) {
----------------
usx95 wrote:

Use UpperCamelCase for local variables type, count, stmt

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

Reply via email to