[PATCH] D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 12 12:02:22 PDT 2018


ahatanak updated this revision to Diff 138066.
ahatanak added a comment.

The new patch passes the calling context to CheckNonDependent so that Sema::CheckAddressOfMemberAccess uses the correct context to check accessibility of explicit template arguments. I initially tried moving the declaration of SavedContext in Sema::FinishTemplateArgumentDeduction to after the call to CheckNonDependent, but that caused test/SemaCXX/cxx1z-class-template-argument-deduction.cpp to fail. It seems like it changes the way lookup of default template arguments is done when the context (which is a CXXDeductionGuideDecl in the failing test case) is not set before ConvertDeducedTemplateArguments is called.


https://reviews.llvm.org/D36918

Files:
  include/clang/Sema/Sema.h
  lib/Sema/SemaTemplateDeduction.cpp
  test/SemaCXX/access.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36918.138066.patch
Type: text/x-patch
Size: 3755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180312/8a2af0e8/attachment.bin>


More information about the cfe-commits mailing list