[PATCH] D17335: [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 19 01:30:10 PST 2016


hokein marked 2 inline comments as done.

================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:343
@@ +342,3 @@
+      auto WorkingDir = Info.getSourceManager()
+                            .getFileManager().getVirtualFileSystem()
+                            ->getCurrentWorkingDirectory();
----------------
Yeah, you are right. We need to handle the error here since in some cases like the source file is not exit, the `SourceManager` is unavailable.


http://reviews.llvm.org/D17335





More information about the cfe-commits mailing list