]> granicus.if.org Git - clang/commitdiff
ModuleMap.cpp: fix VS2012 build
authorHans Wennborg <hans@hanshq.net>
Sun, 26 Oct 2014 19:39:46 +0000 (19:39 +0000)
committerHans Wennborg <hans@hanshq.net>
Sun, 26 Oct 2014 19:39:46 +0000 (19:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220644 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/ModuleMap.cpp

index 14eed0ae392a4bf1916cd25286d7a3384461afff..d929937c0166b0334f1e73a69753f0af0b7fcf46 100644 (file)
@@ -220,8 +220,9 @@ static bool violatesPrivateInclude(Module *RequestingModule,
   // as obtained from the lookup and as obtained from the module.
   // This check is not cheap, so enable it only for debugging.
   bool IsPrivate = false;
-  for (auto *Hdrs : {&RequestedModule->PrivateHeaders,
-                     &RequestedModule->PrivateTextualHeaders})
+  auto HeaderList = {&RequestedModule->PrivateHeaders,
+                     &RequestedModule->PrivateTextualHeaders};
+  for (auto *Hdrs : HeaderList)
     IsPrivate |=
         std::find(Hdrs->begin(), Hdrs->end(), IncFileEnt) != Hdrs->end();
   assert(IsPrivate == IsPrivateRole && "inconsistent headers and roles");