https://bugs.llvm.org/show_bug.cgi?id=41498

            Bug ID: 41498
           Summary: Broken delta after invocation of
                    RewriterBuffer::RemoveText() with
                    removeLineIfEmpty==true
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: other.nik...@mail.ru
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@metafoo.co.uk

It seems that real offset is used to update delta instead of original offset
(RewriterBuffer::RemoveText()):

if (posI != end() && *posI == '\n') {
  Buffer.erase(curLineStartOffs, lineSize + 1/* + '\n'*/);
  AddReplaceDelta(curLineStartOffs, -(lineSize + 1/* + '\n'*/));
}

Is it correct that the same offset is used in Buffer.erase() and
AddReplaceDelta()?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to