diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-05-22 19:56:11 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-05-22 19:56:11 +0000 |
commit | d3b4e08960ad6618b4448fd2c0c38c8c4fa6d72b (patch) | |
tree | 08dca0c053d8f5455c9c56e6d56e81b30f835e74 /clang/lib/Frontend | |
parent | d328db1318f082fae9102df791d41d0231ddbcf4 (diff) | |
download | bcm5719-llvm-d3b4e08960ad6618b4448fd2c0c38c8c4fa6d72b.tar.gz bcm5719-llvm-d3b4e08960ad6618b4448fd2c0c38c8c4fa6d72b.zip |
Remove limits on the number of fix-it hints and ranges in the DiagnosticsEngine.
Summary:
The limits on the number of fix-it hints and ranges attached to a
diagnostic are arbitrary and don't apply universally to all users of the
DiagnosticsEngine. The way the limits are enforced may lead to diagnostics
generating invalid sets of fixes. I suggest removing the limits, which will also
simplify the implementation.
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D3879
llvm-svn: 209468
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/SerializedDiagnosticPrinter.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Frontend/TextDiagnosticPrinter.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp b/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp index b4178f89e97..db89f25ebca 100644 --- a/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp +++ b/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp @@ -560,8 +560,7 @@ void SDiagsWriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, Renderer.emitDiagnostic(Info.getLocation(), DiagLevel, State->diagBuf.str(), Info.getRanges(), - llvm::makeArrayRef(Info.getFixItHints(), - Info.getNumFixItHints()), + Info.getFixItHints(), &Info.getSourceManager(), &Info); } diff --git a/clang/lib/Frontend/TextDiagnosticPrinter.cpp b/clang/lib/Frontend/TextDiagnosticPrinter.cpp index 7a2677b540f..d6df6556122 100644 --- a/clang/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/clang/lib/Frontend/TextDiagnosticPrinter.cpp @@ -154,8 +154,7 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, TextDiag->emitDiagnostic(Info.getLocation(), Level, DiagMessageStream.str(), Info.getRanges(), - llvm::makeArrayRef(Info.getFixItHints(), - Info.getNumFixItHints()), + Info.getFixItHints(), &Info.getSourceManager()); OS.flush(); |