HomePhabricator

Do not pass non-POD type variables through variadic function

Description

Do not pass non-POD type variables through variadic function

Summary:
Cannot pass object of non-POD type 'const CMIUtilString' through variadic function.

This behavior is undefined according to C++11 5.2.2/7:

Passing a potentially-evaluated argument of class type having a non-trivial copy constructor, a non-trivial move contructor, or a non-trivial destructor, with no corresponding parameter, is conditionally-supported with implementation-defined semantics.

Replace SetErrorDescriptionn(errMsg); with SetErrorDescription(errMsg);

Original patch by Tobias Nygren (NetBSD).

Sponsored by <The NetBSD Foundation>

Reviewers: clayborg, labath, emaste, joerg, ki.stfu

Reviewed By: labath, ki.stfu

Subscribers: tnn, ki.stfu, #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D29256

Details

Committed
kamilFeb 1 2017, 8:02 AM
Reviewer
labath
Differential Revision
D29256: Do not pass non-POD type variables through variadic function
Branches
Unknown
Tags
Unknown