[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 30 04:27:00 PDT 2024
================
@@ -534,6 +534,8 @@ TEST(WalkAST, Enums) {
testWalk(R"(namespace ns { enum E { A = 42 }; }
struct S { using ns::E::A; };)",
"int e = S::^A;");
+ testWalk(R"(namespace ns { enum E { $explicit^A = 42 }; })",
+ "namespace z = ns; int e = z::^A;");
----------------
ilya-biryukov wrote:
Could you add a test for the global specifier too?
```::A``` has a slightly different representation as `NestedNameSpecifier`, so we might want to make sure this case is also tested. (I **think** the existing code should work just fine, though).
https://github.com/llvm/llvm-project/pull/106706
More information about the cfe-commits
mailing list