[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 15 20:27:19 PST 2025


================
@@ -108,3 +108,6 @@ void test_f1() {
   int ir = (f1)(nullptr);
 }
 
+// __nullptr keyword in C
----------------
Sirraide wrote:

Maybe also add these:
```c
static_assert(nullptr == __nullptr);
static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false));
```
Just so we have a few more checks. I don’t think we need to go as far as to copy-paste the rest of this file for this.

(I don’t write these `_Generic` selections too often so I hope I got that one right.)

https://github.com/llvm/llvm-project/pull/123119


More information about the cfe-commits mailing list