[all-commits] [llvm/llvm-project] aefff7: [clang] Migrate DR tests to `static_assert` (#88611)

Vlad Serebrennikov via All-commits all-commits at lists.llvm.org
Tue Apr 16 10:50:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aefff774a0d6f75565243263555f2513ac3c9fdf
      https://github.com/llvm/llvm-project/commit/aefff774a0d6f75565243263555f2513ac3c9fdf
  Author: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
  Date:   2024-04-16 (Tue, 16 Apr 2024)

  Changed paths:
    M clang/test/CXX/drs/dr0xx.cpp
    M clang/test/CXX/drs/dr16xx.cpp
    M clang/test/CXX/drs/dr1xx.cpp
    M clang/test/CXX/drs/dr2xx.cpp
    M clang/test/CXX/drs/dr3xx.cpp
    M clang/test/CXX/drs/dr4xx.cpp
    M clang/test/CXX/drs/dr5xx.cpp
    M clang/test/CXX/drs/dr6xx.cpp

  Log Message:
  -----------
  [clang] Migrate DR tests to `static_assert` (#88611)

This patch touches a number of tests that run in C++98 mode that have
been using array size as a context that requires a constant expression,
replacing it with a `static_assert` backported via a macro. This reduces
noise in expected directives that comes from diagnostics around VLAs.

This patch also showcases that DR tests would benefit from folding in
constant expressions in C++98 mode, but I'm not sure it's even on the
table. If it is, I'd be happy to prepare a PR for that, and rebase this
PR on top of it.

CC @AaronBallman



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