Skip to content

Commit

Permalink
Add [[noreturn]] to 1 file inc velox/type/TimestampConversion.cpp (f…
Browse files Browse the repository at this point in the history
…acebookincubator#8797)

Summary:
Pull Request resolved: facebookincubator#8797

LLVM-15 has a warning `-Wno-return` which can be used to identify functions that do not return. Qualifying these functions with `[[noreturn]]` is a perf optimization.

Reviewed By: palmje

Differential Revision: D53815460

fbshipit-source-id: d109875e3f853f1fe16b86923d1ee9a7e7ecf482
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 20, 2024
1 parent d55c48b commit 3020196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/type/TimestampConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ Timestamp fromDatetime(int64_t daysSinceEpoch, int64_t microsSinceMidnight) {

namespace {

void parserError(const char* str, size_t len) {
[[noreturn]] void parserError(const char* str, size_t len) {
VELOX_USER_FAIL(
"Unable to parse timestamp value: \"{}\", "
"expected format is (YYYY-MM-DD HH:MM:SS[.MS])",
Expand Down

0 comments on commit 3020196

Please sign in to comment.