[Lldb-commits] [PATCH] D29256: Do not pass non-POD type variables through variadic function

Joerg Sonnenberger via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 30 12:50:09 PST 2017


joerg added a comment.

  #include <string>
  #include <cstdarg>
  
  void f(std::string msg, ...) {
    va_list ap;
    va_start(ap, msg);
  }

compiled against libc++ gives:
test.cc:6:3: error: cannot pass object of non-POD type 'std::string' (aka 'basic_string<char, char_traits<char>,

  allocator<char> >') through variadic function; call will abort at runtime [-Wnon-pod-varargs]

Joerg


Repository:
  rL LLVM

https://reviews.llvm.org/D29256





More information about the lldb-commits mailing list