Changeset 28e58fd for src/tests/dtor-early-exit.c
- Timestamp:
- Aug 25, 2017, 10:38:34 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 800d275
- Parents:
- af08051 (diff), 3eab308c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/dtor-early-exit.c
raf08051 r28e58fd 27 27 28 28 // don't want these called 29 void ?{}(A *a) { assert( false ); }30 void ?{}(A * a, const char * name) { a->name = name; sout | "construct " | name | endl; a->x = (int*)malloc(); }31 void ?{}(A *a, const char * name, int * ptr) { assert( false ); }32 33 A ?=?(A * a, A a) { sout | "assign " | a->name | " " | a.name; return a; }34 void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = (int*)malloc(); }35 void ^?{}(A * a) { sout | "destruct " | a->name | endl; free(a->x); }29 void ?{}(A & a) { assert( false ); } 30 void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name | endl; a.x = (int*)malloc(); } 31 void ?{}(A & a, const char * name, int * ptr) { assert( false ); } 32 33 A ?=?(A & a, A b) { sout | "assign " | a.name | " " | b.name; return a; } 34 void ?{}(A & a, A b) { sout | "copy construct " | b.name | endl; a.x = (int*)malloc(); } 35 void ^?{}(A & a) { sout | "destruct " | a.name | endl; free(a.x); } 36 36 37 37 // test returns
Note:
See TracChangeset
for help on using the changeset viewer.