Files
clang-p2996/clang/lib/Lex/LiteralSupport.cpp
Aaron Ballman 8f0c865d10 Fix a crash with empty escape sequences when lexing (#102339)
The utilities we use for lexing string and character literals can be run
in a mode where we pass a null pointer for the diagnostics engine. This
mode is used by the format string checkers, for example. However, there
were two places that failed to account for a null diagnostic engine
pointer: `\o{}` and `\x{}`.

This patch adds a check for a null pointer and correctly handles
fallback behavior.

Fixes #102218
2024-08-08 07:32:39 -04:00

82 KiB