More improvements to checking allocation and deallocation functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 9593474..4d0d422 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -95,8 +95,8 @@
   if (const Expr *E = getInit())
     return E->getSourceRange();
   
-  if (const Expr *E = getUninstantiatedDefaultArg())
-    return E->getSourceRange();
+  if (hasUninstantiatedDefaultArg())
+    return getUninstantiatedDefaultArg()->getSourceRange();
     
   return SourceRange();
 }