File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2332,10 +2332,16 @@ class OMPNowaitClause final : public OMPClause {
23322332  // / Returns condition.
23332333  Expr *getCondition () const  { return  cast_or_null<Expr>(Condition); }
23342334
2335-   child_range children () { return  child_range (&Condition, &Condition + 1 ); }
2335+   child_range children () {
2336+     if  (Condition)
2337+       return  child_range (&Condition, &Condition + 1 );
2338+     return  child_range (child_iterator (), child_iterator ());
2339+   }
23362340
23372341  const_child_range children () const  {
2338-     return  const_child_range (&Condition, &Condition + 1 );
2342+     if  (Condition)
2343+       return  const_child_range (&Condition, &Condition + 1 );
2344+     return  const_child_range (const_child_iterator (), const_child_iterator ());
23392345  }
23402346
23412347  child_range used_children ();
Original file line number Diff line number Diff line change @@ -312,8 +312,7 @@ OMPClause::child_range OMPIfClause::used_children() {
312312OMPClause::child_range OMPNowaitClause::used_children () {
313313  if  (Condition)
314314    return  child_range (&Condition, &Condition + 1 );
315-   Stmt *Null = nullptr ;
316-   return  child_range (&Null, &Null);
315+   return  children ();
317316}
318317
319318OMPClause::child_range OMPGrainsizeClause::used_children () {
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ void nowait() {
1919
2020  //  DUMP: OMPTargetDirective
2121  //  DUMP-NEXT: OMPNowaitClause
22-   //  DUMP-NEXT: <<<NULL>>>
2322  //  PRINT: #pragma omp target nowait
2423  #pragma  omp target nowait
2524  {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments