[clang] [clang][analyzer] Make per-entry-point metric rows uniquely identifiable (PR #161663)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 3 06:25:07 PDT 2025


================
@@ -65,6 +65,15 @@ STAT_MAX(MaxCFGSize, "The maximum number of basic blocks in a function.");
 
 namespace {
 
+StringRef getMainFileName(const CompilerInvocation &Invocation) {
+  if (!Invocation.getFrontendOpts().Inputs.empty()) {
+    const FrontendInputFile &Input = Invocation.getFrontendOpts().Inputs[0];
+    return Input.isFile() ? Input.getFile()
+                          : Input.getBuffer().getBufferIdentifier();
+  }
+  return {};
----------------
necto wrote:

Makes sense changed in 7118400ab4c28b8d87a9708ebef2e105910616ba

https://github.com/llvm/llvm-project/pull/161663


More information about the cfe-commits mailing list