mprobst marked an inline comment as done.

================
Comment at: lib/Format/Format.cpp:806
@@ -805,2 +805,3 @@
           FormatTokenLexer &Tokens, tooling::Replacements &Result) override {
+    tooling::Replacements RunResult;
     deriveLocalStyle(AnnotatedLines);
----------------
djasper wrote:
> Call this "RequoteChanges".
Done, went with `RequoteReplaces` (which is what we use in other places for the 
`tooling::Replacements` variable).

================
Comment at: lib/Format/Format.cpp:831
@@ -830,1 +830,3 @@
+    RunResult = RunResult.merge(Whitespaces.generateReplacements());
+    return RunResult;
   }
----------------
djasper wrote:
> Just
> 
>   return RequoteChanges.merge(Whitespaces.generateReplacements());
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.


https://reviews.llvm.org/D24155



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to