diff options
Diffstat (limited to 'include/clang/Lex/MacroInfo.h')
-rw-r--r-- | include/clang/Lex/MacroInfo.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Lex/MacroInfo.h b/include/clang/Lex/MacroInfo.h index cfbb376c16..7c04031570 100644 --- a/include/clang/Lex/MacroInfo.h +++ b/include/clang/Lex/MacroInfo.h @@ -108,7 +108,7 @@ private: bool UsedForHeaderGuard : 1; ~MacroInfo() { - assert(ArgumentList == 0 && "Didn't call destroy before dtor!"); + assert(!ArgumentList && "Didn't call destroy before dtor!"); } public: @@ -119,7 +119,7 @@ public: /// This restores this MacroInfo to a state where it can be reused for other /// devious purposes. void FreeArgumentList() { - ArgumentList = 0; + ArgumentList = nullptr; NumArguments = 0; } @@ -179,7 +179,7 @@ public: /// this macro. void setArgumentList(IdentifierInfo* const *List, unsigned NumArgs, llvm::BumpPtrAllocator &PPAllocator) { - assert(ArgumentList == 0 && NumArguments == 0 && + assert(ArgumentList == nullptr && NumArguments == 0 && "Argument list already set!"); if (NumArgs == 0) return; @@ -362,7 +362,7 @@ protected: bool IsPublic : 1; MacroDirective(Kind K, SourceLocation Loc) - : Previous(0), Loc(Loc), MDKind(K), IsFromPCH(false), + : Previous(nullptr), Loc(Loc), MDKind(K), IsFromPCH(false), IsImported(false), IsAmbiguous(false), IsPublic(true) { } @@ -394,7 +394,7 @@ public: bool IsPublic; public: - DefInfo() : DefDirective(0) { } + DefInfo() : DefDirective(nullptr) { } DefInfo(DefMacroDirective *DefDirective, SourceLocation UndefLoc, bool isPublic) @@ -414,7 +414,7 @@ public: bool isPublic() const { return IsPublic; } - bool isValid() const { return DefDirective != 0; } + bool isValid() const { return DefDirective != nullptr; } bool isInvalid() const { return !isValid(); } LLVM_EXPLICIT operator bool() const { return isValid(); } @@ -529,13 +529,13 @@ inline SourceLocation MacroDirective::DefInfo::getLocation() const { inline MacroInfo *MacroDirective::DefInfo::getMacroInfo() { if (isInvalid()) - return 0; + return nullptr; return DefDirective->getInfo(); } inline MacroDirective::DefInfo MacroDirective::DefInfo::getPreviousDefinition() { - if (isInvalid() || DefDirective->getPrevious() == 0) + if (isInvalid() || DefDirective->getPrevious() == nullptr) return DefInfo(); return DefDirective->getPrevious()->getDefinition(); } |