diff options
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 024838d4d4..01c141e57f 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -781,10 +781,10 @@ static AccessResult HasAccess(Sema &S, // Emulate a MSVC bug where the creation of pointer-to-member // to protected member of base class is allowed but only from - // a static function. - if (S.getLangOpts().MicrosoftMode && !EC.Functions.empty() && - EC.Functions.front()->getStorageClass() == SC_Static) - return AR_accessible; + // a static function member functions. + if (S.getLangOpts().MicrosoftMode && !EC.Functions.empty()) + if (CXXMethodDecl* MD = dyn_cast<CXXMethodDecl>(EC.Functions.front())) + if (MD->isStatic()) return AR_accessible; // Despite the standard's confident wording, there is a case // where you can have an instance member that's neither in a |