xref: /llvm-project/libcxx/test/std/depr/depr.c.headers/stddef_h.nullptr.pass.cpp (revision 9dfb142ce0bfa11ea7cd9176c27b6c0fca7243e0)
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <stddef.h>
10 
11 #include <stddef.h>
12 #include <cassert>
13 
main(int,char **)14 int main(int, char**) {
15     {
16         void *p = NULL;
17         assert(!p);
18     }
19     {
20         void *p = nullptr;
21         assert(!p);
22     }
23 
24     return 0;
25 }
26