Skip to content

Commit 0d5636c

Browse files
Update slang-ast-decl-ref.cpp (shader-slang#5786)
1 parent 27b7ac0 commit 0d5636c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/slang/slang-ast-decl-ref.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,10 @@ void DeclRefBase::toText(StringBuilder& out)
336336
List<Decl*> decls;
337337
for (auto dd = getDecl(); dd; dd = dd->parentDecl)
338338
{
339-
// Skip the top-level decl.
340-
if (as<ModuleDecl>(dd))
339+
// Skip the module, file & include decls since their names are
340+
// considered "transparent"
341+
//
342+
if (as<ModuleDecl>(dd) || as<FileDecl>(dd) || as<IncludeDecl>(dd))
341343
continue;
342344

343345
// Skip base decls in generic containers. We will handle them when we handle the generic

0 commit comments

Comments
 (0)