diff options
Diffstat (limited to 'test/CXX/drs/dr10xx.cpp')
-rw-r--r-- | test/CXX/drs/dr10xx.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/CXX/drs/dr10xx.cpp b/test/CXX/drs/dr10xx.cpp index 64c71b2..a1d7ef6 100644 --- a/test/CXX/drs/dr10xx.cpp +++ b/test/CXX/drs/dr10xx.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // expected-no-diagnostics @@ -13,6 +14,24 @@ namespace std { }; } +namespace dr1048 { // dr1048: 3.6 + struct A {}; + const A f(); + A g(); + typedef const A CA; +#if __cplusplus >= 201103L + // ok: we deduce non-const A in each case. + A &&a = [] (int n) { + while (1) switch (n) { + case 0: return f(); + case 1: return g(); + case 2: return A(); + case 3: return CA(); + } + } (0); +#endif +} + namespace dr1070 { // dr1070: 3.5 #if __cplusplus >= 201103L struct A { |