[PATCH] D83363: [openmp] Use switch in isAllowedClauseForDirective instead of multiple if
    Joel E. Denny via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul  8 08:47:43 PDT 2020
    
    
  
jdenny added inline comments.
================
Comment at: llvm/test/TableGen/directive1.td:124
+// IMPL-NEXT:    }
+// IMPL-NEXT:    llvm_unreachable("Invalid Tdl Directive kind");
 // IMPL-NEXT:  }
----------------
jdenny wrote:
> clementval wrote:
> > jdenny wrote:
> > > The unreachable message doesn't make sense given the `default` in the directive switch.  If that switch covers all directives, `default` isn't needed anyway.
> > Will remove it.
> Is the default useful?  Are all directives covered by cases?
This is what I'm thinking of:
http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83363/new/
https://reviews.llvm.org/D83363
    
    
More information about the llvm-commits
mailing list