From 210e1aded709f6148f6d0a6c16eb5a16190c5e53 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 17 May 2014 18:49:24 +0000 Subject: [C++11] Use 'nullptr'. ASTMatchers edition. llvm-svn: 209070 --- clang/lib/ASTMatchers/Dynamic/Parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/ASTMatchers/Dynamic/Parser.cpp') diff --git a/clang/lib/ASTMatchers/Dynamic/Parser.cpp b/clang/lib/ASTMatchers/Dynamic/Parser.cpp index 70343811898..25629d99a7c 100644 --- a/clang/lib/ASTMatchers/Dynamic/Parser.cpp +++ b/clang/lib/ASTMatchers/Dynamic/Parser.cpp @@ -58,7 +58,7 @@ class Parser::CodeTokenizer { public: explicit CodeTokenizer(StringRef MatcherCode, Diagnostics *Error) : Code(MatcherCode), StartOfLine(MatcherCode), Line(1), Error(Error), - CodeCompletionLocation(0) { + CodeCompletionLocation(nullptr) { NextToken = getNextToken(); } @@ -90,7 +90,7 @@ private: if (CodeCompletionLocation && CodeCompletionLocation <= Code.data()) { Result.Kind = TokenInfo::TK_CodeCompletion; Result.Text = StringRef(CodeCompletionLocation, 0); - CodeCompletionLocation = 0; + CodeCompletionLocation = nullptr; return Result; } @@ -143,7 +143,7 @@ private: // cause the portion of the identifier before the code completion // location to become a code completion token. if (CodeCompletionLocation == Code.data() + TokenLength) { - CodeCompletionLocation = 0; + CodeCompletionLocation = nullptr; Result.Kind = TokenInfo::TK_CodeCompletion; Result.Text = Code.substr(0, TokenLength); Code = Code.drop_front(TokenLength); @@ -335,7 +335,7 @@ bool Parser::parseMatcherExpressionImpl(const TokenInfo &NameToken, TokenInfo EndToken; { - ScopedContextEntry SCE(this, Ctor ? *Ctor : 0); + ScopedContextEntry SCE(this, Ctor ? *Ctor : nullptr); while (Tokenizer->nextTokenKind() != TokenInfo::TK_Eof) { if (Tokenizer->nextTokenKind() == TokenInfo::TK_CloseParen) { -- cgit v1.2.3