Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

15 lines
605 B
C++

// RUN: %check_clang_tidy %s misc-unused-using-decls %t
// RUN: %check_clang_tidy %s misc-unused-using-decls %t -- -format-style=none --
// RUN: %check_clang_tidy %s misc-unused-using-decls %t -- -format-style=llvm --
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.