aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-19 08:23:25 +0000
committerChris Lattner <sabre@nondot.org>2008-11-19 08:23:25 +0000
commit3c73c41cefcfe76f36b7bed72c9f1ec195490951 (patch)
treeaaf7a81af66b31375490e1aa494c576c6903f2cf /lib/Sema/SemaChecking.cpp
parent7e3e9b152e06edf329ceb32190d3255f248d4d5f (diff)
stop calling II::getName() unnecesarily in sema
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp7
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();
}
}