Changeset e6cfa8ff


Ignore:
Timestamp:
Mar 9, 2020, 11:06:19 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
5b544a6
Parents:
9306559f
Message:

Fixed use after delete bug and regenerated stale tests

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    r9306559f re6cfa8ff  
    745745                if(!decl_suspend) SemanticError( loc, "suspend keyword applied to coroutines requires coroutines to be in scope, add #include <coroutine.hfa>\n");
    746746                auto expr = new UntypedExpr( VariableExpr::functionPointer( decl_suspend ) );
    747                 expr->location = stmt->location;
     747                expr->location = loc;
    748748
    749749                // Change this statement into a regular expr
    750750                assert(expr);
    751751                auto nstmt = new ExprStmt( expr );
    752                 nstmt->location = stmt->location;
     752                nstmt->location = loc;
    753753                return nstmt;
    754754        }
  • tests/coroutine/.expect/fmtLines.txt

    r9306559f re6cfa8ff  
    4848{                                                         // f  or n  ewli 
    4949ne c  hara  cter  s                                     su 
    50 spen  d();                                      if   ( fm 
    51 t.ch   !=   '\n'   ) b  reak 
    52 ;               /  / ig  nore   new  line 
    53                                   } //   for                              sout 
    54  | f  mt.c  h;                                                  //  
    55 prin  t ch  arac  ter                   }  
    56 // f  or                        sou  t |   "  " 
    57 ;                                                               //   prin  t bl 
    58 ock   sepa  rato  r             }   //  
    59 for             sou  t |   nl;                                   
    60                                   // p  rint   gro  up s 
    61 epar  ator      } /  / fo  r} / 
    62 / ma  invo  id p  rt(   Form 
    63 at &   fmt  , ch  ar c  h )   
    64 {      fmt  .ch   = ch  ;    
    65  res  ume(   fmt   );}   //  
    66 prti  nt m  ain(  ) {     Form 
    67 at f  mt;         char   ch;    for 
    68  ( ;  ; )   {           s  in |   ch; 
    69                                                                                 //   rea  d on 
    70 e ch  arac  ter     if   ( e 
    71 of(   sin   ) )   brea  k;               
    72                                         //   eof   ?            p  rt(  
    73 fmt,   ch   );  }   //   for} 
    74  //   main  // L  ocal   Var 
    75 iabl  es:   ////   tab  -wid 
    76 th:   4 //  // c  ompi  le-c 
    77 omma  nd:   "cfa   fmt  Line 
    78 s.cf  a" /  ///   End:   //
     50spen  d;                                        i  f (   fmt. 
     51ch !  = '\  n' )   bre  ak;      
     52        //   igno  re n  ewli  ne                
     53                }   // f  or                            so  ut | 
     54 fmt  .ch;                                                      /  / pr 
     55int   char  acte  r                       } // 
     56 for                    s  out   | "    ";       
     57                                                        /  / pr  int   bloc 
     58k se  para  tor         } /  / fo 
     59r               s  out   | nl  ;                                                         
     60                //   pri  nt g  roup   sep 
     61arat  or        }   //   for}   //  
     62main  void   prt  ( Fo  rmat 
     63 & f  mt,   char   ch   ) {   
     64   f  mt.c  h =   ch;      r 
     65esum  e( f  mt )  ;} /  / pr 
     66tint   mai  n()   {     Fo  rmat 
     67 fmt  ; ch  ar c  h;    f  or ( 
     68 ;;   ) {               sin   | c  h;            
     69                                                                  // r  ead   one  
     70char  acte  r       if (   eof 
     71( si  n )   ) br  eak;                                   
     72                        /  / eo  f ?            prt  ( fm 
     73t, c  h );      } /  / fo  r} / 
     74/ ma  in//   Loc  al V  aria 
     75bles  : //  // t  ab-w  idth 
     76: 4   ////   com  pile  -com 
     77mand  : "c  fa f  mtLi  nes. 
     78cfa"   ///  / En  d: /  /
  • tests/errors/.expect/completeType.txt

    r9306559f re6cfa8ff  
    2727    void
    2828  )
    29   Environment:( _83_4_DT ) -> instance of struct A with body 0 (no widening)
     29  Environment:( _85_4_DT ) -> instance of struct A with body 0 (no widening)
    3030
    3131
     
    5050    void
    5151  )
    52   Environment:( _83_4_DT ) -> instance of struct B with body 1 (no widening)
     52  Environment:( _85_4_DT ) -> instance of struct B with body 1 (no widening)
    5353
    5454
     
    127127          void
    128128        )
    129         Environment:( _102_0_T ) -> instance of type T (not function type) (no widening)
     129        Environment:( _104_0_T ) -> instance of type T (not function type) (no widening)
    130130
    131131      Could not satisfy assertion:
    132132?=?: pointer to function
    133133        ... with parameters
    134           reference to instance of type _102_0_T (not function type)
    135           instance of type _102_0_T (not function type)
     134          reference to instance of type _104_0_T (not function type)
     135          instance of type _104_0_T (not function type)
    136136        ... returning
    137           _retval__operator_assign: instance of type _102_0_T (not function type)
     137          _retval__operator_assign: instance of type _104_0_T (not function type)
    138138          ... with attributes:
    139139            Attribute with name: unused
Note: See TracChangeset for help on using the changeset viewer.