diff --git a/lib/AST/DeclContext.cpp b/lib/AST/DeclContext.cpp index f006846d2148c..d2d651ccbdb2b 100644 --- a/lib/AST/DeclContext.cpp +++ b/lib/AST/DeclContext.cpp @@ -1195,7 +1195,7 @@ void IterableDeclContext::checkDeserializeMemberErrorInPackage(ModuleDecl *acces // This needs to be set to force load all members if not done already. setHasLazyMembers(true); // Calling getMembers actually loads the members. - auto members = getMembers(); + (void)getMembers(); assert(!hasLazyMembers()); assert(didDeserializeMembers()); } diff --git a/lib/ClangImporter/ClangImporter.cpp b/lib/ClangImporter/ClangImporter.cpp index 876c78c32f586..a1355d880a5f7 100644 --- a/lib/ClangImporter/ClangImporter.cpp +++ b/lib/ClangImporter/ClangImporter.cpp @@ -188,18 +188,16 @@ namespace { }; class ParsingAction : public clang::ASTFrontendAction { - ASTContext &Ctx; ClangImporter &Importer; ClangImporter::Implementation &Impl; const ClangImporterOptions &ImporterOpts; std::string SwiftPCHHash; public: - explicit ParsingAction(ASTContext &ctx, - ClangImporter &importer, + explicit ParsingAction(ClangImporter &importer, ClangImporter::Implementation &impl, const ClangImporterOptions &importerOpts, std::string swiftPCHHash) - : Ctx(ctx), Importer(importer), Impl(impl), ImporterOpts(importerOpts), + : Importer(importer), Impl(impl), ImporterOpts(importerOpts), SwiftPCHHash(swiftPCHHash) {} std::unique_ptr CreateASTConsumer(clang::CompilerInstance &CI, StringRef InFile) override { @@ -1477,7 +1475,7 @@ ClangImporter::create(ASTContext &ctx, } // Create the associated action. - importer->Impl.Action.reset(new ParsingAction(ctx, *importer, + importer->Impl.Action.reset(new ParsingAction(*importer, importer->Impl, importerOpts, swiftPCHHash));