[all-commits] [llvm/llvm-project] 9353c5: [Diagnostics] Put "deprecated copy" warnings into ...

Dávid Bolvanský via All-commits all-commits at lists.llvm.org
Fri Nov 22 13:37:29 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9353c5dd0664ea444236e527bf93566e11dc34df
      https://github.com/llvm/llvm-project/commit/9353c5dd0664ea444236e527bf93566e11dc34df
  Author: Dávid Bolvanský <david.bolvansky at gmail.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDeclCXX.cpp
    A clang/test/SemaCXX/deprecated-copy.cpp

  Log Message:
  -----------
  [Diagnostics] Put "deprecated copy" warnings into -Wdeprecated-copy

Summary:
GCC 9 added -Wdeprecated-copy (as part of -Wextra). This diagnostic is already implemented in Clang too, just hidden under -Wdeprecated (not on by default).
This patch adds -Wdeprecated-copy and makes it compatible with GCC 9+.
This diagnostic is heavily tested in deprecated.cpp, so I added simple tests just to check we warn when new flag/-Wextra is enabled.

Reviewers: rsmith, dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list