diff options
Diffstat (limited to 'test/Sema/varargs.cpp')
-rw-r--r-- | test/Sema/varargs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/varargs.cpp b/test/Sema/varargs.cpp new file mode 100644 index 0000000..48a7b2f --- /dev/null +++ b/test/Sema/varargs.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +class string; +void f(const string& s, ...) { // expected-note {{parameter of type 'const string &' is declared here}} + __builtin_va_list ap; + __builtin_va_start(ap, s); // expected-warning {{'va_start' has undefined behavior with reference types}} +} |