diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-06-18 00:53:34 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-06-18 00:53:34 +0000 |
commit | 60a5e3f90031191f18128eab8326eea70b266b27 (patch) | |
tree | 62249026f6f556f4536a14e53f2d970852638444 | |
parent | c2e70b46b686c8debb3020891a5593f298b053ae (diff) |
[arcmt] Const'ify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133322 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/ARCMigrate/ARCMT.cpp | 8 | ||||
-rw-r--r-- | lib/ARCMigrate/Internals.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/ARCMigrate/ARCMT.cpp b/lib/ARCMigrate/ARCMT.cpp index 04c35e28c8..a93f1c62c0 100644 --- a/lib/ARCMigrate/ARCMT.cpp +++ b/lib/ARCMigrate/ARCMT.cpp @@ -53,11 +53,11 @@ bool CapturedDiagList::clearDiagnostic(llvm::ArrayRef<unsigned> IDs, } bool CapturedDiagList::hasDiagnostic(llvm::ArrayRef<unsigned> IDs, - SourceRange range) { + SourceRange range) const { if (range.isInvalid()) return false; - ListTy::iterator I = List.begin(); + ListTy::const_iterator I = List.begin(); while (I != List.end()) { FullSourceLoc diagLoc = I->getLocation(); if ((IDs.empty() || // empty means any diagnostic in the range. @@ -74,8 +74,8 @@ bool CapturedDiagList::hasDiagnostic(llvm::ArrayRef<unsigned> IDs, return false; } -void CapturedDiagList::reportDiagnostics(Diagnostic &Diags) { - for (ListTy::iterator I = List.begin(), E = List.end(); I != E; ++I) +void CapturedDiagList::reportDiagnostics(Diagnostic &Diags) const { + for (ListTy::const_iterator I = List.begin(), E = List.end(); I != E; ++I) Diags.Report(*I); } diff --git a/lib/ARCMigrate/Internals.h b/lib/ARCMigrate/Internals.h index fdc0aad176..d0d545ec51 100644 --- a/lib/ARCMigrate/Internals.h +++ b/lib/ARCMigrate/Internals.h @@ -27,9 +27,9 @@ public: void push_back(const StoredDiagnostic &diag) { List.push_back(diag); } bool clearDiagnostic(llvm::ArrayRef<unsigned> IDs, SourceRange range); - bool hasDiagnostic(llvm::ArrayRef<unsigned> IDs, SourceRange range); + bool hasDiagnostic(llvm::ArrayRef<unsigned> IDs, SourceRange range) const; - void reportDiagnostics(Diagnostic &diags); + void reportDiagnostics(Diagnostic &diags) const; }; class TransformActions { |