[PATCH] D155475: [Clang][Sema] Add -Wctad-copy-not-wrap to diagnose copy deduction candidate

PoYao Chang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 08:41:20 PDT 2023


rZhBoYao created this revision.
rZhBoYao added reviewers: EricWF, rsmith.
Herald added a project: All.
rZhBoYao requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

1. '-Wctad-copy-not-wrap' warns when copy deduction candidate is selected in CTAD, and the initialization is a direct-initialization. The warning is suppressed when the class template is in a system header and has at least one explicit deduction guide.
2. Add a group '-Wctad' which incldues '-Wctad-copy-not-wrap' and '-Wctad-maybe-unsupported'.

Fixes #63288


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155475

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaInit.cpp
  clang/test/SemaTemplate/ctad.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155475.541059.patch
Type: text/x-patch
Size: 5896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230717/c44d5a7b/attachment.bin>


More information about the cfe-commits mailing list