<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/variable-redeclaration.slang.expected, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-02-05T18:37:03+00:00</updated>
<entry>
<title>Feature/initialize list side branch (#6058)</title>
<updated>2025-02-05T18:37:03+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2025-02-05T18:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9ec6b91686b651d959fd9ffbec283845bd725dd6'/>
<id>urn:sha1:9ec6b91686b651d959fd9ffbec283845bd725dd6</id>
<content type='text'>
* 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 &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Inline global constants that contains opaque handles for legalization. (#6098)</title>
<updated>2025-01-16T04:43:01+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-01-16T04:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=387f2be1e48a805ef0da34510a5ae0ebc0ba9c3e'/>
<id>urn:sha1:387f2be1e48a805ef0da34510a5ae0ebc0ba9c3e</id>
<content type='text'>
* Inline global constants that contains opaque handles for legalization.

* Add diagnostics on opaque type global variables.

* Fix.

* Fix test.</content>
</entry>
<entry>
<title>Fix erroneous error claiming variable is being used before its declaration (#2958)</title>
<updated>2023-07-06T19:52:00+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2023-07-06T19:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cdfea42f1b28c6ec7b13500a64be823f67bf8e0a'/>
<id>urn:sha1:cdfea42f1b28c6ec7b13500a64be823f67bf8e0a</id>
<content type='text'>
* Simplify type of diagnoseImpl

* Show source line for Note diagnostics, opting out of this where appropriate

* Make declared after use diagnostic clearer

* Fix erroneous error claiming variable is being used before its declaration

Closes https://github.com/shader-slang/slang/issues/2936

* Fix build on msvc

---------

Co-authored-by: jsmall-nvidia &lt;jsmall@nvidia.com&gt;</content>
</entry>
<entry>
<title>Major language server features. (#2264)</title>
<updated>2022-06-07T21:10:49+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-06-07T21:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0c64995ea28febcc7d38e1519da8d93391ce2e7d'/>
<id>urn:sha1:0c64995ea28febcc7d38e1519da8d93391ce2e7d</id>
<content type='text'>
* Major language server features.

* Include slangd in binary release.

* Fix compiler issues.

* Fix compiler error.

* Completion resolve.

* Various improvements.

* Update diagnostic test expected output.

* Bug fix for source locations.

* Adjust diagnostic update frequency.

* Update github actions to store artifacts.

* Fix infinite parser loop.

* Fix parser recovery.

* Fix parser recovery.

* Update test.

* Fix test.

* Disable IR gen for language server.

* Allow commit characters in auto completion.

* Fix lookup for invoke exprs.

* More parser robustness fixes.

* update solution file

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Diagnostic location highlighting (#1700)</title>
<updated>2021-02-12T19:31:56+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2021-02-12T19:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=369279e91dde1b056d8d0e3bb83e7ba3f96321af'/>
<id>urn:sha1:369279e91dde1b056d8d0e3bb83e7ba3f96321af</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* WIP: First pass in supporting output of line error information.

* Add support for lexing to better be able to indicate SourceLocation information.

* Fix lexer usage in DiagnosticSink in C++ extractor.

* Update diagnostics tests to have line location info.

* Fixed test expected output that now have source location information in them.

* Better handling of tab.

* Fix test expected results for tabbing change.

* DiagnosticLexer -&gt; DiagnosticSink::SourceLocationLexer
Added line continuation tests.

* Fix typo.

* Added String::appendRepeatedChar

* Change to rerun tests.

Co-authored-by: Tim Foley &lt;tfoleyNV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Improve checks and diagnostics around redeclarations (#1201)</title>
<updated>2020-02-06T16:38:46+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-02-06T16:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9c84cceffba26817721a23a1a85a48644bf3a560'/>
<id>urn:sha1:9c84cceffba26817721a23a1a85a48644bf3a560</id>
<content type='text'>
* Improve checks and diagnostics around redeclarations

This change turns checking for redeclarations into a dedicated phase of semantic checking, and ensures that it applies to the main categories of declarations: functions, types, and variables.
Note that "variables" here includes function parameters and `struct` fields in addition to the more obvious global and local variables.

Some of the logic for checking redeclarations already existed for functions, and was refactored to deal with other cases of declarations. The checking for functions still needs to be special-cased because functions are much more flexible about the kinds of redeclarations that are allowed.

In addition to improving the diagnosis of redeclaration itself, this change also changes the error message that is produced when referencing a symbol that is ambiguous due to begin redeclared.
This is a small quality-of-life fix, and has the benefit of being much easier to implement than robust tracking of what variables have had redeclaration errors issued so that we can skip emitting an ambiguity error at the use site.

A new test case was added to cover the redeclaration cases for variables (but not types or functions), and the test for function parameters was updated to account for the new more universal diagnostic message (since function parameters used to have special-case redeclaration checking).

* fixup: missing file
</content>
</entry>
</feed>
