This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add test for CWG1821
ClosedPublic

Authored by Endill on Apr 22 2023, 11:44 AM.

Details

Reviewers
shafik
Group Reviewers
Restricted Project
Commits
rG5cda0d165a75: [clang] Add test for CWG1821
Summary

P1787: My clarification in “Where can namespace-scope functions and variables be redeclared?” is applied, resolving CWG1821.
Wording: (If the declaration is not a friend declaration:) If the id-expression in a declarator-id is a qualified-id Q, let S be its lookup context; the declaration shall inhabit a namespace scope. ([dcl.meaning]/1)

Diff Detail

Event Timeline

Endill created this revision.Apr 22 2023, 11:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 11:44 AM
Endill requested review of this revision.Apr 22 2023, 11:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 11:44 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
shafik accepted this revision.Apr 24 2023, 1:40 PM

LGTM

This revision is now accepted and ready to land.Apr 24 2023, 1:40 PM
This revision was automatically updated to reflect the committed changes.