Skip to content
  • Richard Smith's avatar
    Fix a couple of wrong-code bugs in switch-on-constant optimization: · 550a211f
    Richard Smith authored
     * recurse through intermediate LabelStmts and AttributedStmts when checking
       whether a statement inside a switch declares a variable
     * if the end of a compound statement is reachable from the chosen case label,
       and the compound statement contains a variable declaration, it's not valid
       to just emit the contents of the compound statement -- we must emit the
       statement itself or we lose the scope (and thus end lifetimes at the wrong
       point)
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281797 91177308-0d34-0410-b5e6-96231b3b80d8
    550a211f