Changeset b8b64c34 for tests/raii


Ignore:
Timestamp:
Feb 27, 2025, 3:17:20 PM (5 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
3483185
Parents:
9506c70
Message:

That should be the rest of the warnings generated from the tests themselves. There are a few that will probably need updates to the compiler to remove those warnings and a few more that should be clean except for a known error.

Location:
tests/raii
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/raii/ctor-autogen.cfa

    r9506c70 rb8b64c34  
    11// TODO: add error cases (e.g., use of field constructors for managed types, etc.)
    22
    3 enum Color { R, G, B };
     3enum Colour { R, G, B };
    44
    55// empty struct/union should have generated ctor/dtors
     
    2121// struct/union with members with generated ctor/dtors should themselves have generated ctor/dtors
    2222union PopulatedUnion {
    23         Color c;
     23        Colour c;
    2424        U u;
    2525        S s;
     
    2727
    2828struct PopulatedStruct {
    29         Color c;
     29        Colour c;
    3030        U u;
    3131        S s;
     
    109109        S s;
    110110        U u;
    111         Color e;
     111        Colour e = R;
    112112
    113         // identity(R);  Color constant should be Color which is otype
    114         identity(e);  // Color should be an otype
     113        // identity(R);  Colour constant should be Colour which is otype
     114        identity(e);  // Colour should be an otype
    115115        identity(u);  // U should be an otype
    116116        identity(s);  // S should be an otype
     
    139139        identity(dsi);
    140140        identity(dsd);
    141         // identity(dui); // xxx - codegen errors in generated thunk _temp3 (Box-pass-generated assignment return-temporary)
    142         // identity(dud);
     141        identity(dui);
     142        identity(dud);
    143143        identity(dssi);
    144144        identity(dssf);
  • TabularUnified tests/raii/dtor-early-exit.cfa

    r9506c70 rb8b64c34  
    2323};
    2424
    25 // don't want these called
    26 void ?{}(A & a) { assert( false ); }
    2725void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name; a.x = (int*)malloc(); }
    28 void ?{}(A & a, const char * name, int * ptr) { assert( false ); }
     26// Don't want these called:
     27void ?{}(A &) { assert( false ); }
     28void ?{}(A &, const char *, int *) { assert( false ); }
    2929
    3030A ?=?(A & a, A b) {  sout | "assign " | a.name | " " | b.name; return a; }
     
    110110                                if (j == 0) {
    111111                                        sout | "continue L2";
    112                                         continue; // destruct y - missing because object that needs to be destructed is not a part of this block, it's a part of the for's block
     112                                        continue L2; // destruct y - missing because object that needs to be destructed is not a part of this block, it's a part of the for's block
    113113                                } else if (j == 1) {
    114114                                        sout | "break L2";
    115                                         break;  // destruct y
     115                                        break L2;  // destruct y
    116116                                } else if (i == 1) {
    117117                                        sout | "continue L1";
     
    222222                if(true) continue;
    223223                int t = 0;
     224                (void)t;
    224225        }
    225226}
  • TabularUnified tests/raii/init_once.cfa

    r9506c70 rb8b64c34  
    7575}
    7676
    77 void ?{}(init_once & x, init_once other) {
     77void ?{}(init_once & x, init_once) {
    7878        x{};  // reuse default ctor
    7979}
     
    131131                                init_once x;
    132132                                init_once y = x;
    133                         } // fall through
     133                        }
     134                                fallthrough;
    134135                        default: {
    135136                                init_once x;
Note: See TracChangeset for help on using the changeset viewer.