diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-27 02:45:47 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-27 02:45:47 +0000 |
commit | 0dbb783c7be1756482c491b3635dd07dd5fe712c (patch) | |
tree | 477bfcd6d42f6152fccaed23f0f20730b629da2a /clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | |
parent | 7b15cf888453aa9d0828b6121f7bd05138f8fe0a (diff) | |
download | bcm5719-llvm-0dbb783c7be1756482c491b3635dd07dd5fe712c.tar.gz bcm5719-llvm-0dbb783c7be1756482c491b3635dd07dd5fe712c.zip |
[C++11] Use 'nullptr'. StaticAnalyzer edition.
llvm-svn: 209642
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp index 8097727529d..f38ce77dc6b 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp @@ -65,7 +65,7 @@ void MallocOverflowSecurityChecker::CheckMallocArgument( conditional expression, an operation that could reduce the range of the result, or anything too complicated :-). */ const Expr * e = TheArgument; - const BinaryOperator * mulop = NULL; + const BinaryOperator * mulop = nullptr; for (;;) { e = e->IgnoreParenImpCasts(); @@ -73,7 +73,7 @@ void MallocOverflowSecurityChecker::CheckMallocArgument( const BinaryOperator * binop = dyn_cast<BinaryOperator>(e); BinaryOperatorKind opc = binop->getOpcode(); // TODO: ignore multiplications by 1, reject if multiplied by 0. - if (mulop == NULL && opc == BO_Mul) + if (mulop == nullptr && opc == BO_Mul) mulop = binop; if (opc != BO_Mul && opc != BO_Add && opc != BO_Sub && opc != BO_Shl) return; @@ -94,7 +94,7 @@ void MallocOverflowSecurityChecker::CheckMallocArgument( return; } - if (mulop == NULL) + if (mulop == nullptr) return; // We've found the right structure of malloc argument, now save |