This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Avoid a Microsoft SAL macro.
ClosedPublic

Authored by pkasting on Apr 29 2022, 1:24 PM.

Details

Diff Detail

Event Timeline

pkasting created this revision.Apr 29 2022, 1:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2022, 1:24 PM
pkasting requested review of this revision.Apr 29 2022, 1:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2022, 1:25 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante requested changes to this revision.Apr 30 2022, 3:46 AM
Mordante added a subscriber: Mordante.

I didn't look closely at the patch, but no objections against this direction.
The CI fails since you missed some __bounds. I'll review the patch after the CI is green.

This revision now requires changes to proceed.Apr 30 2022, 3:46 AM
pkasting updated this revision to Diff 426240.Apr 30 2022, 11:02 AM

More bounds. Format.

pkasting updated this revision to Diff 426250.Apr 30 2022, 2:23 PM

More formatting.

The MSAN failure doesn't look like me.

Also looks like there are bugs in clang-format (e.g. nasty_macros.compile.pass.cpp line 81), but if I skip it the linter complains :P

PTAL?

The MSAN failure doesn't look like me.

Correct that was main being broken. Please rebase your patch before the next iteration, that should fix these build errors.

libcxx/include/__functional/perfect_forward.h
34

I'm not thrilled by the trailing double underscore, this deviates from our coding style.
Maybe change __bound_ to __bound_args_ in this file, please also update the template name to _BoundArgs.

Please make similar changes at other places, having function arguments with a trailing underscore will lead to confusion. If you're having trouble finding good names, leave a comment to the names you need assistance with.

libcxx/test/libcxx/nasty_macros.compile.pass.cpp
91

Format errors aren't hard errors, so feel free to ignore them.
(At some point we should decide what we want with formatting.)

pkasting updated this revision to Diff 427021.May 4 2022, 8:42 AM

Review comments

Rebased, but now I got a strange AIX timeout. Presumably this is also flake or trunk bustage; PTAL?

philnik added a subscriber: philnik.May 4 2022, 1:08 PM

Rebased, but now I got a strange AIX timeout. Presumably this is also flake or trunk bustage; PTAL?

You can ignore the timeout. The test is right on the edge of timing out.

Mordante accepted this revision.May 5 2022, 8:48 AM

LGTM modulo some nits, please fix them before landing this patch.

libcxx/include/__functional/perfect_forward.h
34

Next time when you address review comments can you mark the comment as done? That makes reviewing easier.

37–85

Minor nit.

libcxx/include/__iterator/advance.h
120

Same for the other comments.

libcxx/include/__ranges/iota_view.h
381

We don't indent nested namespaces.

This revision is now accepted and ready to land.May 5 2022, 8:48 AM
pkasting updated this revision to Diff 427365.May 5 2022, 9:51 AM
pkasting marked 6 inline comments as done.

Review comments

I don't have LLVM commit permissions; can you commit for me?

Landed on your behalf.

This revision was landed with ongoing or failed builds.May 5 2022, 11:08 AM
This revision was automatically updated to reflect the committed changes.
ldionne added a subscriber: ldionne.May 6 2022, 9:35 AM
ldionne added inline comments.
libcxx/include/__functional/perfect_forward.h
59–62

I am not thrilled by this reformatting. There is a reason why we align things like that. We do it consistently everywhere so that we can grep more easily and change these write-it-three-times if needed.

ldionne added inline comments.May 6 2022, 9:46 AM
libcxx/include/__functional/perfect_forward.h
34

I think this also made the indentation inconsistent (2 spaces vs 4 spaces). After the change, there is a mix of the two indentations in the file.