diff options
author | Alexander Kornienko <alexfh@google.com> | 2017-07-05 11:45:09 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2017-07-05 11:45:09 +0000 |
commit | 1c6b8f82afc40dc3ec525b2d9524112a9fd121d2 (patch) | |
tree | 9bdff73e0da850eec650368c7a76fa8fc4a57ccc | |
parent | 0c979d49eb00dec3b3c63c447d455295443bec8b (diff) | |
download | bcm5719-llvm-1c6b8f82afc40dc3ec525b2d9524112a9fd121d2.tar.gz bcm5719-llvm-1c6b8f82afc40dc3ec525b2d9524112a9fd121d2.zip |
Add const to reference arguments of Diagnostic ctor
llvm-svn: 307143
-rw-r--r-- | clang/include/clang/Tooling/Core/Diagnostic.h | 6 | ||||
-rw-r--r-- | clang/lib/Tooling/Core/Diagnostic.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/include/clang/Tooling/Core/Diagnostic.h b/clang/include/clang/Tooling/Core/Diagnostic.h index d657f16df18..b4920d4fe45 100644 --- a/clang/include/clang/Tooling/Core/Diagnostic.h +++ b/clang/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/clang/lib/Tooling/Core/Diagnostic.cpp b/clang/lib/Tooling/Core/Diagnostic.cpp index 3bbc2b901e3..9e4833f2eff 100644 --- a/clang/lib/Tooling/Core/Diagnostic.cpp +++ b/clang/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) {} |