Mercurial > hg > CbC > CbC_llvm
annotate clang/test/SemaObjC/override-nullability.m @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -Wnonnull %s -verify |
2 //rdar://19211059 | |
3 | |
4 @interface NSObject @end | |
5 | |
6 @interface Base : NSObject | |
7 - (nonnull id)bad:(nullable id)obj; // expected-note 2 {{previous declaration is here}} | |
8 - (nullable id)notAsBad:(nonnull id)obj; | |
9 @end | |
10 | |
11 @interface Sub : Base | |
12 - (nullable id)bad:(nonnull id)obj; // expected-warning {{conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'nonnull'}} \ | |
13 // expected-warning {{conflicting nullability specifier on parameter types, 'nonnull' conflicts with existing specifier 'nullable'}} | |
14 - (nonnull id)notAsBad:(nullable id)obj; | |
15 @end |