When formatting source code that needs both requoting and reindentation,
merge the replacements to avoid erroring out for conflicting replacements.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Format/Format.cpp | ||
---|---|---|
806 ↗ | (On Diff #70066) | Done, went with RequoteReplaces (which is what we use in other places for the tooling::Replacements variable). |
831 ↗ | (On Diff #70066) | Done. Somewhat related, this API was very surprising – it passes down a Replacements object, but then the caller takes every item of the returned result and adds it back into the object, causing conflicts. So the only way to correctly use the API is to ignore the parameter, or return an empty dummy object. I've changed the API to not pass down the parameter to make this a bit less misleading. |