diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 5d9b69c844..cec1aeafac 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1139,6 +1139,8 @@ Sema::BuildDeclarationNameExpr(SourceLocation Loc, NamedDecl *D, MarkDeclarationReferenced(Loc, D); if (PerformObjectMemberConversion(This, D)) return ExprError(); + if (DiagnoseUseOfDecl(D, Loc)) + return ExprError(); return Owned(new (Context) MemberExpr(This, true, D, Loc, MemberType)); } |