mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-22 04:55:50 -04:00

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf 18.7p3 explicitly calls this (and some other things) out as undefined. Also move 2 other existing warnings behind the new -Wvarargs flag. llvm-svn: 182694
8 lines
298 B
C++
8 lines
298 B
C++
// 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}}
|
|
}
|