From 0ef0aeca4f1bc1c3d5367ba7114c38dd3685e18c Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Sun, 26 Oct 2014 19:39:46 +0000 Subject: [PATCH] ModuleMap.cpp: fix VS2012 build llvm-svn: 220644 --- clang/lib/Lex/ModuleMap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 14eed0a..d929937 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -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"); -- 2.7.4