================
@@ -617,13 +617,21 @@ int ClangTool::run(ToolAction *Action) {
// pass in made-up names here. Make sure this works on other platforms.
injectResourceDir(CommandLine, "clang_tool", &StaticSymbol);
+ ++CurrentCommandIndexForFile;
+
// FIXME: We need a callback mechanism for the tool writer to output a
// customized message for each file.
- if (NumOfTotalFiles > 1)
- llvm::errs() << "[" + std::to_string(++ProcessedFileCounter) + "/" +
- std::to_string(NumOfTotalFiles) +
- "] Processing file " + File
- << ".\n";
+ if (NumOfTotalFiles > 1 || CompileCommandsForFile.size() > 1) {
+ llvm::errs() << "[" + std::to_string(CurrentFileIndex) + "/" +
+ std::to_string(NumOfTotalFiles) + "]";
+ if (CompileCommandsForFile.size() > 1) {
+ llvm::errs() << " (" + std::to_string(CurrentCommandIndexForFile) +
+ "/" +
+ std::to_string(CompileCommandsForFile.size()) +
+ ")";
+ }
+ llvm::errs() << " Processing file " + File << ".\n";
----------------
zeyi2 wrote:
I've fixed them, thanks :)
https://github.com/llvm/llvm-project/pull/169640
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits