diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-17 23:10:59 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-17 23:10:59 +0000 |
commit | da176c6d6aee673ade66dbaa5065a035331e30db (patch) | |
tree | 3a74bd0383b6db6b2a5e58b163fd56f77020851a /lib/Lex/PPLexerChange.cpp | |
parent | 9d83a9315e54ebb56a49819b77c8597f3aff1d08 (diff) | |
download | clang-da176c6d6aee673ade66dbaa5065a035331e30db.tar.gz clang-da176c6d6aee673ade66dbaa5065a035331e30db.tar.bz2 clang-da176c6d6aee673ade66dbaa5065a035331e30db.tar.xz |
[C++11] Use 'nullptr'. Lex edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | lib/Lex/PPLexerChange.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index 0b1be09d87..e79fbe192d 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -58,7 +58,7 @@ PreprocessorLexer *Preprocessor::getCurrentFileLexer() const { if (IsFileLexer(ISI)) return ISI.ThePPLexer; } - return 0; + return nullptr; } @@ -117,7 +117,7 @@ void Preprocessor::EnterSourceFileWithLexer(Lexer *TheLexer, CurLexer.reset(TheLexer); CurPPLexer = TheLexer; CurDirLookup = CurDir; - CurSubmodule = 0; + CurSubmodule = nullptr; if (CurLexerKind != CLK_LexAfterModuleImport) CurLexerKind = CLK_Lexer; @@ -142,7 +142,7 @@ void Preprocessor::EnterSourceFileWithPTH(PTHLexer *PL, CurDirLookup = CurDir; CurPTHLexer.reset(PL); CurPPLexer = CurPTHLexer.get(); - CurSubmodule = 0; + CurSubmodule = nullptr; if (CurLexerKind != CLK_LexAfterModuleImport) CurLexerKind = CLK_PTHLexer; @@ -169,7 +169,7 @@ void Preprocessor::EnterMacro(Token &Tok, SourceLocation ILEnd, } PushIncludeMacroStack(); - CurDirLookup = 0; + CurDirLookup = nullptr; CurTokenLexer.reset(TokLexer); if (CurLexerKind != CLK_LexAfterModuleImport) CurLexerKind = CLK_TokenLexer; @@ -202,7 +202,7 @@ void Preprocessor::EnterTokenStream(const Token *Toks, unsigned NumToks, // Save our current state. PushIncludeMacroStack(); - CurDirLookup = 0; + CurDirLookup = nullptr; CurTokenLexer.reset(TokLexer); if (CurLexerKind != CLK_LexAfterModuleImport) CurLexerKind = CLK_TokenLexer; @@ -354,7 +354,7 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { CurPTHLexer.reset(); } - CurPPLexer = 0; + CurPPLexer = nullptr; return true; } @@ -429,7 +429,7 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { } if (!isIncrementalProcessingEnabled()) - CurPPLexer = 0; + CurPPLexer = nullptr; if (TUKind == TU_Complete) { // This is the end of the top-level file. 'WarnUnusedMacroLocs' has @@ -561,11 +561,11 @@ void Preprocessor::HandleMicrosoftCommentPaste(Token &Tok) { // We handle this by scanning for the closest real lexer, switching it to // raw mode and preprocessor mode. This will cause it to return \n as an // explicit EOD token. - PreprocessorLexer *FoundLexer = 0; + PreprocessorLexer *FoundLexer = nullptr; bool LexerWasInPPMode = false; for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) { IncludeStackInfo &ISI = *(IncludeMacroStack.end()-i-1); - if (ISI.ThePPLexer == 0) continue; // Scan for a real lexer. + if (ISI.ThePPLexer == nullptr) continue; // Scan for a real lexer. // Once we find a real lexer, mark it as raw mode (disabling macro // expansions) and preprocessor mode (return EOD). We know that the lexer |