| Leonard Chan | ad7ac96 | 2018-12-06 01:05:54 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify %s |
| 2 | |||||
| 3 | #define NODEREF __attribute__((noderef)) | ||||
| 4 | |||||
| 5 | @interface NSObject | ||||
| 6 | + (id)new; | ||||
| 7 | @end | ||||
| 8 | |||||
| 9 | void func() { | ||||
| 10 | id NODEREF obj = [NSObject new]; // expected-warning{{'noderef' can only be used on an array or pointer type}} | ||||
| 11 | } | ||||