Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • tests
  • compiler_tests
  • PruneEmptyCases_test.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Prune empty cases and switch statements · 0b0dcbc1
    Olli Etuaho authored Mar 14, 2018
    The translator already prunes no-ops and unreferenced variables, and
    this may result in case statements that are followed by nothing.
    
    Since the last case statement in as switch statement must always
    contain a statement to be valid GLSL, the translator must not leave
    empty case statements in place. They're now being pruned by the
    PruneEmptyCases AST transformation. This improves on the earlier
    RemoveEmptySwitchStatements AST transformation that did address
    empty switch statements but could not remove them if they had a
    case statement inside.
    
    BUG=angleproject:2402
    TEST=angle_unittests
    
    Change-Id: Ieb9598a744078e45226d8fb7266d877f7835cf0c
    Reviewed-on: https://chromium-review.googlesource.com/962181
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    0b0dcbc1
PruneEmptyCases_test.cpp 2.65 KB
EditWeb IDE
×

Replace PruneEmptyCases_test.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.