This is an archive of the discontinued LLVM Phabricator instance.

[LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.
ClosedPublic

Authored by ymandel on Apr 4 2019, 8:36 AM.

Details

Summary

Introduces a utility library in Refactoring/ to collect routines related to
source-code manipulation. In this change, we move "extended-range" functions
from the FixIt library (in clangTooling) to this new library.

We need to use this functionality in Refactoring/ and cannot access it if it
resides in Tooling/, because that would cause clangToolingRefactor to depend on
clangTooling, which would be a circular dependency.

Event Timeline

ymandel created this revision.Apr 4 2019, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2019, 8:36 AM
ymandel updated this revision to Diff 193735.Apr 4 2019, 9:45 AM

Add tests for SourceCode and remove corresponding tests from FixIt tests.

ymandel updated this revision to Diff 193736.Apr 4 2019, 9:49 AM

Update CMakeLists.txt and rename (misnamed) test file.

ymandel updated this revision to Diff 193741.Apr 4 2019, 10:10 AM

Various tweaks to get tests compiling/passing.

ilya-biryukov accepted this revision.Apr 5 2019, 2:41 AM

Nice! A more specific name and a more specific library.
LGTM!

This revision is now accepted and ready to land.Apr 5 2019, 2:41 AM
ymandel updated this revision to Diff 193861.Apr 5 2019, 5:58 AM

Delete unused function.

ymandel updated this revision to Diff 193865.Apr 5 2019, 7:01 AM

Fix trailing whitespace

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2019, 7:03 AM