Skip to content
Snippets Groups Projects
Commit c0178e9c authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Fix subtle bug in Preprocessor::AdvanceToTokenCharacter(): use '+=' instead of '='.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94830 91177308-0d34-0410-b5e6-96231b3b80d8
parent de4b1d86
No related branches found
No related tags found
No related merge requests found
...@@ -424,7 +424,7 @@ SourceLocation Preprocessor::AdvanceToTokenCharacter(SourceLocation TokStart, ...@@ -424,7 +424,7 @@ SourceLocation Preprocessor::AdvanceToTokenCharacter(SourceLocation TokStart,
// advanced by 3 should return the location of b, not of \\. One compounding // advanced by 3 should return the location of b, not of \\. One compounding
// detail of this is that the escape may be made by a trigraph. // detail of this is that the escape may be made by a trigraph.
if (!Lexer::isObviouslySimpleCharacter(*TokPtr)) if (!Lexer::isObviouslySimpleCharacter(*TokPtr))
PhysOffset = Lexer::SkipEscapedNewLines(TokPtr)-TokPtr; PhysOffset += Lexer::SkipEscapedNewLines(TokPtr)-TokPtr;
return TokStart.getFileLocWithOffset(PhysOffset); return TokStart.getFileLocWithOffset(PhysOffset);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment