return llvm::Expected<> to carry error status and error information.
This is the first step towards introducing "Error" into tooling::Replacements.
Details
Diff Detail
Event Timeline
lib/Format/Format.cpp | ||
---|---|---|
1395 | this is just a temp solution to keep the current interfaces of processReplacements and formatReplacements...should I add a FIXME or can I change them in this patch as well? |
lib/Format/Format.cpp | ||
---|---|---|
1395 | Both are good options :) Choose one. |
- fixed commenting.
- Make formatReplacemnts and cleanupAroundReplacements return llvm::Exppected<...>.
unittests/Format/CleanupTest.cpp | ||
---|---|---|
259 | unfortunately, the bool operator is the only way we got... I think the idea is that Errors are always expected to be checked and handled (the destructor of llvm::Error asserts that an Error has been handled). |
unittests/Format/CleanupTest.cpp | ||
---|---|---|
259 | Hm. Can we make it work with EXPECT_TRUE somehow? |
When I read "result code" I imagine a number.
Perhaps "returns the code with the replacements applied"
or "resulting code"?