summaryrefslogtreecommitdiff
path: root/include/clang/CrossTU
diff options
context:
space:
mode:
authorGabor Marton <martongabesz@gmail.com>2019-01-07 14:05:19 +0000
committerGabor Marton <martongabesz@gmail.com>2019-01-07 14:05:19 +0000
commit1aa1a6f871aca22a9dcca8fef4fb49b41cfd3582 (patch)
treeb71f13beef2f0f1eeadc6edc73f7b541dd97647e /include/clang/CrossTU
parent550f5b09756692e2f47cb2d54b42ee9436b91c8d (diff)
downloadclang-1aa1a6f871aca22a9dcca8fef4fb49b41cfd3582.tar.gz
[CTU] Make loadExternalAST return with non nullptr on success
Summary: In loadExternalAST we return with either an error or with a valid ASTUnit pointer which should not be a nullptr. This prevents in the call site any superfluous check for being a nullptr. Reviewers: xazax.hun, a_sidorin, Szelethus, balazske Subscribers: rnkovacs, dkrupp, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D55280 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/CrossTU')
-rw-r--r--include/clang/CrossTU/CrossTranslationUnit.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/CrossTU/CrossTranslationUnit.h b/include/clang/CrossTU/CrossTranslationUnit.h
index a5cec7e05e..9b36fe653b 100644
--- a/include/clang/CrossTU/CrossTranslationUnit.h
+++ b/include/clang/CrossTU/CrossTranslationUnit.h
@@ -130,8 +130,9 @@ public:
/// \p IndexName. In case the declaration is found in the index the
/// corresponding AST file will be loaded.
///
- /// \return Returns an ASTUnit that contains the definition of the looked up
- /// function.
+ /// \return Returns a pointer to the ASTUnit that contains the definition of
+ /// the looked up function or an Error.
+ /// The returned pointer is never a nullptr.
///
/// Note that the AST files should also be in the \p CrossTUDir.
llvm::Expected<ASTUnit *> loadExternalAST(StringRef LookupName,