diff options
author | Alexander Kornienko <alexfh@google.com> | 2017-02-09 10:41:27 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2017-02-09 10:41:27 +0000 |
commit | 28239b166f6f89d2d7d2979e10bdb1cfb2236657 (patch) | |
tree | 161d862e32cffaad70da5e105f3899a68bd77472 /clang-tools-extra/test/clang-tidy/misc-unused-using-decls-errors.cpp | |
parent | ebfe99414205873984f59772e39940a3c6620bd3 (diff) | |
download | bcm5719-llvm-28239b166f6f89d2d7d2979e10bdb1cfb2236657.tar.gz bcm5719-llvm-28239b166f6f89d2d7d2979e10bdb1cfb2236657.zip |
[clang-tidy] Fix misc-unused-using-decls false positives in presence of compile errors
llvm-svn: 294578
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-unused-using-decls-errors.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/misc-unused-using-decls-errors.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-using-decls-errors.cpp b/clang-tools-extra/test/clang-tidy/misc-unused-using-decls-errors.cpp new file mode 100644 index 00000000000..5eb380f7739 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/misc-unused-using-decls-errors.cpp @@ -0,0 +1,12 @@ +// RUN: %check_clang_tidy %s misc-unused-using-decls %t + +namespace n { +class C; +} + +using n::C; + +void f() { + for (C *p : unknown()) {} + // CHECK-MESSAGES: :[[@LINE-1]]:15: error: use of undeclared identifier 'unknown' [clang-diagnostic-error] +} |