Skip to content

Commit 3e80979

Browse files
committed
Add tests for assert headers linkage specifications
1 parent e6388c6 commit 3e80979

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %clangxx -fsycl -c %s
2+
3+
// Verify that compilation works when assert.h is wrapped by a C linkage
4+
// specification.
5+
6+
#ifdef __cplusplus
7+
extern "C" {
8+
#endif
9+
10+
#include <assert.h>
11+
12+
#ifdef __cplusplus
13+
}
14+
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %clangxx -fsycl -c %s
2+
3+
// Verify that compilation works when cassert is wrapped by a C linkage
4+
// specification.
5+
6+
#ifdef __cplusplus
7+
extern "C" {
8+
#endif
9+
10+
#include <cassert>
11+
12+
#ifdef __cplusplus
13+
}
14+
#endif

0 commit comments

Comments
 (0)