[llvm-bugs] [Bug 45790] Changing behavior in clang::SourceRange.getEnd() between clang versions 8 and 9 and later

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 4 11:03:07 PDT 2020


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Thanks for the report.

The behaviour in clang 8 and before is a bug. SourceRanges throughout clang are
represented as the start locations of the first and last tokens in the range.
This is a common source of surprise for users of SourceRange, but it is the
documented behaviour and is a design choice, not a bug.

We do not provide any API stability guarantees for our C++ API. If you want a
stable API that we are careful to ensure does not change between versions, our
libclang C API is designed for that purpose.

This is unfortunate, but I think there's not really anything we can do to help
you.

-- 
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/20200504/f00f4e65/attachment.html>


More information about the llvm-bugs mailing list