[clang-tools-extra] r276098 - [include-fixer] Make error messages a bit prettier and make sure to
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 20 02:12:20 PDT 2016
Author: d0k
Date: Wed Jul 20 04:12:19 2016
New Revision: 276098
URL: http://llvm.org/viewvc/llvm-project?rev=276098&view=rev
Log:
[include-fixer] Make error messages a bit prettier and make sure to
include a newline at the end.
Modified:
clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp
Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp?rev=276098&r1=276097&r2=276098&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp (original)
+++ clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp Wed Jul 20 04:12:19 2016
@@ -335,7 +335,8 @@ int includeFixerMain(int argc, const cha
auto Buffer = llvm::MemoryBuffer::getFile(FilePath);
if (!Buffer) {
- errs() << "Couldn't open file: " << FilePath;
+ errs() << "Couldn't open file: " << FilePath << ": "
+ << Buffer.getError().message() << '\n';
return 1;
}
@@ -349,7 +350,8 @@ int includeFixerMain(int argc, const cha
}
if (!Quiet)
- llvm::errs() << "Added #include" << Context.getHeaderInfos().front().Header;
+ errs() << "Added #include " << Context.getHeaderInfos().front().Header
+ << '\n';
// Add missing namespace qualifiers to the unidentified symbol.
Replacements->insert({FilePath, Context.getSymbolRange().getOffset(),
More information about the cfe-commits
mailing list