This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Rewrite compilation database test to not require shell
Needs RevisionPublic

Authored by zturner on Aug 15 2016, 4:24 PM.

Details

Summary

This allows the test to run on windows, and also makes writing compilation database tests easier in general. See D23532 for more information.

Diff Detail

Event Timeline

zturner updated this revision to Diff 68105.Aug 15 2016, 4:24 PM
zturner retitled this revision from to [clang-tidy] Rewrite compilation database test to not require shell.
zturner updated this object.
zturner added reviewers: alexfh, klimek, djasper.
zturner added a subscriber: cfe-commits.
alexfh added inline comments.Aug 16 2016, 7:25 AM
test/clang-tidy/clang-tidy-run-with-database.cpp
11

This sed call substitutes placeholders with absolute paths, which is an important part of this test. So we can't get rid of the sed call. Furthermore, the test verifies that clang-tidy doesn't crash when applying fixes (which it used to, IIRC), so I'm not sure this change doesn't make the test less informative.

If you need to test correct handling of GCC-style command lines in JSON compilation databases on Windows, we can add another test, but this one should stay as it is.

36

Please fix "No newline at end of file".

alexfh requested changes to this revision.Aug 16 2016, 7:25 AM
alexfh edited edge metadata.
This revision now requires changes to proceed.Aug 16 2016, 7:25 AM
test/clang-tidy/Inputs/compilation-database/clang-tidy-database.json