<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Inconsistent CXCursor for EnumType::EnumValue"
   href="https://bugs.llvm.org/show_bug.cgi?id=33745">33745</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Inconsistent CXCursor for EnumType::EnumValue
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>libclang
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nikolai.kosjar@qt.io
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat -n $FILE
     1  enum EnumType  { EnumValue };
     2  EnumType v = EnumType::EnumValue;
     3  
     4  struct X {
     5  enum EnumType { EnumValue };
     6  EnumType v = EnumType::EnumValue;
     7  };

Check the cursor for "EnumValue" in line two:
$ ./c-index-test -evaluate-cursor-at=$FILE:2:24 -std=c++11 $FILE
2:24 DeclRefExpr=EnumValue:1:18 RefName=[2:14 - 2:24] RefName=[2:24 - 2:33]
Extent=[2:14 - 2:33] Spelling=EnumValue ([2:24 - 2:33])Kind: Int , Value: 0

Now check the cursor for "EnumValue" within the class declaration in line 6:
$ ./c-index-test -evaluate-cursor-at=$FILE:6:24 -std=c++11 $FILE
6:10 FieldDecl=v:6:10 (Definition) Extent=[6:1 - 6:33] Spelling=v ([6:10 -
6:11])Kind: Int , Value: 0

Ops, it's different. As such it's not possible to get the reference cursor to
get more information.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>