From 0d5636c2426fad43490e0f06830fe6e6db71d045 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:25:01 -0500 Subject: [PATCH] Update slang-ast-decl-ref.cpp (#5786) --- source/slang/slang-ast-decl-ref.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/slang/slang-ast-decl-ref.cpp b/source/slang/slang-ast-decl-ref.cpp index 29ab7f86ea..3025381ea2 100644 --- a/source/slang/slang-ast-decl-ref.cpp +++ b/source/slang/slang-ast-decl-ref.cpp @@ -336,8 +336,10 @@ void DeclRefBase::toText(StringBuilder& out) List decls; for (auto dd = getDecl(); dd; dd = dd->parentDecl) { - // Skip the top-level decl. - if (as(dd)) + // Skip the module, file & include decls since their names are + // considered "transparent" + // + if (as(dd) || as(dd) || as(dd)) continue; // Skip base decls in generic containers. We will handle them when we handle the generic