]> granicus.if.org Git - clang/commitdiff
[ExternalASTMerger] Fix the MSVC build
authorSean Callanan <scallanan@apple.com>
Tue, 11 Apr 2017 19:50:37 +0000 (19:50 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 11 Apr 2017 19:50:37 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299977 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExternalASTMerger.cpp

index 1d144047bd1e0717f87185276a24523b633f64c7..e47ed3469862d081885651ea749207dc1d5d4e4b 100644 (file)
@@ -172,10 +172,10 @@ void ExternalASTMerger::FindExternalLexicalDecls(
   ForEachMatchingDC(
       DC, Importers, [DC, IsKindWeWant](const ImporterPair &IP,
                                         Source<const DeclContext *> SourceDC) {
-        for (Source<const Decl *> SourceDecl : SourceDC.get()->decls()) {
-          if (IsKindWeWant(SourceDecl.get()->getKind())) {
+        for (const Decl *SourceDecl : SourceDC.get()->decls()) {
+          if (IsKindWeWant(SourceDecl->getKind())) {
             Decl *ImportedDecl =
-                IP.Forward->Import(const_cast<Decl *>(SourceDecl.get()));
+                IP.Forward->Import(const_cast<Decl *>(SourceDecl));
             assert(ImportedDecl->getDeclContext() == DC);
           }
         }