Update YamlIO documentation for the ScalarTraits class.
authorAlex Lorenz <arphaman@gmail.com>
Fri, 1 May 2015 18:20:23 +0000 (18:20 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 1 May 2015 18:20:23 +0000 (18:20 +0000)
This patch adds the missing context parameter to the
input and output methods in ScalarTraits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236328 91177308-0d34-0410-b5e6-96231b3b80d8

docs/YamlIO.rst

index 3cc683b6b8202861db928dfdf5fbbe93f8a95325..8b45b6bb85b77a9b00ff35c8aef146c965dd6871 100644 (file)
@@ -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();