summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/clean-up-code.cpp
blob: 96b3a45178bbd630450ccae0fa1e2f95e0d6bab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %check_clang_tidy %s misc-unused-using-decls %t
namespace a { class A {}; }
namespace b {
using a::A;
}
namespace c {}
// CHECK-MESSAGES: :[[@LINE-3]]:10: warning: using decl 'A' is unused [misc-unused-using-decls]
// CHECK-FIXES: {{^namespace a { class A {}; }$}}
// CHECK-FIXES-NOT: namespace
// CHECK-FIXES: {{^namespace c {}$}}
// FIXME: cleanupAroundReplacements leaves whitespace. Otherwise we could just
// check the next line.
OpenPOWER on IntegriCloud