diff options
author | Haojian Wu <hokein@google.com> | 2016-06-27 14:47:39 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2016-06-27 14:47:39 +0000 |
commit | eb646e0d9be26762b58a45612884626ee71a9825 (patch) | |
tree | fddc1f9847f0ea710ba1965d2237fec7000a691c /clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp | |
parent | c5cfe75a6a7e633aff303a924c9d452a49c4c4d3 (diff) | |
download | bcm5719-llvm-eb646e0d9be26762b58a45612884626ee71a9825.tar.gz bcm5719-llvm-eb646e0d9be26762b58a45612884626ee71a9825.zip |
[clang-tidy] Warning enum unused using declarations.
Reviewers: alexfh, aaron.ballman
Subscribers: aaron.ballman, cfe-commits
Differential Revision: http://reviews.llvm.org/D21747
llvm-svn: 273882
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.cpp | 16 |
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; } |