diff options
author | Anna Zaks <ganna@apple.com> | 2011-12-08 22:38:43 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-12-08 22:38:43 +0000 |
commit | 5fc7def35ee858791e591d005b4ae343632ca931 (patch) | |
tree | 36ada81ce8acc55dca8eccb80eae8253e4abeb11 /lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | |
parent | 1e4f68ce0bffd9a6b9a8fc56d1766177382788e3 (diff) |
[analyzer] If memory region is tainted mark data as tainted.
+ random comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp b/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp index da07d8ad0f..89d9dc0242 100644 --- a/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ b/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -97,10 +97,12 @@ SVal SimpleSValBuilder::evalCastFromNonLoc(NonLoc val, QualType castTy) { return UnknownVal(); } + // If value is a non integer constant, produce unknown. if (!isa<nonloc::ConcreteInt>(val)) return UnknownVal(); - // Only handle casts from integers to integers. + // Only handle casts from integers to integers - if val is an integer constant + // being cast to a non integer type, produce unknown. if (!isLocType && !castTy->isIntegerType()) return UnknownVal(); |