]> granicus.if.org Git - clang/commitdiff
Add const to reference arguments of Diagnostic ctor
authorAlexander Kornienko <alexfh@google.com>
Wed, 5 Jul 2017 11:45:09 +0000 (11:45 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 5 Jul 2017 11:45:09 +0000 (11:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307143 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Tooling/Core/Diagnostic.h
lib/Tooling/Core/Diagnostic.cpp

index d657f16df183763920c276716392bacd036ccfa1..b4920d4fe456d1a65d939d01124683cbe77f325c 100644 (file)
@@ -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.
index 3bbc2b901e383bac5657be4fe7f9a8d7ee7c51ef..9e4833f2eff4d6f0d8d92bd340ccba3803946888 100644 (file)
@@ -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) {}