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/Sema/Sema.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/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 2 |
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())); |