Some early errors during the ASTUnit creation were not transferred to the FailedParseDiagnostic so when the code in LoadFromCommandLine swaps its content with the content of StoredDiagnostics they cannot be retrieved by the user in any way.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Perhaps this'd be more robust with ScopeExit? ( https://llvm.org/doxygen/ScopeExit_8h_source.html )
Comment Actions
Perhaps this'd be more robust with ScopeExit?
Not really, OnError is not executed when/if the function succeeds.
Comment Actions
Ah, sorry - ScopeExit has a 'release()' function intended to disengage it/disable the execution of the payload.
The use would often look something like:
auto x = make_scope_exit(...); if (failed()) return fail; if (failed()) return fail; x.release(); return success;
Comment Actions
Looks good to me - thanks!
Great! Can you please commit this for me as I have no commit access?
You can remove these braces now - since it's a superfluous change here now there's no need to add an extra function call.