[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
Mon Feb 22 08:38:57 PST 2016


alexfh added a comment.

In http://reviews.llvm.org/D17335#358613, @hokein wrote:

> - Don't save BuildDirectory for every error in each check.


I think, it's not going to work with multiple files. There's just one Stats instance.


================
Comment at: test/clang-tidy/clang-tidy-run-with-database.cpp:3
@@ +2,3 @@
+// RUN: sed 's|test_dir|%S|g' %S/Inputs/compilation-database/template.json > %T/compile_commands.json
+// RUN: clang-tidy --checks=-*,modernize-use-nullptr -p %T %s -header-filter=.* | FileCheck %s -implicit-check-not="{{warning:}}"
+
----------------
We need to test more stuff here, at least these come to mind:

1. -fix
2. multiple files in one clang-tidy invocation
3. files with the same name in different directories



http://reviews.llvm.org/D17335





More information about the cfe-commits mailing list