summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/uninitialized-fields.slang
Commit message (Collapse)AuthorAge
* Feature/initialize list side branch (#6058)kaizhangNV2025-02-05
| | | | | | | | | | | | | | | | | | | | | | * SP004: implement initialize list translation to ctor - We synthesize a member-wise constructor for each struct follow the rules described in SP004. - Add logic to translate the initialize list to constructor invoke - Add cuda-host decoration for the synthesized constructor - Remove the default constructor when we have a valid member init constructor - Disable -zero-initialize option, will re-implement it in followup (#6109). - Fix the overload lookup issue When creating invoke expression for ctor, we need to call ResolveInvoke() to find us the best candidates, however the existing lookup logic could find us the base constructor for child struct, we should eliminate this case by providing the LookupOptions::IgnoreInheritance to lookup, this requires us to create a subcontext on SemanticsVisitor to indicate that we only want to use this option on looking the constructor. - Do not implicit initialize a struct that doesn't have explicit default constructor. Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Fix potential test failures due to SPIRV validation failure (#6047)Jay Kwak2025-01-10
| | | | | | | | | | | There are a few tests that are currently passing but could fail when conditions change little bit. When slang-test runs with `test-server`, the spirv validation fails and the test gets reported as failed even though they are actually passing. To avoid the potential problem, this commit adds an empty entry point. Co-authored-by: Yong He <yonghe@outlook.com>
* Ignoring construct field warnings on delegatory methods (#4911)venkataram-nv2024-08-28
| | | | | | | | | | | * Ignoring construct field warnings on delegatory methods * Generalizing instruction usage type interface * Skip collection when searching for stores * Adding separate construct delegation tests * Treating differentiable functions as stores
* Warnings for uninitialized fields in constructors (#4680)venkataram-nv2024-07-18
* Detect uninitialized fields in constructors * Reachability check for early returns * Specialized warnings for synthesized default initializers * Handling quirks with constructors * Addressing review comments * Ignore synthesized constructors if they are not used