diff options
Diffstat (limited to 'test/CXX/expr/expr.post/expr.call/p7-0x.cpp')
-rw-r--r-- | test/CXX/expr/expr.post/expr.call/p7-0x.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/CXX/expr/expr.post/expr.call/p7-0x.cpp b/test/CXX/expr/expr.post/expr.call/p7-0x.cpp index bb4726d..d51ba09 100644 --- a/test/CXX/expr/expr.post/expr.call/p7-0x.cpp +++ b/test/CXX/expr/expr.post/expr.call/p7-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s struct X1 { X1(); @@ -15,3 +15,16 @@ void f(X1 x1, X2 x2) { vararg(x1); // okay vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}} } + + +namespace PR11131 { + struct S; + + S &getS(); + + void f(...); + + void g() { + (void)sizeof(f(getS())); + } +} |