diff options
| author | sriramm-nv <85252063+sriramm-nv@users.noreply.github.com> | 2024-04-03 15:10:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-03 15:10:16 -0700 |
| commit | f6c49fdb2cc7ead1943d944097220cedd142792f (patch) | |
| tree | 86f8a09544d89cab007f3168f10396bcee73d12e /source/slang/slang-check-impl.h | |
| parent | 2768e429e556f3978825beaf71cf361626057135 (diff) | |
Fix assertions due to malformed switch statements (#3858)
* Fix assertions due to malformed switch statements
Fixes the issue #2955
* Checks for multiple case statements with same values
* Checks for multiple default cases
* Constant-folds case exprs into an Integer value
* fix the comments, and updated error code
* one-line comment on diagnostic code
Diffstat (limited to 'source/slang/slang-check-impl.h')
| -rw-r--r-- | source/slang/slang-check-impl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-check-impl.h b/source/slang/slang-check-impl.h index 48bd2093b..55edba6b9 100644 --- a/source/slang/slang-check-impl.h +++ b/source/slang/slang-check-impl.h @@ -2741,6 +2741,9 @@ namespace Slang void tryInferLoopMaxIterations(ForStmt* stmt); void checkLoopInDifferentiableFunc(Stmt* stmt); + + private: + void validateCaseStmts(SwitchStmt* stmt, DiagnosticSink* sink); }; struct SemanticsDeclVisitorBase |
