diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-11-15 23:33:34 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-11-15 23:33:34 +0000 |
commit | e614d6c6b12f20f0072c20eb312db2e80d1cb051 (patch) | |
tree | de5cc2b67890c9484f412eabf64b4f4267c04f51 /lib/Sema/SemaExpr.cpp | |
parent | d2536a604f59a3cca491f175bf1e49eeca49163b (diff) |
In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works inside static functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index cfa5feabb3..362aea9a74 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1534,7 +1534,7 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CXXMethodDecl *DepMethod = cast_or_null<CXXMethodDecl>( CurMethod->getInstantiatedFromMemberFunction()); if (DepMethod) { - if (getLangOptions().MicrosoftExt) + if (getLangOptions().MicrosoftMode) diagnostic = diag::warn_found_via_dependent_bases_lookup; Diag(R.getNameLoc(), diagnostic) << Name << FixItHint::CreateInsertion(R.getNameLoc(), "this->"); @@ -1560,6 +1560,8 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, Diag(R.getNameLoc(), diagnostic) << Name; } } else { + if (getLangOptions().MicrosoftMode) + diagnostic = diag::warn_found_via_dependent_bases_lookup; Diag(R.getNameLoc(), diagnostic) << Name; } |