[clang] [clang] Add __nullptr as a keyword to C (PR #123119)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 24 10:36:21 PST 2025
================
@@ -108,3 +108,8 @@ void test_f1() {
int ir = (f1)(nullptr);
}
+// __nullptr keyword in C
+void foo(void *);
+void bar() { foo(__nullptr); }
+static_assert(nullptr == __nullptr);
+static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false));
----------------
erichkeane wrote:
This isn't actually done here. This test is C2x only, Aaron was asking for a C17 test as well.
https://github.com/llvm/llvm-project/pull/123119
More information about the cfe-commits
mailing list