[arcmt] Const'ify.

llvm-svn: 133322
This commit is contained in:
Argyrios Kyrtzidis 2011-06-18 00:53:34 +00:00
parent 19d968e62f
commit 0f3f9f78f8
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}

View File

@ -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 {