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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -Wnonnull %s -verify
anatofuz
parents:
diff changeset
2 //rdar://19211059
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @interface NSObject @end
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 @interface Base : NSObject
anatofuz
parents:
diff changeset
7 - (nonnull id)bad:(nullable id)obj; // expected-note 2 {{previous declaration is here}}
anatofuz
parents:
diff changeset
8 - (nullable id)notAsBad:(nonnull id)obj;
anatofuz
parents:
diff changeset
9 @end
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 @interface Sub : Base
anatofuz
parents:
diff changeset
12 - (nullable id)bad:(nonnull id)obj; // expected-warning {{conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'nonnull'}} \
anatofuz
parents:
diff changeset
13 // expected-warning {{conflicting nullability specifier on parameter types, 'nonnull' conflicts with existing specifier 'nullable'}}
anatofuz
parents:
diff changeset
14 - (nonnull id)notAsBad:(nullable id)obj;
anatofuz
parents:
diff changeset
15 @end