[PATCH] D24515: Supports adding insertion around non-insertion replacements.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 14 05:57:24 PDT 2016


djasper added inline comments.

================
Comment at: include/clang/Tooling/Core/Replacement.h:172
@@ +171,3 @@
+  ///   - They do not overlap.
+  ///   - One replacement is insertion, and the other is a replacement with
+  ///     length > 0, and the insertion is adjecent to but not contained in the
----------------
I think technically this is also not an overlap and so the first condition would hold. How about phrasing this the other way, i.e.:

Two replacements are considered order independent if they:
- they don't overlap (being directly adjacent is fine) and
- aren't both inserts at the same code location


https://reviews.llvm.org/D24515





More information about the cfe-commits mailing list