diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-10-08 16:46:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-08 16:46:18 -0400 |
| commit | 05de8d86370d7a329bdf4cb4b9e5b270f6696076 (patch) | |
| tree | b7115ba3e3f46b44f007c403afb58c1214d47f7c /source/slang/slang-check.cpp | |
| parent | 34ba10d1b883700992f34c68ed72f659d3644461 (diff) | |
Fix for issue with user attribute lookup (#2437)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Add handling for root paths.
* Fixes around absolute paths.
* Add SimplifyStyle
* Remove unrequire include.
* Fix some details around RelativeFileSystem canonical paths.
* For MemoryFileSystem make sure "/a" and "a" maps to same canonical path.
* Add test for canonicalPath.
* Improve comment.
* More testing around canonical paths.
* Fix for user attribute lookup issue.
* Add a test.
* Small improvements in test.
* Improve the comments around lookup workaround.
Diffstat (limited to 'source/slang/slang-check.cpp')
| -rw-r--r-- | source/slang/slang-check.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp index bcc74a6d0..8c6cddbfe 100644 --- a/source/slang/slang-check.cpp +++ b/source/slang/slang-check.cpp @@ -210,4 +210,24 @@ namespace Slang throw; } } + + void removeLookupForName(TypeCheckingCache* cache, Name* name) + { + auto& lookupCache = cache->lookupCache; + + List<LookupRequestKey> keys; + + for (const auto& pairs : lookupCache) + { + const auto& key = pairs.Key; + if (key.name == name) + { + keys.add(key); + } + } + for (auto& key : keys) + { + lookupCache.Remove(key); + } + } } |
