This is an archive of the discontinued LLVM Phabricator instance.

Revert "Revert "[clang][pp] adds '#pragma include_instead'""
ClosedPublic

Authored by cjdb on Jul 27 2021, 11:13 AM.

Details

Diff Detail

Event Timeline

cjdb requested review of this revision.Jul 27 2021, 11:13 AM
cjdb created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2021, 11:13 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hans added inline comments.Jul 27 2021, 11:31 AM
clang/test/PCH/ms-pch-macro-include_instead-regression.c
24

This is really the interesting part. Maybe the other checks and macros could be removed, if that's enough to trigger the crash?

cjdb updated this revision to Diff 362116.Jul 27 2021, 11:34 AM
cjdb retitled this revision from Revert "Revert "[clang][pp] adds '#pragma include_instead'"" Includes regression test for problem noted by @hans. to Revert "Revert "[clang][pp] adds '#pragma include_instead'"".
cjdb edited the summary of this revision. (Show Details)

updates commit message

Generally LGTM, but the CI is failing.

clang/test/PCH/ms-pch-macro-include_instead-regression.c
4

This is getting a shell parse error on Windows according to the CI runner. I suspect you need to quote the -pch-through-header= argument.

cjdb updated this revision to Diff 362479.Jul 28 2021, 11:33 AM
aaron.ballman accepted this revision.Jul 29 2021, 4:34 AM

LGTM with the testing and formatting fix.

clang/include/clang/Basic/DiagnosticLexKinds.td
307

80-col wrapping.

clang/test/PCH/ms-pch-macro-include_instead-regression.c
3

This fixes the shell issue when I try it out locally on Windows.

This revision is now accepted and ready to land.Jul 29 2021, 4:34 AM
cjdb updated this revision to Diff 362806.Jul 29 2021, 9:14 AM
cjdb marked an inline comment as done.
cjdb added a subscriber: tstellar.

fixes up formatting and testing

Will merge post-CI. @aaron.ballman do you approve this to be cherry-picked into LLVM 13? (cc @tstellar)

clang/include/clang/Basic/DiagnosticLexKinds.td
307

Surprised this made it past the first time.

clang/test/PCH/ms-pch-macro-include_instead-regression.c
3

Thanks!

fixes up formatting and testing

Will merge post-CI. @aaron.ballman do you approve this to be cherry-picked into LLVM 13? (cc @tstellar)

Thanks for checking! I do approve it -- it was intended to make it before the branch point from the previous review.

This revision was automatically updated to reflect the committed changes.