From d424218cf7ef6d233819a6d9759f8ae0aa750b58 Mon Sep 17 00:00:00 2001
From: Alexander Kornienko <alexfh@google.com>
Date: Wed, 5 Jul 2017 11:45:09 +0000
Subject: [PATCH] Add const to reference arguments of Diagnostic ctor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307143 91177308-0d34-0410-b5e6-96231b3b80d8
---
 include/clang/Tooling/Core/Diagnostic.h | 6 +++---
 lib/Tooling/Core/Diagnostic.cpp         | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/clang/Tooling/Core/Diagnostic.h b/include/clang/Tooling/Core/Diagnostic.h
index d657f16df18..b4920d4fe45 100644
--- a/include/clang/Tooling/Core/Diagnostic.h
+++ b/include/clang/Tooling/Core/Diagnostic.h
@@ -58,9 +58,9 @@ struct Diagnostic {
   Diagnostic(llvm::StringRef DiagnosticName, Level DiagLevel,
              StringRef BuildDirectory);
 
-  Diagnostic(llvm::StringRef DiagnosticName, DiagnosticMessage &Message,
-             llvm::StringMap<Replacements> &Fix,
-             SmallVector<DiagnosticMessage, 1> &Notes, Level DiagLevel,
+  Diagnostic(llvm::StringRef DiagnosticName, const DiagnosticMessage &Message,
+             const llvm::StringMap<Replacements> &Fix,
+             const SmallVector<DiagnosticMessage, 1> &Notes, Level DiagLevel,
              llvm::StringRef BuildDirectory);
 
   /// \brief Name identifying the Diagnostic.
diff --git a/lib/Tooling/Core/Diagnostic.cpp b/lib/Tooling/Core/Diagnostic.cpp
index 3bbc2b901e3..9e4833f2eff 100644
--- a/lib/Tooling/Core/Diagnostic.cpp
+++ b/lib/Tooling/Core/Diagnostic.cpp
@@ -35,9 +35,9 @@ Diagnostic::Diagnostic(llvm::StringRef DiagnosticName,
       BuildDirectory(BuildDirectory) {}
 
 Diagnostic::Diagnostic(llvm::StringRef DiagnosticName,
-                       DiagnosticMessage &Message,
-                       llvm::StringMap<Replacements> &Fix,
-                       SmallVector<DiagnosticMessage, 1> &Notes,
+                       const DiagnosticMessage &Message,
+                       const llvm::StringMap<Replacements> &Fix,
+                       const SmallVector<DiagnosticMessage, 1> &Notes,
                        Level DiagLevel, llvm::StringRef BuildDirectory)
     : DiagnosticName(DiagnosticName), Message(Message), Fix(Fix), Notes(Notes),
       DiagLevel(DiagLevel), BuildDirectory(BuildDirectory) {}
-- 
GitLab