File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 13
13
#ifndef SWIFT_C_AST_ASTBRIDGING_H
14
14
#define SWIFT_C_AST_ASTBRIDGING_H
15
15
16
+ #if __clang__
16
17
// Provide macros to temporarily suppress warning about the use of
17
18
// _Nullable and _Nonnull.
18
19
#define SWIFT_BEGIN_NULLABILITY_ANNOTATIONS \
22
23
23
24
#define SWIFT_END_NULLABILITY_ANNOTATIONS \
24
25
_Pragma("clang diagnostic pop") _Pragma("clang assume_nonnull end")
26
+ #else
27
+ #define SWIFT_BEGIN_NULLABILITY_ANNOTATIONS
28
+ #define SWIFT_END_NULLABILITY_ANNOTATIONS
29
+ #endif
25
30
26
31
//===----------------------------------------------------------------------===//
27
32
// Diagnostic Engine
28
33
//===----------------------------------------------------------------------===//
29
34
35
+ #ifndef __has_attribute // Optional of course.
36
+ #define __has_attribute (x ) 0 // Compatibility with non-clang compilers.
37
+ #endif
38
+
30
39
// TODO: Move this to somewhere common header.
31
40
#if __has_attribute (enum_extensibility )
32
41
#define ENUM_EXTENSIBILITY_ATTR (arg ) __attribute__((enum_extensibility(arg)))
You can’t perform that action at this time.
0 commit comments