[LLVMbugs] [Bug 22183] New: Incomplete cursor traversal: FieldDecl init

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jan 10 06:09:10 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22183

            Bug ID: 22183
           Summary: Incomplete cursor traversal: FieldDecl init
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: contact at jeaye.com
                CC: klimek at google.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Given the code (saved as foo.cpp):

struct foo
{
  int num{ 42 };
  int age{ num };
};

and my example test code: https://gist.github.com/jeaye/edd9b0f036f9bef91985
the resulting output (of each cursor) is currently (trunk as of 01-10-15):

foo, 1:1 -> 5:2, StructDecl, Record, foo
num, 3:3 -> 3:16, FieldDecl, Int, num
age, 4:3 -> 4:17, FieldDecl, Int, age

This means that neither the integer literal (42) nor the member ref (num) is
traversed. After my commit:
https://github.com/jeaye/clang/commit/7fc5ad762dfc9c3da56c5a10c9c5990e4da4a254
the resulting output of the same test program is:

foo, 1:1 -> 5:2, StructDecl, Record, foo
num, 3:3 -> 3:16, FieldDecl, Int, num
, 3:10 -> 3:16, InitListExpr, Int, 
, 3:12 -> 3:14, IntegerLiteral, Int, 
age, 4:3 -> 4:17, FieldDecl, Int, age
, 4:10 -> 4:17, InitListExpr, Int, 
num, 4:12 -> 4:15, UnexposedExpr, Int, num
num, 4:12 -> 4:15, MemberRefExpr, Int, num

-- 
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/20150110/401b6be6/attachment.html>


More information about the llvm-bugs mailing list