This is an archive of the discontinued LLVM Phabricator instance.

Implementation of core DR580 and C++11 member access rules
ClosedPublic

Authored by ismailp on Apr 19 2013, 3:07 PM.

Details

Reviewers
rsmith
ismailp
Summary

This patch implements resolution in core DR580, which is included in the C++11 standard. I have also changed variable names to match with LLVM style.

Diff Detail

Event Timeline

silvas added inline comments.Apr 19 2013, 5:05 PM
lib/Sema/SemaAccess.cpp
1487

While you're fixing style, you can probably bump the DC = FN statement onto the next line, as is more common.

ismailp updated this revision to Unknown Object (????).Apr 20 2013, 2:14 AM

As a part of style changes, DC = FN moved to next line.

rsmith added inline comments.Apr 20 2013, 5:29 AM
lib/Sema/SemaAccess.cpp
1490

This should either be cast<DeclContext> or should not assign to DC if the templated decl is not a DeclContext (that is, if it's an alias template). I think we shouldn't get here for alias templates, so the cast<> is probably the right option; please add some testcases for that.

ismailp updated this revision to Unknown Object (????).Apr 22 2013, 2:10 PM

I have added a few test cases for alias templates, a function template - to ensure I didn't break it - and extended previous one slightly. I initially had a FIXME for alias templates, but removed it right before I submitted the patch. I can't find a way to access a private variable/field from an alias template context.

ismailp accepted this revision.Aug 10 2014, 3:23 PM
ismailp added a reviewer: ismailp.
This revision is now accepted and ready to land.Aug 10 2014, 3:23 PM
ismailp closed this revision.Aug 10 2014, 3:23 PM

Committed in r180707.