diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:59:51 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:59:51 +0000 |
| commit | 7cb19e8bd99e7a7f926ad363aa2b4dd58fb8e380 (patch) | |
| tree | 8d5195e81c160c2a7c7d93674e053a67d0f31092 /contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp | |
| parent | 1c4688a8498fea1db507842ff8dedaacad8ef77b (diff) | |
| parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 1b35b32656e7..69cd072ea57f 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -160,7 +160,7 @@ public: } bool MoveToLine(unsigned LineNo); - bool AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, + bool AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) { return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok); } @@ -248,7 +248,7 @@ PrintPPOutputPPCallbacks::startNewLineIfNeeded(bool ShouldUpdateCurrentLine) { ++CurLine; return true; } - + return false; } @@ -262,11 +262,11 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc, // Unless we are exiting a #include, make sure to skip ahead to the line the // #include directive was at. SourceManager &SourceMgr = SM; - + PresumedLoc UserLoc = SourceMgr.getPresumedLoc(Loc); if (UserLoc.isInvalid()) return; - + unsigned NewLine = UserLoc.getLine(); if (Reason == PPCallbacks::EnterFile) { @@ -281,7 +281,7 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc, // off by one. We can do better by simply incrementing NewLine here. NewLine += 1; } - + CurLine = NewLine; CurFilename.clear(); @@ -292,7 +292,7 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc, startNewLineIfNeeded(/*ShouldUpdateCurrentLine=*/false); return; } - + if (!Initialized) { WriteLineInfo(CurLine); Initialized = true; |
