Added applyAllReplacementsAndFormat that works for multiple files.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I don't think this is the right abstraction:
- Formatting so far is fundamentally per file. Grouping replacements per file is something that can be done outside of libFormat.
- The logic to sort and deduplicate Replacements is important independent of whether formatting is done on them. So this should also go outside of libFormat.
Comment Actions
Ok, after thinking about it a bit, here is a new plan:
- get rid of applyAllReplacementsAndFormat (in all its forms)
- implement a formatRewrittenCode(Rewriter&, ...); as Daniel wants libFormat to stay file focused, we can put that into non-core libTooling; it'll figure out what to reformat from the rewriter state
That should leave us with a set of single purpose functions we can nicely combine.
Comment Actions
- Removed all applyAllReplacementsAndFormat(*); added formatRewrittenCode in clangTooling.