This is an archive of the discontinued LLVM Phabricator instance.

Fix include path in ClangTidy.cpp.
ClosedPublic

Authored by chh on Apr 18 2016, 6:16 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

chh updated this revision to Diff 54142.Apr 18 2016, 6:16 PM
chh retitled this revision from to Fix include path in ClangTidy.cpp..
chh updated this object.
chh added reviewers: srhines, alexfh.
chh added a subscriber: cfe-commits.
alexfh requested changes to this revision.Apr 21 2016, 9:54 AM
alexfh edited edge metadata.
alexfh added inline comments.
clang-tidy/ClangTidy.cpp
61 ↗(On Diff #54142)

As it is, the change leaves almost no context of where the Checkers.inc file comes from. I'd prefer to leave at least lib/StaticAnalyzer/Checkers/Checkers.inc. Will this work for you?

Another question is how do you deal with other .inc files generated from .td files in llvm/lib/... or llvm/tools/clang/lib/...?

This revision now requires changes to proceed.Apr 21 2016, 9:54 AM
srhines added inline comments.Apr 21 2016, 10:02 AM
clang-tidy/ClangTidy.cpp
61 ↗(On Diff #54142)

I think that the other .inc files have proper exported include paths so that you only include the final part of the name.

Looking at llvm/lib/Option/CMakeLists.txt, I see the following export o fthe includes:

ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Option
)

Should this export actually be happening in lib/StaticAnalyzer/Checkers/CMakeLists.txt? Even in that case, it will shorten down to just the final name, without any other part of the path (like you are requesting here).

chh updated this revision to Diff 54587.Apr 21 2016, 3:04 PM
chh edited edge metadata.

This change depends on http://reviews.llvm.org/D19393.

alexfh requested changes to this revision.Apr 26 2016, 6:47 AM
alexfh edited edge metadata.
In D19249#408437, @chh wrote:

This change depends on http://reviews.llvm.org/D19393.

I'm personally fine with the solution in D19393. Removing this from my dashboard until that patch lands.

This revision now requires changes to proceed.Apr 26 2016, 6:47 AM
alexfh accepted this revision.Apr 27 2016, 4:54 PM
alexfh edited edge metadata.

Since D19393 is approved, this patch also looks fine.

This revision is now accepted and ready to land.Apr 27 2016, 4:54 PM
This revision was automatically updated to reflect the committed changes.