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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • repo-panama
    • repo-panama
    • tools
    • None
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: