From: Alexander Kornienko Date: Wed, 5 Jul 2017 11:45:09 +0000 (+0000) Subject: Add const to reference arguments of Diagnostic ctor X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d424218cf7ef6d233819a6d9759f8ae0aa750b58;p=clang 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 --- diff --git a/include/clang/Tooling/Core/Diagnostic.h b/include/clang/Tooling/Core/Diagnostic.h index d657f16df1..b4920d4fe4 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 &Fix, - SmallVector &Notes, Level DiagLevel, + Diagnostic(llvm::StringRef DiagnosticName, const DiagnosticMessage &Message, + const llvm::StringMap &Fix, + const SmallVector &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 3bbc2b901e..9e4833f2ef 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 &Fix, - SmallVector &Notes, + const DiagnosticMessage &Message, + const llvm::StringMap &Fix, + const SmallVector &Notes, Level DiagLevel, llvm::StringRef BuildDirectory) : DiagnosticName(DiagnosticName), Message(Message), Fix(Fix), Notes(Notes), DiagLevel(DiagLevel), BuildDirectory(BuildDirectory) {}