aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-25 18:22:16 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-25 18:22:16 +0000
commit0e5ecbda6992001f6506dfe42a60695d06750863 (patch)
treed7b665527be4155703be690afd8f6e7dc44ea00d /clang/lib/Basic/SourceManager.cpp
parent269884ead5e5647c2f0fcb2ff541cb100a3ae9be (diff)
downloadllvm-0e5ecbda6992001f6506dfe42a60695d06750863.zip
llvm-0e5ecbda6992001f6506dfe42a60695d06750863.tar.gz
llvm-0e5ecbda6992001f6506dfe42a60695d06750863.tar.bz2
Fix column checking for SourceManager::getLocation().
llvm-svn: 74194
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 69b6be7..6640c61 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -943,7 +943,7 @@ SourceLocation SourceManager::getLocation(const FileEntry *SourceFile,
return SourceLocation();
unsigned FilePos = Content->SourceLineCache[Line - 1];
- const char *Buf = Content->getBuffer()->getBufferStart();
+ const char *Buf = Content->getBuffer()->getBufferStart() + FilePos;
unsigned BufLength = Content->getBuffer()->getBufferEnd() - Buf;
unsigned i = 0;