llvm-for-llvmta/tools/clang/test/Frontend/noderef_on_non_pointers.m

12 lines
239 B
Mathematica
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -verify %s
#define NODEREF __attribute__((noderef))
@interface NSObject
+ (id)new;
@end
void func() {
id NODEREF obj = [NSObject new]; // expected-warning{{'noderef' can only be used on an array or pointer type}}
}