This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][z/OS] exclude nasty_macros.h from check-cxx
ClosedPublic

Authored by zibi on Mar 25 2021, 1:47 PM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG4d478121f3bf: [SystemZ][z/OS] exclude nasty_macros.h from check-cxx
Summary

Need to exclude nasty_macros.h from check-cxx on z/OS due to conflicts within system headers.

Sample failure in random_shuffle.depr_in_cxx14.verify.cpp libcxx test.

error: 'error' diagnostics seen but not expected:
Line 1268: expected ')'
Line 1268: unknown type name 'This'
Line 1268: expected ')'

caused by the following macros in nasty_macros.h

#define NASTY_MACRO This should not be expanded!!!
#define _E NASTY_MACRO

The name collision is observed in the following code snippet whre _E is being used as parameter name:

inline int iswalnum(wint_t _E) {return __iswalnum(_E);}

It is reasonable to exclude nasty_macros.h on z/OS similarly as it was done on Windows.

Diff Detail

Event Timeline

zibi created this revision.Mar 25 2021, 1:47 PM
zibi requested review of this revision.Mar 25 2021, 1:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2021, 1:47 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript

I think it'd be useful to put in your commit message (i.e. revision summary) an example of the kind of error that's getting fixed here: what doesn't work and how does it fail?

zibi edited the summary of this revision. (Show Details)Mar 26 2021, 6:22 AM
ldionne accepted this revision.Mar 26 2021, 6:27 AM
This revision is now accepted and ready to land.Mar 26 2021, 6:27 AM
This revision was automatically updated to reflect the committed changes.