This is an archive of the discontinued LLVM Phabricator instance.

[AST] default implementation is possible for non-member functions in C++2a.
ClosedPublic

Authored by hokein on May 20 2020, 3:53 AM.

Details

Summary

Make RAV not visit the default function decl by default.
Also update some stale comments on FunctionDecl::isDefault.

Diff Detail

Event Timeline

hokein created this revision.May 20 2020, 3:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2020, 3:53 AM
rsmith accepted this revision.May 20 2020, 10:58 AM
rsmith added a subscriber: rsmith.

Looks good subject to some comment tweaks.

clang/include/clang/AST/Decl.h
2128–2129

In passing, please remove the "per C++0x" here and below. This isn't a new thing whose existence we need to remind readers of any more! Also, replace "C++2a" with "C++20" or remove that too; C++20 is complete so we shouldn't be using its pre-release codename any more.

The term is "defaulted comparisons", not "default comparisons". (I'd also remove the "friend" since that's at best incidental, especially after http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2085r0.html).

This revision is now accepted and ready to land.May 20 2020, 10:58 AM
hokein updated this revision to Diff 265978.May 25 2020, 1:35 AM

Address comments.

This revision was automatically updated to reflect the committed changes.