Skip to content

Commit 1138283

Browse files
author
Aidan
committed
duplicated c17 tests in c2x
1 parent e9fc782 commit 1138283

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/test/Sema/nullptr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,6 @@ void test_f1() {
112112
void foo(void *);
113113
void bar() { foo(__nullptr); }
114114
static_assert(nullptr == __nullptr);
115+
static_assert(__nullptr == 0); // Test that its value matches that of NULL
115116
static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false));
117+
static_assert(_Generic(__typeof(__nullptr), int : 0, void * : 0, default : 1)); // Test that it's type is not the same as what NULL would generally have.

0 commit comments

Comments
 (0)