summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-29 19:38:24 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-29 19:38:24 +0000
commitdb4b7710f7b23f8013c204902ae018273f575cea (patch)
tree8010cadca1b87ce30b2246422c0b5140461010c2 /clang/lib/Lex/Preprocessor.cpp
parent7c42b9d51e7a05c6b2019f0481eb041a8dd1c1a1 (diff)
downloadbcm5719-llvm-db4b7710f7b23f8013c204902ae018273f575cea.tar.gz
bcm5719-llvm-db4b7710f7b23f8013c204902ae018273f575cea.zip
Fix subtle bug in Preprocessor::AdvanceToTokenCharacter(): use '+=' instead of '='.
llvm-svn: 94830
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}
OpenPOWER on IntegriCloud