This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Reenable ranges for clang-cl
ClosedPublic

Authored by mstorsjo on Apr 30 2021, 4:02 AM.

Details

Reviewers
cjdb
curdeius
Quuxplusone
Group Reviewers
Restricted Project
Commits
rG8d0dfa0d5746: [libcxx] Reenable ranges for clang-cl
Summary

This reverts a224bf8ec423b42eea251407e7a6cc8398a5edf4 and fixes the
underlying issue.

The underlying issue is simply that MSVC headers contains a define
like #define __in, where __in is one macro in the MSVC Source
Code Annotation Language, defined in sal.h

Just use a different variable name than __in
__indirectly_readable_impl, and add __in to nasty_macros.h just
like the existing __out.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Apr 30 2021, 4:02 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2021, 4:02 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
curdeius accepted this revision as: curdeius.Apr 30 2021, 4:27 AM
curdeius added a subscriber: curdeius.

LGTM pending CI.

mstorsjo updated this revision to Diff 341847.Apr 30 2021, 4:54 AM

Removed some more XFAILs that had been added since the initial patch that is reverted.

Per http://web.archive.org/web/20110221041226/http://msdn.microsoft.com/en-us/library/ms235402(v=vs.80).aspx , I think it would make sense to nasty-macro some other identifiers while you're in the area.
I suggest __inout, __opt, __z, __nz, __full, __part, __deref.
(There are a-combinatorial-explosion-more reserved identifiers, but I don't think libc++ would ever accidentally stumble into any of them.)

mstorsjo edited the summary of this revision. (Show Details)Apr 30 2021, 6:36 AM
mstorsjo updated this revision to Diff 341882.Apr 30 2021, 6:38 AM

Add a couple more identifiers to the nasty macros header.

cjdb accepted this revision.Apr 30 2021, 10:20 AM

Will probably need a rebase, but LGTM. Thanks for getting to the bottom of this!

Quuxplusone accepted this revision.Apr 30 2021, 1:52 PM

LGTM % alphabetization

libcxx/test/support/nasty_macros.h
56–68

Please alphabetize. (So that the next person to add an identifier here doesn't have to make any decisions about where to put it "thematically" — it'll be a nice mechanical decision. Plus easy to check for duplicates.)

This revision is now accepted and ready to land.Apr 30 2021, 1:52 PM
This revision was landed with ongoing or failed builds.May 1 2021, 1:16 AM
This revision was automatically updated to reflect the committed changes.