<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/preprocessor/pragma-once-a.h, 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>2024-10-29T06:49:26+00:00</updated>
<entry>
<title>format</title>
<updated>2024-10-29T06:49:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21'/>
<id>urn:sha1:f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21</id>
<content type='text'>
* format

* Minor test fixes

* enable checking cpp format in ci</content>
</entry>
<entry>
<title>Add basic support for #pragma once (#630)</title>
<updated>2018-08-27T19:33:35+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-08-27T19:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9a9733091cc7c9628e445313785d561deb229072'/>
<id>urn:sha1:9a9733091cc7c9628e445313785d561deb229072</id>
<content type='text'>
* Improve diagnostic messages for function redefinition

The front-end was using internal "not implemented" errors instead of friendly user-facing errors to handle:

* Redefinition of a function (same signature and both have bodies)

* Multiple function declarations/definitions with the same parameter signature, but differnet return types

This change simply turns both of these into reasonably friendly errors that explain what went wrong and point to the previous definition/declaration as appropriate.

* Add support for detecting #pragma directives and handling them

The logic here mirrors what was set up for preprocessor directives, just for "sub-directives" in this case.
The only case here is the default one, which now reports a warning for directives we don't understand.

* Add basic support for #pragma once

Fixes #494

The approach here is simplistic in the extreme. When we see a `#pragma once` directive, we put the current file path (the location of the `#pragma` directive, as reported by our source manager) into a set, and  then any paths in that set are ignored by subsequent `#include` directives.

This should work for simple cases of `#pragma once`, but it is likely to fail in a variety of cases because our filesystem layer currently makes no attempt to normalize/canonicalize paths. Improving the robustness of the solution is left to future work.

This change includes a simple test case to confirm that a second `#include` of a file with a `#pragma once` is successfully ignored.
</content>
</entry>
</feed>
