diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-21 22:41:38 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-21 22:41:38 +0000 |
commit | b248d53f2599d8e7b53b144b713e163ca521ffca (patch) | |
tree | 7c55c966414cc8c82a47f1ae2cccf6cd86154953 /lib/Lex/PTHLexer.cpp | |
parent | 872b9acd95f8ecec52db6fe4053bc349ae2dfa43 (diff) |
Fix <rdar://problem/6512717> by correctly reading the right offset in the token data in PTHLexer::getSourceLocation().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index aa59db5ae2..9fa2bb2b0f 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -324,7 +324,7 @@ SourceLocation PTHLexer::getSourceLocation() { // handling a #included file. Just read the necessary data from the token // data buffer to construct the SourceLocation object. // NOTE: This is a virtual function; hence it is defined out-of-line. - const unsigned char *OffsetPtr = CurPtr + (1 + 1 + 3); + const unsigned char *OffsetPtr = CurPtr + (DISK_TOKEN_SIZE - 4); uint32_t Offset = Read32(OffsetPtr); return FileStartLoc.getFileLocWithOffset(Offset); } |