summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-05 22:41:45 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-05 22:41:45 +0000
commit3cb15729aff241e28c9854bd09609fb74e7bac37 (patch)
treea51bd54acbb78d140ec33b26f1779ad74c5bdf6e /clang/lib/AST/DeclBase.cpp
parentae0d4365454456203a6f284c5d0e6ed994883c86 (diff)
downloadbcm5719-llvm-3cb15729aff241e28c9854bd09609fb74e7bac37.tar.gz
bcm5719-llvm-3cb15729aff241e28c9854bd09609fb74e7bac37.zip
function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
useless return value. Switch to using it directly when completing the redeclaration chain for an anonymous declaration, and reduce the set of declarations that we load in the process to just those of the right kind. llvm-svn: 244161
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index e772f195336..40b135f9202 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -1059,14 +1059,7 @@ DeclContext::LoadLexicalDeclsFromExternalStorage() const {
// Load the external declarations, if any.
SmallVector<Decl*, 64> Decls;
ExternalLexicalStorage = false;
- switch (Source->FindExternalLexicalDecls(this, Decls)) {
- case ELR_Success:
- break;
-
- case ELR_Failure:
- case ELR_AlreadyLoaded:
- return false;
- }
+ Source->FindExternalLexicalDecls(this, Decls);
if (Decls.empty())
return false;
OpenPOWER on IntegriCloud