~pali/llvm/clang-3.9

Viewing all changes in revision 64805.

  • Committer: tstellar
  • Date: 2016-11-23 18:21:42 UTC
  • Revision ID: svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:cfe/branches/release_39:287790
Merging r281797:

------------------------------------------------------------------------
r281797 | richard-llvm | 2016-09-16 16:30:39 -0700 (Fri, 16 Sep 2016) | 10 lines

Fix a couple of wrong-code bugs in switch-on-constant optimization:

 * 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)

------------------------------------------------------------------------

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: