Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Tooling/Core/Replacement.cpp | ||
---|---|---|
505 ↗ | (On Diff #111414) | While obviously correct, are you concerned that by removing the explanatory text, this change will obscure the reason for the assert? |
lib/Tooling/Core/Replacement.cpp | ||
---|---|---|
505 ↗ | (On Diff #111414) | The text is now in a comment above the call. |
lib/Tooling/Core/Replacement.cpp | ||
---|---|---|
505 ↗ | (On Diff #111414) | Well, that's what I mean. The reason is no longer in the backtrace. |
lib/Tooling/Core/Replacement.cpp | ||
---|---|---|
505 ↗ | (On Diff #111414) | The backtrace will point to this exact line, so I assume anyone debugging it will eventually read the comment. It might be better to have an optional message to cantFail(), but that isn't within the scope of this change. |
lib/Tooling/Core/Replacement.cpp | ||
---|---|---|
505 ↗ | (On Diff #111414) | Sorry, I meant the output of llvm::sys::PrintStackTrace(), which include the assert. |
It's just too bad llvm::cantFail() doesn't take an optional string.
But the code is cleaner, so I won't comment further.
That's not a bad idea actually. Let me add an optional error message to cantFail for you.
I've added an optional ErrMsg argument to cantFail in r312066 - you can now use this to preserve your explanatory text.
Yeah, I was waiting on someone with approval for this area of the code to comment and then lost track of it. I can recheck it tonight and then submit it. Thank you for going back through these patches. :)