[all-commits] [llvm/llvm-project] 3a3197: [C2x] Implement support for nullptr and nullptr_t

Aaron Ballman via All-commits all-commits at lists.llvm.org
Fri Oct 14 07:06:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a31970ee2af24ffcfd4b6fc11ac9bdf4d4ef2e8
      https://github.com/llvm/llvm-project/commit/3a31970ee2af24ffcfd4b6fc11ac9bdf4d4ef2e8
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

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

  Log Message:
  -----------
  [C2x] Implement support for nullptr and nullptr_t

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.

Differential Revision: https://reviews.llvm.org/D135099




More information about the All-commits mailing list