@@ -2137,7 +2137,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2137
2137
2138
2138
// Check redeclaration.
2139
2139
(void )evaluateOrDefault (
2140
- Context .evaluator ,
2140
+ Ctx .evaluator ,
2141
2141
CheckRedeclarationRequest{
2142
2142
VD, VD->getDeclContext ()->getSelfNominalTypeDecl ()},
2143
2143
{});
@@ -2164,11 +2164,11 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2164
2164
// expressions to mean something builtin to the language. We *do* allow
2165
2165
// these if they are escaped with backticks though.
2166
2166
if (VD->getDeclContext ()->isTypeContext () &&
2167
- (VD->getName ().isSimpleName (Context .Id_Type ) ||
2168
- VD->getName ().isSimpleName (Context .Id_Protocol )) &&
2167
+ (VD->getName ().isSimpleName (Ctx .Id_Type ) ||
2168
+ VD->getName ().isSimpleName (Ctx .Id_Protocol )) &&
2169
2169
VD->getNameLoc ().isValid () &&
2170
- Context .SourceMgr .extractText ({VD->getNameLoc (), 1 }) != " `" ) {
2171
- auto &DE = Context .Diags ;
2170
+ Ctx .SourceMgr .extractText ({VD->getNameLoc (), 1 }) != " `" ) {
2171
+ auto &DE = Ctx .Diags ;
2172
2172
DE.diagnose (VD->getNameLoc (), diag::reserved_member_name,
2173
2173
VD, VD->getBaseIdentifier ().str ());
2174
2174
DE.diagnose (VD->getNameLoc (), diag::backticks_to_escape)
@@ -2212,27 +2212,25 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2212
2212
// target was loaded for the main module, where both belong to the same package;
2213
2213
// this is an expected behavior, but it should have been loaded from the local
2214
2214
// build directory, not from distributed SDK. In such case, we show a warning.
2215
- auto &diags = ID->Ctx .Diags ;
2216
- diags.diagnose (ID,
2217
- diag::in_package_module_not_compiled_locally,
2218
- target->getBaseIdentifier (),
2219
- target->getPackageName (),
2220
- target->getModuleFilename ());
2215
+ Ctx.Diags .diagnose (ID,
2216
+ diag::in_package_module_not_compiled_locally,
2217
+ target->getBaseIdentifier (),
2218
+ target->getPackageName (),
2219
+ target->getModuleFilename ());
2221
2220
}
2222
2221
2223
2222
// Report the public import of a private module.
2224
- if (ID-> Ctx .LangOpts .LibraryLevel == LibraryLevel::API) {
2223
+ if (Ctx.LangOpts .LibraryLevel == LibraryLevel::API) {
2225
2224
auto importer = ID->getModuleContext ();
2226
2225
if (target &&
2227
2226
!ID->getAttrs ().hasAttribute <ImplementationOnlyAttr>() &&
2228
2227
!ID->getAttrs ().hasAttribute <SPIOnlyAttr>() &&
2229
2228
ID->getAccessLevel () == AccessLevel::Public &&
2230
2229
target->getLibraryLevel () == LibraryLevel::SPI) {
2231
2230
2232
- auto &diags = ID->Ctx .Diags ;
2233
2231
InFlightDiagnostic inFlight =
2234
- diags .diagnose (ID, diag::error_public_import_of_private_module,
2235
- target->getName (), importer->getName ());
2232
+ Ctx. Diags .diagnose (ID, diag::error_public_import_of_private_module,
2233
+ target->getName (), importer->getName ());
2236
2234
if (ID->getAttrs ().isEmpty ()) {
2237
2235
inFlight.fixItInsert (ID->getStartLoc (),
2238
2236
" @_implementationOnly " );
@@ -2500,7 +2498,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2500
2498
if (Ctx.LangOpts .hasFeature (Feature::StaticExclusiveOnly) &&
2501
2499
SD->getAttrs ().hasAttribute <StaticExclusiveOnlyAttr>() &&
2502
2500
!VD->isLet ()) {
2503
- SD-> Ctx .Diags .diagnoseWithNotes (
2501
+ Ctx.Diags .diagnoseWithNotes (
2504
2502
VD->diagnose (diag::attr_static_exclusive_only_let_only,
2505
2503
VD->getInterfaceType ()),
2506
2504
[&]() {
0 commit comments