aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/temp/temp.param/p5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/temp/temp.param/p5.cpp')
-rw-r--r--test/CXX/temp/temp.param/p5.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/CXX/temp/temp.param/p5.cpp b/test/CXX/temp/temp.param/p5.cpp
index 67efc4e48162..c25868267e49 100644
--- a/test/CXX/temp/temp.param/p5.cpp
+++ b/test/CXX/temp/temp.param/p5.cpp
@@ -1,14 +1,13 @@
// RUN: %clang_cc1 -verify %s -std=c++11
-// expected-no-diagnostics
template<const int I> struct S {
decltype(I) n;
- int &&r = I;
+ int &&r = I; // expected-warning 2{{binding reference member 'r' to a temporary value}} expected-note 2{{declared here}}
};
-S<5> s;
+S<5> s; // expected-note {{instantiation}}
template<typename T, T v> struct U {
decltype(v) n;
- int &&r = v;
+ int &&r = v; // expected-warning {{binding reference member 'r' to a temporary value}} expected-note {{declared here}}
};
-U<const int, 6> u;
+U<const int, 6> u; // expected-note {{instantiation}}