summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-language-server-ast-lookup.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-06 14:40:38 -0800
committerGitHub <noreply@github.com>2023-11-06 14:40:38 -0800
commit46529df2c4f73a4655bdd79d48004f29374a99a8 (patch)
tree801e69e70a47ce702c055df68ada41a38158367b /source/slang/slang-language-server-ast-lookup.cpp
parentda9e0adb5cf2b1bed6075a3afe93cfdcceabe904 (diff)
Fix ICE when lowering an associatedtype declref from an derived interface. (#3312)
* Fix ICE when lowering an associatedtype declref from an derived interface. * Fixes. * Fix test. * Fix GLSL/SPIRV image subscript swizzle store regression. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-language-server-ast-lookup.cpp')
-rw-r--r--source/slang/slang-language-server-ast-lookup.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/slang/slang-language-server-ast-lookup.cpp b/source/slang/slang-language-server-ast-lookup.cpp
index 6c00312ba..dbdf1ddd0 100644
--- a/source/slang/slang-language-server-ast-lookup.cpp
+++ b/source/slang/slang-language-server-ast-lookup.cpp
@@ -363,7 +363,21 @@ public:
return false;
}
- bool visitThisExpr(ThisExpr*) { return false; }
+ bool visitThisExpr(ThisExpr* expr)
+ {
+ static const int thisTokenLength = 4;
+ if (_isLocInRange(
+ context, expr->loc, thisTokenLength))
+ {
+ ASTLookupResult result;
+ result.path = context->nodePath;
+ result.path.add(expr);
+ context->results.add(result);
+ return true;
+ }
+ return false;
+ }
+
bool visitThisTypeExpr(ThisTypeExpr*) { return false; }
bool visitAndTypeExpr(AndTypeExpr* expr)
{