diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-expr-3.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-expr-3.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-3.cpp b/clang/test/SemaTemplate/instantiate-expr-3.cpp index 7f54c5de3c3..d098f27860c 100644 --- a/clang/test/SemaTemplate/instantiate-expr-3.cpp +++ b/clang/test/SemaTemplate/instantiate-expr-3.cpp @@ -56,3 +56,16 @@ struct Conditional0 { }; template struct Conditional0<int, int, int>; + +// --------------------------------------------------------------------- +// Statement expressions +// --------------------------------------------------------------------- +template<typename T> +struct StatementExpr0 { + void f(T t) { + (void)({ if (t) t = t + 17; }); // expected-error{{invalid}} + } +}; + +template struct StatementExpr0<int>; +template struct StatementExpr0<N1::X>; // expected-note{{instantiation}} |

