[PATCH] D55280: [CTU] Make loadExternalAST return with non nullptr on success
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 5 08:42:29 PST 2018
martong marked an inline comment as done.
martong added inline comments.
================
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:147
llvm::Expected<const FunctionDecl *>
CrossTranslationUnitContext::getCrossTUDefinition(const FunctionDecl *FD,
----------------
balazske wrote:
> Szelethus wrote:
> > Would it be worth to add a comment that this function never returns with `nullptr` on success?
> Even on failure not. Failure should be `Error`, success is a non-null pointer.
Yes, you are right.
We should indicate that in the documentation of this function that it can not return with a nullptr on success. I think we should do that in here https://reviews.llvm.org/D55131 because there we do check that the `ToDecl` is not a nullptr.
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