diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 59d1ed5b206db2a86b3b5bb851f393c43b568ce2 (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp | |
parent | 91bc56ed825ba56b3cc264aa5c95ab84f86832ab (diff) | |
parent | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (diff) |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp b/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp index 090aeedb7150..41bb581bb0aa 100644 --- a/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp @@ -40,7 +40,7 @@ InclusionDirective::InclusionDirective(PreprocessingRecord &PPRec, PreprocessingRecord::PreprocessingRecord(SourceManager &SM) : SourceMgr(SM), - ExternalSource(0) { + ExternalSource(nullptr) { } /// \brief Returns a pair of [Begin, End) iterators of preprocessed entities @@ -334,7 +334,7 @@ PreprocessedEntity *PreprocessingRecord::getPreprocessedEntity(PPEntityID PPID){ } if (PPID.ID == 0) - return 0; + return nullptr; unsigned Index = PPID.ID - 1; assert(Index < PreprocessedEntities.size() && "Out-of bounds local preprocessed entity"); @@ -361,7 +361,7 @@ MacroDefinition *PreprocessingRecord::findMacroDefinition(const MacroInfo *MI) { llvm::DenseMap<const MacroInfo *, MacroDefinition *>::iterator Pos = MacroDefinitions.find(MI); if (Pos == MacroDefinitions.end()) - return 0; + return nullptr; return Pos->second; } @@ -406,6 +406,10 @@ void PreprocessingRecord::Defined(const Token &MacroNameTok, MacroNameTok.getLocation()); } +void PreprocessingRecord::SourceRangeSkipped(SourceRange Range) { + SkippedRanges.push_back(Range); +} + void PreprocessingRecord::MacroExpands(const Token &Id,const MacroDirective *MD, SourceRange Range, const MacroArgs *Args) { |