[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 30 05:51:30 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;");
----------------
kadircet wrote:
ugh, apparently for global namespaces, we don't store any decls. hence we were failing. tweaked the code a little.
https://github.com/llvm/llvm-project/pull/106706
More information about the cfe-commits
mailing list