diff options
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index df428971d1..7e6c6362de 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -716,9 +716,8 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType, // Perform checking for returned stack addresses. if (lhsType->isPointerType() || lhsType->isBlockPointerType()) { if (DeclRefExpr *DR = EvalAddr(RetValExp)) - Diag(DR->getLocStart(), diag::warn_ret_stack_addr, - DR->getDecl()->getIdentifier()->getName(), - RetValExp->getSourceRange()); + Diag(DR->getLocStart(), diag::warn_ret_stack_addr) + << DR->getDecl()->getIdentifier() << RetValExp->getSourceRange(); // Skip over implicit cast expressions when checking for block expressions. if (ImplicitCastExpr *IcExpr = @@ -734,7 +733,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()->getName() + << DR->getDecl()->getIdentifier() << RetValExp->getSourceRange(); } } |