From 7e8fd6b3112f355cfa38d211b999556eb8c05eed Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 11 Jun 2014 21:57:15 +0000 Subject: [PATCH] Don't slice SemaDiagnosticBuilder I wasn't able to figure out how to emit this diagnostic from a SFINAE context, so I don't have a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210713 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExpr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 408a8a4089..7c076f8e84 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1952,9 +1952,8 @@ recoverFromMSUnqualifiedLookup(Sema &S, ASTContext &Context, // Diagnose this as unqualified lookup into a dependent base class. If 'this' // is available, suggest inserting 'this->' as a fixit. SourceLocation Loc = NameInfo.getLoc(); - DiagnosticBuilder DB = - S.Diag(Loc, diag::ext_undeclared_unqual_id_with_dependent_base) - << NameInfo.getName() << RD; + auto DB = S.Diag(Loc, diag::ext_undeclared_unqual_id_with_dependent_base); + DB << NameInfo.getName() << RD; if (!ThisType.isNull()) { DB << FixItHint::CreateInsertion(Loc, "this->"); -- 2.40.0