[llvm-bugs] [Bug 33745] New: Inconsistent CXCursor for EnumType::EnumValue
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 11 08:39:46 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33745
Bug ID: 33745
Summary: Inconsistent CXCursor for EnumType::EnumValue
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: libclang
Assignee: unassignedclangbugs at nondot.org
Reporter: nikolai.kosjar at qt.io
CC: klimek at google.com, llvm-bugs at lists.llvm.org
$ 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.
--
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/20170711/85db388a/attachment.html>
More information about the llvm-bugs
mailing list