summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/TextDiagnosticPrinter.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-05-22 19:56:11 +0000
committerAlexander Kornienko <alexfh@google.com>2014-05-22 19:56:11 +0000
commitc2f2b74ec2885c7a6f2a96a4626bac42269fbcf6 (patch)
tree65a23facd270401a144e869427dc968cce99612d /lib/Frontend/TextDiagnosticPrinter.cpp
parent3c19b124a8004cc5a1371a720692df6b6469fa32 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r--lib/Frontend/TextDiagnosticPrinter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp
index 7a2677b540..d6df655612 100644
--- a/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/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();