Skip to content

Commit

Permalink
revert r311839 (ongoing cwg discussion)
Browse files Browse the repository at this point in the history
apologies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311975 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
faisalv committed Aug 29, 2017
1 parent e6c2e94 commit e4f522b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion lib/Sema/SemaExprMember.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ Sema::BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS,
return BuildImplicitMemberExpr(SS, TemplateKWLoc, R, TemplateArgs, true, S);

case IMA_Mixed:
case IMA_Mixed_Unrelated:
case IMA_Unresolved:
return BuildImplicitMemberExpr(SS, TemplateKWLoc, R, TemplateArgs, false,
S);
Expand All @@ -251,7 +252,6 @@ Sema::BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS,
Diag(R.getNameLoc(), diag::warn_cxx98_compat_non_static_member_use)
<< R.getLookupNameInfo().getName();
// Fall through.
case IMA_Mixed_Unrelated:
case IMA_Static:
case IMA_Abstract:
case IMA_Mixed_StaticContext:
Expand Down
22 changes: 0 additions & 22 deletions test/SemaCXX/member-expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,3 @@ namespace pr16676 {
.i; // expected-error {{member reference type 'pr16676::S *' is a pointer; did you mean to use '->'}}
}
}

namespace unrelated_class_instance_call_should_be_illformed {


struct A {
void bar(int) { }
static void bar(double) { }

void g(int*);
static void g(char *);
};


struct B {
void f() {
A::bar(3); //expected-error{{call to non-static member}}
A::g((int*)0); //expected-error{{call to non-static member}}
}
};


} // ns unrelated_class_mixed_static_nonstatic_call_should_be_illformed

0 comments on commit e4f522b

Please sign in to comment.