This is an archive of the discontinued LLVM Phabricator instance.

[C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExported
ClosedPublic

Authored by ChuanqiXu on Jan 25 2022, 3:20 AM.

Details

Summary

Since only the decls inhabit in a namespace scope could be exported, it is not meaningful to check it in CheckRedeclarationExported, which implements [module.interface]/p6: http://eel.is/c++draft/module.interface#6.

Diff Detail

Event Timeline

ChuanqiXu requested review of this revision.Jan 25 2022, 3:20 AM
ChuanqiXu created this revision.
ChuanqiXu added inline comments.Jan 25 2022, 3:21 AM
clang/lib/Sema/SemaDecl.cpp
1643–1648

This is formatted by clang-format, the original may be too long:

if (!New->getLexicalDeclContext()->getNonTransparentContext()->isFileContext() ||
    ...
urnathan accepted this revision.Jan 25 2022, 5:45 AM
urnathan added inline comments.
clang/lib/Sema/SemaDecl.cpp
1643–1648

I like continuation lines where the operator is on the start of the new line rather than the end of the old one :)

This revision is now accepted and ready to land.Jan 25 2022, 5:45 AM
This revision was landed with ongoing or failed builds.Jan 25 2022, 6:56 PM
This revision was automatically updated to reflect the committed changes.