https://github.com/naveen-seth created 
https://github.com/llvm/llvm-project/pull/172352

Improves the readability of `getFirstCC1CommandLine()` by using consistent 
naming and adding documentation.
(This addresses the feedback in 
https://github.com/llvm/llvm-project/pull/169964#discussion_r2620074122)

>From 1cd04dcb27f4c2a9e4754258f6be5a18e181dec2 Mon Sep 17 00:00:00 2001
From: Naveen Seth Hanig <[email protected]>
Date: Mon, 15 Dec 2025 19:57:29 +0100
Subject: [PATCH] [clang][DependencyScanning] Use OverlayFS naming consistently

---
 clang/lib/Tooling/DependencyScanningTool.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Tooling/DependencyScanningTool.cpp 
b/clang/lib/Tooling/DependencyScanningTool.cpp
index 74cc6af3551f8..87f756d2f4df4 100644
--- a/clang/lib/Tooling/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanningTool.cpp
@@ -189,15 +189,18 @@ buildCC1CommandLine(const driver::Command &Cmd) {
   return Out;
 }
 
+/// Builds the compilation for the given driver command line and returns the
+/// first -cc1 command line, or std::nullopt on error, with diagnostics
+/// reported to \c Diags.
 static std::optional<std::vector<std::string>> getFirstCC1CommandLine(
     ArrayRef<std::string> CommandLine, DiagnosticsEngine &Diags,
-    llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> ScanFS) {
+    llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS) {
   // Compilation holds a non-owning a reference to the Driver, hence we need to
   // keep the Driver alive when we use Compilation. Arguments to commands may 
be
   // owned by Alloc when expanded from response files.
   llvm::BumpPtrAllocator Alloc;
   const auto [Driver, Compilation] =
-      buildCompilation(CommandLine, Diags, ScanFS, Alloc);
+      buildCompilation(CommandLine, Diags, OverlayFS, Alloc);
   if (!Compilation)
     return std::nullopt;
 

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

Reply via email to