[cfe-commits] r133322 - in /cfe/trunk/lib/ARCMigrate: ARCMT.cpp Internals.h
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jun 17 17:53:34 PDT 2011
Author: akirtzidis
Date: Fri Jun 17 19:53:34 2011
New Revision: 133322
URL: http://llvm.org/viewvc/llvm-project?rev=133322&view=rev
Log:
[arcmt] Const'ify.
Modified:
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/lib/ARCMigrate/Internals.h
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=133322&r1=133321&r2=133322&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Fri Jun 17 19:53:34 2011
@@ -53,11 +53,11 @@
}
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 @@
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);
}
Modified: cfe/trunk/lib/ARCMigrate/Internals.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/Internals.h?rev=133322&r1=133321&r2=133322&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/Internals.h (original)
+++ cfe/trunk/lib/ARCMigrate/Internals.h Fri Jun 17 19:53:34 2011
@@ -27,9 +27,9 @@
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 {
More information about the cfe-commits
mailing list