From db4b7710f7b23f8013c204902ae018273f575cea Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 29 Jan 2010 19:38:24 +0000 Subject: Fix subtle bug in Preprocessor::AdvanceToTokenCharacter(): use '+=' instead of '='. llvm-svn: 94830 --- clang/lib/Lex/Preprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Lex/Preprocessor.cpp') diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 5689baaac65..df0e702ab44 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -424,7 +424,7 @@ SourceLocation Preprocessor::AdvanceToTokenCharacter(SourceLocation TokStart, // 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. if (!Lexer::isObviouslySimpleCharacter(*TokPtr)) - PhysOffset = Lexer::SkipEscapedNewLines(TokPtr)-TokPtr; + PhysOffset += Lexer::SkipEscapedNewLines(TokPtr)-TokPtr; return TokStart.getFileLocWithOffset(PhysOffset); } -- cgit v1.2.3