summaryrefslogtreecommitdiffstats
path: root/clang/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
commitb39215942ee1f585b49380f2bb387df9ebc9d2b7 (patch)
treee22d3d41c310824cf44c2fb99babfe2bd585bfa5 /clang/lib/Sema/Sema.cpp
parent2216af3fa8ddb31e1a0b80393c20e5a5cc31dd46 (diff)
downloadbcm5719-llvm-b39215942ee1f585b49380f2bb387df9ebc9d2b7.tar.gz
bcm5719-llvm-b39215942ee1f585b49380f2bb387df9ebc9d2b7.zip
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. llvm-svn: 116411
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 1b3572a6498..042f605cf0c 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/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()));
OpenPOWER on IntegriCloud