This is an archive of the discontinued LLVM Phabricator instance.

[Windows] Add test coverage for line endings when rewriting includes
ClosedPublic

Authored by aganea on Apr 6 2021, 10:23 AM.

Details

Summary

Validate that we properly generating a single line ending on Windows when using -frewrite-includes. Otherwise we're breaking split-line macros. The test fails before D99837.

See discussion in https://reviews.llvm.org/D96363#2650460 and D99426

Diff Detail

Event Timeline

aganea requested review of this revision.Apr 6 2021, 10:23 AM
aganea created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 10:23 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Not very familiar with the feature, but from the linked discussion it looks sensible to me, so +1, I can give a formal stamp a bit later if nobody else does.

clang/test/Frontend/rewrite-includes-macros.cpp
15

I guess the missing newline at end of file isn't one of the aspects that needs to be tested?

LGTM, thanks for adding a testcase!

This revision is now accepted and ready to land.Apr 6 2021, 12:21 PM
aganea marked an inline comment as done.Apr 6 2021, 12:32 PM
aganea added inline comments.
clang/test/Frontend/rewrite-includes-macros.cpp
15

It is not indeed, I'll fix that, thanks!

This revision was automatically updated to reflect the committed changes.
aganea marked an inline comment as done.