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

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 13:28:42 PDT 2017


Rakete1111 added inline comments.


================
Comment at: lib/Sema/SemaAccess.cpp:1798
+  EffectiveContext EC(CurScope->getEntity());
+  if (IsAccessible(*this, EC, Entity) == ::AR_accessible)
+    return AR_accessible;
----------------
You don't need that scope resolution operator there. Also, I guess you don't have to create `EC`, you can just pass `EffectiveContext(CurScope->getEntity())` directly to `IsAccessible`.


https://reviews.llvm.org/D36918





More information about the cfe-commits mailing list