[llvm-bugs] [Bug 25374] New: Source ranges (CXSourceRange) might be invalid

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 2 02:17:38 PST 2015


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

            Bug ID: 25374
           Summary: Source ranges (CXSourceRange) might be invalid
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nikolai.kosjar at theqtcompany.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following two cases produce a diagnostic with an invalid range. The range
start offst is fine, but the range end offset is zero.


Case 1:

  struct Foo {
      someIdentifierLeadingToAnInvalidRange; 
  };


Case 2:

  template <typename T>
  struct QForeachContainer {
      QForeachContainer(const T&) {}
  };

  void f()
  {
      for (QForeachContainer<__typeof__(v.x)> container(v.x); true; )
          return;
  }

Replacing the second v.x with e.g. v only underlines one line. Same if the
"templateness" is removed from this example.

-- 
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/20151102/d1f90f95/attachment.html>


More information about the llvm-bugs mailing list