Issue 129641
Summary Rewriter::InsertTextAfterToken may have overflow issue
Labels new issue
Assignees
Reporter shafik
    If we look at `Rewriter::InsertTextAfterToken`, we see that here: 

https://github.com/llvm/llvm-project/blob/3aab3fe56fbd60b49a47ae0f90d96de2cd09fc18/clang/lib/Rewrite/Rewriter.cpp#L204-L205

`getRangeSize` may return a `-1` which could lead to an overflow and would likely not be a good value when passed to `InsertText`. 

This was flagged by static analysis. It looks like a valid issue but I am not sure. It seems like the function is not used anymore so maybe the correct fix is to remove it.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to