This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Extend TransformerClangTidyCheck to support adding includes.
ClosedPublic

Authored by ymandel on Jun 27 2019, 1:16 PM.

Details

Summary

This revision implements support for the AddedIncludes field in
RewriteRule cases; that is, it supports specifying the addition of include
directives in files modified by the clang tidy check.

Event Timeline

ymandel created this revision.Jun 27 2019, 1:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2019, 1:16 PM
Herald added a subscriber: xazax.hun. · View Herald Transcript
gribozavr accepted this revision.Jun 28 2019, 6:34 AM
This revision is now accepted and ready to land.Jun 28 2019, 6:34 AM
ymandel updated this revision to Diff 207085.Jun 28 2019, 9:59 AM

Added check for use of AddedIncludes before allocating/registering IncludeInserter.

gribozavr accepted this revision.Jul 1 2019, 5:57 AM
gribozavr added inline comments.
clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
51

llvm::any_of(Rule, [](const...

ymandel updated this revision to Diff 207538.Jul 2 2019, 6:18 AM

switched to llvm::any_of.

ymandel marked 2 inline comments as done.Jul 2 2019, 6:24 AM
ymandel added inline comments.
clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
51

nice, thanks!

This revision was automatically updated to reflect the committed changes.
ymandel marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 6:26 AM