[all-commits] [llvm/llvm-project] 00e209: [Clang] Implement CWG2518 - static_assert(false)

cor3ntin via All-commits all-commits at lists.llvm.org
Tue Feb 28 08:21:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00e2098bf49f0ed45b3b8c22894cd3ac9a530e0f
      https://github.com/llvm/llvm-project/commit/00e2098bf49f0ed45b3b8c22894cd3ac9a530e0f
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/CXX/drs/dr25xx.cpp
    M clang/test/SemaCXX/access-base-class.cpp
    M clang/test/SemaCXX/coroutines.cpp
    M clang/test/SemaCXX/static-assert.cpp
    M clang/test/SemaTemplate/instantiate-var-template.cpp
    M clang/test/SemaTemplate/instantiation-dependence.cpp
    M clang/www/cxx_dr_status.html

  Log Message:
  -----------
  [Clang] Implement CWG2518 - static_assert(false)

This allows `static_assert(false)` to not be ill-formed
in template definitions.

This change is applied as a DR in all C++ modes.

Of notes, a couple of tests were relying of the eager nature
of static_assert

* test/SemaTemplate/instantiation-dependence.cpp
* test/SemaTemplate/instantiate-var-template.cpp

I don't know if the changes to `static_assert`
still allow that sort of tests to be expressed.

Reviewed By: #clang-language-wg, erichkeane, aaron.ballman

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




More information about the All-commits mailing list