[PATCH] D21601: Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error.

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 23 05:24:41 PDT 2016

klimek added inline comments.

Comment at: include/clang/Tooling/Core/Replacement.h:170
@@ +169,3 @@
+/// This completely ignores the path stored in each replacement. If all
+/// replacements are applied successfully, this returns the result code;
+/// otherwise, an llvm::Error carrying llvm::StringError is returned (the Error
When I read "result code" I imagine a number.
Perhaps "returns the code with the replacements applied"
or "resulting code"?

Comment at: lib/Format/Format.cpp:1395
@@ -1394,2 +1394,3 @@
+// If any replacements in \p Replaces fails to apply, this returns \p Replaces.
 template <typename T>
Why would we want to return the same replacements?


More information about the cfe-commits mailing list