summaryrefslogtreecommitdiff
path: root/AK/SourceLocation.h
AgeCommit message (Collapse)Author
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-28AK: Display SourceLocation function name in colorAli Mohammad Pur
It's much easier to spot the function name (which is what you often expect) like this.
2021-11-17AK: Convert AK::Format formatting helpers to returning ErrorOr<void>Andreas Kling
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions.
2021-05-30AK+Userland: Use akaster@serenityos.org for my copyright headersAndrew Kaster
2021-04-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-25AK: Add default constructor to SourceLocationBrian Gianforcaro
2021-04-25AK: Add a AK::Formatter implementation for AK::SourceLocationBrian Gianforcaro
2021-04-24AK: Add SourceLocation supportBrian Gianforcaro
C++20 added std::source_location, which lets you capture the callers __FILE__ / __LINE__ / __FUNCTION__ etc as a default argument to functions. See: https://en.cppreference.com/w/cpp/utility/source_location During a bug investigation @ADKaster suggested we could use this to make the LOCK_DEBUG feature of the kernel more user friendly and allow it to automatically instrument all call sites. We then implemented / tested it over discord. :^) Co-Authored-by: Andrew Kaster <andrewdkaster@gmail.com>