[cfe-dev] SourceManager::translateLineCol works fine on Linux, asserts on Windows
Welson Sun
welson.sun at gmail.com
Tue Mar 17 10:13:47 PDT 2015
Hi,
I am trying to solve a problem seems to be Windows only. Here is the code
that works on Linux, but asserts on Windows:
SourceLocation s = sm.translateLineCol(sm.getMainFileID(), line, 1);
rewriter.InsertTextBefore(s, repl);
The debug version on Windows shows this:
Assertion failed: Index < LoadedSLocEntryTable.size() && "Invalid index",
file llvm_clang\v3.5\src\tools\clang\include\clang/Basic/SourceManager.h,
line 1487
Just wondering if anyone happens to know anything.
I will report back when I get a clue
--
- Welson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150317/54ded3ec/attachment.html>
More information about the cfe-dev
mailing list