summaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-05-22 05:54:18 +0000
committerCraig Topper <craig.topper@gmail.com>2014-05-22 05:54:18 +0000
commit5017bb66166679620f1e22de2f507888473e1c89 (patch)
treefcbc6fc3171f8d0b70f34aebf952209af51b1638 /lib/Serialization/ASTWriterDecl.cpp
parentd24fb6c9472187a9e77ea371fd73d92a4f6c69f0 (diff)
downloadclang-5017bb66166679620f1e22de2f507888473e1c89.tar.gz
[C++11] Use 'nullptr'. Serialization edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index 8a463b537c..c6e42d4d31 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/lib/Serialization/ASTWriterDecl.cpp
@@ -277,7 +277,7 @@ void ASTDeclWriter::VisitEnumDecl(EnumDecl *D) {
Record.push_back(MemberInfo->getTemplateSpecializationKind());
Writer.AddSourceLocation(MemberInfo->getPointOfInstantiation(), Record);
} else {
- Writer.AddDeclRef(0, Record);
+ Writer.AddDeclRef(nullptr, Record);
}
if (!D->hasAttrs() &&
@@ -398,7 +398,7 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
Writer.AddTemplateArgumentList(FTSInfo->TemplateArguments, Record);
// Template args as written.
- Record.push_back(FTSInfo->TemplateArgumentsAsWritten != 0);
+ Record.push_back(FTSInfo->TemplateArgumentsAsWritten != nullptr);
if (FTSInfo->TemplateArgumentsAsWritten) {
Record.push_back(FTSInfo->TemplateArgumentsAsWritten->NumTemplateArgs);
for (int i=0, e = FTSInfo->TemplateArgumentsAsWritten->NumTemplateArgs;
@@ -449,8 +449,8 @@ void ASTDeclWriter::VisitObjCMethodDecl(ObjCMethodDecl *D) {
VisitNamedDecl(D);
// FIXME: convert to LazyStmtPtr?
// Unlike C/C++, method bodies will never be in header files.
- bool HasBodyStuff = D->getBody() != 0 ||
- D->getSelfDecl() != 0 || D->getCmdDecl() != 0;
+ bool HasBodyStuff = D->getBody() != nullptr ||
+ D->getSelfDecl() != nullptr || D->getCmdDecl() != nullptr;
Record.push_back(HasBodyStuff);
if (HasBodyStuff) {
Writer.AddStmt(D->getBody());
@@ -757,7 +757,7 @@ void ASTDeclWriter::VisitVarDecl(VarDecl *D) {
!D->hasExtInfo() &&
D->getFirstDecl() == D->getMostRecentDecl() &&
D->getInitStyle() == VarDecl::CInit &&
- D->getInit() == 0 &&
+ D->getInit() == nullptr &&
!isa<ParmVarDecl>(D) &&
!isa<VarTemplateSpecializationDecl>(D) &&
!D->isConstexpr() &&
@@ -806,7 +806,7 @@ void ASTDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
D->getObjCDeclQualifier() == 0 &&
!D->isKNRPromoted() &&
!D->hasInheritedDefaultArg() &&
- D->getInit() == 0 &&
+ D->getInit() == nullptr &&
!D->hasUninstantiatedDefaultArg()) // No default expr.
AbbrevToUse = Writer.getDeclParmVarAbbrev();
@@ -815,7 +815,7 @@ void ASTDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
assert(!D->getTSCSpec() && "PARM_VAR_DECL can't use TLS");
assert(D->getAccess() == AS_none && "PARM_VAR_DECL can't be public/private");
assert(!D->isExceptionVariable() && "PARM_VAR_DECL can't be exception var");
- assert(D->getPreviousDecl() == 0 && "PARM_VAR_DECL can't be redecl");
+ assert(D->getPreviousDecl() == nullptr && "PARM_VAR_DECL can't be redecl");
assert(!D->isStaticDataMember() &&
"PARM_VAR_DECL can't be static data member");
}
@@ -1104,7 +1104,7 @@ void ASTDeclWriter::VisitFriendTemplateDecl(FriendTemplateDecl *D) {
Record.push_back(D->getNumTemplateParameters());
for (unsigned i = 0, e = D->getNumTemplateParameters(); i != e; ++i)
Writer.AddTemplateParameterList(D->getTemplateParameterList(i), Record);
- Record.push_back(D->getFriendDecl() != 0);
+ Record.push_back(D->getFriendDecl() != nullptr);
if (D->getFriendDecl())
Writer.AddDeclRef(D->getFriendDecl(), Record);
else
@@ -1205,7 +1205,7 @@ void ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl(
Writer.AddASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten(), Record);
// These are read/set from/to the first declaration.
- if (D->getPreviousDecl() == 0) {
+ if (D->getPreviousDecl() == nullptr) {
Writer.AddDeclRef(D->getInstantiatedFromMember(), Record);
Record.push_back(D->isMemberSpecialization());
}
@@ -1281,7 +1281,7 @@ void ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl(
Writer.AddASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten(), Record);
// These are read/set from/to the first declaration.
- if (D->getPreviousDecl() == 0) {
+ if (D->getPreviousDecl() == nullptr) {
Writer.AddDeclRef(D->getInstantiatedFromMember(), Record);
Record.push_back(D->isMemberSpecialization());
}
@@ -1348,7 +1348,7 @@ void ASTDeclWriter::VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D) {
} else {
// Rest of NonTypeTemplateParmDecl.
Record.push_back(D->isParameterPack());
- Record.push_back(D->getDefaultArgument() != 0);
+ Record.push_back(D->getDefaultArgument() != nullptr);
if (D->getDefaultArgument()) {
Writer.AddStmt(D->getDefaultArgument());
Record.push_back(D->defaultArgumentWasInherited());