From 4702d8d9cf80d6f80e68d20b3ff5c0bf8a43e000 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 14 Dec 2022 10:45:56 +0100 Subject: [PATCH] [include-cleaner] Print the line number of removal #includes. I found that this information is helpful when using this tool. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D139715 --- clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp b/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp index cdd0ea722f7c5..f45a54b5ee9a3 100644 --- a/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp +++ b/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp @@ -130,7 +130,7 @@ class Action : public clang::ASTFrontendAction { switch (Print) { case PrintStyle::Changes: for (const Include *I : Results.Unused) - llvm::outs() << "- " << I->quote() << "\n"; + llvm::outs() << "- " << I->quote() << " @Line:" << I->Line << "\n"; for (const auto &I : Results.Missing) llvm::outs() << "+ " << I << "\n"; break;