diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2013-04-10 00:47:10 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2013-04-10 00:47:10 +0000 |
commit | e1368a107a3ec58b121d369468d8d047c3201395 (patch) | |
tree | 47acbffa7ae72b43c294c69480d19b324ad7134a /clang/test/SemaCXX/warn-unused-variables.cpp | |
parent | b0640dc2b664ba74496ae83740cf66b8fbebaa32 (diff) | |
download | bcm5719-llvm-e1368a107a3ec58b121d369468d8d047c3201395.tar.gz bcm5719-llvm-e1368a107a3ec58b121d369468d8d047c3201395.zip |
Suppress -Wunused-variable for variables declared in headers, which may in
fact be defined and used in another TU.
Reshuffle some test cases because we suppress -Wunused-variable after we've
emitted an error.
This fixes PR15558.
llvm-svn: 179138
Diffstat (limited to 'clang/test/SemaCXX/warn-unused-variables.cpp')
-rw-r--r-- | clang/test/SemaCXX/warn-unused-variables.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/test/SemaCXX/warn-unused-variables.cpp b/clang/test/SemaCXX/warn-unused-variables.cpp index 4e8d51d319e..00597f929b2 100644 --- a/clang/test/SemaCXX/warn-unused-variables.cpp +++ b/clang/test/SemaCXX/warn-unused-variables.cpp @@ -41,15 +41,6 @@ void test_dependent_init(T *p) { (void)i; } -namespace PR6948 { - template<typename T> class X; // expected-note{{template is declared here}} - - void f() { - X<char> str (read_from_file()); // expected-error{{use of undeclared identifier 'read_from_file'}} \ - expected-error{{implicit instantiation of undefined template 'PR6948::X<char>'}} - } -} - void unused_local_static() { static int x = 0; static int y = 0; // expected-warning{{unused variable 'y'}} @@ -135,3 +126,5 @@ namespace ctor_with_cleanups { S2 s((S1())); } } + +#include "Inputs/warn-unused-variables.h" |