[llvm-bugs] [Bug 51444] New: inner field is missed for struct decl on ast-dump

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 11 12:48:15 PDT 2021


            Bug ID: 51444
           Summary: inner field is missed for struct decl on ast-dump
           Product: clang
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: temtaime at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Consider :

struct S { int *a; };
typedef int *A;

-ast-dump=json gives :

FieldDecl for S with
          "name": "a",
          "type": {
            "qualType": "int *"

But for typedef there are :

 "name": "A",
      "type": {
        "qualType": "int *"
      "inner": [
          "id": "0x168e942d310",
          "kind": "PointerType",
          "type": {
            "qualType": "int *"
          "inner": [
              "id": "0x168e942c600",
              "kind": "BuiltinType",
              "type": {
                "qualType": "int"

Can we add inner to FieldDecl too ? Also i wonder maybe add inner to all "type"
clauses ?
What are the plans for ast dump feature? I think it is very great feature, me,
for example, i am writing a tool that generates bindings for another language
from C headers.
Using libclang directly places some difficulties.

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/20210811/65811fda/attachment.html>

More information about the llvm-bugs mailing list