Annotate unreachable comment-scanner switch paths to satisfy C26819 (#5071)

This commit is contained in:
Niels Lohmann
2026-02-07 09:15:18 +01:00
committed by GitHub
parent 21b53746c9
commit f8eee1bb79
2 changed files with 8 additions and 0 deletions

View File

@@ -863,6 +863,8 @@ class lexer : public lexer_base<BasicJsonType>
break;
}
}
JSON_HEDLEY_UNREACHABLE();
}
// multi-line comments skip input until */ is read
@@ -898,6 +900,8 @@ class lexer : public lexer_base<BasicJsonType>
continue;
}
}
JSON_HEDLEY_UNREACHABLE();
}
// unexpected character after reading '/'