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.cpp24
1 files changed, 15 insertions, 9 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 a5399fa5545..618a9f661f9 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
@@ -44,11 +44,13 @@ public:
extern ostream cout;
ostream &endl(ostream &os);
-enum Color {
- Green,
- Red,
- Yellow
-};
+enum Color1 { Green };
+
+enum Color2 { Red };
+
+enum Color3 { Yellow };
+
+enum Color4 { Blue };
} // namespace n
@@ -126,11 +128,13 @@ void IgnoreFunctionScope() {
using n::H;
}
-using n::Color;
-// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: using decl 'Color' is unused
+using n::Color1;
+// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: using decl 'Color1' is unused
using n::Green;
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: using decl 'Green' is unused
-using n::Red;
+using n::Color2;
+using n::Color3;
+using n::Blue;
// ----- Usages -----
void f(B b);
@@ -144,5 +148,7 @@ void g() {
UsedFunc();
UsedTemplateFunc<int>();
cout << endl;
- int t = Red;
+ Color2 color2;
+ int t1 = Color3::Yellow;
+ int t2 = Blue;
}
OpenPOWER on IntegriCloud