diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-13 17:22:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-13 17:22:14 +0000 |
commit | b535041ee33c5eff255832bc5541c8d52aae8254 (patch) | |
tree | 5e2d6d3f5d283e693da17f28cfd9014da894c8d6 /lib/Basic/Diagnostic.cpp | |
parent | 35495eb14f22c4e96956912e23ca2a433227ad8c (diff) |
Fix a silly bug in the suppression of non-error diagnostics in a
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index 6430b7ec1c..102086b69d 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -625,6 +625,12 @@ bool Diagnostic::ProcessDiag() { return true; } +void DiagnosticBuilder::FlushCounts() { + DiagObj->NumDiagArgs = NumArgs; + DiagObj->NumDiagRanges = NumRanges; + DiagObj->NumFixItHints = NumFixItHints; +} + bool DiagnosticBuilder::Emit() { // If DiagObj is null, then its soul was stolen by the copy ctor // or the user called Emit(). @@ -632,9 +638,7 @@ bool DiagnosticBuilder::Emit() { // When emitting diagnostics, we set the final argument count into // the Diagnostic object. - DiagObj->NumDiagArgs = NumArgs; - DiagObj->NumDiagRanges = NumRanges; - DiagObj->NumFixItHints = NumFixItHints; + FlushCounts(); // Process the diagnostic, sending the accumulated information to the // DiagnosticClient. |