summaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unused-variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/warn-unused-variables.cpp')
-rw-r--r--test/SemaCXX/warn-unused-variables.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp
index 582701957e594..4e8d51d319e93 100644
--- a/test/SemaCXX/warn-unused-variables.cpp
+++ b/test/SemaCXX/warn-unused-variables.cpp
@@ -42,10 +42,11 @@ void test_dependent_init(T *p) {
}
namespace PR6948 {
- template<typename T> class X;
+ 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'}}
+ 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>'}}
}
}
@@ -122,3 +123,15 @@ namespace PR11550 {
S3 z = a; // expected-warning {{unused variable 'z'}}
}
}
+
+namespace ctor_with_cleanups {
+ struct S1 {
+ ~S1();
+ };
+ struct S2 {
+ S2(const S1&);
+ };
+ void func() {
+ S2 s((S1()));
+ }
+}