[cfe-commits] r148080 - /cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
Anna Zaks
ganna at apple.com
Thu Jan 12 16:56:51 PST 2012
Author: zaks
Date: Thu Jan 12 18:56:51 2012
New Revision: 148080
URL: http://llvm.org/viewvc/llvm-project?rev=148080&view=rev
Log:
[analyzer] Taint: when looking up a binding, provide the type.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp?rev=148080&r1=148079&r2=148080&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Thu Jan 12 18:56:51 2012
@@ -243,7 +243,10 @@
return 0;
}
- SVal Val = State->getSVal(*AddrLoc);
+ const PointerType *ArgTy =
+ dyn_cast<PointerType>(Arg->getType().getCanonicalType().getTypePtr());
+ assert(ArgTy);
+ SVal Val = State->getSVal(*AddrLoc, ArgTy->getPointeeType());
return Val.getAsSymbol();
}
More information about the cfe-commits
mailing list