- 06 Jul, 2022 2 commits
-
-
Michiel Verloop authored
-
Michiel Verloop authored
• Make two functions static in ctformatting.c. • Remove global.h import from ctinfo.c. • Move CTFintialize from main to OPTanalyseCommandline. • More changes not worth mentioning.
-
- 30 Jun, 2022 38 commits
-
-
Michiel Verloop authored
• Add CTIerrorBegin/End call to a CTIerrorContinued call site that was missed in an earlier commit. • Add end-to-end test for CTIerrorBegin/Continued/End. • Rename error end-to-end tests to have consistent naming. • Expand test-error-generic to additionally test line wrapping and custom header arguments. • Fix inconsistent CTIerror behaviour by moving the CTFinitialize call from OPTcheckOptionConsistency to main.c.
-
Michiel Verloop authored
-
Michiel Verloop authored
• Refactor ctinfo.c to rely on ctformatting.h. ○ Decouple various calls to ctformatting.h using macros. ○ Remove ProcessMessage, Loc2buf, PrintMessage, FinalizeMessageBegin and FinalizeMessage. ○ Refactor CTIerrorBegin/Continued/End. - Refactored calling locations to properly make use of these functions. ○ Remove CTIwarnContinued (Had no uses and CTIwarnBegin/End did not yet exist). ○ Add CTIerrorRaw as a companion function to CTIgetErrorMessageVA. - Refactored calling locations of CTIgetErrorMessageVA to use CTIerrorRaw when printing output. • Add sac2cShared as a dependency for base-test-environment to avoid linking before types_nodetype.h is generated. • Add SBUFprintd function variant that deallocates the string argument. • Fix TYextendBottomError adding a newline if the error message to concatenate is null. • Refactor errors in type_errors.c to make use of str_buffer.h. - This also fixes two memory leaks. • Remove all sources of '@' characters in strings where they were used as newlines. • Refactor all sinks of '@' characters to instead consume newlines. ○ An exception is in ctformatting.c, because the source of the @ character is a compiler argument and cannot generate newlines. • Remove outdated README from the tests/errors folder (An updated README exists in the tests folder). • Refactor error end-to-end tests. ○ Add Mac compatibility - the tests no longer make use of the -P flag which BSD grep does not support. ○ Remove the case insensitive flags. • Rename test-type_inference_error.sac to test-type-inference-error.sac. • Rename test-overload_error.sac to test-overload-error.sac. • Rename function CTFvcreateMessageLoc to CTFvCreateMessageLoc.
-
Michiel Verloop authored
• Fix a warning for cti-single-line being issued when it should not, and vice versa.
-
Michiel Verloop authored
• Changed all mentions of unit tests to end-to-end tests. • Document how to reuse program output to run multiple checks on it. • Document how to use run.sh for an entire folder at once. • Miscellaneous improvements.
-
Michiel Verloop authored
-
Michiel Verloop authored
• CTFcreateMessageContinued can now be called without providing the multiline header. • The 'current' multiline header is stored as a static variable in ctformatting.c. • The functions CTFcreateMessage(Begin)(Loc) assign the multiline header. • CTFcreateMessageEnd frees the multiline header and sets it to NULL. • The CTFcreateMessageBegin functions call CTFcreateMessageContinued to parse remaining_lines instead of returning them unparsed. • Updated tests for the changed behaviour.
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
• Fix wrong calls to CTIabort • Potential fix to ignore -Wformat-zero-length in a few test cases.
-
Michiel Verloop authored
-
Michiel Verloop authored
• Runtime unit-tests (cuda/hwloc) are broken because of linking errors. • Main.c now calls CTFinitialize.
-
Michiel Verloop authored
-
Michiel Verloop authored
• Fix @ being replaced with newlines in the multiline header. • Fix @ being replaced with spaces instead of a newline in the first line header if cti-single-line is disabled. • Add tests for replacing @ with \n or a space for the first line header.
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
In the previous commit, static const globals were defined in ctformatting.c, alongside getter functions. The getters are not allowed, and lead to a hang. The fix is to instead define the globals in the header file as macros.
-
Michiel Verloop authored
• Move the default header formats from ctinfo.c to ctformatting.c ○ The getDefault functions now return a const reference to the default header. • Move option consistency check for cti globals to ctformatting with CTFinitialize. • Fix the test from last commit that was broken. • Various improvements or tiny fixes to ctformatting.c
-
Michiel Verloop authored
• Add CTFcheckHeaderConsistency to ctformatting. • Add default headers to ctinfo and methods to retrieve copies of said headers. • Set the default headers as default headers in globals.mac • Add header consistency checks to OPTcheckOptionConsistency in options.c ○ Add warnings for conflicting cti settings. • Add broken test to test-compile-time-formatting.cpp for CTFcreateMessageLoc.
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
-
Michiel Verloop authored
• Add new files ctformatting.c, ctformatting.h and add them to CMakeLists. • Add a rewrite of the ProcessMessage, loc2buf, and CTIfinalize functions to ctformatting.c. ○ Tests pending. ○ The functions are still present in ctinfo.c • Add SBUFtruncate, SBUFinsertAfterToken, and related tests. • Add != null debug asserts for all pointer arguments for SBUF functions. • Add minor improvements to ctinfo.c
-
Michiel Verloop authored
-
Michiel Verloop authored
• Removed the location-warning test since other commits made the scenario produce an error instead of a warning.
-
Michiel Verloop authored
-
Michiel Verloop authored
• CTInote still uses two spaces as a header when not given a location. • CTInote uses headers like CTIwarn/error/abort when given a location. • All CTInoteLine callers now call CTInote and use NODE_LOCATION instead of NODE_LINE. • LINE_TO_LOC now has brackets around the argument. • Remove unused functions in CTinfo.c
-
Michiel Verloop authored
-
Michiel Verloop authored
• Remove message_line_length, set_message_length(), CTIgetErrorMessageLength() and CTIgetWarnMessageLength() from ctinfo.
-
Michiel Verloop authored
• All CTIwarnLine callers have LINE_TO_LOC applied to their first argument. • CTIwarnLoc will be converted to make use of CTIwarn in the next commit.
-
Michiel Verloop authored
• All CTIwarn callers have EMPTY_LOC inserted as their first argument. • CTIwarnLine/Loc will be converted to make use of CTIwarn in the coming two commits.
-
Michiel Verloop authored
• All CTIabortLine callers have LINE_TO_LOC applied to their first argument. • Callers with NODE_LINE have been changed to use NODE_LOCATION. • CTIabortLoc will be converted to make use of CTIabort in the next commit.
-
Michiel Verloop authored
• All CTIabort callers have EMPTY_LOC inserted as their first argument. • CTIabortLine/Loc will be converted to make use of CTIabort in the coming two commits.
-
Michiel Verloop authored
• CTIabort-Line/Loc will be converted to make use of CTIabort in the next commits.
-