summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/syntax.cpp')
-rw-r--r--source/slang/syntax.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index 4881f301e..70e230f33 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -2011,10 +2011,13 @@ void Type::accept(IValVisitor* visitor, void* extra)
String DeclRefBase::toString() const
{
- StringBuilder sb;
- sb << this->getDecl()->getName()->text;
+ if (!decl) return "";
+
+ auto name = decl->getName();
+ if (!name) return "";
+
// TODO: need to print out substitutions too!
- return sb.ProduceString();
+ return name->text;
}
RefPtr<ThisTypeSubstitution> getThisTypeSubst(DeclRefBase & declRef, bool insertSubstEntry)