[all-commits] [llvm/llvm-project] 49e7ef: [Clang]: Diagnose deprecated copy operations also ...

Ningvin via All-commits all-commits at lists.llvm.org
Wed Sep 14 10:48:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49e7ef2c09facd722a29a5ad96a7f8f16e362b28
      https://github.com/llvm/llvm-project/commit/49e7ef2c09facd722a29a5ad96a7f8f16e362b28
  Author: Julius <julius.bettin at protonmail.com>
  Date:   2022-09-14 (Wed, 14 Sep 2022)

  Changed paths:
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/SemaCXX/deprecated-copy-with-dtor.cpp
    M clang/test/SemaCXX/deprecated-copy-with-user-provided-copy.cpp
    M clang/test/SemaCXX/deprecated-copy-with-user-provided-dtor.cpp
    M clang/test/SemaCXX/deprecated-copy.cpp
    M clang/test/SemaCXX/deprecated.cpp

  Log Message:
  -----------
  [Clang]: Diagnose deprecated copy operations also in MSVC compatibility mode

When running in MSVC compatibility mode, previously no deprecated copy
operation warnings (enabled by -Wdeprecated-copy) were raised. This
restriction was already in place when the deprecated copy warning was
first introduced.

This patch removes said restriction so that deprecated copy warnings, if
enabled, are also raised in MSVC compatibility mode. The reasoning here
being that these warnings are still useful when running in MSVC
compatibility mode and also have to be semi-explicitly enabled in the
first place (using -Wdeprecated-copy, -Wdeprecated or -Wextra).

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




More information about the All-commits mailing list