}
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.
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);
}
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 {