Skip to content

Commit 949fe16

Browse files
committed
AST: Move a bunch of random @objc diagnostics to Sema
1 parent 07ce01d commit 949fe16

File tree

5 files changed

+675
-668
lines changed

5 files changed

+675
-668
lines changed

include/swift/AST/ASTContext.h

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -839,25 +839,6 @@ class ASTContext final {
839839
/// Returns memory used exclusively by constraint solver.
840840
size_t getSolverMemory() const;
841841

842-
/// Complain if @objc or dynamic is used without importing Foundation.
843-
void diagnoseAttrsRequiringFoundation(SourceFile &SF);
844-
845-
/// Diagnose any Objective-C method overrides that aren't reflected
846-
/// as overrides in Swift.
847-
bool diagnoseUnintendedObjCMethodOverrides(SourceFile &sf);
848-
849-
/// Diagnose all conflicts between members that have the same
850-
/// Objective-C selector in the same class.
851-
///
852-
/// \param sf The source file for which we are diagnosing conflicts.
853-
///
854-
/// \returns true if there were any conflicts diagnosed.
855-
bool diagnoseObjCMethodConflicts(SourceFile &sf);
856-
857-
/// Diagnose any unsatisfied @objc optional requirements of
858-
/// protocols that conflict with methods.
859-
bool diagnoseObjCUnsatisfiedOptReqConflicts(SourceFile &sf);
860-
861842
/// Retrieve the Swift name for the given Foundation entity, where
862843
/// "NS" prefix stripping will apply under omit-needless-words.
863844
StringRef getSwiftName(KnownFoundationEntity kind);
@@ -936,31 +917,6 @@ class ASTContext final {
936917
friend SILBoxType;
937918
};
938919

939-
/// Retrieve information about the given Objective-C method for
940-
/// diagnostic purposes, to be used with OBJC_DIAG_SELECT in
941-
/// DiagnosticsSema.def.
942-
std::pair<unsigned, DeclName> getObjCMethodDiagInfo(
943-
AbstractFunctionDecl *method);
944-
945-
/// Attach Fix-Its to the given diagnostic that updates the name of the
946-
/// given declaration to the desired target name.
947-
///
948-
/// \returns false if the name could not be fixed.
949-
bool fixDeclarationName(InFlightDiagnostic &diag, ValueDecl *decl,
950-
DeclName targetName);
951-
952-
/// Fix the Objective-C name of the given declaration to match the provided
953-
/// Objective-C selector.
954-
///
955-
/// \param ignoreImpliedName When true, ignore the implied name of the
956-
/// given declaration, because it no longer applies.
957-
///
958-
/// For properties, the selector should be a zero-parameter selector of the
959-
/// given property's name.
960-
bool fixDeclarationObjCName(InFlightDiagnostic &diag, ValueDecl *decl,
961-
Optional<ObjCSelector> targetNameOpt,
962-
bool ignoreImpliedName = false);
963-
964920
} // end namespace swift
965921

966922
#endif

0 commit comments

Comments
 (0)