mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
6f691d73b1
This check finds unused namespace alias declarations. There are currently no misc-unused-alias-decls warnings in mozilla-central! https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-alias-decls.html MozReview-Commit-ID: LHziGESvaM5 --HG-- extra : rebase_source : f10fbb6364bc947b5fa2ca8c0b47494519856940 extra : source : 987ca732290093c4bd36690c6ebd3ed2ac0b5444
19 lines
345 B
C++
19 lines
345 B
C++
// https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-alias-decls.html
|
|
|
|
namespace n1 {
|
|
namespace n2 {
|
|
namespace n3 {
|
|
int qux = 42;
|
|
}
|
|
}
|
|
}
|
|
|
|
namespace n1_unused = ::n1; // WARNING
|
|
namespace n12_unused = n1::n2; // WARNING
|
|
namespace n123 = n1::n2::n3; // OK
|
|
|
|
int test()
|
|
{
|
|
return n123::qux;
|
|
}
|