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
  • compiler
  • translator
  • IntermNode.h
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Fix switch statement validation corner cases · 923ecef6
    Olli Etuaho authored Oct 11, 2017
    The grammar needs to generate AST nodes even for no-op statements,
    since they might be the last statement in a switch statement that is
    required for switch statement validity. Change the grammar to generate
    nodes from empty blocks and empty declarations.
    
    We also need to do some further processing of the AST. This is because
    PruneEmptyDeclarations will still remove empty declarations, and at
    least the NVIDIA driver GLSL compiler doesn't accept some types of
    no-op statements as the last statement inside a switch statement. So
    after parsing has finished we do rudimentary dead code elimination to
    remove dead cases from the end of switch statements.
    
    BUG=angleproject:2181
    TEST=angle_unittests
    
    Change-Id: I586f2e4a3ac2171e65f1f0ccb7a7de220e3cc225
    Reviewed-on: https://chromium-review.googlesource.com/712574
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    923ecef6
IntermNode.h 30 KB
EditWeb IDE
×

Replace IntermNode.h

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.