[cfe-commits] r39460 - in /cfe/cfe/trunk: Basic/Diagnostic.cpp Driver/clang.cpp include/clang/Basic/Diagnostic.h
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:44:40 PDT 2007
Author: clattner
Date: Wed Jul 11 11:44:40 2007
New Revision: 39460
URL: http://llvm.org/viewvc/llvm-project?rev=39460&view=rev
Log:
improve const correctness
Modified:
cfe/cfe/trunk/Basic/Diagnostic.cpp
cfe/cfe/trunk/Driver/clang.cpp
cfe/cfe/trunk/include/clang/Basic/Diagnostic.h
Modified: cfe/cfe/trunk/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Basic/Diagnostic.cpp?rev=39460&r1=39459&r2=39460&view=diff
==============================================================================
--- cfe/cfe/trunk/Basic/Diagnostic.cpp (original)
+++ cfe/cfe/trunk/Basic/Diagnostic.cpp Wed Jul 11 11:44:40 2007
@@ -118,7 +118,7 @@
/// the diag::kind enum.
void Diagnostic::Report(SourceLocation Pos, unsigned DiagID,
const std::string *Strs, unsigned NumStrs,
- SourceRange *Ranges, unsigned NumRanges) {
+ const SourceRange *Ranges, unsigned NumRanges) {
// Figure out the diagnostic level of this message.
Diagnostic::Level DiagLevel = getDiagnosticLevel(DiagID);
Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=39460&r1=39459&r2=39460&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:44:40 2007
@@ -352,7 +352,7 @@
virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, SourceLocation Pos,
diag::kind ID, const std::string *Strs,
- unsigned NumStrs, SourceRange *Ranges,
+ unsigned NumStrs, const SourceRange *Ranges,
unsigned NumRanges);
};
@@ -452,7 +452,7 @@
diag::kind ID,
const std::string *Strs,
unsigned NumStrs,
- SourceRange *Ranges,
+ const SourceRange *Ranges,
unsigned NumRanges) {
unsigned LineNo = 0, FilePos = 0, FileID = 0, ColNo = 0;
unsigned LineStart = 0, LineEnd = 0;
Modified: cfe/cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=39460&r1=39459&r2=39460&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/cfe/trunk/include/clang/Basic/Diagnostic.h Wed Jul 11 11:44:40 2007
@@ -120,7 +120,7 @@
/// diag::kind enum.
void Report(SourceLocation Pos, unsigned DiagID,
const std::string *Strs = 0, unsigned NumStrs = 0,
- SourceRange *Ranges = 0, unsigned NumRanges = 0);
+ const SourceRange *Ranges = 0, unsigned NumRanges = 0);
};
/// DiagnosticClient - This is an abstract interface implemented by clients of
@@ -134,7 +134,7 @@
/// capturing it to a log as needed.
virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, SourceLocation Pos,
diag::kind ID, const std::string *Strs,
- unsigned NumStrs, SourceRange *Ranges,
+ unsigned NumStrs, const SourceRange *Ranges,
unsigned NumRanges) = 0;
};
More information about the cfe-commits
mailing list