aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Basic/Diagnostic.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 153c31e3d1..842bacb9a5 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -955,11 +955,10 @@ StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level,
StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
StringRef Message, FullSourceLoc Loc,
ArrayRef<CharSourceRange> Ranges,
- ArrayRef<FixItHint> Fixits)
- : ID(ID), Level(Level), Loc(Loc), Message(Message)
+ ArrayRef<FixItHint> FixIts)
+ : ID(ID), Level(Level), Loc(Loc), Message(Message),
+ Ranges(Ranges.begin(), Ranges.end()), FixIts(FixIts.begin(), FixIts.end())
{
- this->Ranges.assign(Ranges.begin(), Ranges.end());
- this->FixIts.assign(Fixits.begin(), Fixits.end());
}
StoredDiagnostic::~StoredDiagnostic() { }