varargs.cpp 298 B

1234567
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. class string;
  3. void f(const string& s, ...) { // expected-note {{parameter of type 'const string &' is declared here}}
  4. __builtin_va_list ap;
  5. __builtin_va_start(ap, s); // expected-warning {{'va_start' has undefined behavior with reference types}}
  6. }