Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaObjC/class-method-self.m @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 (2021-06-07) |
parents | 1d019706d866 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -verify -Wno-objc-root-class %s @interface XX - (void)addObserver:(XX*)o; // expected-note 2{{passing argument to parameter 'o' here}} @end @interface YY + (void)classMethod; @end @implementation YY static XX *obj; + (void)classMethod { [obj addObserver:self]; // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}} Class whatever; [obj addObserver:whatever]; // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}} } @end