diff options
author | Kaelyn Uhrain <rikka@google.com> | 2012-01-31 23:49:25 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2012-01-31 23:49:25 +0000 |
commit | 16e46dd0c284296cea819dfbf67942ecef02894d (patch) | |
tree | eb74d6a94e34e33abe288918159f958afb4e460f /lib/Sema/SemaDecl.cpp | |
parent | 4ac38094a1844166ac455004bf94d0aaf1e2df74 (diff) |
Make the callback object to Sema::CorrectTypo mandatory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index c20f9426fb..d545d03ac5 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -174,7 +174,7 @@ ParsedType Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, if (CorrectedII) { TypeNameValidatorCCC Validator(true); TypoCorrection Correction = CorrectTypo(Result.getLookupNameInfo(), - Kind, S, SS, &Validator); + Kind, S, SS, Validator); IdentifierInfo *NewII = Correction.getCorrectionAsIdentifierInfo(); TemplateTy Template; bool MemberOfUnknownSpecialization; @@ -371,7 +371,7 @@ bool Sema::DiagnoseUnknownTypeName(const IdentifierInfo &II, TypeNameValidatorCCC Validator(false); if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(&II, IILoc), LookupOrdinaryName, S, SS, - &Validator)) { + Validator)) { std::string CorrectedStr(Corrected.getAsString(getLangOptions())); std::string CorrectedQuotedStr(Corrected.getQuoted(getLangOptions())); @@ -576,7 +576,7 @@ Corrected: CorrectionCandidateCallback DefaultValidator; if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, - &SS, &DefaultValidator)) { + &SS, DefaultValidator)) { unsigned UnqualifiedDiag = diag::err_undeclared_var_use_suggest; unsigned QualifiedDiag = diag::err_no_member_suggest; std::string CorrectedStr(Corrected.getAsString(getLangOptions())); @@ -1274,7 +1274,7 @@ ObjCInterfaceDecl *Sema::getObjCInterfaceDecl(IdentifierInfo *&Id, DeclFilterCCC<ObjCInterfaceDecl> Validator; if (TypoCorrection C = CorrectTypo(DeclarationNameInfo(Id, IdLoc), LookupOrdinaryName, TUScope, NULL, - &Validator)) { + Validator)) { IDecl = C.getCorrectionDeclAs<ObjCInterfaceDecl>(); Diag(IdLoc, diag::err_undef_interface_suggest) << Id << IDecl->getDeclName() @@ -4498,7 +4498,7 @@ static NamedDecl* DiagnoseInvalidRedeclaration( // If the qualified name lookup yielded nothing, try typo correction } else if ((Correction = SemaRef.CorrectTypo(Prev.getLookupNameInfo(), Prev.getLookupKind(), 0, 0, - &Validator, NewDC))) { + Validator, NewDC))) { // Trap errors. Sema::SFINAETrap Trap(SemaRef); @@ -7359,7 +7359,7 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, TypoCorrection Corrected; DeclFilterCCC<FunctionDecl> Validator; if (S && (Corrected = CorrectTypo(DeclarationNameInfo(&II, Loc), - LookupOrdinaryName, S, 0, &Validator))) { + LookupOrdinaryName, S, 0, Validator))) { std::string CorrectedStr = Corrected.getAsString(getLangOptions()); std::string CorrectedQuotedStr = Corrected.getQuoted(getLangOptions()); FunctionDecl *Func = Corrected.getCorrectionDeclAs<FunctionDecl>(); |