This is an archive of the discontinued LLVM Phabricator instance.

[Support] Fix an invalid character escaping in string literal (unittest).
ClosedPublic

Authored by etienneb on Apr 3 2016, 11:40 AM.

Details

Summary

A character within a string literal is not escaped correctly.
In this case, there is no semantic change because the invalid character turn out to be NUL anyway.

note: "\0x12" is equivalent to {0, 'x', '1', '2'} and not { 12 }.

This issue was found by clang-tidy.

Diff Detail

Event Timeline

etienneb updated this revision to Diff 52509.Apr 3 2016, 11:40 AM
etienneb retitled this revision from to [Support] Fix an invalid character escaping in string literal (unittest)..
etienneb updated this object.
etienneb added reviewers: rnk, alexfh.
etienneb added a subscriber: cfe-commits.
alexfh removed a reviewer: alexfh.Apr 4 2016, 4:32 AM
rnk accepted this revision.Apr 4 2016, 10:14 AM
rnk edited edge metadata.

Lgtm I suppose the test worked fine because it still found the right magic bytes.

This revision is now accepted and ready to land.Apr 4 2016, 10:14 AM
etienneb closed this revision.Apr 4 2016, 6:51 PM