[PATCH] D17335: [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 17 07:42:00 PST 2016
alexfh added a comment.
Thank you for working on this!
This change needs a lit test (ensure it fails/crashes without the patch and works fine after the patch).
================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:343
@@ +342,3 @@
+ .getVirtualFileSystem()
+ ->getCurrentWorkingDirectory()
+ .get()));
----------------
Should this code handle possible errors from getCurrentWorkingDirectory()?
================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.h:63
@@ -61,2 +62,3 @@
+ std::string BuildDirectory;
std::string CheckName;
----------------
Please add a comment and explain also how this relates to `ClangTidyMessage::FilePath` and `clang::tooling::Replacement::FilePath`.
Additionally, describe possible values. For example, can this be an absolute path, a relative path or both? Can this be empty?
Repository:
rL LLVM
http://reviews.llvm.org/D17335
More information about the cfe-commits
mailing list