[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

Andrey Ali Khan Bolshakov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 26 19:23:45 PDT 2023


bolshakov-a added a comment.

> Additional levels of nesting append 3's: <unnamed-tag>@3, <unnamed-tag>@33, etc.

Yes, but if you have such a code:

  struct A {
    union {
      union {
        struct B {};
        using T = B;
      };
    };
  };
  void f(A::T);

you have `?f@@YAXUB@<unnamed-tag>@2A@@@Z` for `f`, and for such a code:

  struct A {
    union {
      union {
        struct B { struct C {}; };
        using T = B::C;
      };
    };
  };
  void f(A::T);

you'd have `?f@@YAXUC at B@<unnamed-tag>@3A@@@Z`. What are `2` and `3` in general? I don't know whether the aforementioned code is acceptable according to the standard, honestly. But if I put a code into the common place, I should figure out the common algorithm.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146386/new/

https://reviews.llvm.org/D146386



More information about the cfe-commits mailing list