brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 68becaf Raw
41 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2 3typedef int INTF3; // expected-note {{previous definition is here}}4 5@interface SUPER @end // expected-note {{previous definition is here}}6 7@interface OBJECT @end8 9@interface INTF  : OBJECT10@end11 12@implementation INTF @end // expected-note {{previous definition is here}}13 14@implementation INTF //  expected-error {{reimplementation of class 'INTF'}}15@end16 17 18@interface INTF1 : OBJECT19@end20 21@implementation INTF1 : SUPER // expected-error {{conflicting super class name 'SUPER'}}22@end23 24@interface INTF2 25@end26 27@implementation INTF2 : SUPR //  expected-error {{cannot find interface declaration for 'SUPR', superclass of 'INTF2'}}28@end29 30@implementation INTF3 @end // expected-error {{redefinition of 'INTF3' as different kind of symbol}}31 32@implementation INTF4 @end // expected-warning {{cannot find interface declaration for 'INTF4'}}33 34@class INTF5; // expected-note{{forward declaration of class here}}35 36@implementation INTF5 {  // expected-warning {{cannot find interface declaration for 'INTF5'}}37  int x;38}39@end40 41