This attempts to fix a (non-deterministic) buffer overrun when parsing raw string literals during modular build.
Similar fix to 4e5b5c36f47c9a406ea7f6b4f89fae477693973a.
Differential D94950
[clang][lex] Speculative fix for buffer overrun on raw string parse jansvoboda11 on Jan 19 2021, 12:33 AM. Authored by
Details This attempts to fix a (non-deterministic) buffer overrun when parsing raw string literals during modular build. Similar fix to 4e5b5c36f47c9a406ea7f6b4f89fae477693973a.
Diff Detail
Unit Tests
Event TimelineComment Actions Looks good. Thanks for implementing this!
|
Nit: "16" is a magic number; it might be better to use a constant or comment to document its significance (raw strings can only have 16-character delimiters).
(I believe this is C++11 [lex.string]p2, but I've never written one of the citation comments you see in clang, so I'm not sure if you should cite a later standard.)