diff options
Diffstat (limited to 'lib/Sema/SemaTemplateVariadic.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateVariadic.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp index 86d3bc1..daa1523 100644 --- a/lib/Sema/SemaTemplateVariadic.cpp +++ b/lib/Sema/SemaTemplateVariadic.cpp @@ -716,17 +716,19 @@ ExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S, case LookupResult::NotFound: case LookupResult::NotFoundInCurrentInstantiation: - if (DeclarationName CorrectedName = CorrectTypo(R, S, 0, 0, false, - CTC_NoKeywords)) { - if (NamedDecl *CorrectedResult = R.getAsSingle<NamedDecl>()) + if (TypoCorrection Corrected = CorrectTypo(R.getLookupNameInfo(), + R.getLookupKind(), S, 0, 0, + false, CTC_NoKeywords)) { + if (NamedDecl *CorrectedResult = Corrected.getCorrectionDecl()) if (CorrectedResult->isParameterPack()) { + std::string CorrectedQuotedStr(Corrected.getQuoted(getLangOptions())); ParameterPack = CorrectedResult; Diag(NameLoc, diag::err_sizeof_pack_no_pack_name_suggest) - << &Name << CorrectedName - << FixItHint::CreateReplacement(NameLoc, - CorrectedName.getAsString()); + << &Name << CorrectedQuotedStr + << FixItHint::CreateReplacement( + NameLoc, Corrected.getAsString(getLangOptions())); Diag(ParameterPack->getLocation(), diag::note_parameter_pack_here) - << CorrectedName; + << CorrectedQuotedStr; } } |