teak-llvm/clang/test/SemaObjC/protocol-expr-1.m
Fariborz Jahanian a57d91c2ae Objective-C. Warn if protocol used in an @protocol
expression is a forward declaration as this results
in undefined behavior. rdar://17768630

llvm-svn: 213968
2014-07-25 19:45:01 +00:00

17 lines
223 B
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
@protocol fproto @end
@protocol p1
@end
@class cl;
int main()
{
Protocol *proto = @protocol(p1);
Protocol *fproto = @protocol(fproto);
}