summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-01-26 19:01:06 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-01-26 19:01:06 +0000
commit1660a5d2983030e92c372be4746adc35489e552e (patch)
tree5b61cc6278e1de71ae78a018c537d69af70bfb9a /clang/lib/StaticAnalyzer
parent2c8592a80f8be40f9a3e1289c8eaa8abaa9f6d9e (diff)
downloadbcm5719-llvm-1660a5d2983030e92c372be4746adc35489e552e.tar.gz
bcm5719-llvm-1660a5d2983030e92c372be4746adc35489e552e.zip
Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16567 llvm-svn: 258836
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp6
-rw-r--r--clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
index 26ffee827cf..75aefc0e838 100644
--- a/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
@@ -54,10 +54,10 @@ class VforkChecker : public Checker<check::PreCall, check::PostCall,
bool isCallWhitelisted(const IdentifierInfo *II, CheckerContext &C) const;
void reportBug(const char *What, CheckerContext &C,
- const char *Details = 0) const;
+ const char *Details = nullptr) const;
public:
- VforkChecker() : II_vfork(0) {}
+ VforkChecker() : II_vfork(nullptr) {}
void checkPreCall(const CallEvent &Call, CheckerContext &C) const;
void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
@@ -107,7 +107,7 @@ bool VforkChecker::isCallWhitelisted(const IdentifierInfo *II,
"execv",
"execvp",
"execvpe",
- 0,
+ nullptr
};
ASTContext &AC = C.getASTContext();
diff --git a/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp b/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp
index d6aeceb1457..ed41914ebd0 100644
--- a/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp
@@ -75,8 +75,8 @@ bool clang::ento::containsBuiltinOffsetOf(const Stmt *S) {
// Extract lhs and rhs from assignment statement
std::pair<const clang::VarDecl *, const clang::Expr *>
clang::ento::parseAssignment(const Stmt *S) {
- const VarDecl *VD = 0;
- const Expr *RHS = 0;
+ const VarDecl *VD = nullptr;
+ const Expr *RHS = nullptr;
if (auto Assign = dyn_cast_or_null<BinaryOperator>(S)) {
if (Assign->isAssignmentOp()) {
OpenPOWER on IntegriCloud