@@ -567,9 +567,8 @@ void SemaObjC::ActOnSuperClassOfClassInterface(
567
567
if (TypoCorrection Corrected = SemaRef.CorrectTypo (
568
568
DeclarationNameInfo (SuperName, SuperLoc), Sema::LookupOrdinaryName,
569
569
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);
573
572
PrevDecl = Corrected.getCorrectionDeclAs <ObjCInterfaceDecl>();
574
573
}
575
574
}
@@ -1322,9 +1321,9 @@ void SemaObjC::FindProtocolDeclaration(bool WarnOnDeclarations,
1322
1321
Sema::LookupObjCProtocolName, SemaRef.TUScope ,
1323
1322
nullptr , CCC, Sema::CTK_ErrorRecovery);
1324
1323
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 );
1328
1327
}
1329
1328
1330
1329
if (!PDecl) {
@@ -1703,9 +1702,9 @@ void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(
1703
1702
if (corrected) {
1704
1703
// Did we find a protocol?
1705
1704
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]);
1709
1708
lookupKind = Sema::LookupObjCProtocolName;
1710
1709
protocols[i] = proto;
1711
1710
++numProtocolsResolved;
@@ -1715,7 +1714,7 @@ void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(
1715
1714
// Did we find a type?
1716
1715
if (auto typeDecl = corrected.getCorrectionDeclAs <TypeDecl>()) {
1717
1716
SemaRef.diagnoseTypo (corrected,
1718
- SemaRef. PDiag (diag::err_unknown_typename_suggest)
1717
+ PDiag (diag::err_unknown_typename_suggest)
1719
1718
<< identifiers[i]);
1720
1719
lookupKind = Sema::LookupOrdinaryName;
1721
1720
typeDecls[i] = typeDecl;
@@ -1725,10 +1724,9 @@ void SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(
1725
1724
1726
1725
// Did we find an Objective-C class?
1727
1726
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 );
1732
1730
lookupKind = Sema::LookupOrdinaryName;
1733
1731
typeDecls[i] = objcClass;
1734
1732
++numTypeDeclsResolved;
@@ -2009,10 +2007,9 @@ ObjCImplementationDecl *SemaObjC::ActOnStartClassImplementation(
2009
2007
// Suggest the (potentially) correct interface name. Don't provide a
2010
2008
// code-modification hint or use the typo name for recovery, because
2011
2009
// 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 );
2016
2013
} else {
2017
2014
Diag (ClassLoc, diag::warn_undef_interface) << ClassName;
2018
2015
}
@@ -5439,8 +5436,7 @@ ObjCInterfaceDecl *SemaObjC::getObjCInterfaceDecl(const IdentifierInfo *&Id,
5439
5436
if (TypoCorrection C = SemaRef.CorrectTypo (
5440
5437
DeclarationNameInfo (Id, IdLoc), Sema::LookupOrdinaryName,
5441
5438
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);
5444
5440
IDecl = C.getCorrectionDeclAs <ObjCInterfaceDecl>();
5445
5441
Id = IDecl->getIdentifier ();
5446
5442
}
@@ -5544,7 +5540,7 @@ void SemaObjC::SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation) {
5544
5540
SemaRef.MarkFunctionReferenced (Field->getLocation (), Destructor);
5545
5541
SemaRef.CheckDestructorAccess (
5546
5542
Field->getLocation (), Destructor,
5547
- SemaRef. PDiag (diag::err_access_dtor_ivar)
5543
+ PDiag (diag::err_access_dtor_ivar)
5548
5544
<< Context.getBaseElementType (Field->getType ()));
5549
5545
}
5550
5546
}
0 commit comments