[PATCH] D134303: [AST] Preserve more structure in UsingEnumDecl node.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 10 02:11:13 PDT 2022


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

Modelling this as a `TypeLoc` for code reuse reasons gives me a pause too.
However, I think we still accept this as keeping the clients simpler seems like the right trade-off to me.

Putting information about both typedefs and qualifiers explicitly will make the representation of `UsingEnumDecl` way too complicated for a seemingly simple and niche feature.



================
Comment at: clang-tools-extra/clangd/unittests/SelectionTests.cpp:554
+        )cpp",
+       "UsingEnumDecl"},
   };
----------------
Could we also test that checks what happens in presence of typedefs?
```
namespace enums {
  enum class X { a, b};
  using Y = X;
}

namespace uses {
    using enum enums::Y;
}
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134303



More information about the cfe-commits mailing list