diff options
| author | Edwin Vane <edwin.vane@intel.com> | 2013-06-13 17:19:37 +0000 |
|---|---|---|
| committer | Edwin Vane <edwin.vane@intel.com> | 2013-06-13 17:19:37 +0000 |
| commit | 230ecb24222a13f8801867da857c8e925cbb3d31 (patch) | |
| tree | 51b28f8b6ed06ef7d66c24f247733463157ee56a /clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp | |
| parent | 90706dd4244d4c0b8296c9aa7511181055e85cfb (diff) | |
| download | bcm5719-llvm-230ecb24222a13f8801867da857c8e925cbb3d31.tar.gz bcm5719-llvm-230ecb24222a13f8801867da857c8e925cbb3d31.zip | |
cpp11-migrate: const-correcting IncludeExcludeInfo
isFileIncluded() needed to be marked const.
llvm-svn: 183918
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp')
| -rw-r--r-- | clang-tools-extra/cpp11-migrate/Core/IncludeExcludeInfo.cpp | 10 |
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; |

