return llvm::Expected<> to carry error status and error information.
This is the first step towards introducing "Error" into tooling::Replacements.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Format/Format.cpp | ||
|---|---|---|
| 1395 ↗ | (On Diff #61518) | 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 ↗ | (On Diff #61518) | Both are good options :) Choose one. |
Comment Actions
- fixed commenting.
- Make formatReplacemnts and cleanupAroundReplacements return llvm::Exppected<...>.
| include/clang/Format/Format.h | ||
|---|---|---|
| 780 ↗ | (On Diff #61780) | typo: otheriwse |
| lib/Format/Format.cpp | ||
| 1395–1396 ↗ | (On Diff #61780) | Comment doesn't apply any more, right? |
| unittests/Format/CleanupTest.cpp | ||
| 258 ↗ | (On Diff #61780) | The explicit cast is unfortunate. Does this not have an .Ok() method or something? |
| unittests/Format/CleanupTest.cpp | ||
|---|---|---|
| 258 ↗ | (On Diff #61780) | 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 | ||
|---|---|---|
| 258 ↗ | (On Diff #61785) | Hm. Can we make it work with EXPECT_TRUE somehow? |