File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed
Inputs/clang-importer-sdk/usr/include Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -176,3 +176,8 @@ func testNulls() {
176
176
let _: Int = DEPRECATED_ONE // expected-error {{use of unresolved identifier 'DEPRECATED_ONE'}}
177
177
let _: Int = OKAY_TYPED_ONE // expected-error {{cannot convert value of type 'okay_t' (aka 'UInt32') to specified type 'Int'}}
178
178
}
179
+
180
+ func testHeaderGuard( ) {
181
+ _ = IS_HEADER_GUARD // expected-error {{use of unresolved identifier 'IS_HEADER_GUARD'}}
182
+ _ = LOOKS_LIKE_HEADER_GUARD_BUT_IS_USEFUL_CONSTANT // expected-error {{use of unresolved identifier 'LOOKS_LIKE_HEADER_GUARD_BUT_IS_USEFUL_CONSTANT'}}
183
+ }
Original file line number Diff line number Diff line change
1
+ #ifndef IS_HEADER_GUARD
2
+ #define IS_HEADER_GUARD
3
+ #endif
Original file line number Diff line number Diff line change 1
1
#include <macros_impl.h>
2
2
#include <macros_private_impl.h>
3
+ #include <header_guard.h>
4
+ #include <not_a_header_guard.h>
3
5
4
6
// Get Clang's NULL.
5
7
#include <stddef.h>
Original file line number Diff line number Diff line change
1
+ #ifndef LOOKS_LIKE_HEADER_GUARD_BUT_IS_USEFUL_CONSTANT
2
+ #define LOOKS_LIKE_HEADER_GUARD_BUT_IS_USEFUL_CONSTANT 0xcafe
3
+ #endif
You can’t perform that action at this time.
0 commit comments