comparison clang/test/SemaObjC/method-attributes.m @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children 1f2b6ac9f198
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
97 97
98 - (id) IMethod :(int) count, ... __attribute__((section("__TEXT,foo"))); 98 - (id) IMethod :(int) count, ... __attribute__((section("__TEXT,foo")));
99 99
100 + (void) CMethod : (id) Obj __attribute__((section("__TEXT,fee"))); 100 + (void) CMethod : (id) Obj __attribute__((section("__TEXT,fee")));
101 @end 101 @end
102
103 // Section type conflicts between methods/properties and global variables
104 const int global1 __attribute__((section("seg1,sec1"))) = 10; // expected-note {{declared here}} expected-note {{declared here}} expected-note {{declared here}}
105 int global2 __attribute__((section("seg2,sec2"))) = 10; // expected-note {{declared here}} expected-note {{declared here}} expected-note {{declared here}}
106
107 @interface section_conflicts : NSObject
108 @property int p1 __attribute__((section("seg1,sec1"))); // expected-error {{'p1' causes a section type conflict with 'global1'}}
109 @property int p2 __attribute__((section("seg2,sec2"))); // expected-error {{'p2' causes a section type conflict with 'global2'}}
110
111 - (void)imethod1 __attribute__((section("seg1,sec1"))); // expected-error {{'imethod1' causes a section type conflict with 'global1'}}
112 - (void)imethod2 __attribute__((section("seg2,sec2"))); // expected-error {{'imethod2' causes a section type conflict with 'global2'}}
113
114 + (void)cmethod1:(id)Obj __attribute__((section("seg1,sec1"))); // expected-error {{'cmethod1:' causes a section type conflict with 'global1'}}
115 + (void)cmethod2:(id)Obj __attribute__((section("seg2,sec2"))); // expected-error {{'cmethod2:' causes a section type conflict with 'global2'}}
116 @end