commit | a6a292b4dc47da42b2fc0662af7fe278c9e9fb33 | [log] [tgz] |
---|---|---|
author | Douglas Gregor <dgregor@apple.com> | Tue Apr 27 16:20:13 2010 +0000 |
committer | Douglas Gregor <dgregor@apple.com> | Tue Apr 27 16:20:13 2010 +0000 |
tree | 448de5eee7bc7b5cb649b751cdba6ecf3ce7dc97 | |
parent | 40e7192a17b7061b1e18e2a44feb05224f531b41 [diff] [blame] |
Don't look into incomplete types when trying to warn about unused variables. Fixes PR6948. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp index 3b5349a..5ef7e70 100644 --- a/test/SemaCXX/warn-unused-variables.cpp +++ b/test/SemaCXX/warn-unused-variables.cpp
@@ -51,3 +51,11 @@ X0<int> i(p); (void)i; } + +namespace PR6948 { + template<typename T> class X; + + void f() { + X<char> str (read_from_file()); // expected-error{{use of undeclared identifier 'read_from_file'}} + } +}