File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ node_modules
88.cache 
99.clangd 
1010* .pch 
11+ __pycache__ 
12+ * .pyc 
Original file line number Diff line number Diff line change @@ -255,6 +255,11 @@ struct AlignmentOf {
255255    return  type->symbol ()->alignment ();
256256  }
257257
258+   auto  operator ()(const  UnboundedArrayType* type) const 
259+       -> std::optional<std::size_t> {
260+     return  memoryLayout.alignmentOf (type->elementType ());
261+   }
262+ 
258263  auto  operator ()(auto  type) const  -> std::optional<std::size_t> {
259264    //  ### TODO
260265    if  (!type) return  std::nullopt ;
Original file line number Diff line number Diff line change @@ -22,3 +22,8 @@ static_assert(alignof(long) == 4);
2222static_assert (alignof (unsigned  long ) == 4 );
2323static_assert (alignof (long  double ) == 16 );
2424#endif 
25+ 
26+ static_assert (alignof (char []) == 1 );
27+ static_assert (alignof (int []) == 4 );
28+ static_assert (alignof (double []) == 8 );
29+ static_assert (alignof (__int128_t ) == 16 );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments