[PATCH] D55280: [CTU] Make loadExternalAST return with non nullptr on success

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 6 07:56:50 PST 2018


martong added a comment.

Hi Aleksey,

The first version was indeed not correct. But, I think we handle that case with the latest update (https://reviews.llvm.org/differential/diff/176779/).  In `loadExternalAST()` we have this right before the return:

  if (!Unit)
      return llvm::make_error<IndexError>(
          index_error_code::failed_to_get_external_ast);
  return Unit;

So we will never return with a nullptr value in the `Expected`.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55280/new/

https://reviews.llvm.org/D55280





More information about the cfe-commits mailing list