diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 3eda420940..119151a3af 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1487,7 +1487,7 @@ Sema::DecomposeUnqualifiedId(const UnqualifiedId &Id, /// /// \return false if new lookup candidates were found bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, - CorrectTypoContext CTC, + CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, Expr **Args, unsigned NumArgs) { DeclarationName Name = R.getLookupName(); @@ -1602,7 +1602,7 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, // We didn't find anything, so try to correct for a typo. TypoCorrection Corrected; if (S && (Corrected = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), - S, &SS, NULL, false, CTC))) { + S, &SS, &CCC))) { std::string CorrectedStr(Corrected.getAsString(getLangOptions())); std::string CorrectedQuotedStr(Corrected.getQuoted(getLangOptions())); R.setLookupName(Corrected.getCorrection()); @@ -1817,7 +1817,8 @@ ExprResult Sema::ActOnIdExpression(Scope *S, return ActOnDependentIdExpression(SS, NameInfo, IsAddressOfOperand, TemplateArgs); - if (DiagnoseEmptyLookup(S, SS, R, CTC_Unknown)) + CorrectionCandidateCallback DefaultValidator; + if (DiagnoseEmptyLookup(S, SS, R, DefaultValidator)) return ExprError(); assert(!R.empty() && |