// RUN: %clang_cc1 -fsyntax-only -verify %s // Obj-C string literal expressions template struct StringTest { void f() { (void)@"Hello"; } }; template struct StringTest; template struct StringTest; // @selector expressions template struct SelectorTest { SEL f() { return @selector(multiple:arguments:); } SEL f2() { return @selector(multiple:arguments:); } }; template struct SelectorTest; template struct SelectorTest; // @protocol expressions @protocol P @end template struct ProtocolTest { void f() { (void)@protocol(P); } }; template struct ProtocolTest; template struct ProtocolTest; // @encode expressions template struct EncodeTest { static const char *encode(T t) { return @encode(T); } }; template struct EncodeTest; template struct EncodeTest; template struct EncodeTest; // @() boxing expressions. template struct BoxingTest { static id box(T value) { return @(value); // expected-error {{illegal type 'int *' used in a boxed expression}} \ // expected-error {{illegal type 'long double' used in a boxed expression}} } }; @interface NSNumber + (NSNumber *)numberWithInt:(int)value; @end @interface NSString + (id)stringWithUTF8String:(const char *)str; @end template struct BoxingTest; template struct BoxingTest; template struct BoxingTest; // expected-note {{in instantiation of member function 'BoxingTest::box' requested here}} template struct BoxingTest; // expected-note {{in instantiation of member function 'BoxingTest::box' requested here}}