diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 173a4f43a911175643bda81ee675e8d9269056ea (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /lib/StaticAnalyzer/Core/BasicValueFactory.cpp | |
parent | 88f7a7d5251a2d813460274c92decc143a11569b (diff) | |
download | FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'lib/StaticAnalyzer/Core/BasicValueFactory.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Core/BasicValueFactory.cpp b/lib/StaticAnalyzer/Core/BasicValueFactory.cpp index a6c400f..0e90566 100644 --- a/lib/StaticAnalyzer/Core/BasicValueFactory.cpp +++ b/lib/StaticAnalyzer/Core/BasicValueFactory.cpp @@ -173,12 +173,12 @@ BasicValueFactory::evalAPSInt(BinaryOperator::Opcode Op, // FIXME: Expand these checks to include all undefined behavior. if (V2.isSigned() && V2.isNegative()) - return NULL; + return nullptr; uint64_t Amt = V2.getZExtValue(); - if (Amt > V1.getBitWidth()) - return NULL; + if (Amt >= V1.getBitWidth()) + return nullptr; return &getValue( V1.operator<<( (unsigned) Amt )); } @@ -191,12 +191,12 @@ BasicValueFactory::evalAPSInt(BinaryOperator::Opcode Op, // FIXME: Expand these checks to include all undefined behavior. if (V2.isSigned() && V2.isNegative()) - return NULL; + return nullptr; uint64_t Amt = V2.getZExtValue(); - if (Amt > V1.getBitWidth()) - return NULL; + if (Amt >= V1.getBitWidth()) + return nullptr; return &getValue( V1.operator>>( (unsigned) Amt )); } |