File tree Expand file tree Collapse file tree 8 files changed +42
-13
lines changed Expand file tree Collapse file tree 8 files changed +42
-13
lines changed Original file line number Diff line number Diff line change 1919#include " TypeCheckConcurrency.h"
2020#include " TypeCheckObjC.h"
2121#include " TypeCheckType.h"
22+ #include " TypeCheckUnsafe.h"
2223#include " TypeChecker.h"
2324#include " swift/AST/ASTWalker.h"
2425#include " swift/AST/AvailabilityDomain.h"
Original file line number Diff line number Diff line change @@ -273,17 +273,6 @@ void checkExplicitAvailability(Decl *decl);
273273std::pair<const Decl *, bool /* inDefinition*/ >
274274enclosingContextForUnsafe (SourceLoc referenceLoc, const DeclContext *referenceDC);
275275
276- // / Diagnose the given unsafe use right now.
277- void diagnoseUnsafeUse (const UnsafeUse &use, bool asNote = false );
278-
279- // / Diagnose any unsafe uses within the signature or definition of the given
280- // / declaration, if there are any.
281- void diagnoseUnsafeUsesIn (const Decl *decl);
282-
283- // / Determine whether a reference to this declaration is considered unsafe,
284- // / either explicitly (@unsafe) or because it references an unsafe type.
285- bool isUnsafe (ConcreteDeclRef declRef);
286-
287276} // namespace swift
288277
289278#endif // SWIFT_SEMA_TYPE_CHECK_AVAILABILITY_H
Original file line number Diff line number Diff line change 2020#include " TypeCheckEffects.h"
2121#include " TypeCheckObjC.h"
2222#include " TypeChecker.h"
23+ #include " TypeCheckUnsafe.h"
2324#include " swift/AST/ASTVisitor.h"
2425#include " swift/AST/Availability.h"
2526#include " swift/AST/Decl.h"
Original file line number Diff line number Diff line change 2727#include " TypeCheckObjC.h"
2828#include " TypeCheckType.h"
2929#include " TypeChecker.h"
30+ #include " TypeCheckUnsafe.h"
3031#include " swift/AST/ASTPrinter.h"
3132#include " swift/AST/ASTVisitor.h"
3233#include " swift/AST/ASTWalker.h"
Original file line number Diff line number Diff line change 2727#include " TypeCheckEffects.h"
2828#include " TypeCheckInvertible.h"
2929#include " TypeCheckObjC.h"
30+ #include " TypeCheckUnsafe.h"
3031#include " swift/AST/ASTContext.h"
3132#include " swift/AST/ASTMangler.h"
3233#include " swift/AST/ASTPrinter.h"
Original file line number Diff line number Diff line change 2020#include " TypeCheckDistributed.h"
2121#include " TypeCheckType.h"
2222#include " TypeChecker.h"
23+ #include " TypeCheckUnsafe.h"
2324#include " swift/AST/ASTPrinter.h"
2425#include " swift/AST/ASTScope.h"
2526#include " swift/AST/ASTVisitor.h"
Original file line number Diff line number Diff line change 1414//
1515// ===----------------------------------------------------------------------===//
1616
17+ #include " TypeCheckAvailability.h"
18+ #include " TypeCheckType.h"
19+ #include " TypeCheckUnsafe.h"
20+
1721#include " swift/AST/ASTContext.h"
1822#include " swift/AST/UnsafeUse.h"
1923#include " swift/AST/DiagnosticsSema.h"
2024#include " swift/AST/PackConformance.h"
2125#include " swift/AST/SourceFile.h"
2226#include " swift/AST/SourceFileExtras.h"
23- #include " TypeCheckAvailability.h"
24- #include " TypeCheckType.h"
2527
2628using namespace swift ;
2729
Original file line number Diff line number Diff line change 1+ // ===--- TypeCheckUnasfe.h - Strict Safety Diagnostics ----------*- C++ -*-===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ // ===----------------------------------------------------------------------===//
12+
13+ #ifndef SWIFT_SEMA_TYPE_CHECK_UNSAFE_H
14+ #define SWIFT_SEMA_TYPE_CHECK_UNSAFE_H
15+
16+ #include " swift/AST/UnsafeUse.h"
17+
18+ namespace swift {
19+
20+ // / Diagnose the given unsafe use right now.
21+ void diagnoseUnsafeUse (const UnsafeUse &use, bool asNote = false );
22+
23+ // / Diagnose any unsafe uses within the signature or definition of the given
24+ // / declaration, if there are any.
25+ void diagnoseUnsafeUsesIn (const Decl *decl);
26+
27+ // / Determine whether a reference to this declaration is considered unsafe,
28+ // / either explicitly (@unsafe) or because it references an unsafe type.
29+ bool isUnsafe (ConcreteDeclRef declRef);
30+
31+ }
32+
33+ #endif // SWIFT_SEMA_TYPE_CHECK_UNSAFE_H
You can’t perform that action at this time.
0 commit comments