diff options
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 09474452a28..09f6efb0970 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/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(); } } |