summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/invalid-member-expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/invalid-member-expr.cpp')
-rw-r--r--test/SemaCXX/invalid-member-expr.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/SemaCXX/invalid-member-expr.cpp b/test/SemaCXX/invalid-member-expr.cpp
index 87da79a..172be6b 100644
--- a/test/SemaCXX/invalid-member-expr.cpp
+++ b/test/SemaCXX/invalid-member-expr.cpp
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
class X {};
@@ -23,9 +25,17 @@ void test2() {
// PR6327
namespace test3 {
template <class A, class B> struct pair {};
+ template <class _E> class initializer_list {};
+ template <typename _Tp> pair<_Tp, _Tp> minmax(initializer_list<_Tp> __l) {};
void test0() {
- pair<int, int> z = minmax({}); // expected-error {{expected expression}}
+ pair<int, int> z = minmax({});
+#if __cplusplus <= 199711L // C++03 or earlier modes
+ // expected-error@-2 {{expected expression}}
+#else
+ // expected-error@-4 {{no matching function for call to 'minmax'}}
+ // expected-note@-8 {{candidate template ignored: couldn't infer template argument '_Tp'}}
+#endif
}
struct string {
OpenPOWER on IntegriCloud