summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-21 22:41:38 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-21 22:41:38 +0000
commitae54f2f590f9c7d6b80e026eb89577cb77440c61 (patch)
tree7bab94b40aea32beee139d10a663ec4672167635 /clang/lib/Lex
parent3041abd608c47d733f7958b08f890b8a3e1c92a5 (diff)
downloadbcm5719-llvm-ae54f2f590f9c7d6b80e026eb89577cb77440c61.tar.gz
bcm5719-llvm-ae54f2f590f9c7d6b80e026eb89577cb77440c61.zip
Fix <rdar://problem/6512717> by correctly reading the right offset in the token data in PTHLexer::getSourceLocation().
llvm-svn: 62725
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PTHLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index aa59db5ae2a..9fa2bb2b0fb 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud