File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,3 +120,61 @@ void foo_struct_foo() {
120120 // CHECK: call void @llvm.lifetime.end.p0{{(i8)?}}(i64 immarg 123
121121 // CHECK-NEXT: ret void
122122}
123+
124+ struct CodepointSet
125+ {
126+ CodepointSet opBinary (string op, U)(U )
127+ {
128+ return this ;
129+ }
130+
131+ this (this ) { }
132+ }
133+
134+ CodepointSet memoizeExpr (string expr)()
135+ {
136+ if (__ctfe)
137+ return mixin (expr);
138+ CodepointSet slot;
139+ return slot;
140+ }
141+
142+ struct unicode
143+ {
144+ static CodepointSet opDispatch (string name)()
145+ {
146+ CodepointSet set;
147+ return set;
148+ }
149+ }
150+
151+ void wordCharacter () {
152+ // CHECK-LABEL: define void @wordCharacter()
153+ // CHECK-NOT: call void @llvm.lifetime.start.p0{{(i8)?}}({{.*}}sret
154+ memoizeExpr! " unicode.A | unicode.M" ;
155+ // CHECK-LABEL: ret void
156+ }
157+
158+ struct Grapheme
159+ {
160+ // / Ctor
161+ this (C)(C) { }
162+
163+ this (this ) { }
164+
165+ ~this () { }
166+ }
167+
168+ enum jamoLBase = 0x1100 ;
169+
170+ Grapheme decomposeHangul (dchar ch) {
171+ // CHECK-LABEL: define void @decomposeHangul()
172+ immutable idxS = ch ;
173+ immutable idxT = idxS ;
174+
175+ immutable partL = jamoLBase ;
176+ // CHECK-NOT: call void @llvm.lifetime.start.p0{{(i8)?}}({{.*}}sret
177+ if (idxT )
178+ return Grapheme (partL);
179+ return Grapheme ();
180+ }
You can’t perform that action at this time.
0 commit comments