summaryrefslogtreecommitdiff
path: root/source/compiler-core
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-11-16 12:17:49 -0800
committerGitHub <noreply@github.com>2022-11-16 12:17:49 -0800
commit801aa3b44254341018a1acbe754f2ce3b0900e2a (patch)
treeb3066778522edb99bf64c0ac80c91b0b4cb788f8 /source/compiler-core
parent09d8e048d2264d89886cda8e87e8a452d4f913c1 (diff)
Clean up type checking of higher order expressions. (#2519)
* Clean up type checking of higher order expressions. * Replace `goto` with `break` to pacify clang. * Fix. * Fixes. * Fix more tests. * Fix lowerWitnessTable parameter error. * Exclude attributes from ast printing. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/compiler-core')
-rw-r--r--source/compiler-core/slang-diagnostic-sink.cpp2
-rw-r--r--source/compiler-core/slang-diagnostic-sink.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/compiler-core/slang-diagnostic-sink.cpp b/source/compiler-core/slang-diagnostic-sink.cpp
index 5e58098b0..fa638316c 100644
--- a/source/compiler-core/slang-diagnostic-sink.cpp
+++ b/source/compiler-core/slang-diagnostic-sink.cpp
@@ -69,7 +69,7 @@ void printDiagnosticArg(StringBuilder& sb, Token const& token)
sb << token.getContent();
}
-SourceLoc const& getDiagnosticPos(Token const& token)
+SourceLoc getDiagnosticPos(Token const& token)
{
return token.loc;
}
diff --git a/source/compiler-core/slang-diagnostic-sink.h b/source/compiler-core/slang-diagnostic-sink.h
index 466a68827..5131e5194 100644
--- a/source/compiler-core/slang-diagnostic-sink.h
+++ b/source/compiler-core/slang-diagnostic-sink.h
@@ -109,9 +109,9 @@ void printDiagnosticArg(StringBuilder& sb, RefPtr<T> ptr)
printDiagnosticArg(sb, ptr.Ptr());
}
-inline SourceLoc const& getDiagnosticPos(SourceLoc const& pos) { return pos; }
+inline SourceLoc getDiagnosticPos(SourceLoc const& pos) { return pos; }
-SourceLoc const& getDiagnosticPos(Token const& token);
+SourceLoc getDiagnosticPos(Token const& token);
template<typename T>