This is an archive of the discontinued LLVM Phabricator instance.

Use backslash escape, replacing xargs -0 in test macro-multiline.c
ClosedPublic

Authored by hubert.reinterpretcast on Dec 22 2017, 9:03 AM.

Details

Summary

xargs supports escaping of newline characters with backslash. xargs -0 is neither part of POSIX nor the LSB.

This patch removes the -0 option and adjusts the input to xargs accordingly; that is, the input is a text file not ending in an incomplete line, and the newline of interest is preceded by a backslash.

Note: The treatment of escaped newline characters is not as clearly specified by POSIX as for escaped blank characters; however, the same can be said for escaped backslashes. It is slightly more clear for the case where the -I option is used; however, -I is also of limited portability.

Diff Detail

Repository
rC Clang

Event Timeline

bruno accepted this revision.Jan 4 2018, 10:19 AM
bruno added a subscriber: bruno.

LGTM

This revision is now accepted and ready to land.Jan 4 2018, 10:19 AM
This revision was automatically updated to reflect the committed changes.