summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/Diagnostic.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h
index 566b5e3d480..fb1d7a629e2 100644
--- a/clang/include/clang/Basic/Diagnostic.h
+++ b/clang/include/clang/Basic/Diagnostic.h
@@ -207,7 +207,7 @@ private:
/// this reason, we stick state in the Diagnostic class, see the comment there
/// for more info.
class DiagnosticInfo {
- Diagnostic *DiagObj;
+ mutable Diagnostic *DiagObj;
FullSourceLoc Loc;
unsigned DiagID;
void operator=(const DiagnosticInfo&); // DO NOT IMPLEMENT
@@ -221,7 +221,7 @@ public:
/// Copy constructor. When copied, this "takes" the diagnostic info from the
/// input and neuters it.
- DiagnosticInfo(DiagnosticInfo &D) {
+ DiagnosticInfo(const DiagnosticInfo &D) {
DiagObj = D.DiagObj;
Loc = D.Loc;
DiagID = D.DiagID;
@@ -262,7 +262,7 @@ public:
assert(Idx < DiagObj->NumDiagRanges && "Invalid diagnostic range index!");
return *DiagObj->DiagRanges[Idx];
}
-
+
DiagnosticInfo &operator<<(const std::string &S) {
assert((unsigned)DiagObj->NumDiagArgs <
sizeof(DiagObj->DiagArguments)/sizeof(DiagObj->DiagArguments[0]) &&
OpenPOWER on IntegriCloud