aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 09474452a2..09f6efb097 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -719,7 +719,7 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType,
if (lhsType->isPointerType() || lhsType->isBlockPointerType()) {
if (DeclRefExpr *DR = EvalAddr(RetValExp))
Diag(DR->getLocStart(), diag::warn_ret_stack_addr)
- << DR->getDecl()->getIdentifier() << RetValExp->getSourceRange();
+ << DR->getDecl()->getDeclName() << RetValExp->getSourceRange();
// Skip over implicit cast expressions when checking for block expressions.
if (ImplicitCastExpr *IcExpr =
@@ -735,8 +735,7 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType,
// Check for a reference to the stack
if (DeclRefExpr *DR = EvalVal(RetValExp))
Diag(DR->getLocStart(), diag::warn_ret_stack_ref)
- << DR->getDecl()->getIdentifier()
- << RetValExp->getSourceRange();
+ << DR->getDecl()->getDeclName() << RetValExp->getSourceRange();
}
}