diff options
author | Charles Li <charles_li@playstation.sony.com> | 2015-11-11 19:34:47 +0000 |
---|---|---|
committer | Charles Li <charles_li@playstation.sony.com> | 2015-11-11 19:34:47 +0000 |
commit | 542f04cc4d53cf3effd96a633205adbb022dc245 (patch) | |
tree | c0b928779c175c4f57339986a512dc4cabf3bf20 /clang/test/SemaCXX/invalid-member-expr.cpp | |
parent | 99f23473a18ccdcdaeb50883da15aa606b8f1ddf (diff) | |
download | bcm5719-llvm-542f04cc4d53cf3effd96a633205adbb022dc245.tar.gz bcm5719-llvm-542f04cc4d53cf3effd96a633205adbb022dc245.zip |
[Lit Test] Updated 26 Lit tests to be C++11 compatible.
Expected diagnostics have been expanded to vary by C++ dialect.
RUN line has also been expanded to: default, C++98/03 and C++11.
llvm-svn: 252785
Diffstat (limited to 'clang/test/SemaCXX/invalid-member-expr.cpp')
-rw-r--r-- | clang/test/SemaCXX/invalid-member-expr.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/invalid-member-expr.cpp b/clang/test/SemaCXX/invalid-member-expr.cpp index 87da79a27c0..172be6b8266 100644 --- a/clang/test/SemaCXX/invalid-member-expr.cpp +++ b/clang/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 { |