summaryrefslogtreecommitdiff
path: root/source/core/slang-token-reader.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2020-02-11 06:44:15 -0800
committerGitHub <noreply@github.com>2020-02-11 09:44:15 -0500
commita0174d819c731e08c7a5a5d3c6e6f425d65e7187 (patch)
tree18c681f57b4117213f45bdab0c0b16b208fbe348 /source/core/slang-token-reader.cpp
parent56771d655d77395e4fe879cc19771d461aa01190 (diff)
Make fixes for the attribute-error test case. (#1215)
There are two main fixes here: The first is to remove a memory leak in the reflection test tool, in the case where Slang compilation fails. There is no real reason to be using the reflection test tool for tests that produce diagnostics (we have the slangc tool for that), but it makes sense to go ahead and fix the leak rather than work around it. This was one of those leaks that could have been avoided with smart pointers and a COM-lite API. The second issue was that the logic for constructing an `AttributeDecl` based on a user-defined `struct` was not correctly setting the parent of the attribute decl. The code in question was a little hard to follow and had a few steps that didn't seem strictly necessary given its goals, so I went ahead and scrubbed+commented it to just do what made sense to me (and the tests still pass...). I'm not entirely happy with the design and implementation approach for user-defined attributes, so we might want to take another stab at it sooner or later. This change is not meant to address any design issues, and is just about fixing bugs in what is already there.
Diffstat (limited to 'source/core/slang-token-reader.cpp')
0 files changed, 0 insertions, 0 deletions