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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 09:35:21 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a subscriber: rjmccall.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM, though please wait a day or so to land this in case @rjmccall disagrees with my assessment of the Objective-C changes.



================
Comment at: clang/test/SemaObjCXX/parameters.mm:14-17
+struct test2 { virtual void foo() = 0; };
 @interface Test2
-- (void) foo: (test2) foo; // expected-error {{parameter type 'test2' is an abstract class}}
+- (void) foo: (test2) foo ;
 @end
----------------
I think this change makes sense for Objective-C as well (this is a declaration and not a definition, at least as I understand things), but pinging @rjmccall just in case I'm wrong.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152096/new/

https://reviews.llvm.org/D152096



More information about the cfe-commits mailing list