This is an archive of the discontinued LLVM Phabricator instance.

Implement DR 373 "Lookup on namespace qualified name in using-directive"
ClosedPublic

Authored by mgehre on Mar 10 2017, 2:27 PM.

Details

Summary

3.4.6 [basic.lookup.udir] paragraph 1:
In a using-directive or namespace-alias-definition, during the lookup for a namespace-name or for a name in a nested-name-specifier, only namespace names are considered.

Event Timeline

mgehre created this revision.Mar 10 2017, 2:27 PM
mgehre updated this revision to Diff 91418.Mar 10 2017, 2:33 PM

clang-format

rsmith added inline comments.Mar 10 2017, 2:38 PM
test/CXX/drs/dr3xx.cpp
911

This should say "dr373: 5" to indicate the first version of Clang with the fix.

www/cxx_dr_status.html
2282

... and this file should be regenerated so it lists the version.

mgehre updated this revision to Diff 91424.Mar 10 2017, 3:00 PM

Added clang version to test and regenerated cxx_dr_status.html

rsmith edited edge metadata.Mar 11 2017, 11:19 AM

Functionally, this looks good. How do the diagnostics look in the case where lookup only finds a non-namespace name? Eg,

struct A { struct B {}; };
namespace X = A::B;
mgehre updated this revision to Diff 91956.Mar 15 2017, 4:16 PM

Improve diagnostics and add tests for them.

rsmith accepted this revision.Mar 17 2017, 9:12 AM

Thanks, LGTM

This revision is now accepted and ready to land.Mar 17 2017, 9:12 AM
This revision was automatically updated to reflect the committed changes.