diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-07-20 09:12:19 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-07-20 09:12:19 +0000 |
commit | a6812f612fef649fa260e19c07895782a71944a1 (patch) | |
tree | b9f579ab54af2be2139f4331b541a28ca673cf6b /clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp | |
parent | a965bd75087b476c640ddd0c7ec25b036c541a85 (diff) | |
download | bcm5719-llvm-a6812f612fef649fa260e19c07895782a71944a1.tar.gz bcm5719-llvm-a6812f612fef649fa260e19c07895782a71944a1.zip |
[include-fixer] Make error messages a bit prettier and make sure to
include a newline at the end.
llvm-svn: 276098
Diffstat (limited to 'clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp')
-rw-r--r-- | clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp b/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp index 1062701727a..1f50f583915 100644 --- a/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp +++ b/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp @@ -335,7 +335,8 @@ int includeFixerMain(int argc, const char **argv) { 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 char **argv) { } 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(), |