This is an archive of the discontinued LLVM Phabricator instance.

[libclang] Expose Rewriter in libclang API
ClosedPublic

Authored by jkorous on Sep 1 2020, 5:06 PM.

Diff Detail

Event Timeline

jkorous created this revision.Sep 1 2020, 5:06 PM
jkorous requested review of this revision.Sep 1 2020, 5:06 PM
jkorous updated this revision to Diff 289552.Sep 2 2020, 1:09 PM

I think the methods that use the rewriter should be prefixed with clang_Rewriter_ to match the naming convention, e.g. clang_Rewriter_removeText, clang_Rewriter_dispose, clang_Rewriter_create.

Can you add a libclang unit test for the rewriter?

jkorous updated this revision to Diff 289837.Sep 3 2020, 5:25 PM
  • added tests
  • renamed with prefix
davide added a subscriber: davide.Sep 4 2020, 10:15 AM
arphaman accepted this revision.Sep 4 2020, 1:31 PM

LGTM, with one comment below:

clang/include/clang-c/Rewrite.h
21

That should be prefixed with CX to be CXRewriter to match the naming convention.

This revision is now accepted and ready to land.Sep 4 2020, 1:31 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 4 2020, 2:17 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript