summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2016-02-25 23:57:23 +0000
committerAlexander Kornienko <alexfh@google.com>2016-02-25 23:57:23 +0000
commit1612fa07d351cf5b4a4595dba07e12416a957137 (patch)
tree81a3dba89d7b55dfdff701c84ff80e4cd05b670e /clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
parenta354c5c43324127b44d2b7e2e2dccf07692b1013 (diff)
downloadbcm5719-llvm-1612fa07d351cf5b4a4595dba07e12416a957137.tar.gz
bcm5719-llvm-1612fa07d351cf5b4a4595dba07e12416a957137.zip
Add a new check, readability-redundant-string-init, that checks unnecessary string initializations.
Reviewers: hokein, alexfh Subscribers: cfe-commits Patch by Shuai Wang! Differential Revision: http://reviews.llvm.org/D17586 llvm-svn: 261939
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index 0cb44f9d1df..d1cb4eb2d9e 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -338,10 +338,9 @@ void ClangTidyDiagnosticConsumer::HandleDiagnostic(
Errors.push_back(ClangTidyError(CheckName, Level, IsWarningAsError));
}
- // FIXME: Provide correct LangOptions for each file.
- LangOptions LangOpts;
ClangTidyDiagnosticRenderer Converter(
- LangOpts, &Context.DiagEngine->getDiagnosticOptions(), Errors.back());
+ Context.getLangOpts(), &Context.DiagEngine->getDiagnosticOptions(),
+ Errors.back());
SmallString<100> Message;
Info.FormatDiagnostic(Message);
SourceManager *Sources = nullptr;
OpenPOWER on IntegriCloud