summaryrefslogtreecommitdiffstats
path: root/clang/Analysis/GRSimpleVals.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-29 23:53:11 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-29 23:53:11 +0000
commit51e87ea210c1d70ea559f8f478a5f92d346cf31d (patch)
tree34987db27e1fed070e6f2176302de1f859047bb6 /clang/Analysis/GRSimpleVals.cpp
parente8ddaba1697c35396a210ff4790a7c03a9f33b26 (diff)
downloadbcm5719-llvm-51e87ea210c1d70ea559f8f478a5f92d346cf31d.tar.gz
bcm5719-llvm-51e87ea210c1d70ea559f8f478a5f92d346cf31d.zip
Added extra check for calls to functions where we pass undefined values
as arguments. llvm-svn: 47778
Diffstat (limited to 'clang/Analysis/GRSimpleVals.cpp')
-rw-r--r--clang/Analysis/GRSimpleVals.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/Analysis/GRSimpleVals.cpp b/clang/Analysis/GRSimpleVals.cpp
index d6c133f2dc2..a2b6c95d2f5 100644
--- a/clang/Analysis/GRSimpleVals.cpp
+++ b/clang/Analysis/GRSimpleVals.cpp
@@ -106,6 +106,11 @@ unsigned RunGRSimpleVals(CFG& cfg, FunctionDecl& FD, ASTContext& Ctx,
CheckerState->bad_calls_begin(),
CheckerState->bad_calls_end(),
"Call using a NULL or undefined function pointer value.");
+
+ EmitWarning(Diag, SrcMgr,
+ CheckerState->undef_arg_begin(),
+ CheckerState->undef_arg_end(),
+ "Pass-by-value argument in function or message expression is undefined.");
#ifndef NDEBUG
if (Visualize) CheckerState->ViewGraph();
OpenPOWER on IntegriCloud