[PATCH] D55280: [CTU] Remove redundant error check

2018-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @Szelethus @balazske Thanks for your review! The meantime I have discussed with @xazax.hun that actually the called `ASTUnit::LoadFromASTFile` function inside `loadExternalAST` may return with a nullptr. So, the best is to handle that inside `loadExternalAST`.

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LG! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55280/new/ https://reviews.llvm.org/D55280 ___

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176779. martong added a comment. - Return an error from loadExternalAST in case of nullptr Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55280/new/ https://reviews.llvm.org/D55280 Files:

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: include/clang/CrossTU/CrossTranslationUnit.h:121 + /// \return Returns a pointer to the ASTUnit that contains the definition of + /// the looked up function. The pointer should not be a nullptr. /// Return value

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. From what I can see, this patch LGTM, but I lack the experience in the CTU department just yet to give any meaningful feedback. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:147 llvm::Expected

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin, Szelethus, balazske. Herald added subscribers: cfe-commits, gamesh411, dkrupp, rnkovacs. In loadExternalAST we normally return with either an error or with a valid ASTUnit pointer which should not be a nullptr. However,