aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/GRExprEngineInternalChecks.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Analysis/GRExprEngineInternalChecks.cpp b/lib/Analysis/GRExprEngineInternalChecks.cpp
index d772744f17..cc5762267b 100644
--- a/lib/Analysis/GRExprEngineInternalChecks.cpp
+++ b/lib/Analysis/GRExprEngineInternalChecks.cpp
@@ -216,6 +216,15 @@ public:
R = CL->getSourceRange();
}
+ else if (const AllocaRegion* AR = dyn_cast<AllocaRegion>(V.getRegion())) {
+ const Expr* ARE = AR->getExpr();
+ SourceLocation L = ARE->getLocStart();
+ R = ARE->getSourceRange();
+
+ os << "Address of stack memory allocated by call to alloca() on line "
+ << BR.getSourceManager().getLogicalLineNumber(L)
+ << " returned.";
+ }
else {
os << "Address of stack memory associated with local variable '"
<< V.getRegion()->getString() << "' returned.";