summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp')
-rw-r--r--clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp b/clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp
index b6c7259f13f..65cd8eb89d0 100644
--- a/clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp
+++ b/clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp
@@ -103,11 +103,11 @@ error_code IncludeExcludeInfo::readListFromFile(StringRef IncludeListFile,
return error_code::success();
}
-bool IncludeExcludeInfo::isFileIncluded(StringRef FilePath) {
+bool IncludeExcludeInfo::isFileIncluded(StringRef FilePath) const {
bool InIncludeList = false;
- for (std::vector<std::string>::iterator I = IncludeList.begin(),
- E = IncludeList.end();
+ for (std::vector<std::string>::const_iterator I = IncludeList.begin(),
+ E = IncludeList.end();
I != E; ++I)
if ((InIncludeList = fileHasPathPrefix(FilePath, *I)))
break;
@@ -116,8 +116,8 @@ bool IncludeExcludeInfo::isFileIncluded(StringRef FilePath) {
if (!InIncludeList)
return false;
- for (std::vector<std::string>::iterator I = ExcludeList.begin(),
- E = ExcludeList.end();
+ for (std::vector<std::string>::const_iterator I = ExcludeList.begin(),
+ E = ExcludeList.end();
I != E; ++I)
if (fileHasPathPrefix(FilePath, *I))
return false;
OpenPOWER on IntegriCloud