clangd and clang-format pre commit agree now

Sheesh
This commit is contained in:
2025-06-23 10:53:11 -04:00
parent fc1b3ac147
commit e477ff095a
3 changed files with 300 additions and 10 deletions

View File

@@ -288,13 +288,14 @@ struct NumDfa {
return (state & 63) == 30 || (state & 63) == 36 || (state & 63) == 48 ||
(state & 63) == 42;
}
// return value either points to the first byte which does not match, or
// bufEnd. Leaves the dfa in the last state of the match.
// clang-format off
#ifdef __x86_64__
__attribute__((target_clones("default", "bmi2")))
#endif
const char *
scan(const char *buf, const char *bufEnd) {
// Return value either points to the first byte which does not match, or bufEnd.
// Leaves the dfa in the last state of the match.
const char *scan(const char *buf, const char *bufEnd) {
// clang-format on
auto state_ = state;
for (;;) {
constexpr int kStride = 16;
@@ -597,13 +598,14 @@ struct Utf8Dfa {
// Return true if this dfa is in an accept state. You probably want to call
// scan until the match ends first.
bool accept() const { return (state & 63) == 48; }
// return value either points to the first byte which does not match, or
// bufEnd. Leaves the dfa in the last state of the match.
// clang-format off
#ifdef __x86_64__
__attribute__((target_clones("default", "bmi2")))
#endif
const char *
scan(const char *buf, const char *bufEnd) {
// Return value either points to the first byte which does not match, or bufEnd.
// Leaves the dfa in the last state of the match.
const char *scan(const char *buf, const char *bufEnd) {
// clang-format on
auto state_ = state;
for (;;) {
constexpr int kStride = 16;