[all-commits] [llvm/llvm-project] 0677d7: [Clang] Static member initializers are not immedia...

cor3ntin via All-commits all-commits at lists.llvm.org
Tue Sep 19 14:42:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0677d7cd8c1549b04ae02e0a878faabf17f8999f
      https://github.com/llvm/llvm-project/commit/0677d7cd8c1549b04ae02e0a878faabf17f8999f
  Author: cor3ntin <corentinjabot at gmail.com>
  Date:   2023-09-19 (Tue, 19 Sep 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/test/SemaCXX/cxx2a-consteval.cpp
    M clang/test/SemaCXX/cxx2b-consteval-propagate.cpp

  Log Message:
  -----------
  [Clang] Static member initializers are not immediate escalating context. (#66021)

Per CWG2760, default members initializers should be consider part the
body of constructors, which mean they are evaluated in an immediate
escalating context.

However, this does not apply to static members.

This patch produces some extraneous diagnostics, unfortunately we do not
have a good way to report an error back to the initializer and this is a
pre existing issue

Fixes #65985
Fixes #66562




More information about the All-commits mailing list