From: Hamza Sood Date: Wed, 27 Dec 2017 18:05:29 +0000 (+0000) Subject: [NFC] Small const correctness fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0173fa26b0e5350b7f01bf672be6eb9fae4919af;p=clang [NFC] Small const correctness fix git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321494 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index d3f91a4e27..a9db973851 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1589,7 +1589,7 @@ bool LookupResult::isVisibleSlow(Sema &SemaRef, NamedDecl *D) { return false; // Find the extra places where we need to look. - llvm::DenseSet &LookupModules = SemaRef.getLookupModules(); + const auto &LookupModules = SemaRef.getLookupModules(); if (LookupModules.empty()) return false; @@ -1604,7 +1604,8 @@ bool LookupResult::isVisibleSlow(Sema &SemaRef, NamedDecl *D) { // Check whether DeclModule is transitively exported to an import of // the lookup set. return std::any_of(LookupModules.begin(), LookupModules.end(), - [&](Module *M) { return M->isModuleVisible(DeclModule); }); + [&](const Module *M) { + return M->isModuleVisible(DeclModule); }); } bool Sema::isVisibleSlow(const NamedDecl *D) {