From 17d2b2492d42e54ea4e0d907b4d84aa17f4a6f33 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 2 Feb 2021 17:45:56 -0500 Subject: Downstream compiler line number test (#1682) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP diagnostics for line number output. * Small param naming change * Use x macro for pass through compile human name lookup/getting. * WIP on parsing downstream compiler output. * Split out parsing into ParseDiagnosticUtil. Added test result of single line. * Dump out the std output on fail to parse diagnostics. * Change test type for syntax-error-intrinsic.slang be TEST not TEST_DIAGNOSTIC --- source/core/slang-string-util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/core/slang-string-util.cpp') diff --git a/source/core/slang-string-util.cpp b/source/core/slang-string-util.cpp index 326bc3191..a859c6945 100644 --- a/source/core/slang-string-util.cpp +++ b/source/core/slang-string-util.cpp @@ -32,9 +32,9 @@ namespace Slang { return areAllEqual(slicesA, slicesB, equalFn); } -/* static */void StringUtil::split(const UnownedStringSlice& in, char splitChar, List& slicesOut) +/* static */void StringUtil::split(const UnownedStringSlice& in, char splitChar, List& outSlices) { - slicesOut.clear(); + outSlices.clear(); const char* start = in.begin(); const char* end = in.end(); @@ -49,7 +49,7 @@ namespace Slang { } // Add to output - slicesOut.add(UnownedStringSlice(start, cur)); + outSlices.add(UnownedStringSlice(start, cur)); // Skip the split character, if at end we are okay anyway start = cur + 1; -- cgit v1.2.3