summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 5d9b69c8448..cec1aeafac5 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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));
}
OpenPOWER on IntegriCloud