This is an archive of the discontinued LLVM Phabricator instance.

Move Checkers.inc to clang/include/.../Checkers
ClosedPublic

Authored by chh on Apr 21 2016, 3:03 PM.

Details

Reviewers
zaks.anna
srhines
Summary

https://llvm.org/bugs/show_bug.cgi?id=27355
To compile with other binary output directory structures in build systems like Android.
Allow clang-tidy/ClangTidy.cpp and other files to include Checkers.inc like other .inc files,
with a relative path to clang/include.

Diff Detail

Event Timeline

chh updated this revision to Diff 54586.Apr 21 2016, 3:03 PM
chh retitled this revision from to Move Checkers.inc to clang/include/.../Checkers.
chh updated this object.
chh added reviewers: srhines, alexfh.
chh added a subscriber: cfe-commits.
chh added a comment.Apr 21 2016, 3:06 PM

See dependent change of ClangTidy.cpp in http://reviews.llvm.org/D19393.

alexfh edited reviewers, added: zaks.anna; removed: alexfh.Apr 21 2016, 5:24 PM
srhines added inline comments.Apr 21 2016, 5:32 PM
include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
4

Anna should probably decide here, but I think it might be preferable to actually move Checkers.td into include/..., since it is indeed being used beyond just the lib/... directory it currently resides in (hence the original problem here of a bizarre include path in clang/tools/extra).

zaks.anna added inline comments.Apr 21 2016, 6:56 PM
include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
4

+1
If you use it outside of lib/StaticAnalyzer, feel free to move it.

chh updated this revision to Diff 54758.Apr 22 2016, 6:53 PM

Also move Checkers.td to clang/include/.../Checkers.

zaks.anna edited edge metadata.Apr 23 2016, 3:08 PM

Would it be possible to generate the diff that shows that the file moved as opposed to being deleted and added?

srhines edited edge metadata.Apr 23 2016, 5:28 PM

Anna, if I scroll over the new include file in phabricator, it shows as a proper file move (in a yellow column at the start of the right diff - hover for it to say this). Every line is the same from the original file, as this is being moved only to fix up the relative paths, which are used across multiple directories.

I know that git and svn both handle renames properly (via mv), but I have no clue whether phabricator + git-svn are going to preserve history in the nicest way possible. If there are suggestions there for minimizing trouble, we're happy to listen.

chh marked 2 inline comments as done.Apr 25 2016, 9:35 AM

I used "svn mv" to move the file and "svn diff --show-copies-as-adds" to generate the diff.
If I didn't use "--show-copies-as-adds", the new file was not included/shown by phabricator at all.

Please let me know if there is better way to generate and display such diff in phabricator.
Thanks.

zaks.anna accepted this revision.Apr 27 2016, 12:41 PM
zaks.anna edited edge metadata.
This revision is now accepted and ready to land.Apr 27 2016, 12:41 PM
chh closed this revision.Apr 27 2016, 7:08 PM

Was submitted in r267832 | chh | 2016-04-27 18:09:09 -0700 (Wed, 27 Apr 2016)

include/clang/StaticAnalyzer/Checkers/Checkers.td