djasper added inline comments.
================
Comment at: lib/Format/Format.cpp:1544
@@ -1508,2 +1543,3 @@
deriveLocalStyle(AnnotatedLines);
- computeAffectedLines(AnnotatedLines.begin(), AnnotatedLines.end());
+ AffectedRangeMgr.computeAffectedLines(AnnotatedLines.begin(),
+ AnnotatedLines.end());
----------------
Move this into the base class?
================
Comment at: lib/Format/Format.cpp:2097
@@ +2096,3 @@
+static tooling::Replacements
+setupEnvironmentAndProcess(T Callback, const FormatStyle &Style, StringRef
Code,
+ ArrayRef<tooling::Range> Ranges, StringRef FileName,
----------------
Instead, create a class Environment that does all of these and makes SourceMgr,
ID and CharRanges available via getters (maybe more). Then you should be able
to just instantiate an environment and call the other reformat/cleanup function
with the corresponding arguments.
http://reviews.llvm.org/D18551
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits