[LLVMbugs] [Bug 21028] New: Deleting whole buffer with Rewriter::RemoveText

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 22 08:26:30 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21028

            Bug ID: 21028
           Summary: Deleting whole buffer with Rewriter::RemoveText
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eliben at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

There's an assertion in Rewriter::RemoveText that seems to preclude removing
the whole text [http://clang.llvm.org/doxygen/Rewriter_8cpp_source.html#l00059]

  assert(RealOffset+Size < Buffer.size() && "Invalid location");

Should this be:

  assert(RealOffset+Size <= Buffer.size() && "Invalid location");

?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140922/aaefe7b5/attachment.html>


More information about the llvm-bugs mailing list