summaryrefslogtreecommitdiffstats
path: root/lib/AST/ParentMap.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-05-12 05:36:57 +0000
committerCraig Topper <craig.topper@gmail.com>2014-05-12 05:36:57 +0000
commit613c4e1cde9bc967e9610869c5eacc6ec74c39ef (patch)
treea827c7967a1adf7c2d9665ccc1fe1983754788dc /lib/AST/ParentMap.cpp
parent1a751e402717efb1b1321ab310700ce79a302da8 (diff)
[C++11] Use 'nullptr'. AST edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ParentMap.cpp')
-rw-r--r--lib/AST/ParentMap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp
index ff44d938d3..a991302a25 100644
--- a/lib/AST/ParentMap.cpp
+++ b/lib/AST/ParentMap.cpp
@@ -37,7 +37,7 @@ static void BuildParentMap(MapTy& M, Stmt* S,
// If we are rebuilding the map, clear out any existing state.
if (M[POE->getSyntacticForm()])
for (Stmt::child_range I = S->children(); I; ++I)
- M[*I] = 0;
+ M[*I] = nullptr;
M[POE->getSyntacticForm()] = S;
BuildParentMap(M, POE->getSyntacticForm(), OV_Transparent);
@@ -92,7 +92,7 @@ static void BuildParentMap(MapTy& M, Stmt* S,
}
}
-ParentMap::ParentMap(Stmt* S) : Impl(0) {
+ParentMap::ParentMap(Stmt *S) : Impl(nullptr) {
if (S) {
MapTy *M = new MapTy();
BuildParentMap(*M, S);
@@ -120,7 +120,7 @@ void ParentMap::setParent(const Stmt *S, const Stmt *Parent) {
Stmt* ParentMap::getParent(Stmt* S) const {
MapTy* M = (MapTy*) Impl;
MapTy::iterator I = M->find(S);
- return I == M->end() ? 0 : I->second;
+ return I == M->end() ? nullptr : I->second;
}
Stmt *ParentMap::getParentIgnoreParens(Stmt *S) const {
@@ -146,7 +146,7 @@ Stmt *ParentMap::getParentIgnoreParenImpCasts(Stmt *S) const {
}
Stmt *ParentMap::getOuterParenParent(Stmt *S) const {
- Stmt *Paren = 0;
+ Stmt *Paren = nullptr;
while (isa<ParenExpr>(S)) {
Paren = S;
S = getParent(S);