Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210650

Cursor.isAnonymousStruct is about embedded anon struct/union and not just name being empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: repo-panama
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      jdk.jextract and jdk.internal.clang modules use 'isAnonymous' everywhere as if anonymous is just about name being empty. But clang's use of "anonymous cursor" is about embedded anonymous struct or union.

      For example:

      struct X {
          struct { int i; int j; }; // <-- anonymous struct per clang
          int k;
      };

      We should avoid using 'anonymous' is the other sense (name being empty) - instead we should just compare name/spelling of Tree/Cursor/Type being empty string for those cases.

        Attachments

          Activity

            People

            Assignee:
            sundar Sundararajan Athijegannathan
            Reporter:
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: