summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/uninitialized-out.slang
Commit message (Collapse)AuthorAge
* Warnings for uninitialized values (#4530)venkataram-nv2024-07-09
| | | | | | | | | | | | | | | | | | | | | | This extends the code for handling uninitialized output parameters. Still needs to handle generic templates and assignment of uninitialized values more carefully. The file containing the relevant code are now in source/slang/slang-ir-use-uninitialized-values.cpp rather than the previous source/slang/slang-ir-use-uninitialized-out-param.h and the top-level function is now checkForUsingUinitializedValues. Additionally a rudimentary test shader has been added for this case, which replaces the old file for out params only; tests/diagnositcs/uninitialized-out.slang becomes tests/diagnositcs/uninitialized.slang. What this does not implement (could be future PRs): * Checking uninitialized fields within constructors * Partially uninitialized values with respect to data structure (e.g. arrays/structs/vector types) * Partially uninitialized values with respect to control flow (e.g. if/else/loop)
* Add warning for returning without initializing out parameter (#2807)Ellie Hermaszewska2023-04-21
| | | | | * Add warning for returning without initializing out parameter * Add unused prelude function to squash uninitialized out variable warnings
* Diagnose on using uninitialized `out` param. (#2803)Yong He2023-04-14
* Diagnose on using uninitialized `out` param. * Hack to allow `out Vertices<T>`. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>