[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 13:27:03 PDT 2022


aaron.ballman created this revision.
aaron.ballman added reviewers: jyknight, efriedma, clang-language-wg.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added a project: clang.

This introduces support for `nullptr` and `nullptr_t` in C2x mode. The proposal accepted by WG14 is: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm

Note, there are quite a few incompatibilities with the C++ feature in some of the edge cases of this feature. Therefore, there are some FIXME comments in tests for testing behavior that might change after WG14 has resolved national body comments (a process we've not yet started). So this implementation might change slightly depending on the resolution of comments. This is called out explicitly in the release notes as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135099

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/AST/ExprCXX.h
  clang/include/clang/AST/PrettyPrinter.h
  clang/include/clang/AST/Type.h
  clang/include/clang/Basic/DiagnosticParseKinds.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/TokenKinds.def
  clang/lib/AST/Expr.cpp
  clang/lib/AST/Type.cpp
  clang/lib/Headers/stddef.h
  clang/lib/Parse/ParseExpr.cpp
  clang/lib/Sema/SemaCast.cpp
  clang/lib/Sema/SemaCodeComplete.cpp
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/test/C/C11/n1330.c
  clang/test/C/C2x/n3042.c
  clang/test/Sema/nullptr.c
  clang/test/Sema/static-assert.c
  clang/www/c_status.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135099.464787.patch
Type: text/x-patch
Size: 36572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221003/8f05bff8/attachment-0001.bin>


More information about the cfe-commits mailing list