diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
| commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
| tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /lib/StaticAnalyzer/Core/BasicValueFactory.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
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 a6c400f3704d..0e90566839ca 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 )); } |
