Skip to content

Commit

Permalink
Update YamlIO documentation for the ScalarTraits class.
Browse files Browse the repository at this point in the history
This patch adds the missing context parameter to the
input and output methods in ScalarTraits.

Differential Revision: http://reviews.llvm.org/D9173

llvm-svn: 236328
  • Loading branch information
hyp committed May 1, 2015
1 parent d27d3a1 commit 684379a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/docs/YamlIO.rst
Expand Up @@ -456,10 +456,10 @@ looks like:

template <>
struct ScalarTraits<MyCustomType> {
static void output(const T &value, llvm::raw_ostream &out) {
static void output(const T &value, void*, llvm::raw_ostream &out) {
out << value; // do custom formatting here
}
static StringRef input(StringRef scalar, T &value) {
static StringRef input(StringRef scalar, void*, T &value) {
// do custom parsing here. Return the empty string on success,
// or an error message on failure.
return StringRef();
Expand Down

0 comments on commit 684379a

Please sign in to comment.