[all-commits] [llvm/llvm-project] aced81: [C23] Implement N3018: The constexpr specifier for...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Wed Mar 6 00:46:47 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aced81c0a5bf30dda99fde2e28364426de4c18d3
      https://github.com/llvm/llvm-project/commit/aced81c0a5bf30dda99fde2e28364426de4c18d3
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/TokenKinds.def
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Sema/DeclSpec.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/lib/Sema/SemaOverload.cpp
    A clang/test/C/C2x/n3018.c
    A clang/test/Parser/c23-constexpr.c
    A clang/test/Sema/constexpr.c
    M clang/www/c_status.html

  Log Message:
  -----------
  [C23] Implement N3018: The constexpr specifier for object definitions (#73099)

The implementation mostly reuses C++ code paths where possible,
including narrowing check in order to provide diagnostic messages in
case initializer for constexpr variable is not exactly representable in
target type.

The following won't work due to lack of support for other features:
- Diagnosing of underspecified declarations involving constexpr
- Constexpr attached to compound literals

Also due to lack of support for char8_t some of examples with utf-8
strings don't work properly.

Fixes https://github.com/llvm/llvm-project/issues/64742



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list