ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        ctor
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | Last change
 on this file since 8b6b552 was             486341f, checked in by Rob Schluntz <rschlunt@…>, 9 years ago | 
        
          | 
add option to CodeGen to output unmangled name, add ctorWarnings test
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            411 bytes | 
      
      
| Rev | Line |  | 
|---|
| [486341f] | 1 | struct A { | 
|---|
|  | 2 | int x, y, z; | 
|---|
|  | 3 | }; | 
|---|
|  | 4 |  | 
|---|
|  | 5 | void ?{}(A * a, int x) { | 
|---|
|  | 6 | (&a->x){ x+999 }; | 
|---|
|  | 7 | a->y = 0; // not technically a constructor, but okay | 
|---|
|  | 8 | } // z never constructed | 
|---|
|  | 9 |  | 
|---|
|  | 10 | struct B { | 
|---|
|  | 11 | A a1, a2, a3; | 
|---|
|  | 12 | }; | 
|---|
|  | 13 |  | 
|---|
|  | 14 | void ?{}(B * b) { | 
|---|
|  | 15 | b->a2 = (A) { 2 }; // a2 used before constructed | 
|---|
|  | 16 | (&b->a1){ 1 }; | 
|---|
|  | 17 | } // a2, a3 never constructed | 
|---|
|  | 18 |  | 
|---|
|  | 19 | void ^?{}(B * b) { | 
|---|
|  | 20 | b->a2 = (A) { 0 }; | 
|---|
|  | 21 | ^(&b->a1){}; | 
|---|
|  | 22 | } // a2, a3 never destructed | 
|---|
|  | 23 |  | 
|---|
|  | 24 | int main() { | 
|---|
|  | 25 | B b; | 
|---|
|  | 26 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.