[PATCH] D152096: [Clang] Check for abstract parameters only when functions are defined.

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 4 08:16:11 PDT 2023


cor3ntin created this revision.
Herald added a project: All.
cor3ntin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The C++ standard allows abstract parameters in deleted functions
and in function declarations

> The type of a parameter or the return type for a function definition
> shall not be a (possibly cv-qualified) class type that is
> incomplete or abstract within the function body
> unless the function is deleted.

Fixes https://github.com/llvm/llvm-project/issues/63012


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152096

Files:
  clang/docs/ReleaseNotes.rst
  clang/lib/Sema/SemaChecking.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/test/CXX/class.derived/class.abstract/p3.cpp
  clang/test/CXX/drs/dr6xx.cpp
  clang/test/SemaCXX/abstract.cpp
  clang/test/SemaCXX/auto-type-from-cxx.cpp
  clang/test/SemaObjCXX/parameters.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152096.528217.patch
Type: text/x-patch
Size: 15321 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230604/a731f6b2/attachment-0001.bin>


More information about the cfe-commits mailing list