summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp b/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp
index 4d6b33252f1..a5399fa5545 100644
--- a/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp
+++ b/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp
@@ -43,7 +43,14 @@ public:
};
extern ostream cout;
ostream &endl(ostream &os);
-}
+
+enum Color {
+ Green,
+ Red,
+ Yellow
+};
+
+} // namespace n
// ----- Using declarations -----
// eol-comments aren't removed (yet)
@@ -119,6 +126,12 @@ void IgnoreFunctionScope() {
using n::H;
}
+using n::Color;
+// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: using decl 'Color' is unused
+using n::Green;
+// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: using decl 'Green' is unused
+using n::Red;
+
// ----- Usages -----
void f(B b);
void g() {
@@ -131,4 +144,5 @@ void g() {
UsedFunc();
UsedTemplateFunc<int>();
cout << endl;
+ int t = Red;
}
OpenPOWER on IntegriCloud