@@ -567,9 +567,8 @@ void SemaObjC::ActOnSuperClassOfClassInterface(
567567 if (TypoCorrection Corrected = SemaRef.CorrectTypo (
568568 DeclarationNameInfo (SuperName, SuperLoc), Sema::LookupOrdinaryName,
569569 SemaRef.TUScope , nullptr , CCC, Sema::CTK_ErrorRecovery)) {
570- SemaRef.diagnoseTypo (Corrected,
571- SemaRef.PDiag (diag::err_undef_superclass_suggest)
572- << SuperName << ClassName);
570+ SemaRef.diagnoseTypo (Corrected, PDiag (diag::err_undef_superclass_suggest)
571+ << SuperName << ClassName);
573572 PrevDecl = Corrected.getCorrectionDeclAs <ObjCInterfaceDecl>();
574573 }
575574 }
@@ -1322,9 +1321,9 @@ void SemaObjC::FindProtocolDeclaration(bool WarnOnDeclarations,
13221321 Sema::LookupObjCProtocolName, SemaRef.TUScope ,
13231322 nullptr , CCC, Sema::CTK_ErrorRecovery);
13241323 if ((PDecl = Corrected.getCorrectionDeclAs <ObjCProtocolDecl>()))
1325- SemaRef.diagnoseTypo (
1326- Corrected, SemaRef. PDiag (diag::err_undeclared_protocol_suggest)
1327- << Pair.first );
1324+ SemaRef.diagnoseTypo (Corrected,
1325+ PDiag (diag::err_undeclared_protocol_suggest)
1326+ << Pair.first );
13281327 }
13291328
13301329 if (!PDecl) {
@@ -1703,9 +1702,9 @@ void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(
17031702 if (corrected) {
17041703 // Did we find a protocol?
17051704 if (auto proto = corrected.getCorrectionDeclAs <ObjCProtocolDecl>()) {
1706- SemaRef.diagnoseTypo (
1707- corrected, SemaRef. PDiag (diag::err_undeclared_protocol_suggest)
1708- << identifiers[i]);
1705+ SemaRef.diagnoseTypo (corrected,
1706+ PDiag (diag::err_undeclared_protocol_suggest)
1707+ << identifiers[i]);
17091708 lookupKind = Sema::LookupObjCProtocolName;
17101709 protocols[i] = proto;
17111710 ++numProtocolsResolved;
@@ -1715,7 +1714,7 @@ void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(
17151714 // Did we find a type?
17161715 if (auto typeDecl = corrected.getCorrectionDeclAs <TypeDecl>()) {
17171716 SemaRef.diagnoseTypo (corrected,
1718- SemaRef. PDiag (diag::err_unknown_typename_suggest)
1717+ PDiag (diag::err_unknown_typename_suggest)
17191718 << identifiers[i]);
17201719 lookupKind = Sema::LookupOrdinaryName;
17211720 typeDecls[i] = typeDecl;
@@ -1725,10 +1724,9 @@ void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(
17251724
17261725 // Did we find an Objective-C class?
17271726 if (auto objcClass = corrected.getCorrectionDeclAs <ObjCInterfaceDecl>()) {
1728- SemaRef.diagnoseTypo (
1729- corrected,
1730- SemaRef.PDiag (diag::err_unknown_type_or_class_name_suggest)
1731- << identifiers[i] << true );
1727+ SemaRef.diagnoseTypo (corrected,
1728+ PDiag (diag::err_unknown_type_or_class_name_suggest)
1729+ << identifiers[i] << true );
17321730 lookupKind = Sema::LookupOrdinaryName;
17331731 typeDecls[i] = objcClass;
17341732 ++numTypeDeclsResolved;
@@ -2009,10 +2007,9 @@ ObjCImplementationDecl *SemaObjC::ActOnStartClassImplementation(
20092007 // Suggest the (potentially) correct interface name. Don't provide a
20102008 // code-modification hint or use the typo name for recovery, because
20112009 // this is just a warning. The program may actually be correct.
2012- SemaRef.diagnoseTypo (Corrected,
2013- SemaRef.PDiag (diag::warn_undef_interface_suggest)
2014- << ClassName,
2015- /* ErrorRecovery*/ false );
2010+ SemaRef.diagnoseTypo (
2011+ Corrected, PDiag (diag::warn_undef_interface_suggest) << ClassName,
2012+ /* ErrorRecovery*/ false );
20162013 } else {
20172014 Diag (ClassLoc, diag::warn_undef_interface) << ClassName;
20182015 }
@@ -5439,8 +5436,7 @@ ObjCInterfaceDecl *SemaObjC::getObjCInterfaceDecl(const IdentifierInfo *&Id,
54395436 if (TypoCorrection C = SemaRef.CorrectTypo (
54405437 DeclarationNameInfo (Id, IdLoc), Sema::LookupOrdinaryName,
54415438 SemaRef.TUScope , nullptr , CCC, Sema::CTK_ErrorRecovery)) {
5442- SemaRef.diagnoseTypo (C, SemaRef.PDiag (diag::err_undef_interface_suggest)
5443- << Id);
5439+ SemaRef.diagnoseTypo (C, PDiag (diag::err_undef_interface_suggest) << Id);
54445440 IDecl = C.getCorrectionDeclAs <ObjCInterfaceDecl>();
54455441 Id = IDecl->getIdentifier ();
54465442 }
@@ -5544,7 +5540,7 @@ void SemaObjC::SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation) {
55445540 SemaRef.MarkFunctionReferenced (Field->getLocation (), Destructor);
55455541 SemaRef.CheckDestructorAccess (
55465542 Field->getLocation (), Destructor,
5547- SemaRef. PDiag (diag::err_access_dtor_ivar)
5543+ PDiag (diag::err_access_dtor_ivar)
55485544 << Context.getBaseElementType (Field->getType ()));
55495545 }
55505546 }
0 commit comments