aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-13 17:22:14 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-13 17:22:14 +0000
commitb535041ee33c5eff255832bc5541c8d52aae8254 (patch)
tree5e2d6d3f5d283e693da17f28cfd9014da894c8d6 /lib/Sema/Sema.cpp
parent35495eb14f22c4e96956912e23ca2a433227ad8c (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/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 1b3572a649..042f605cf0 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -455,7 +455,9 @@ Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() {
case Diagnostic::SFINAE_Suppress:
// Make a copy of this suppressed diagnostic and store it with the
// template-deduction information;
+ FlushCounts();
DiagnosticInfo DiagInfo(&SemaRef.Diags);
+
Info->addSuppressedDiagnostic(DiagInfo.getLocation(),
PartialDiagnostic(DiagInfo,
SemaRef.Context.getDiagAllocator()));