Skip to content

Commit

Permalink
[include-cleaner] Print the line number of removal #includes.
Browse files Browse the repository at this point in the history
I found that this information is helpful when using this tool.

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D139715
  • Loading branch information
hokein committed Dec 14, 2022
1 parent 7b420a1 commit 4702d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 4702d8d

Please sign in to comment.