File tree 8 files changed +42
-13
lines changed
8 files changed +42
-13
lines changed Original file line number Diff line number Diff line change 19
19
#include " TypeCheckConcurrency.h"
20
20
#include " TypeCheckObjC.h"
21
21
#include " TypeCheckType.h"
22
+ #include " TypeCheckUnsafe.h"
22
23
#include " TypeChecker.h"
23
24
#include " swift/AST/ASTWalker.h"
24
25
#include " swift/AST/AvailabilityDomain.h"
Original file line number Diff line number Diff line change @@ -273,17 +273,6 @@ void checkExplicitAvailability(Decl *decl);
273
273
std::pair<const Decl *, bool /* inDefinition*/ >
274
274
enclosingContextForUnsafe (SourceLoc referenceLoc, const DeclContext *referenceDC);
275
275
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
-
287
276
} // namespace swift
288
277
289
278
#endif // SWIFT_SEMA_TYPE_CHECK_AVAILABILITY_H
Original file line number Diff line number Diff line change 20
20
#include " TypeCheckEffects.h"
21
21
#include " TypeCheckObjC.h"
22
22
#include " TypeChecker.h"
23
+ #include " TypeCheckUnsafe.h"
23
24
#include " swift/AST/ASTVisitor.h"
24
25
#include " swift/AST/Availability.h"
25
26
#include " swift/AST/Decl.h"
Original file line number Diff line number Diff line change 27
27
#include " TypeCheckObjC.h"
28
28
#include " TypeCheckType.h"
29
29
#include " TypeChecker.h"
30
+ #include " TypeCheckUnsafe.h"
30
31
#include " swift/AST/ASTPrinter.h"
31
32
#include " swift/AST/ASTVisitor.h"
32
33
#include " swift/AST/ASTWalker.h"
Original file line number Diff line number Diff line change 27
27
#include "TypeCheckEffects.h"
28
28
#include "TypeCheckInvertible.h"
29
29
#include "TypeCheckObjC.h"
30
+ #include "TypeCheckUnsafe.h"
30
31
#include "swift/AST/ASTContext.h"
31
32
#include "swift/AST/ASTMangler.h"
32
33
#include "swift/AST/ASTPrinter.h"
Original file line number Diff line number Diff line change 20
20
#include "TypeCheckDistributed.h"
21
21
#include "TypeCheckType.h"
22
22
#include "TypeChecker.h"
23
+ #include "TypeCheckUnsafe.h"
23
24
#include "swift/AST/ASTPrinter.h"
24
25
#include "swift/AST/ASTScope.h"
25
26
#include "swift/AST/ASTVisitor.h"
Original file line number Diff line number Diff line change 14
14
//
15
15
//===----------------------------------------------------------------------===//
16
16
17
+ #include "TypeCheckAvailability.h"
18
+ #include "TypeCheckType.h"
19
+ #include "TypeCheckUnsafe.h"
20
+
17
21
#include "swift/AST/ASTContext.h"
18
22
#include "swift/AST/UnsafeUse.h"
19
23
#include "swift/AST/DiagnosticsSema.h"
20
24
#include "swift/AST/PackConformance.h"
21
25
#include "swift/AST/SourceFile.h"
22
26
#include "swift/AST/SourceFileExtras.h"
23
- #include " TypeCheckAvailability.h"
24
- #include " TypeCheckType.h"
25
27
26
28
using namespace swift;
27
29
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